org.tolven.app
Interface CreatorLocal

All Known Implementing Classes:
CreatorBean

public interface CreatorLocal


Method Summary
 MenuData createOrUpdateMenuData(TrimEx trim, DocBase doc, Account account)
          This method is called when a message arrives in the evaluator queue.
 MenuData createTRIMEvent(MenuData mdPrior, AccountUser activeAccountUser, java.lang.String transitionName, java.util.Date now)
           
 MenuData createTRIMPlaceholder(AccountUser accountUser, java.lang.String trimPath, java.lang.String context, java.util.Date now, java.lang.String alias)
          Instantiate a new document and new Menudata item pointing to it.
 void marshalToDocument(Trim trim, DocXML docXML)
          Marshal the specified Trim object graph back to the specified document.
 void sendCopyTo(AccountUser accountUser, long documentId, long otherAccountId)
          Send a copy of an existing document to another account
 void submit(long accountId, long userId, ContinuityOfCareRecord ccr)
          Submit from a finished CCR graph but no document
 void submit(MenuData md, AccountUser activeAccountUser)
          Submit the document associated with this menuData item
 

Method Detail

createTRIMPlaceholder

MenuData createTRIMPlaceholder(AccountUser accountUser,
                               java.lang.String trimPath,
                               java.lang.String context,
                               java.util.Date now,
                               java.lang.String alias)
                               throws javax.xml.bind.JAXBException,
                                      TRIMException
Instantiate a new document and new Menudata item pointing to it.

Parameters:
accountId -
ms -
parent -
Returns:
MenuData
Throws:
javax.xml.bind.JAXBException
TRIMException

createTRIMEvent

MenuData createTRIMEvent(MenuData mdPrior,
                         AccountUser activeAccountUser,
                         java.lang.String transitionName,
                         java.util.Date now)
                         throws javax.xml.bind.JAXBException,
                                TRIMException
Throws:
javax.xml.bind.JAXBException
TRIMException

submit

void submit(MenuData md,
            AccountUser activeAccountUser)
            throws java.lang.Exception
Submit the document associated with this menuData item

Throws:
java.lang.Exception

submit

void submit(long accountId,
            long userId,
            ContinuityOfCareRecord ccr)
            throws java.lang.Exception
Submit from a finished CCR graph but no document

Parameters:
accountId -
userId -
ccr -
Throws:
java.lang.Exception

sendCopyTo

void sendCopyTo(AccountUser accountUser,
                long documentId,
                long otherAccountId)
                throws java.lang.Exception
Send a copy of an existing document to another account

Throws:
java.lang.Exception

createOrUpdateMenuData

MenuData createOrUpdateMenuData(TrimEx trim,
                                DocBase doc,
                                Account account)
This method is called when a message arrives in the evaluator queue. Using tolvenIds as a guide, this method performs standard processing of the placeholder and/or event.
  1. If the trim does not reference a placeholder, then create or find a placeholder for the trim now.
  2. finding a placeholder at this point involves using the ID attribute of the act and placeholderID entity.
  3. If the trim does not reference an Event, then create an event that references the placeholder.
  4. The placeholder and event should now contain the Id of the document
  5. The placeholder document id must be updated with that of the event.
  6. Change the status of both the placeholder and event to active.
  7. If the trim references a previous event, then change the status of that (old) event to obsolete.
  8. If a placeholder is created, then it is also populated from the trim document, according to the metaData for that placeholder.
  9. In any case, now is the time to apply changes from the event (document) to the placeholder.

Parameters:
trim - The source trim, which must be held immutable at this point
account - The account we are processing
Returns:
The Event (not placeholder)

marshalToDocument

void marshalToDocument(Trim trim,
                       DocXML docXML)
                       throws javax.xml.bind.JAXBException,
                              TRIMException
Marshal the specified Trim object graph back to the specified document.

Parameters:
trim -
docXML -
Throws:
javax.xml.bind.JAXBException
TRIMException