wt.lifecycle
Class StandardLifeCycleService

java.lang.Object
  extended bywt.services.StandardManager
      extended bywt.lifecycle.StandardLifeCycleService
All Implemented Interfaces:
LifeCycleService, LifeCycleServiceSvr, Manager, NetFactor, Serializable

public class StandardLifeCycleService
extends StandardManager
implements LifeCycleService, LifeCycleServiceSvr, Serializable

See Also:
Serialized Form

Nested Class Summary
 class StandardLifeCycleService.MultiObjectKey
           
 
Field Summary
(package private) static String ACTION_NAME
           
private  AdHocAclSpecCache adHocAclSpecCache
           
protected static String AUGMENT
          Hhistory augment event argument for a LifeCycleManaged object.
protected static String BYPASS_DEFAULT_TRANSITIONS
          Flag used in the MethodContext to communicate whether default transitions are bypassed.
private static String CLASSNAME
           
private  CriterionCache criterionCache
           
private static String DEFAULT_LC_TEAM
           
private static String DEFAULT_LIFECYCLE
           
protected static String DEMOTE
          History onDemote event argument for a LifeCycleManaged object.
protected static String DENY
          History onDeny event argument for a LifeCycleManaged object.
static String DISABLE_PROHIBIT_CHANGE_AT_GATE_VETO
          Set a boolean true with this key in the method context to disable PRE_CHANGE vetoing on LifeCycleManaged objects.
protected static String DROP
          History onDrop event argument for a LifeCycleManaged object.
private static boolean ENABLE_HISTORY
           
protected static String ENTER_PHASE
          History event argument for onCreate of a LifeCycleManaged object

Supported API: false
private  InitialPhaseCache initialPhaseCache
           
private  Cache lifeCycleManagedPhaseMap
           
private  LifeCycleTemplateCache lifeCycleTemplateCache
           
private static LifeCycleTemplateNameCache lifeCycleTemplateNameCache
           
(package private) static String PENDING
           
private  PhaseTemplateCache phaseTemplateCache
           
(package private) static String PRIMARY_BUSINESS_OBJECT
           
protected static String PROMOTE
          History event argument for onPromote of a LifeCycleManaged object.
(package private) static String PROMOTE_TASK
           
protected static String REASSIGN
          History onReassign event argument for a LifeCycleManaged object.
private static String RESOURCE
           
private static boolean RETAIN_CRITERIA
           
private static boolean RETAIN_SIGNATURES
           
protected static String RETEAM
          History onReteam event argument for a LifeCycleManaged object.
(package private) static String REVIEW_TASK
           
private static String SERVICE_NAME
           
protected static String SET_STATE
          Hhistory on SetStatet event argument for a LifeCycleManaged object.
private static String START_WF_PROCESS_IMMEDIATE
           
protected static String SUBMIT
          History event argument for onSubmit for a LifeCycleManaged object.
(package private) static String SUBMIT_TASK
           
private static String SYSTEM_DOMAIN
           
(package private) static String TOP_PRIORITY
           
private static Object UNDO_CHECK_OUT_KEY
           
(package private) static String URL_CLASSNAME
           
(package private) static String URL_METHOD_NAME
           
private static String URLCLASSNAME
           
private static String URLMETHODNAME
           
private static boolean VERBOSE
           
private static boolean VERBOSE_BASIC
           
protected static String VOTE
          History event argument for a onVote of a LifeCycleManaged object.
(package private) static String WORK_NOTIFICATION_TEMPLATES
           
private static long WORKFLOW_PRIORITY
           
 
Fields inherited from class wt.services.StandardManager
 
Fields inherited from interface wt.services.Manager
MANAGER_SERVICE, STARTUP_AUTOMATIC, STARTUP_MANUAL, STATUS_EMERGENCY_SHUTDOWN, STATUS_EMERGENCY_SHUTTING_DOWN, STATUS_SHUTDOWN, STATUS_SHUTDOWN_ERRORS, STATUS_SHUTDOWN_FAILURE, STATUS_SHUTTING_DOWN, STATUS_STARTED, STATUS_STARTED_ERRORS, STATUS_STARTING_UP, STATUS_STARTUP_FAILURE
 
Constructor Summary
StandardLifeCycleService()
           
 
Method Summary
private  long[] addIteratedPhaseIdsToMap(WTKeyedMap map, Map iterated, long[] phaseOids, int count)
           
private  long[] addNonIteratedPhaseIdsToMap(WTKeyedMap map, Map nonIterated, long[] phaseOids, int count)
           
private  void addToMapCollection(Map map, Persistable object, WTCollection collection)
           
 State[] allStates()
          Deprecated. in R4.0. Use the appropriate call on the EnumeratedType object to get these values.
private  void applyLifeCyclePermissions(WTCollection collection, boolean persist)
           
 Persistable assignToLifeCycle(Persistable object)
          Associate a life cycle managed object with a life cycle.
private  Persistable assignToLifeCycle(Persistable object, WTContainerRef context_ref)
           
private  void assignToLifeCycle(WTList collection, WTContainerRef context, boolean persist)
           
 Phase augmentRoles(LifeCycleManaged object)
          Given a LifeCycleManaged object, the current State of the Object and the RoleHolder (the phase object), change the role participants to reflect those in the RoleHolder2

Supported API: true
 void augmentRoles(Team team)
          Given a team, rebuild all the ad hoc acls for objects associated with the team.
private  void buildAdHocAcl(LifeCycleManaged object, Phase aPhase)
           
private  void buildAdHocAcl(LifeCycleManaged object, PhaseTemplate pt)
           
private  void buildAdHocAcl(List objects, List membershipList, Map phaseTemplates)
          Adhoc ACL methods *
private  Vector buildCriteriaVector(QueryResult results)
           
private  LifeCycleHistory buildHistory(LifeCycleManaged object, Phase aPhase, String historyEvent)
          History support *
 boolean canCreateLifeCycleTemplate(WTUser user)
          Determines if a given user is entitled to create a Life Cycle Templates.
 boolean canCreateLifeCycleTemplate(WTUser user, WTContainerRef context)
          Determines if a given user is entitled to create a Life Cycle Templates in the given container.
private  void cleanupCriteria(Phase aPhase, LifeCycleHistory aHistory)
           
private  void cleanupCriteria(WTList objects, WTKeyedMap phaseMap, WTList histories)
           
private  void cleanupCurrentPhase(LifeCycleManaged object, Phase current, LifeCycleHistory aHistory)
          Cleanup methods
private  void cleanupCurrentPhases(WTList objects, WTList aHistoryList)
           
private  void cleanupObjectHistory(Map map)
           
private  void cleanupSignatures(LifeCycleManaged object, Phase currentPhase, LifeCycleHistory aHistory)
           
private  void cleanupSignatures(WTList objects, WTKeyedMap phaseMap, WTList histories)
           
private  void cloneCriteria(Phase aPhase, PhaseTemplate aPhaseTemplate)
          Runtime Object Management *
private  void cloneCriteria(WTCollection collection, WTKeyedMap phaseMap, WTKeyedMap phaseTemplateMap)
           
private  String constructProcessName(WfProcessDefinition aPT, LifeCycleManaged obj)
           
protected  void copyObjectsRelatedToLifeCycleTemplate(LifeCycleTemplate original, LifeCycleTemplate working)
          On PostCheckout event, copy all the objects related the Life Cycle Template from the original to the working
protected  PhaseTemplate copyPhaseTemplateAndRelatedObjects(PhaseTemplate originalPt, PhaseTemplate prevWorkingPt, LifeCycleTemplate workingLct)
          For each PhaseTemplate found, copy that object and all related objects.
 LifeCycleTemplate copyTemplate(LifeCycleTemplate lifeCycleTemplate, String copyName, String folderLocation)
          Produces a copy of the LifeCycleTemplate object and persists it with the name passed as argument.
 LifeCycleTemplate copyTemplate(LifeCycleTemplate lifeCycleTemplate, String copyName, String folderLocation, WTContainerRef context)
          Produces a copy of the LifeCycleTemplate object and persists it with the name passed as argument.
protected  void copyTransitions(LifeCycleTemplate src, LifeCycleTemplate dest)
          Copies all PhaseSuccession objects between the phase templates of the source and destination life cycle templates.
 void createDefaultTransitions(WTCollection lifeCycleTemplates)
          Creates all default transitions for all life cycle templates in the specirfied collection, according to the directives specified in the wt.properties system configuration.
 LifeCycleSignature createLifeCycleSignature(Persistable object, WTPrincipal signer, String comments, Role role, boolean vote)
          Answer an initialized but unpersisted LifeCycleSignature instance

Supported API: true
private static void createLifeCycleTemplateNameCache()
           
private  Phase createPhase(LifeCycleManaged object, PhaseTemplate aPhaseTemplate)
           
private  Map createPhaseCriteriaMap(Object[] phases)
           
private  Phase createPhaseInstance(LifeCycleManaged object, PhaseTemplate aPhaseTemplate)
           
private  WTKeyedMap createPhases(WTCollection collection, WTKeyedMap phaseTemplates)
           
private  LifeCycleSignature createRobotLifeCycleSignature(WTObject object, Role role)
           
private  List createSubcollectionsByKey(WTCollection collection)
           
private static void deleteCriterion(long[] lchOids)
           
private  void deleteCurrentPhase(LifeCycleManaged object, Phase current)
           
private  void deleteCurrentPhases(WTList objects, WTKeyedMap phaseMap)
           
private static void deleteSignatures(long[] lcmOids)
           
 LifeCycleManaged demote(LifeCycleManaged object, LifeCycleSignature signature)
          Move the object to the previous phase.
 void demote(WTObject object)
          Demote the object to the previous phase.
 LifeCycleManaged deny(LifeCycleManaged object, LifeCycleSignature signature)
          Remove the object from the gate and return the object to the submitter

Supported API: true
 void deny(WTObject object)
          Return the object to the submitter, removing it from the gate.
protected  void dispatchEvent(String eventType, ObjectReference objectRef)
          Dispatches a LifeCycleServiceEvent that includes the event type and target.
protected  void dispatchVetoableEvent(String eventType, Persistable object)
          Dispatches a LifeCycleServiceEvent that includes the event type and target..
protected  void dispatchVetoableMultiObjectEvent(String eventType, WTCollection objects)
          Dispatches a LifeCycleServiceEventthat includes the event type and targets (i.e., LifeCyclemanaged objects).
 LifeCycleManaged doDemote(LifeCycleManaged object, LifeCycleSignature signature)
          Transition the object to its previous phase, updating its state, initiating the appropriate workflow and recording history.
 LifeCycleManaged doDeny(LifeCycleManaged object, LifeCycleSignature signature)
          Transition the object from the gate back to the phase, initating the appropriate workflow and recording history.
 LifeCycleManaged doDrop(LifeCycleManaged object, LifeCycleSignature signature)
          Remove the object from the life cycle and set its state to DROPPED.
 LifeCycleManaged doPromote(LifeCycleManaged object, LifeCycleSignature signature)
          Transition the object to its next phase, updating its state, initiating the appropriate workflow and recording history.
 LifeCycleManaged doReassign(LifeCycleManaged object, LifeCycleTemplateReference lctRef)
          Re-assign the object to a new life cycle.
private  LifeCycleManaged doReassign(LifeCycleManaged object, LifeCycleTemplateReference lctRef, WTContainerRef context_ref)
           
private  void doReassign(WTList list, LifeCycleTemplateReference lctRef, WTContainerRef context_ref, State state, boolean preserveState)
           
 LifeCycleManaged doSetState(LifeCycleManaged object, PhaseTemplate aPhaseTemplate)
          Sets the state of the object.
private  LifeCycleManaged doSetState(LifeCycleManaged object, PhaseTemplate aPhaseTemplate, Timestamp timestamp)
           
private  void doSetState(WTList list, WTKeyedMap phaseTemplateMap)
           
private  LifeCycleManaged doStateTransition(LifeCycleManaged object, PhaseTemplate nextPhaseTemplate, String historyEvent, WTContainerRef context_ref, Timestamp timestamp)
           
private  void doStateTransition(WTList collection, String historyEvent, WTKeyedMap phaseTemplateMap, WTContainerRef context, boolean persist)
           
 LifeCycleManaged doSubmit(LifeCycleManaged object)
          Submit the object for review.
 LifeCycleManaged drop(LifeCycleManaged object, LifeCycleSignature signature)
          Transition the object to an end state

Supported API: true
 void drop(WTObject object)
          Transition the object to an end state.
 void exportTemplates(Vector lifeCycleVector, String fileName, boolean appendFlag)
          Populate a file with the xml equivalent of the LifeCycleTemplate objects.
 QueryResult findAllTemplateMasters(WTContainerRef context)
          Answer a vector of all life cycle template masters for the WTContainerRef passed.
 Vector findAllTemplates()
          Answer a vector of all life cycle templates.
 Vector findAllTemplates(WTContainerRef context)
          Answer a vector of all life cycle templates for the WTContainerRef passed.
 Vector findAllTemplates(WTContainerRef context, boolean routingOnly)
          Answer a vector of all life cycle templates for the WTContainerRef passed.
 Vector findAssociatedProcesses(LifeCycleManaged object, WfState state)
          Given a Life Cycle Managed object, return the Workflow processes associated with the current phase.
 Vector findCandidateMasterReferences(Class targetClass)
          Answer a vector of life cycle template references valid for the class

Supported API: true
 Vector findCandidateMasterReferences(Class targetClass, WTContainerRef context)
          Answer a vector of life cycle template references valid for the target class in the container.
 Vector findCandidateMasterReferences(LifeCycleManaged object)
          Answer a vector of life cycle template references valid for the life cycle managed object

Supported API: true
 Vector findCandidateTemplates(Class targetClass)
          Answer a vector of enabled life cycle template references valid for the class findCandidateMasterReference is the preferable to use instead of this method.
 Vector findCandidateTemplates(LifeCycleManaged object)
          Answer a vector of enabled life cycle template references valid for the life cycle managed object findCandidateMasterReference is the preferable to use instead of this method.
private  LifeCycleTemplateMaster findDefaultMaster()
           
private  LifeCycleTemplate findDefaultTemplate()
           
private  LifeCycleTemplate findDefaultTemplate(LifeCycleManaged object)
           
 Vector findExportImportFileNames()
          Retrieve a vector of file names from the Import/Export directory

Supported API: true
private  int findNumberOfTargets(Map map)
           
private  void findPhasesAndAddToMap(long[] phaseOids, Map map)
           
 Enumeration findPredecessorStates(LifeCycleManaged object)
          Given a particular LifeCycleManged object, answer an enumeration of all the predecessor States

Supported API: true
private  WTCollection findRevisedObjects(WTCollection collection)
          In a collection, find a list of all objects that are the result of a Revise, New View Version, New One-Off Version action.
 Vector findRoutingTemplates(WTContainerRef context)
          Return an Enumeration of all lifecycle templates for the WTContainerRef passed.
 WTKeyedMap findSetStateCandidates(WTCollection lcms)
          Determines the allowable states the session principal can set the objects in the collection to.
 Vector findStates(LifeCycleTemplate aLifeCycleTemplate)
          Given a particular LifeCycleTemplate, answer a Vector of all the Life Cycle States used in that LifeCycle

Supported API: true
 Enumeration findSuccessorStates(LifeCycleManaged object)
          Given a particular LifeCycleTemplate, answer an enumeration of all the Successor States

Supported API: true
private  Enumeration findTeamsObjects(Team team)
          This method finds all the Life Cycle Managed objects associated with the team so that the acls can get rebuilt for shared objects.
private  Enumeration findTemplateMasterByClass(Class targetClass, WTContainerRef context)
          Answer an enumeration of templates which accepts the specified class in this container.
private  LifeCycleTemplateMaster findTemplateMasterByName(String name, WTContainerRef context)
          Answer an enumeration of templates which accepts the specified class in this container.
 Set findTransitions(WTSet promotables)
          For a given Set of promotables return the intersection of thier common Transitions.
 Set findTransitions(WTSet promotables, Transition transition)
          For a given Set of Promotables, return the intersection of common Transitions.
private  AdHocAclSpec getAdHocAclSpec(PhaseTemplate pt)
          Caching methods *
protected  AdHocAclSpecCache getAdHocAclSpecCache()
           
 Vector getAllReviewerList(LifeCycleManaged object)
          Answer a vector of LifeCycleSignatures

Supported API: true
 Vector getAllSignatures(LifeCycleManaged object)
          Answer a vector of signatures for all roles for the object for the current phase and all preceeding phases.
private  State getAssignedState(PhaseTemplate aPhaseTemplate)
           
 String getConceptualClassname()
          Deprecated.  
 Vector getCriteria(LifeCycleManaged object)
          Answer a vector of Criterion objects for the current phase

Supported API: true
 ArrayList getCriterion(LifeCycleHistory history)
          returns an ArrayList of Criterion for a LifeCycleHistory

Supported API: false
protected  CriterionCache getCriterionCache()
           
 Phase getCurrentPhase(LifeCycleManaged object)
          Deprecated. at R4.0 - This method should not be used outside of the Life Cycle service. This phase object should be considered private to LifeCycle. If you have a need to access information on this object, please send a detailed request via Windchill Technical Marketing.
 ObjectReference getCurrentWorkflow(LifeCycleManaged object)
          Given a LifeCycleManaged object, return a reference to the current WfProcess.
 QueryResult getHistory(LifeCycleManaged object)
          Answer an enumeration of LifeCycleHistory objects based on supplied object.
private  PhaseTemplate getInitialPhase(LifeCycleManaged object)
           
private  PhaseTemplate getInitialPhase(LifeCycleTemplate template)
           
protected  InitialPhaseCache getInitialPhaseCache()
           
 LifeCycleTemplate getLatestIteration(LifeCycleTemplateMaster master)
          Given a LifeCycleTemplateMaster, return the latest iteration (LifeCycleTemplate)

Supported API: true
 LifeCycleTemplateReference getLatestIteration(LifeCycleTemplateMasterReference master)
          Given a LifeCycleTemplateMasterReference, return the latest iteration (LifeCycleTemplateReference)

Supported API: true
private  LifeCycleTemplate getLCT(String aTemplateName)
          Search for a LifeCycleTemplate with the given name.
private  LifeCycleTemplate getLCT(String aTemplateName, WTContainerRef context)
          Search the specified WTContainer for a LifeCycleTemplate with the given name.
private  LifeCycleManaged getLifeCycleManaged(Phase phase)
           
 LifeCycleTemplate getLifeCycleTemplate(LifeCycleManaged object)
          Deprecated. in R4.0 - Use myObject.getLifeCycleTemplate() instead.
private  LifeCycleTemplate getLifeCycleTemplate(PhaseTemplate pt)
           
 LifeCycleTemplate getLifeCycleTemplate(String aTemplateName)
          Given a String representation of the LifeCycleTemplate name, answer the LifeCycleTemplate.
 LifeCycleTemplate getLifeCycleTemplate(String aTemplateName, WTContainerRef context)
          Given a String representation of the LifeCycleTemplate name and a WTContainerRef, answer the LifeCycleTemplate.
protected  LifeCycleTemplateCache getLifeCycleTemplateCache()
           
 LifeCycleTemplateMaster getLifeCycleTemplateMaster(String aMasterName)
          Given a String representation of the LifeCycleTemplateMaster name, answer the LifeCycleTemplateMasterReference

Supported API: true
 LifeCycleTemplateMaster getLifeCycleTemplateMaster(String aMasterName, WTContainerRef context)
          Given a String representation of the LifeCycleTemplateMaster name and a WTContainerRef, answer the LifeCycleTemplateMasterReference

Supported API: true
protected static LifeCycleTemplateNameCache getLifeCycleTemplateNameCache()
           
 LifeCycleTemplateReference getLifeCycleTemplateReference(String aName)
          Given a String representation of the LifeCycleTemplater name, find the latest iteration or working copy of the LifeCycleTemplate.
 LifeCycleTemplateReference getLifeCycleTemplateReference(String aName, WTContainerRef context)
          Given a String representation of the LifeCycleTemplater name and a WTContainerRef, find the latest iteration or working copy of the LifeCycleTemplate.
private  Locale getLocale()
           
private  ObjectIdentifier getOid(Object obj)
           
private  long[] getOidsOfLinks(Map map, int mycount)
           
private  long[] getOidsOfObjects(Map map)
           
private  long[] getOidsOfPhases(Map map)
           
private static WTContainerRef getOrgContainer(WTContained object)
           
private  Phase getPhase(LifeCycleManaged object)
          Answer the CurrentPhase link for the object
private  WTValuedMap getPhaseCopyMap(LifeCycleTemplate src, LifeCycleTemplate dest)
          Returns a non-inflated map of the phase templates of the source life cycle template to their counterparts (phase templates having matching states) of the destination life cycle template.
private  Vector getPhaseCriteria(Phase aPhase)
          Setters/Getters *
private  Vector getPhaseCriteria(PhaseTemplate aPhaseTemplate)
           
 String getPhaseName(LifeCycleManaged object)
          Answer the phase name of the current phase for the specified life cycle managed object

Supported API: false
private  WTKeyedMap getPhases(WTList objects)
           
private  QueryResult getPhaseSignatures(LifeCycleManaged object, Phase aPhase)
           
private  Vector getPhaseSignatures(LifeCycleManaged object, WTUser user, QuerySpec select)
           
private  Map getPhaseSignatures(WTList objects, WTKeyedMap phaseMap)
           
private  PhaseTemplate getPhaseTemplate(AdHocAclSpec ahas)
           
private  PhaseTemplate getPhaseTemplate(Criterion criterion)
           
private  PhaseTemplate getPhaseTemplate(LifeCycleManaged object)
           
protected  PhaseTemplateCache getPhaseTemplateCache()
           
private  WTKeyedMap getPhaseTemplateMaps(WTCollection collection)
           
 Vector getPhaseTemplates(LifeCycleTemplate template)
          Given a LifeCycleTemplate, return a vector of all the PhaseTemplate objects

Supported API: true
private  Set getPhaseTemplatesForInitialization(WTCollection lcts)
          Returns a Set of properly ordered WTList instances containing the PhaseTemplate instances of the argument collection of life cycle templates.
private  PhaseTemplate getPredecessorPhase(PhaseTemplate current)
          Answer the next phase in the Life Cycle or null if current is the initial phase (no predecessor).
 State getPredecessorState(LifeCycleManaged lcmObject)
          This operation determines the current state of the object and returns the predecessor state for the object.
 Vector getReviewerList(LifeCycleManaged object)
          Answer a vector of LifeCycleSignatures

Supported API: true
 Vector getRoles(LifeCycleManaged object)
          Answer a vector of strings - role names for the current phase

Supported API: true
 Enumeration getRunningInstances(String templateName)
          Deprecated. at 5.0 - Use the whereUsed methods instead.
 WTKeyedMap getSeriesSelectors(WTSet lcms)
          Given a WTSet of objects, returns a WTKeyedMap whose keys are those elements of the argument set that are LifeCycleManaged and whose values are the keys' corresponding SeriesRangeSelector values for their current states, if applicable.
 ArrayList getSignatures(LifeCycleHistory history)
          returns an ArrayList of LifeCycleSignatures for a LifeCycleHistory

Supported API: false
 Vector getSignatures(LifeCycleManaged object)
          Answer a vector of signatures for all roles for the object for the current phase.
 Vector getSignatures(LifeCycleManaged object, Role role)
          Answer a vector of LifeCycleSignature for the current phase based on object and role.
 Vector getSignatures(LifeCycleManaged object, WTUser user)
          Answer a vector of LifeCycleSignatures based on supplied object & user.
 Vector getSignatures(LifeCycleManaged object, WTUser user, Role role)
          Answer a vector of LifeCycleSignature for the current phase based on object, user and role.
 String getStateLink(LifeCycleManaged object)
          Deprecated. at 5.0
private  String getStringOfObjectIdentities(QueryResult qr)
           
private  String getStringOfPhaseTemplates(QueryResult qr)
           
private  PhaseTemplate getSuccessorPhase(PhaseTemplate current)
          Answer the next phase in the Life Cycle.
 State getSuccessorState(LifeCycleManaged lcmObject)
          This operation determines the current state of the object and returns the successor state for the object.
private  WTCollection getTransitions(LifeCycleTemplate lct)
          Returns an inflated collection of the phase succession links associated with the phase templates of the argument life cycle template.
 boolean hasAugmentRoleAccess(Role role, LifeCycleManaged object)
          Given a role and a LifeCycleManaged object, determines whether the current user has the permissions required to update the role participants

Supported API: true
 void importTemplates(String fileName)
          Given a WTContainerRef and a jar or zip file that contains a version of any number of LifeCycleTemplate objects, import these objects.
 void importTemplates(String fileName, WTContainerRef context)
          Given a WTContainerRef and a jar or zip file that contains a version of any number of LifeCycleTemplate objects, import these objects.
private  LifeCycleManaged initializeStateCookie(LifeCycleManaged object)
           
private  void initializeStateCookie(WTCollection collection)
           
private  Phase initiateGateWorkflow(PhaseTemplate aPhaseTemplate, Phase aPhase, LifeCycleManaged object)
           
private  Phase initiatePhaseWorkflow(PhaseTemplate aPhaseTemplate, Phase aPhase, LifeCycleManaged object, WTContainerRef context_ref)
           
private  void initiatePhaseWorkflow(WTKeyedMap phaseTemplateMap, WTKeyedMap phaseMap, WTCollection collection)
           
private  WfProcess initiateWorkflow(WfProcessDefinition aDefinition, Phase aPhase, LifeCycleManaged object, WTContainerRef context_ref)
           
private  WTValuedMap initiateWorkflow(WTValuedMap objToWfDefMap, WTKeyedMap objToWfNameMap, WTCollection collection)
           
 boolean isA(LifeCycleManaged object, WTUser user, Role role)
          Deprecated. at 8.0. A user no longer has to belong to a specific role in order to complete a lifecycle task
private  boolean isCheckedOut(Persistable object)
           
private  boolean isCookieInitialized(LifeCycleManaged object)
           
private  boolean isFirstIteration(Persistable object)
           
private  boolean isGroupMember(WTUser user, Vector vp)
           
 boolean isInFinalPhase(LifeCycleManaged object)
          Answers whether the LifeCycleManaged object is in the Final phase of its LifeCycle

Supported API: true
 boolean isInInitialPhase(LifeCycleManaged object)
          Answer whether the LifeCycleManaged object is in the Initial phase

Supported API: true
private  boolean isInitialPhase(PhaseTemplate currentPT)
          Utilities *
 boolean isState(LifeCycleTemplate aLifeCycleTemplate, State aState)
          Given a particular LifeCycleTemplate and a State, answer whether or not the State is used in the LifeCycle

Supported API: true
private  boolean isWorkingCopy(Persistable object)
           
private  WTCollection isWorkingCopy(WTCollection collection)
           
private  void logOrDelete(Criterion aCriterion, LifeCycleHistory aHistory, boolean deleting)
           
private  void logOrDelete(LifeCycleSignature aSignature, LifeCycleHistory aHistory, boolean deleting)
           
private  void markWorkItemAsComplete(LifeCycleSignature signature, LifeCycleManaged object)
           
private static boolean mismatchedOrgs(WfProcessDefinition def, String templateOrg)
           
 Set navigate(LifeCycleManaged lcmObject, Transition name, boolean successor)
          Navigate the transition of the current state of the LifeCycleManagedObject using the passed transition.
 Set navigate(LifeCycleTemplateReference lctRef, State state, Transition transition, boolean successor)
          Navigate the transition from the passed state using the passed transition.
 Map navigate(WTCollection c, Transition transition, boolean successor)
          Navigate the PhaseSuccessors for the Transition for all objects in the WTCollection.
 Map navigate(WTKeyedMap c, Transition transition, boolean successor)
          Navigates the PhaseTemplate->PhaseSuccession using param transition.
private  QuerySpec newInitialPhasesSpec(WTCollection lcts)
          Returns a query spec selecting the initial phase template of each of the argument life cycle templates, NULL, and NULL.
static StandardLifeCycleService newStandardLifeCycleService()
          Default factory for the class.
private  QuerySpec newSuccessorPhasesSpec(WTCollection lcts)
          Returns a query spec selecting the all non-initial phase templates of each of the argument life cycle templates and a reference to each such phase template's predecessor.
protected  void performStartupProcess()
          Override the method from StandardManager to provide LifeCycleServices with custom startup for event subscription.
protected  void processCleanupAdHocAclLinkEvent(AdHocAclLink link)
          Do cleanup link processing on AdHocAclSpec objects.
protected  void processCleanupDefaultCriterionEvent(DefaultCriterion link)
          Do cleanup link processing on Criterion objects.
protected  void processCleanupLinkEvent(Map history, Map criteria)
          Do cleanup link processing on life cycle managed objects.
protected  void processCleanupPhaseLinkEvent(PhaseLink link)
          Do cleanup link processing on Phase objects.
protected  void processPostLCTMStoreEvent(WTCollection lctms)
          Do post-store processing on new life cycle templates.
protected  void processPostStoreEvent(WTList collection)
          Do post-store processing on life cycle managed objects.
protected  void processPreRevise(LifeCycleManaged object)
          On Revise, clear out the cookie information
protected  void processPreStoreEvent(WTCollection collection)
          Do pre-store processing on life cycle managed objects.
protected  void processReteam(LifeCycleManaged object)
          On RETEAM, complete the appropriate life cycle processing
private  void processReviseTransition(WTCollection collection)
          Set the LifeCycleState based on LifeCycle REVISE transition for revised objects.
protected  void processRollback(LifeCycleManaged object)
          On POST_ROLLBACK, complete the appropriate life cycle processing
 LifeCycleManaged promote(LifeCycleManaged object, LifeCycleSignature signature)
          Move the object to the next phase.
 void promote(WTObject object)
          Promote an object to the next phase.
private  void putObjectsIntoSearchBuckets(WTList objects, WTKeyedMap map, Map iterated, Map nonIterated)
           
 LifeCycleManaged reassign(LifeCycleManaged object, LifeCycleTemplateReference lctRef)
          Reassign a life cycle managed object to a new life cycle.
 LifeCycleManaged reassign(LifeCycleManaged object, LifeCycleTemplateReference lctRef, WTContainerRef context)
          Reassign a life cycle managed object to a new life cycle in a certain WTContainerRef.
 WTList reassign(WTList list, LifeCycleTemplateReference lctRef, WTContainerRef context, boolean preserveState)
          Reassign all objects in a WTList to a lifecycle.
 WTList reassign(WTList list, LifeCycleTemplateReference lctRef, WTContainerRef context, State state)
          Reassign the life cycle managed objects in a WTList to a new life cycle in a certain WTContainerRef.
protected  void registerAsListener()
          Register as a listener for dispatched events.
 void registerEvents(ManagerService manager)
          Overrides the registration of all applicable lifecycle service events with the service manager.
private  void removePhaseData(LifeCycleManaged object, Phase current, LifeCycleHistory aHistory)
           
private  void removePhaseData(Map map)
           
private  void removePhaseData(WTList objects, WTKeyedMap phaseMap, WTList histories)
           
private  Vector replaceCriteria(Phase aPhase, Vector criteria)
          Runtime object management *
private  LifeCycleManaged resetNonBasicAttributes(LifeCycleManaged object)
          Remove the attributes that are not basic as the object no longer uses acls or teams
private  boolean roleContentsChanged(Role aRole, RoleHolder2 prevRoleHolder, RoleHolder2 newRoleHolder)
           
 Vector saveCriteria(LifeCycleManaged object, Vector criteria)
          Deprecated. at R5.0
 LifeCycleHistory saveHistory(LifeCycleManaged object, Phase aPhase, String event)
          Create a history entry based on a life cycle event.
private  LifeCycleHistory saveHistory(LifeCycleManaged object, Phase aPhase, String event, Timestamp timestamp)
           
 WTList saveHistory(WTList list, WTKeyedMap phaseMap, String event)
           
 TransactionResult saveLifeCycleTemplate(TransactionContainer aTran)
          Store or update a LifeCycleTemplate.
 TransactionResult saveLifeCycleTemplate(TransactionContainer aTran, WTContainerRef context)
          Store or update a LifeCycleTemplate.
 TransactionResult saveLifeCycleTemplate(TransactionContainer aTran, WTContainerRef context, boolean bypassDefaultTransitions)
          Store or update a LifeCycleTemplate.
 State[] selectableStates()
          Deprecated. in R4.0. Use the appropriate call on the EnumeratedType object to get these values.
private  Phase setCurrentPhase(LifeCycleManaged object, Phase phase)
           
private  void setCurrentPhase(WTCollection collection, WTKeyedMap phaseMap)
           
 void setEnabled(LifeCycleTemplate aTemplate, boolean enable)
          Enable/Disable the Life Cycle Template Master

Supported API: true
 void setEnabled(LifeCycleTemplateMaster aMaster, boolean enable)
          Enable/Disable the Life Cycle Template Master

Supported API: true
 LifeCycleManaged setLifeCycleState(LifeCycleManaged object, State state)
          Set the state of the Life Cycle Managed object.
 LifeCycleManaged setLifeCycleState(LifeCycleManaged object, State state, boolean terminAssocRunningProcesses)
          Set the state of the Life Cycle Managed object and provide the option to terminate the associated workflows.
 LifeCycleManaged setLifeCycleState(LifeCycleManaged object, State state, boolean terminAssocRunningProcesses, Timestamp timestamp)
          Set the state of the Life Cycle Managed object.
 WTList setLifeCycleState(WTList list, Map stateMap, WTList terminateList)
          Set the state of the Life Cycle Managed objects in the WTList list.
 WTList setLifeCycleState(WTList list, State state, boolean terminAssocRunningProcesses)
          Set the state of the Life Cycle Managed objects and provide the option to terminate the associated workflows.
private  void setPhase(LifeCycleManaged object, Phase phase)
           
 void setRouting(LifeCycleTemplate aTemplate, boolean routing)
          Set/reset the rouing attribute on the Life Cycle Template Master.
 void setRouting(LifeCycleTemplateMaster aMaster, boolean routing)
          Set/reset the routing attribute of the Life Cycle Template Master.
 LifeCycleManaged setState(LifeCycleManaged object, int aStateOrdinal)
          Transition the object to an different state.
private  LifeCycleState setState(LifeCycleManaged object, LifeCycleTemplateReference lctRef, State aState, boolean atGate)
           
 LifeCycleManaged setState(LifeCycleManaged object, State aState)
          Transition the object to an different state.
private  LifeCycleState setState(LifeCycleManaged object, State aState, boolean atGate)
           
private  LifeCycleManaged setState(LifeCycleManaged object, State aState, Timestamp timestamp)
           
 WTList setState(WTList list, Map map)
          Transition the objects in the collection to a different state.
 WTList setState(WTList list, State aState)
          Transition the objects in the collection to a different state.
 WTObject setState(WTObject object, Integer aStateOrdinal)
          Used to Validate the WTObject from the robot and pass onto setState.
 WTObject setState(WTObject object, State aState)
          Used to Validate the WTObject from the robot and pass onto setState.
private  void setStates(WTList list, LifeCycleTemplateReference lctRef, State aState, boolean preserveState, boolean atGate)
           
private  void setStates(WTList list, Map phaseTemplateMap, boolean atGate)
           
private  void setTemplate(LifeCycleManaged object, LifeCycleTemplate aTemplate)
           
private  boolean shouldBeManaged(Persistable object)
           
private  WTCollection shouldBeManaged(WTCollection collection)
          Determine if a Persistable object should be life cycle managed
private  PhaseTemplate stateSearch(LifeCycleTemplate aTemplate, State aState)
           
 void submit(WTObject object)
          Submit the object for review.
 LifeCycleManaged submitForApproval(LifeCycleManaged object)
          Submit the object for review.
private  void terminateProcesses(Enumeration enum)
           
private  boolean userIsARolePlayer(WTRoleHolder2 roleHolder, WTUser user, Role role)
           
private  void validateAtGate(WTCollection lcmObjects)
          This API validates whether or not all objects in the collection are not at the gate.
protected  void validateCheckinTemplateNotInUse(LifeCycleTemplate lct)
          On PRE_CHECKIN event, ensure there are no Life Cycle Managed objects using this Life Cycle Template
 LifeCycleSignature validateDemote(LifeCycleManaged object, LifeCycleSignature signature)
          Perform pre-demote validations

Supported API: false
 LifeCycleSignature validateDeny(LifeCycleManaged object, LifeCycleSignature signature)
          Perform pre-deny validations

Supported API: false
 LifeCycleSignature validateDrop(LifeCycleManaged object, LifeCycleSignature signature)
          Perform pre-drop validations

Supported API: false
private  void validateIsLatestIteration(LifeCycleManaged object, String action)
           
private  void validateIsLatestIteration(WTCollection objects, String action)
           
private  LifeCycleTemplate validateLifeCycleTemplate(LifeCycleTemplateReference lctr, boolean useLatest)
           
private static boolean validateLifeCycleTemplateObjects(LifeCycleTemplate template)
           
private  boolean validatePersistence(WTCollection collection)
           
private static boolean validatePhaseTemplateWorklfows(PhaseTemplate phaseTemplate, LifeCycleTemplate template)
           
protected  void validatePreDeleteTemplateNotInUse(LifeCycleTemplate lct)
          On PRE_DELETE event, ensure there are no Life Cycle Managed objects using this Life Cycle Template
 LifeCycleSignature validatePromote(LifeCycleManaged object, LifeCycleSignature signature)
          Perform pre-promote validations

Supported API: false
 LifeCycleManaged validateReassign(LifeCycleManaged object, LifeCycleTemplateReference lctRef)
          Perform pre-reassign validations

Supported API: false
private  void validateReassign(WTCollection lcmObjects, LifeCycleTemplateReference lctRef)
          This API validates whether or not all objects in the collection are are in a state where they can be assigned.
 void validateReassign(WTCollection objects, LifeCycleTemplateReference lctRef, State state)
           
 PhaseTemplate validateSetState(LifeCycleManaged object, int aStateOrdinal)
          Used by setState, checks that the state the Workflow SetState robot is tying to set the object to is valid.
 PhaseTemplate validateSetState(LifeCycleManaged object, State aState)
          Used by setState, checks that the state the Workflow SetState robot is tying to set the object to is valid.
private  WTKeyedMap validateSetState(WTCollection collection, State aState, Map stateMap)
           
private  PhaseTemplate validateState(LifeCycleManaged object, int aStateOrdinal)
           
private  PhaseTemplate validateState(LifeCycleManaged object, State aState)
           
private  WTKeyedMap validateState(WTCollection collection, State aState, Map stateMap)
          This API validates the state of each object in the collection and puts it's nextPhaseTemplate in a map to return to the caller.
 LifeCycleManaged validateSubmit(LifeCycleManaged object)
          Perform pre-submit validations

Supported API: false
 LifeCycleManaged validateSubmitForApproval(LifeCycleManaged object)
          Perform pre-submit validations

Supported API: true
 LifeCycleSignature validateVote(LifeCycleManaged object, LifeCycleSignature signature)
          Perform pre-vote validations

Supported API: false
 LifeCycleSignature vote(LifeCycleManaged object, LifeCycleSignature signature)
          Record a signer disposition (Yes/No) and any comments.
 QueryResult whereUsed(LifeCycleTemplate aTemplate)
          Given a LifeCycleTemplate, return a QueryResult containing all LifeCycleManaged objects that use it

Supported API: false
 QueryResult whereUsed(LifeCycleTemplateMaster aMaster)
          Given a LifeCycleTemplateMaster, return a QueryResult containing all LifeCycleManaged objects that use any iteration of it

Supported API: false
 QueryResult whereUsed(WfProcess process)
           
 QueryResult whereUsed(WfProcessTemplate template)
          Given a WfProcessTemplate, return a QueryResult containing all PhaseTemplate objects that use it

Supported API: false
 QueryResult whereUsed(WfProcessTemplateMaster master)
          Given a WfProcessTemplateMaster, return a QueryResult containing all PhaseTemplate objects that use it.
 
Methods inherited from class wt.services.StandardManager
emergencyShutdown, emergencyShutdownComplete, emergencyShuttingDown, getClassInfo, getManagerService, getManagerStatus, getName, getStartupType, init, initialize, initialize, isStarted, newStandardManager, newStandardManager, performEmergencyShutdownProcess, performShutdownProcess, setManagerService, shutdown, shutdownFailure, shutdownSuccess, shuttingDown, started, startedErrors, startingUp, startup, startupFailure, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

ENTER_PHASE

protected static final String ENTER_PHASE
History event argument for onCreate of a LifeCycleManaged object

Supported API: false

See Also:
Constant Field Values

SUBMIT

protected static final String SUBMIT
History event argument for onSubmit for a LifeCycleManaged object. Submit moves the object to the phase gate.

Supported API: false

See Also:
Constant Field Values

PROMOTE

protected static final String PROMOTE
History event argument for onPromote of a LifeCycleManaged object. Promote causes the object to transition to a successor phase with an associated state change and application of new business rules - such as access control.

Supported API: false

See Also:
Constant Field Values

VOTE

protected static final String VOTE
History event argument for a onVote of a LifeCycleManaged object. Vote is the recording of a signature by a reviewer role player.

Supported API: false

See Also:
Constant Field Values

DEMOTE

protected static final String DEMOTE
History onDemote event argument for a LifeCycleManaged object. Demote is a reverse promote.

Supported API: false

See Also:
Constant Field Values

DENY

protected static final String DENY
History onDeny event argument for a LifeCycleManaged object. Deny removes the object from the gate and returns it to the submitter.

Supported API: false

See Also:
Constant Field Values

DROP

protected static final String DROP
History onDrop event argument for a LifeCycleManaged object. Drop causes the object to be removed from the life cycle and its state set to a dropped state.

Supported API: false

See Also:
Constant Field Values

REASSIGN

protected static final String REASSIGN
History onReassign event argument for a LifeCycleManaged object. Reassign associates the object to a new life cycle.

Supported API: false

See Also:
Constant Field Values

AUGMENT

protected static final String AUGMENT
Hhistory augment event argument for a LifeCycleManaged object. Augment allows changes to the role principal mapping of the team.

Supported API: false

See Also:
Constant Field Values

SET_STATE

protected static final String SET_STATE
Hhistory on SetStatet event argument for a LifeCycleManaged object. SetState assigns a particular state to the object.

Supported API: false

See Also:
Constant Field Values

RETEAM

protected static final String RETEAM
History onReteam event argument for a LifeCycleManaged object. Reteam associates the object with a new team template.

Supported API: false

See Also:
Constant Field Values

BYPASS_DEFAULT_TRANSITIONS

protected static final String BYPASS_DEFAULT_TRANSITIONS
Flag used in the MethodContext to communicate whether default transitions are bypassed.

Supported API: false

See Also:
Constant Field Values

lifeCycleManagedPhaseMap

private Cache lifeCycleManagedPhaseMap

TOP_PRIORITY

static final String TOP_PRIORITY
See Also:
Constant Field Values

PRIMARY_BUSINESS_OBJECT

static final String PRIMARY_BUSINESS_OBJECT
See Also:
Constant Field Values

WORK_NOTIFICATION_TEMPLATES

static final String WORK_NOTIFICATION_TEMPLATES
See Also:
Constant Field Values

URL_CLASSNAME

static final String URL_CLASSNAME
See Also:
Constant Field Values

URL_METHOD_NAME

static final String URL_METHOD_NAME
See Also:
Constant Field Values

ACTION_NAME

static final String ACTION_NAME
See Also:
Constant Field Values

PENDING

static final String PENDING
See Also:
Constant Field Values

SUBMIT_TASK

static final String SUBMIT_TASK
See Also:
Constant Field Values

REVIEW_TASK

static final String REVIEW_TASK
See Also:
Constant Field Values

PROMOTE_TASK

static final String PROMOTE_TASK
See Also:
Constant Field Values

URLCLASSNAME

private static String URLCLASSNAME

URLMETHODNAME

private static String URLMETHODNAME

DISABLE_PROHIBIT_CHANGE_AT_GATE_VETO

public static final String DISABLE_PROHIBIT_CHANGE_AT_GATE_VETO
Set a boolean true with this key in the method context to disable PRE_CHANGE vetoing on LifeCycleManaged objects. This is needed by an R7 migrator to relax the constraint which updating lifecycle managed objects identities.

Example Usage

   MethodContext.getContext().put(DISABLE_PROHIBIT_CHANGE_AT_GATE_VETO, "true");
   try {
       ...
   } finally {
      MethodContext.getContext().remove(DISABLE_PROHIBIT_CHANGE_AT_GATE_VETO);
   }


Supported API: false

See Also:
Constant Field Values

VERBOSE

private static final boolean VERBOSE

VERBOSE_BASIC

private static final boolean VERBOSE_BASIC

DEFAULT_LIFECYCLE

private static final String DEFAULT_LIFECYCLE

ENABLE_HISTORY

private static final boolean ENABLE_HISTORY

RETAIN_SIGNATURES

private static final boolean RETAIN_SIGNATURES

RETAIN_CRITERIA

private static final boolean RETAIN_CRITERIA

SERVICE_NAME

private static final String SERVICE_NAME
See Also:
Constant Field Values

SYSTEM_DOMAIN

private static final String SYSTEM_DOMAIN

START_WF_PROCESS_IMMEDIATE

private static final String START_WF_PROCESS_IMMEDIATE

DEFAULT_LC_TEAM

private static final String DEFAULT_LC_TEAM

WORKFLOW_PRIORITY

private static final long WORKFLOW_PRIORITY

UNDO_CHECK_OUT_KEY

private static final Object UNDO_CHECK_OUT_KEY

initialPhaseCache

private InitialPhaseCache initialPhaseCache

lifeCycleTemplateCache

private LifeCycleTemplateCache lifeCycleTemplateCache

adHocAclSpecCache

private AdHocAclSpecCache adHocAclSpecCache

criterionCache

private CriterionCache criterionCache

lifeCycleTemplateNameCache

private static LifeCycleTemplateNameCache lifeCycleTemplateNameCache

phaseTemplateCache

private PhaseTemplateCache phaseTemplateCache
Constructor Detail

StandardLifeCycleService

public StandardLifeCycleService()
Method Detail

getConceptualClassname

public String getConceptualClassname()
Deprecated.  

Returns the conceptual (modeled) name for the class.

Supported API: false

Specified by:
getConceptualClassname in interface NetFactor
Overrides:
getConceptualClassname in class StandardManager
Returns:
String

registerEvents

public void registerEvents(ManagerService manager)
Overrides the registration of all applicable lifecycle service events with the service manager.

Supported API: false

Specified by:
registerEvents in interface Manager
Overrides:
registerEvents in class StandardManager
Parameters:
manager - the ManagerService object used to override the registration of applicable events with the service manager

dispatchVetoableEvent

protected void dispatchVetoableEvent(String eventType,
                                     Persistable object)
                              throws WTException,
                                     WTPropertyVetoException
Dispatches a LifeCycleServiceEvent that includes the event type and target..

Supported API: false

Parameters:
eventType - The name of the PersistentManagerEvent type.
object - The target of the persistable operation.
Throws:
WTException
WTPropertyVetoException

dispatchEvent

protected void dispatchEvent(String eventType,
                             ObjectReference objectRef)
                      throws WTException,
                             WTPropertyVetoException
Dispatches a LifeCycleServiceEvent that includes the event type and target.

Supported API: false

Parameters:
eventType - The name of the PersistentManagerEvent type.
objectRef - The target of the persistable operation.
Throws:
WTException
WTPropertyVetoException

dispatchVetoableMultiObjectEvent

protected void dispatchVetoableMultiObjectEvent(String eventType,
                                                WTCollection objects)
                                         throws WTException,
                                                WTPropertyVetoException
Dispatches a LifeCycleServiceEventthat includes the event type and targets (i.e., LifeCyclemanaged objects).

Supported API: false

Parameters:
eventType - The name of the LifeCycleServiceEvent type.
objects - The targets of the lifecycle service event
Throws:
WTException
WTPropertyVetoException

newStandardLifeCycleService

public static StandardLifeCycleService newStandardLifeCycleService()
                                                            throws WTException
Default factory for the class.

Supported API: false

Returns:
StandardLifeCycleService
Throws:
WTException

submitForApproval

public LifeCycleManaged submitForApproval(LifeCycleManaged object)
                                   throws WTException,
                                          LifeCycleException
Submit the object for review.

Supported API: true

Specified by:
submitForApproval in interface LifeCycleService
Parameters:
object - the LifeCycleManaged object that should be submitted for approval
Returns:
LifeCycleManaged
Throws:
WTException
LifeCycleException

vote

public LifeCycleSignature vote(LifeCycleManaged object,
                               LifeCycleSignature signature)
                        throws WTException,
                               LifeCycleException
Record a signer disposition (Yes/No) and any comments.

Supported API: true

Specified by:
vote in interface LifeCycleService
Parameters:
object - the LifeCycleManaged object that should be voted on
signature - the signature object where the vote results should be recorded
Returns:
LifeCycleSignature
Throws:
WTException
LifeCycleException

promote

public LifeCycleManaged promote(LifeCycleManaged object,
                                LifeCycleSignature signature)
                         throws WTException,
                                LifeCycleException
Move the object to the next phase.

The doPromote method is executed

Supported API: true

Specified by:
promote in interface LifeCycleService
Parameters:
object - the LifeCycleManaged object that should be promoted
signature - the Signature object where the results and information about the promote should be recorded
Returns:
LifeCycleManaged
Throws:
WTException
LifeCycleException

demote

public LifeCycleManaged demote(LifeCycleManaged object,
                               LifeCycleSignature signature)
                        throws WTException,
                               LifeCycleException
Move the object to the previous phase.

The doDemote method is executed

Supported API: true

Specified by:
demote in interface LifeCycleService
Parameters:
object - the LifeCycleManaged object that should be demoted.
signature - the Signature object where the results and information about the demote should be recorded
Returns:
LifeCycleManaged
Throws:
WTException
LifeCycleException

deny

public LifeCycleManaged deny(LifeCycleManaged object,
                             LifeCycleSignature signature)
                      throws WTException,
                             LifeCycleException
Remove the object from the gate and return the object to the submitter

Supported API: true

Specified by:
deny in interface LifeCycleService
Parameters:
object - the LifeCycleManaged object that should be denied
signature - the Signature object that the result and information about the deny is recorded
Returns:
LifeCycleManaged
Throws:
WTException
LifeCycleException

drop

public LifeCycleManaged drop(LifeCycleManaged object,
                             LifeCycleSignature signature)
                      throws WTException,
                             LifeCycleException
Transition the object to an end state

Supported API: true

Specified by:
drop in interface LifeCycleService
Parameters:
object - the LifeCycleManaged object that should be moved to a final/dropped state
signature - the LifeCycleSignature object records information about the drop process
Returns:
LifeCycleManaged
Throws:
WTException
LifeCycleException

reassign

public LifeCycleManaged reassign(LifeCycleManaged object,
                                 LifeCycleTemplateReference lctRef)
                          throws WTException,
                                 LifeCycleException
Reassign a life cycle managed object to a new life cycle.

Supported API: true

Specified by:
reassign in interface LifeCycleService
Parameters:
object - the LifeCycleManaged object that should be assigned to a new life cycle
lctRef - a reference to a LifeCycleTemplate, the LifeCycleTemplate that the object should be reassigned to
Returns:
LifeCycleManaged
Throws:
WTException
LifeCycleException

getLifeCycleTemplate

public LifeCycleTemplate getLifeCycleTemplate(LifeCycleManaged object)
                                       throws WTException,
                                              LifeCycleException
Deprecated. in R4.0 - Use myObject.getLifeCycleTemplate() instead.

Answer the LifeCycleTemplate the object is assigned to

Supported API: true

Specified by:
getLifeCycleTemplate in interface LifeCycleService
Parameters:
object - the LifeCycleManaged object used as search criteria in the retrieval of the LifeCycleTemplate
Returns:
LifeCycleTemplate
Throws:
WTException
LifeCycleException

getSignatures

public Vector getSignatures(LifeCycleManaged object,
                            WTUser user,
                            Role role)
                     throws WTException,
                            LifeCycleException
Answer a vector of LifeCycleSignature for the current phase based on object, user and role.

Supported API: true

Specified by:
getSignatures in interface LifeCycleService
Parameters:
object - the LifeCycleManaged object used as search criteria in the retrieval of signature objects
user - the WTUser object used as search criteria in the retrieval of Signature objects
role - the Role object used as search criteria in the retrieval of the Signature objects
Returns:
Vector
Throws:
WTException
LifeCycleException

getSignatures

public Vector getSignatures(LifeCycleManaged object,
                            Role role)
                     throws WTException,
                            LifeCycleException
Answer a vector of LifeCycleSignature for the current phase based on object and role.

Supported API: true

Specified by:
getSignatures in interface LifeCycleService
Parameters:
object - the LifeCycleManaged object used as search criteria in the retrieval of the Signature objects
role - the Role object used as search criteria in the retrieval of Signature objects
Returns:
Vector
Throws:
WTException
LifeCycleException

getSignatures

public Vector getSignatures(LifeCycleManaged object)
                     throws WTException,
                            LifeCycleException
Answer a vector of signatures for all roles for the object for the current phase.

Supported API: true

Specified by:
getSignatures in interface LifeCycleService
Parameters:
object - the LifeCycleManaged object used as search criteria in the retrieval of Signature objects
Returns:
Vector
Throws:
WTException
LifeCycleException

getSignatures

public Vector getSignatures(LifeCycleManaged object,
                            WTUser user)
                     throws WTException,
                            LifeCycleException
Answer a vector of LifeCycleSignatures based on supplied object & user.

Supported API: true

Specified by:
getSignatures in interface LifeCycleService
Parameters:
object - The LifeCycleManaged object used as search criteria in the retrieval of Signature objects
user - the WTUser object used as search criteria in the retrieval of Signature objects
Returns:
Vector
Throws:
WTException
LifeCycleException

getAllSignatures

public Vector getAllSignatures(LifeCycleManaged object)
                        throws WTException,
                               LifeCycleException
Answer a vector of signatures for all roles for the object for the current phase and all preceeding phases.

Supported API: true

Specified by:
getAllSignatures in interface LifeCycleService
Parameters:
object - the LifeCycleManaged object used as search criteria in the retrieval of Signature objects
Returns:
Vector
Throws:
WTException
LifeCycleException

createLifeCycleSignature

public LifeCycleSignature createLifeCycleSignature(Persistable object,
                                                   WTPrincipal signer,
                                                   String comments,
                                                   Role role,
                                                   boolean vote)
                                            throws WTException
Answer an initialized but unpersisted LifeCycleSignature instance

Supported API: true

Specified by:
createLifeCycleSignature in interface LifeCycleService
Parameters:
object - the Persistable object that the LifeCycleSignature is associated to
signer - the WTPrincipal who did the work
comments - any comments the signer recorded about the work accomplished
role - the Role object, used to represent the role the signer was participating as
vote - a boolean signer designation, used to record the disposition
Returns:
LifeCycleSignature
Throws:
WTException

getReviewerList

public Vector getReviewerList(LifeCycleManaged object)
                       throws WTException,
                              LifeCycleException
Answer a vector of LifeCycleSignatures

Supported API: true

Specified by:
getReviewerList in interface LifeCycleService
Parameters:
object - The LifeCycleManaged object used as search criteria in the retrieval of Signature objects
Returns:
Vector
Throws:
WTException
LifeCycleException

getAllReviewerList

public Vector getAllReviewerList(LifeCycleManaged object)
                          throws WTException,
                                 LifeCycleException
Answer a vector of LifeCycleSignatures

Supported API: true

Specified by:
getAllReviewerList in interface LifeCycleService
Parameters:
object - The LifeCycleManaged object used as search criteria in the retrieval of Signature objects
Returns:
Vector
Throws:
WTException
LifeCycleException

getRoles

public Vector getRoles(LifeCycleManaged object)
                throws WTException,
                       LifeCycleException
Answer a vector of strings - role names for the current phase

Supported API: true

Specified by:
getRoles in interface LifeCycleService
Parameters:
object - the LifeCycleManaged object used as search criteria in the retrieval of Role objects
Returns:
Vector
Throws:
WTException
LifeCycleException

getCriteria

public Vector getCriteria(LifeCycleManaged object)
                   throws WTException,
                          LifeCycleException
Answer a vector of Criterion objects for the current phase

Supported API: true

Specified by:
getCriteria in interface LifeCycleService
Parameters:
object - the LifeCycleManaged object used as search criteria in the retrieval of Criterion objects
Returns:
Vector
Throws:
WTException
LifeCycleException

saveLifeCycleTemplate

public TransactionResult saveLifeCycleTemplate(TransactionContainer aTran)
                                        throws WTException,
                                               LifeCycleException
Store or update a LifeCycleTemplate. This method accepts and processes a batch container of persistence assertions.

Supported API: true

Specified by:
saveLifeCycleTemplate in interface LifeCycleService
Parameters:
aTran - a TransactionContainer that contains a set of LifeCycleTemplate, PhaseTemplate, AdHocAclSpec, Criterion and Transition assertions that need to be applied against one or more LifeCycleTemplate objects
Returns:
TransactionResult
Throws:
WTException
LifeCycleException

saveCriteria

public Vector saveCriteria(LifeCycleManaged object,
                           Vector criteria)
                    throws WTException,
                           LifeCycleException
Deprecated. at R5.0

Save/Update a vector of Criterion objects

Supported API: false

Specified by:
saveCriteria in interface LifeCycleService
Parameters:
object - the LifeCycleManged object that the associated criteria should be applied to
criteria - a Vector of Criterion objects that should be applied to the LifeCycleManaged object
Returns:
Vector
Throws:
WTException
LifeCycleException

allStates

public State[] allStates()
                  throws WTException
Deprecated. in R4.0. Use the appropriate call on the EnumeratedType object to get these values.

Answer an array of State objects

Supported API: false

Specified by:
allStates in interface LifeCycleService
Returns:
State[]
Throws:
WTException

selectableStates

public State[] selectableStates()
                         throws WTException
Deprecated. in R4.0. Use the appropriate call on the EnumeratedType object to get these values.

Answer an array of State objects declared selectable

Supported API: false

Specified by:
selectableStates in interface LifeCycleService
Returns:
State[]
Throws:
WTException

getHistory

public QueryResult getHistory(LifeCycleManaged object)
                       throws WTException,
                              LifeCycleException
Answer an enumeration of LifeCycleHistory objects based on supplied object.

Usage:

LifeCycleHistory aHistory = null; Enumeration e = LifeCycleHelper.service.getHistory(aLifeCycleManaged); while (e.hasMoreElements()) { aHistory = (LifeCycleHistory)e.nextElement(); // -- do stuff }

Supported API: true

Specified by:
getHistory in interface LifeCycleService
Parameters:
object - the LifeCycleManaged object used as search criteria for the retrieval of History information
Returns:
QueryResult
Throws:
WTException
LifeCycleException

getCurrentPhase

public Phase getCurrentPhase(LifeCycleManaged object)
                      throws WTException
Deprecated. at R4.0 - This method should not be used outside of the Life Cycle service. This phase object should be considered private to LifeCycle. If you have a need to access information on this object, please send a detailed request via Windchill Technical Marketing.

Answer the object's current phase

Supported API: false

Specified by:
getCurrentPhase in interface LifeCycleService
Parameters:
object - the LifeCycleManaged object used as search criteria in the retrieval of the current phase object
Returns:
Phase
Throws:
WTException

isA

public boolean isA(LifeCycleManaged object,
                   WTUser user,
                   Role role)
            throws WTException,
                   LifeCycleException
Deprecated. at 8.0. A user no longer has to belong to a specific role in order to complete a lifecycle task

Answer whether the designated user is validated for the designated role

Supported API: true

Specified by:
isA in interface LifeCycleService
Parameters:
object - the LifeCycleManaged object
user - the designated user
role - the designated role
Returns:
boolean
Throws:
WTException
LifeCycleException

isInInitialPhase

public boolean isInInitialPhase(LifeCycleManaged object)
                         throws WTException
Answer whether the LifeCycleManaged object is in the Initial phase

Supported API: true

Specified by:
isInInitialPhase in interface LifeCycleService
Parameters:
object - The LifeCycleManaged object
Returns:
boolean
Throws:
WTException

isInFinalPhase

public boolean isInFinalPhase(LifeCycleManaged object)
                       throws WTException
Answers whether the LifeCycleManaged object is in the Final phase of its LifeCycle

Supported API: true

Specified by:
isInFinalPhase in interface LifeCycleService
Parameters:
object - The LifeCycleManaged object
Returns:
boolean
Throws:
WTException

getLifeCycleTemplate

public LifeCycleTemplate getLifeCycleTemplate(String aTemplateName)
                                       throws LifeCycleException,
                                              WTException
Given a String representation of the LifeCycleTemplate name, answer the LifeCycleTemplate. If no template is found, return null/code>.

Supported API: true

Specified by:
getLifeCycleTemplate in interface LifeCycleService
Parameters:
aTemplateName - the name of the LifeCycleTemplate to retrieve
Returns:
LifeCycleTemplate
Throws:
LifeCycleException
WTException

validateSubmitForApproval

public LifeCycleManaged validateSubmitForApproval(LifeCycleManaged object)
                                           throws WTException,
                                                  LifeCycleException
Perform pre-submit validations

Supported API: true

Specified by:
validateSubmitForApproval in interface LifeCycleService
Parameters:
object - the LifeCycleManaged object to be submitted
Returns:
LifeCycleManaged
Throws:
WTException
LifeCycleException

hasAugmentRoleAccess

public boolean hasAugmentRoleAccess(Role role,
                                    LifeCycleManaged object)
                             throws WTException,
                                    LifeCycleException
Given a role and a LifeCycleManaged object, determines whether the current user has the permissions required to update the role participants

Supported API: true

Specified by:
hasAugmentRoleAccess in interface LifeCycleService
Parameters:
role - The LifeCycleManaged object that the role/participant mapping is being added to
object - the object whose team is being modified
Returns:
boolean
Throws:
WTException
LifeCycleException

findCandidateTemplates

public Vector findCandidateTemplates(LifeCycleManaged object)
                              throws WTException,
                                     LifeCycleException
Answer a vector of enabled life cycle template references valid for the life cycle managed object findCandidateMasterReference is the preferable to use instead of this method. Using findCandidateMasterReference plus the 'getLifeCycleTemplate' method on that object will get the latest iteration at the last possible moment, eliminating some multi-user timing issues.

Supported API: true

Specified by:
findCandidateTemplates in interface LifeCycleService
Parameters:
object - the LifeCycleManaged object used as search criteria in the retrieval of canidate LifeCycleTemplates
Returns:
Vector
Throws:
WTException
LifeCycleException

findCandidateTemplates

public Vector findCandidateTemplates(Class targetClass)
                              throws WTException,
                                     LifeCycleException
Answer a vector of enabled life cycle template references valid for the class findCandidateMasterReference is the preferable to use instead of this method. Using findCandidateMasterReference plus the 'getLifeCycleTemplate' method on that object will get the latest iteration at the last possible moment, eliminating some multi-user timing issues.

Supported API: true

Specified by:
findCandidateTemplates in interface LifeCycleService
Parameters:
targetClass - the class used as search criteria in the retrieval of canidate LifeCycleTemplates
Returns:
Vector
Throws:
WTException
LifeCycleException

findStates

public Vector findStates(LifeCycleTemplate aLifeCycleTemplate)
                  throws WTException,
                         LifeCycleException
Given a particular LifeCycleTemplate, answer a Vector of all the Life Cycle States used in that LifeCycle

Supported API: true

Specified by:
findStates in interface LifeCycleService
Parameters:
aLifeCycleTemplate - the LifeCycleTemplate used to retrieve the appropriate states
Returns:
Vector
Throws:
WTException
LifeCycleException

isState

public boolean isState(LifeCycleTemplate aLifeCycleTemplate,
                       State aState)
                throws WTException,
                       LifeCycleException
Given a particular LifeCycleTemplate and a State, answer whether or not the State is used in the LifeCycle

Supported API: true

Specified by:
isState in interface LifeCycleService
Parameters:
aLifeCycleTemplate - the LifeCycleTemplate used in the lookup
aState - the State used in the lookup
Returns:
boolean
Throws:
WTException
LifeCycleException

findPredecessorStates

public Enumeration findPredecessorStates(LifeCycleManaged object)
                                  throws WTException,
                                         LifeCycleException
Given a particular LifeCycleManged object, answer an enumeration of all the predecessor States

Supported API: true

Specified by:
findPredecessorStates in interface LifeCycleService
Parameters:
object - the LifeCycleManaged object of interest
Returns:
Enumeration
Throws:
WTException
LifeCycleException

findSuccessorStates

public Enumeration findSuccessorStates(LifeCycleManaged object)
                                throws WTException,
                                       LifeCycleException
Given a particular LifeCycleTemplate, answer an enumeration of all the Successor States

Supported API: true

Specified by:
findSuccessorStates in interface LifeCycleService
Parameters:
object - the LifeCycleManaged object of interest
Returns:
Enumeration
Throws:
WTException
LifeCycleException

setEnabled

public void setEnabled(LifeCycleTemplate aTemplate,
                       boolean enable)
                throws WTException,
                       LifeCycleException
Enable/Disable the Life Cycle Template Master

Supported API: true

Specified by:
setEnabled in interface LifeCycleService
Parameters:
aTemplate - the template to set the enabled flat on
enable - specifies whether or not the template is enabled
Throws:
WTException
LifeCycleException

setEnabled

public void setEnabled(LifeCycleTemplateMaster aMaster,
                       boolean enable)
                throws WTException,
                       LifeCycleException
Enable/Disable the Life Cycle Template Master

Supported API: true

Specified by:
setEnabled in interface LifeCycleService
Parameters:
aMaster - the lifecycle template master to set the enabled flag on
enable - sets the value of the enabled flag to true or false
Throws:
WTException
LifeCycleException

findCandidateMasterReferences

public Vector findCandidateMasterReferences(LifeCycleManaged object)
                                     throws WTException,
                                            LifeCycleException
Answer a vector of life cycle template references valid for the life cycle managed object

Supported API: true

Specified by:
findCandidateMasterReferences in interface LifeCycleService
Parameters:
object - the LifeCycleManaged object used as search criteria in the retrieval of canidate LifeCycleTemplates
Returns:
Vector
Throws:
WTException
LifeCycleException

findCandidateMasterReferences

public Vector findCandidateMasterReferences(Class targetClass)
                                     throws WTException,
                                            LifeCycleException
Answer a vector of life cycle template references valid for the class

Supported API: true

Specified by:
findCandidateMasterReferences in interface LifeCycleService
Parameters:
targetClass - the class used as search criteria in the retrieval of canidate LifeCycleTemplates
Returns:
Vector
Throws:
WTException
LifeCycleException

getLifeCycleTemplateMaster

public LifeCycleTemplateMaster getLifeCycleTemplateMaster(String aMasterName)
                                                   throws LifeCycleException,
                                                          WTException
Given a String representation of the LifeCycleTemplateMaster name, answer the LifeCycleTemplateMasterReference

Supported API: true

Specified by:
getLifeCycleTemplateMaster in interface LifeCycleService
Parameters:
aMasterName - the name of the LifeCycleTemplate to retrieve
Returns:
LifeCycleTemplateMaster
Throws:
LifeCycleException
WTException

getLifeCycleTemplateReference

public LifeCycleTemplateReference getLifeCycleTemplateReference(String aName)
                                                         throws LifeCycleException,
                                                                WTException
Given a String representation of the LifeCycleTemplater name, find the latest iteration or working copy of the LifeCycleTemplate. Return a LifeCycleTemplateReference.

Supported API: true

Specified by:
getLifeCycleTemplateReference in interface LifeCycleService
Parameters:
aName - the name of the LifeCycleTemplate to retrieve
Returns:
LifeCycleTemplateReference
Throws:
LifeCycleException
WTException

setLifeCycleState

public LifeCycleManaged setLifeCycleState(LifeCycleManaged object,
                                          State state,
                                          boolean terminAssocRunningProcesses)
                                   throws WTException,
                                          LifeCycleException
Set the state of the Life Cycle Managed object and provide the option to terminate the associated workflows. If null is passed as the WfState, all processes are terminated.

Supported API: true

Specified by:
setLifeCycleState in interface LifeCycleService
Parameters:
object - The LifeCycleManaged object whose state should be updated
state - The state to set the LifeCycleManaged object to.
terminAssocRunningProcesses - a flag that determines whether or not to terminate the wf processes associated with this phase that are OPEN_RUNNING
Returns:
LifeCycleManaged
Throws:
WTException
LifeCycleException

setLifeCycleState

public LifeCycleManaged setLifeCycleState(LifeCycleManaged object,
                                          State state)
                                   throws WTException,
                                          LifeCycleException
Set the state of the Life Cycle Managed object.

Supported API: true

Specified by:
setLifeCycleState in interface LifeCycleService
Parameters:
object - The LifeCycleManaged object whose state should be updated
state - The state to set the LifeCycleManaged object to.
Returns:
LifeCycleManaged
Throws:
WTException
LifeCycleException

findAssociatedProcesses

public Vector findAssociatedProcesses(LifeCycleManaged object,
                                      WfState state)
                               throws WTException,
                                      LifeCycleException
Given a Life Cycle Managed object, return the Workflow processes associated with the current phase. If null is specified as the Wf State, all processes are retrieved.

Supported API: true

Specified by:
findAssociatedProcesses in interface LifeCycleService
Parameters:
object - the Life Cycle Managed object
state - the Workflow state
Returns:
Vector
Throws:
WTException
LifeCycleException

findExportImportFileNames

public Vector findExportImportFileNames()
                                 throws WTException,
                                        LifeCycleException
Retrieve a vector of file names from the Import/Export directory

Supported API: true

Specified by:
findExportImportFileNames in interface LifeCycleService
Returns:
Vector
Throws:
WTException
LifeCycleException

exportTemplates

public void exportTemplates(Vector lifeCycleVector,
                            String fileName,
                            boolean appendFlag)
                     throws WTException,
                            LifeCycleException
Populate a file with the xml equivalent of the LifeCycleTemplate objects. The xml file is zipped in a jar or zip file.

Supported API: true

Specified by:
exportTemplates in interface LifeCycleService
Parameters:
lifeCycleVector - an enumeration of LifeCycleTemplate objects that need to be exported
fileName - the name of the file that the csv version of the templates should be written to (not including the .csv suffix or the directory name)
appendFlag - a flag that determines whether the exported data should overwrite any existing data or append it to the end
Throws:
WTException
LifeCycleException

importTemplates

public void importTemplates(String fileName)
                     throws WTException,
                            LifeCycleException
Given a WTContainerRef and a jar or zip file that contains a version of any number of LifeCycleTemplate objects, import these objects.

Supported API: true

Specified by:
importTemplates in interface LifeCycleService
Parameters:
fileName - the name of the file that the xml version of the templates should be imported from (not including the .csv extension or the directory name)
Throws:
WTException
LifeCycleException

copyTemplate

public LifeCycleTemplate copyTemplate(LifeCycleTemplate lifeCycleTemplate,
                                      String copyName,
                                      String folderLocation)
                               throws WTException,
                                      LifeCycleException
Produces a copy of the LifeCycleTemplate object and persists it with the name passed as argument. If the name argument is "null", the name of the copied LifeCycleTemplate object is prefixed with 'copy of'. If the folder location is not specified, the object will be persisted in the orginal LifeCycleTemplates's folder location. Note: The 'Copy Of' prefix is pulled from a Resource Bundle for localization purposes.

Supported API: true

Specified by:
copyTemplate in interface LifeCycleService
Parameters:
lifeCycleTemplate - the LifeCycleTemplate object that should be copied
copyName - the name of the new LifeCycleTemplate
folderLocation - the folder location of the new LifeCycleTemplate
Returns:
LifeCycleTemplate
Throws:
WTException
LifeCycleException

findAllTemplates

public Vector findAllTemplates()
                        throws WTException,
                               LifeCycleException
Answer a vector of all life cycle templates. The latest iteration of each life cycle template will be returned. In this particular context, the definition of 'latest iteration' is either the current user's working copy, if one exists, or the latest iteration in the vault.

Supported API: true

Specified by:
findAllTemplates in interface LifeCycleService
Returns:
Vector
Throws:
WTException
LifeCycleException

getLatestIteration

public LifeCycleTemplate getLatestIteration(LifeCycleTemplateMaster master)
                                     throws WTException,
                                            LifeCycleException
Given a LifeCycleTemplateMaster, return the latest iteration (LifeCycleTemplate)

Supported API: true

Specified by:
getLatestIteration in interface LifeCycleService
Parameters:
master - the lifecycle master of interest
Returns:
LifeCycleTemplate
Throws:
WTException
LifeCycleException

getLatestIteration

public LifeCycleTemplateReference getLatestIteration(LifeCycleTemplateMasterReference master)
                                              throws WTException,
                                                     LifeCycleException
Given a LifeCycleTemplateMasterReference, return the latest iteration (LifeCycleTemplateReference)

Supported API: true

Specified by:
getLatestIteration in interface LifeCycleService
Parameters:
master - the lifecycle template master of interest
Returns:
LifeCycleTemplateReference
Throws:
WTException
LifeCycleException

getPhaseTemplates

public Vector getPhaseTemplates(LifeCycleTemplate template)
                         throws WTException,
                                LifeCycleException
Given a LifeCycleTemplate, return a vector of all the PhaseTemplate objects

Supported API: true

Specified by:
getPhaseTemplates in interface LifeCycleService
Parameters:
template - the lifecycle template to retrieve the phase templates for
Returns:
Vector
Throws:
WTException
LifeCycleException

getCurrentWorkflow

public ObjectReference getCurrentWorkflow(LifeCycleManaged object)
                                   throws WTException,
                                          LifeCycleException
Given a LifeCycleManaged object, return a reference to the current WfProcess. If the LifeCycleManaged object is in the phase, the Phase WF is returned. If the LifeCycleManaged object is at the gate, the Gate WF is returned. If there is no workflow, a null is returned.

Supported API: true

Specified by:
getCurrentWorkflow in interface LifeCycleService
Parameters:
object - the object whoose current workflow should be returned
Returns:
ObjectReference
Throws:
WTException
LifeCycleException

getStateLink

public String getStateLink(LifeCycleManaged object)
                    throws WTException,
                           LifeCycleException
Deprecated. at 5.0

Given a LifeCycleManaged object, return the current state of the object as a link to the WfProcess (ProcessManager)

Supported API: false

Specified by:
getStateLink in interface LifeCycleService
Parameters:
object - the object to build the statesLink for.
Returns:
String
Throws:
WTException
LifeCycleException

augmentRoles

public Phase augmentRoles(LifeCycleManaged object)
                   throws WTException,
                          LifeCycleException
Given a LifeCycleManaged object, the current State of the Object and the RoleHolder (the phase object), change the role participants to reflect those in the RoleHolder2

Supported API: true

Specified by:
augmentRoles in interface LifeCycleService
Parameters:
object - The LifeCycleManaged object that the role/participant mapping is being added to
Returns:
Phase
Throws:
WTException
LifeCycleException

getSuccessorState

public State getSuccessorState(LifeCycleManaged lcmObject)
                        throws WTException,
                               LifeCycleException
This operation determines the current state of the object and returns the successor state for the object. That is, the state the object will be in when promoted.

Supported API: true

Specified by:
getSuccessorState in interface LifeCycleService
Parameters:
lcmObject - The Life Cycle Managed object used to get the next state.
Returns:
State
Throws:
WTException
LifeCycleException

getPredecessorState

public State getPredecessorState(LifeCycleManaged lcmObject)
                          throws WTException,
                                 LifeCycleException
This operation determines the current state of the object and returns the predecessor state for the object. That is, the state the object will be in when demoted

Supported API: true

Specified by:
getPredecessorState in interface LifeCycleService
Parameters:
lcmObject - The Life Cycle Managed object used to get the next state.
Returns:
State
Throws:
WTException
LifeCycleException

canCreateLifeCycleTemplate

public boolean canCreateLifeCycleTemplate(WTUser user)
                                   throws WTException
Determines if a given user is entitled to create a Life Cycle Templates. Returns 'true' if the user is an Org Administrator or an Exhange Administrator.

Supported API: false

Specified by:
canCreateLifeCycleTemplate in interface LifeCycleService
Parameters:
user - the user to test for lifecycle creation validation
Returns:
boolean
Throws:
WTException

augmentRoles

public void augmentRoles(Team team)
                  throws WTException,
                         LifeCycleException
Given a team, rebuild all the ad hoc acls for objects associated with the team.

Supported API: true

Specified by:
augmentRoles in interface LifeCycleService
Parameters:
team - The team being updated.
Throws:
WTException
LifeCycleException

getLifeCycleTemplate

public LifeCycleTemplate getLifeCycleTemplate(String aTemplateName,
                                              WTContainerRef context)
                                       throws LifeCycleException,
                                              WTException
Given a String representation of the LifeCycleTemplate name and a WTContainerRef, answer the LifeCycleTemplate. If no template is found, return null/code>.

Supported API: true

Specified by:
getLifeCycleTemplate in interface LifeCycleService
Parameters:
aTemplateName - the name of the LifeCycleTemplate to retrieve
context - the container to search for the lifecycle template
Returns:
LifeCycleTemplate
Throws:
LifeCycleException
WTException

getLifeCycleTemplateReference

public LifeCycleTemplateReference getLifeCycleTemplateReference(String aName,
                                                                WTContainerRef context)
                                                         throws LifeCycleException,
                                                                WTException
Given a String representation of the LifeCycleTemplater name and a WTContainerRef, find the latest iteration or working copy of the LifeCycleTemplate. Return a LifeCycleTemplateReference.

Supported API: true

Specified by:
getLifeCycleTemplateReference in interface LifeCycleService
Parameters:
aName - the name of the LifeCycleTemplate to retrieve
context - the container to search for the lifecycle template master
Returns:
LifeCycleTemplateReference
Throws:
LifeCycleException
WTException

findAllTemplates

public Vector findAllTemplates(WTContainerRef context)
                        throws WTException,
                               LifeCycleException
Answer a vector of all life cycle templates for the WTContainerRef passed. The latest iteration of each life cycle template will be returned. In this particular context, the definition of 'latest iteration' is either the current user's working copy, if one exists, or the latest iteration in the vault.

Supported API: true

Specified by:
findAllTemplates in interface LifeCycleService
Parameters:
context - the container to search for lifecycle templates
Returns:
Vector
Throws:
WTException
LifeCycleException

getLifeCycleTemplateMaster

public LifeCycleTemplateMaster getLifeCycleTemplateMaster(String aMasterName,
                                                          WTContainerRef context)
                                                   throws LifeCycleException,
                                                          WTException
Given a String representation of the LifeCycleTemplateMaster name and a WTContainerRef, answer the LifeCycleTemplateMasterReference

Supported API: true

Specified by:
getLifeCycleTemplateMaster in interface LifeCycleService
Parameters:
aMasterName - the name of the LifeCycleTemplate to retrieve
context - the container to search for the lifecycle template master
Returns:
LifeCycleTemplateMaster
Throws:
LifeCycleException
WTException

importTemplates

public void importTemplates(String fileName,
                            WTContainerRef context)
                     throws WTException,
                            LifeCycleException
Given a WTContainerRef and a jar or zip file that contains a version of any number of LifeCycleTemplate objects, import these objects.

Supported API: true

Specified by:
importTemplates in interface LifeCycleService
Parameters:
fileName - the name of the jar or zip file that the xml version of the templates should be imported from
context - the container to import the lifecycle template into
Throws:
WTException
LifeCycleException

reassign

public LifeCycleManaged reassign(LifeCycleManaged object,
                                 LifeCycleTemplateReference lctRef,
                                 WTContainerRef context)
                          throws WTException,
                                 LifeCycleException
Reassign a life cycle managed object to a new life cycle in a certain WTContainerRef.

Supported API: true

Specified by:
reassign in interface LifeCycleService
Parameters:
object - the LifeCycleManaged object that should be assigned to a new life cycle
lctRef - a reference to a LifeCycleTemplate, the LifeCycleTemplate that the object should be reassigned to
context - the container where the objects associated workflow processes will be created
Returns:
LifeCycleManaged
Throws:
WTException
LifeCycleException

saveLifeCycleTemplate

public TransactionResult saveLifeCycleTemplate(TransactionContainer aTran,
                                               WTContainerRef context)
                                        throws WTException,
                                               LifeCycleException
Store or update a LifeCycleTemplate. This method accepts and processes a batch container of persistence assertions. If a WTContainerRef is passed, and it is different that that of this templates master; then a new master is created in the passed WTContainer, and this template becomes the first iteration.

Supported API: true

Specified by:
saveLifeCycleTemplate in interface LifeCycleService
Parameters:
aTran - a TransactionContainer that contains a set of LifeCycleTemplate, PhaseTemplate, AdHocAclSpec, Criterion and Transition assertions that need to be applied against one or more LifeCycleTemplate objects
context - the container the lifecycle template is being saved in
Returns:
TransactionResult
Throws:
WTException
LifeCycleException

findCandidateMasterReferences

public Vector findCandidateMasterReferences(Class targetClass,
                                            WTContainerRef context)
                                     throws WTException,
                                            LifeCycleException
Answer a vector of life cycle template references valid for the target class in the container.

Supported API: true

Specified by:
findCandidateMasterReferences in interface LifeCycleService
Parameters:
targetClass - the class used as search criteria in the retrieval of canidate LifeCycleTemplates
context - the container to search for lifecycle template masters
Returns:
Vector
Throws:
WTException
LifeCycleException

findAllTemplateMasters

public QueryResult findAllTemplateMasters(WTContainerRef context)
                                   throws WTException,
                                          LifeCycleException
Answer a vector of all life cycle template masters for the WTContainerRef passed. The latest iteration of each life cycle template will be returned. In this particular context, the definition of 'latest iteration' is either the current user's working copy, if one exists, or the latest iteration in the vault.

Supported API: true

Specified by:
findAllTemplateMasters in interface LifeCycleService
Parameters:
context - the container to search for lifecycle templates
Returns:
QueryResult
Throws:
WTException
LifeCycleException

setRouting

public void setRouting(LifeCycleTemplate aTemplate,
                       boolean routing)
                throws WTException,
                       LifeCycleException
Set/reset the rouing attribute on the Life Cycle Template Master. This attribute denotes whether or not the template master can be used to route other objects

Supported API: true

Specified by:
setRouting in interface LifeCycleService
Parameters:
aTemplate - the template to set the routing statis on
routing - sets the routing flag to true or false
Throws:
WTException
LifeCycleException

setRouting

public void setRouting(LifeCycleTemplateMaster aMaster,
                       boolean routing)
                throws WTException,
                       LifeCycleException
Set/reset the routing attribute of the Life Cycle Template Master. This attribute denotes whether or not the template master can be used to route other objects

Supported API: true

Specified by:
setRouting in interface LifeCycleService
Parameters:
aMaster - the lifecycle template master to set the routing status on
routing - sets the routing flag to true or false
Throws:
WTException
LifeCycleException

findRoutingTemplates

public Vector findRoutingTemplates(WTContainerRef context)
                            throws WTException,
                                   LifeCycleException
Return an Enumeration of all lifecycle templates for the WTContainerRef passed. The latest iteration of each life cycle template will be returned. In this particular context, the definition of 'latest iteration' is either the current user's working copy, if one exists, or the latest iteration in the vault.

Supported API: true

Specified by:
findRoutingTemplates in interface LifeCycleService
Parameters:
context - the container to search for lifecycle templates
Returns:
Vector
Throws:
WTException
LifeCycleException

findAllTemplates

public Vector findAllTemplates(WTContainerRef context,
                               boolean routingOnly)
                        throws WTException,
                               LifeCycleException
Answer a vector of all life cycle templates for the WTContainerRef passed. If routingOnly is true, returns only those templates whose routing attribute is true. The latest iteration of each life cycle template will be returned. In this particular context, the definition of 'latest iteration' is either the current user's working copy, if one exists, or the latest iteration in the vault.

Supported API: true

Specified by:
findAllTemplates in interface LifeCycleService
Parameters:
context - the container to search for lifecycle templates
routingOnly - specifies whether only the lifecycle templates marked as routing should be returned or it all enabled lifecycle templates should be returned
Returns:
Vector
Throws:
WTException
LifeCycleException

canCreateLifeCycleTemplate

public boolean canCreateLifeCycleTemplate(WTUser user,
                                          WTContainerRef context)
                                   throws WTException
Determines if a given user is entitled to create a Life Cycle Templates in the given container. Returns 'true' if the user is an Org Administrator or an Exhange Administrator.

Supported API: false

Specified by:
canCreateLifeCycleTemplate in interface LifeCycleService
Parameters:
user - the user to validate creation privileges against
context - the container to validate access against
Returns:
boolean
Throws:
WTException

copyTemplate

public LifeCycleTemplate copyTemplate(LifeCycleTemplate lifeCycleTemplate,
                                      String copyName,
                                      String folderLocation,
                                      WTContainerRef context)
                               throws WTException,
                                      LifeCycleException
Produces a copy of the LifeCycleTemplate object and persists it with the name passed as argument. If the name argument is "null", the name of the copied LifeCycleTemplate object is prefixed with 'copy of'. If the folder location is not specified, the object will be persisted in the orginal LifeCycleTemplates's folder location. If the context is null, the current container will be used. Note: The 'Copy Of' prefix is pulled from a Resource Bundle for localization purposes.

Supported API: true

Specified by:
copyTemplate in interface LifeCycleService
Parameters:
lifeCycleTemplate - the LifeCycleTemplate object that should be copied
copyName - the name of the new LifeCycleTemplate
folderLocation - the folder location of the new LifeCycleTemplate
context - the container where the copy should be stored
Returns:
LifeCycleTemplate
Throws:
WTException
LifeCycleException

navigate

public Set navigate(LifeCycleManaged lcmObject,
                    Transition name,
                    boolean successor)
             throws WTException
Navigate the transition of the current state of the LifeCycleManagedObject using the passed transition. Return a set of States

Supported API: true

Specified by:
navigate in interface LifeCycleService
Parameters:
lcmObject - LifeCycleManagedObject
name - Transition to navigate
successor - get Successors
Returns:
Set
Throws:
WTException

reassign

public WTList reassign(WTList list,
                       LifeCycleTemplateReference lctRef,
                       WTContainerRef context,
                       boolean preserveState)
                throws WTException,
                       LifeCycleException
Reassign all objects in a WTList to a lifecycle.

Supported API: true

Specified by:
reassign in interface LifeCycleService
Parameters:
list - the WtList of LifeCycleManaged objects that should be assigned to a new life cycle
lctRef - a reference to a LifeCycleTemplate, the LifeCycleTemplate that the object should be reassigned to
context - The container the object resides in. This may be null.
preserveState - If this is set to true, the existing state of objects will be preserved if the state is contained in the lifecycle template. Otherwise, the object will be set to the initial state of the lifecycle.
Returns:
WTList
Throws:
WTException
LifeCycleException

reassign

public WTList reassign(WTList list,
                       LifeCycleTemplateReference lctRef,
                       WTContainerRef context,
                       State state)
                throws WTException,
                       LifeCycleException
Reassign the life cycle managed objects in a WTList to a new life cycle in a certain WTContainerRef.

Supported API: true

Specified by:
reassign in interface LifeCycleService
Parameters:
list - the WTList of LifeCycleManaged objects that should be assigned to a new life cycle
lctRef - a reference to a LifeCycleTemplate, the LifeCycleTemplate that the object should be reassigned to
context - The container which the object resides in.
state - The state the objects in the lifecycle should be assigned when reassigned to the lifecycle.
Returns:
WTList
Throws:
WTException
LifeCycleException

setLifeCycleState

public WTList setLifeCycleState(WTList list,
                                State state,
                                boolean terminAssocRunningProcesses)
                         throws WTException,
                                LifeCycleException
Set the state of the Life Cycle Managed objects and provide the option to terminate the associated workflows. If null is passed as the WfState, all processes are terminated.

Supported API: true

Specified by:
setLifeCycleState in interface LifeCycleService
Parameters:
list - The LifeCycleManaged objects whose state should be updated
state - The state to set the LifeCycleManaged object to.
terminAssocRunningProcesses - a flag that determines whether or not to terminate the wf processes associated with this phase that are OPEN_RUNNING
Returns:
WTList
Throws:
WTException
LifeCycleException

navigate

public Set navigate(LifeCycleTemplateReference lctRef,
                    State state,
                    Transition transition,
                    boolean successor)
             throws WTException
Navigate the transition from the passed state using the passed transition. Return a set of States

Supported API: true

Specified by:
navigate in interface LifeCycleService
Parameters:
lctRef - reference to the LifeCycleTemplate.
state - State of the LifeCycleTemplate.
transition - Transtion to navigate
successor - get Successors
Returns:
Set
Throws:
WTException

findSetStateCandidates

public WTKeyedMap findSetStateCandidates(WTCollection lcms)
                                  throws WTException
Determines the allowable states the session principal can set the objects in the collection to. The return type is a map with the lifecycle managed objects assigned as keys and the value is a HashSet containing the allowable states the user can assign to the object.

Supported API: true

Specified by:
findSetStateCandidates in interface LifeCycleService
Parameters:
lcms - a collection of lifecycle managed objects
Returns:
WTKeyedMap
Throws:
WTException

navigate

public Map navigate(WTCollection c,
                    Transition transition,
                    boolean successor)
             throws WTException,
                    LifeCycleException
Navigate the PhaseSuccessors for the Transition for all objects in the WTCollection. Calls single-object navigate. Use multi-object instead.

Supported API: true

Specified by:
navigate in interface LifeCycleService
Parameters:
c - a collection of lifecycle managed objects
transition - the transition to navigate
successor - boolean value to indicate if the navigate should be to a successor state
Returns:
Map
Throws:
WTException
LifeCycleException

getSignatures

public ArrayList getSignatures(LifeCycleHistory history)
                        throws WTException
returns an ArrayList of LifeCycleSignatures for a LifeCycleHistory

Supported API: false

Specified by:
getSignatures in interface LifeCycleService
Parameters:
history - the LifeCycleHistory of interest
Returns:
ArrayList
Throws:
WTException

getCriterion

public ArrayList getCriterion(LifeCycleHistory history)
                       throws WTException
returns an ArrayList of Criterion for a LifeCycleHistory

Supported API: false

Specified by:
getCriterion in interface LifeCycleService
Parameters:
history - the LifeCycleHistory of interest
Returns:
ArrayList
Throws:
WTException

setLifeCycleState

public LifeCycleManaged setLifeCycleState(LifeCycleManaged object,
                                          State state,
                                          boolean terminAssocRunningProcesses,
                                          Timestamp timestamp)
                                   throws WTException,
                                          LifeCycleException
Set the state of the Life Cycle Managed object.

Supported API: true

Specified by:
setLifeCycleState in interface LifeCycleService
Parameters:
object - The LifeCycleManaged object whose state should be updated
state - The state to set the LifeCycleManaged object to.
terminAssocRunningProcesses - a flag that determines whether or not to terminate the wf processes associated with this phase that are OPEN_RUNNING
timestamp - An optional parameter that allows specification of the created and modified timestamps for the history objects.
Returns:
LifeCycleManaged
Throws:
WTException
LifeCycleException

navigate

public Map navigate(WTKeyedMap c,
                    Transition transition,
                    boolean successor)
             throws WTException,
                    LifeCycleException
Navigates the PhaseTemplate->PhaseSuccession using param transition. Returns a WTKeyedMap where the keys are the keys passed in param c and the values WTKeyedHashMap where the keys are PhaseTemplates and the values are sets of inflated PhaseSuccessions.

Usage:

WTKeyedHashMap map=new WTKeyedHashMap(); Set set = new Set[) state=State.toState("DESIGN") set.add(state) map.put(lifecycleManagedObject, set) WTKeyedHashSet returnMap = LifeCycleHelper.service.navigate(map, Transition.toTransition("SET_STATE"), true)

Supported API: true

Specified by:
navigate in interface LifeCycleService
Parameters:
c - A WTKeyedMap that contains as its keys LifecycleManagedObject or LifeCycleTemplates and the values are a set of states to navigate.
transition - the name of the transition to navigate
successor - specifies whether or not to return the successor state or the predessor.
Returns:
Map
Throws:
WTException
LifeCycleException

getSeriesSelectors

public WTKeyedMap getSeriesSelectors(WTSet lcms)
                              throws WTException
Given a WTSet of objects, returns a WTKeyedMap whose keys are those elements of the argument set that are LifeCycleManaged and whose values are the keys' corresponding SeriesRangeSelector values for their current states, if applicable. If a key's current state does not have a SeriesRangeSelector, it is mapped to null.

Supported API: true

Specified by:
getSeriesSelectors in interface LifeCycleService
Parameters:
lcms - set of objects. Those that are not wt.lifecycle.LifeCycleManaged are ignored (and are excluded from the result).
Returns:
WTKeyedMap
Throws:
WTException

createDefaultTransitions

public void createDefaultTransitions(WTCollection lifeCycleTemplates)
                              throws WTException
Creates all default transitions for all life cycle templates in the specirfied collection, according to the directives specified in the wt.properties system configuration. It is the caller's responsibility to ensure that the invocation of this method will not result in transition duplication, which will result in an exception's being thrown. In general, the only way to ensure this is to invoke this method only on life cycle templates that have no transitions defined (not counting NEXT transitions, which are for internal usage and may not be specified for default initialization).

Supported API: false

Specified by:
createDefaultTransitions in interface LifeCycleService
Parameters:
lifeCycleTemplates - a collection of lifecycle templates to create transitions for
Throws:
WTException

saveLifeCycleTemplate

public TransactionResult saveLifeCycleTemplate(TransactionContainer aTran,
                                               WTContainerRef context,
                                               boolean bypassDefaultTransitions)
                                        throws WTException,
                                               LifeCycleException
Store or update a LifeCycleTemplate. This method accepts and processes a batch container of persistence assertions. If a WTContainerRef is passed, and it is different that that of this templates master; then a new master is created in the passed WTContainer, and this template becomes the first iteration.

Supported API: true

Specified by:
saveLifeCycleTemplate in interface LifeCycleService
Parameters:
aTran - a TransactionContainer that contains a set of LifeCycleTemplate, PhaseTemplate, AdHocAclSpec, Criterion and Transition assertions and transitions that need to be applied against one or more LifeCycleTemplate objects
context - the container the template is being saved in
bypassDefaultTransitions - specifies whether or not the default transitions should be created. if set to true, the transitions must be specified in the transaction container
Returns:
TransactionResult
Throws:
WTException
LifeCycleException

findTransitions

public Set findTransitions(WTSet promotables)
                    throws WTException
For a given Set of promotables return the intersection of thier common Transitions.

Supported API: false

Specified by:
findTransitions in interface LifeCycleService
Parameters:
promotables -
Returns:
Set
Throws:
WTException

findTransitions

public Set findTransitions(WTSet promotables,
                           Transition transition)
                    throws WTException
For a given Set of Promotables, return the intersection of common Transitions. Note: This will either return a Set of 1 namely the passed in transition of an empty set.

Supported API: false

Specified by:
findTransitions in interface LifeCycleService
Parameters:
promotables -
transition -
Returns:
Set
Throws:
WTException

setLifeCycleState

public WTList setLifeCycleState(WTList list,
                                Map stateMap,
                                WTList terminateList)
                         throws WTException,
                                LifeCycleException
Set the state of the Life Cycle Managed objects in the WTList list. Set state values are in the Map stateMap where the key is the LCMO in list and the value is a State. Also this method will terminate any workflow processes accociated in WTList terminateList.

Supported API: true

Specified by:
setLifeCycleState in interface LifeCycleService
Parameters:
list - The LifeCycleManaged objects whose state should be updated
stateMap - The state to set the LifeCycleManaged object to. Key=LCMO, value State
terminateList - The LifeCycleManaged objects whose workflow processes should be terminated.
Returns:
WTList
Throws:
WTException
LifeCycleException

assignToLifeCycle

public Persistable assignToLifeCycle(Persistable object)
                              throws WTException,
                                     LifeCycleException
Associate a life cycle managed object with a life cycle. This includes assigning an initial state to the object.

Supported API: false

Specified by:
assignToLifeCycle in interface LifeCycleServiceSvr
Parameters:
object - the Persistable object that the caller wants assigned to a life cycle
Returns:
Persistable
Throws:
WTException
LifeCycleException

doSubmit

public LifeCycleManaged doSubmit(LifeCycleManaged object)
                          throws WTException,
                                 LifeCycleException
Submit the object for review. This initiates the appropriate workflow for the life cycle gate.

Supported API: false

Specified by:
doSubmit in interface LifeCycleServiceSvr
Parameters:
object - the LifeCycleManaged object that should be submitted for review
Returns:
LifeCycleManaged
Throws:
WTException
LifeCycleException

doPromote

public LifeCycleManaged doPromote(LifeCycleManaged object,
                                  LifeCycleSignature signature)
                           throws WTException,
                                  LifeCycleException
Transition the object to its next phase, updating its state, initiating the appropriate workflow and recording history.

Supported API: false

Specified by:
doPromote in interface LifeCycleServiceSvr
Parameters:
object - the LifeCycleManaged object to be promoted
signature - the LifeCycleSignature object to be used to record information about the promote
Returns:
LifeCycleManaged
Throws:
WTException
LifeCycleException

doDemote

public LifeCycleManaged doDemote(LifeCycleManaged object,
                                 LifeCycleSignature signature)
                          throws WTException,
                                 LifeCycleException
Transition the object to its previous phase, updating its state, initiating the appropriate workflow and recording history.

Supported API: false

Specified by:
doDemote in interface LifeCycleServiceSvr
Parameters:
object - the LifeCycleManaged object to be used in the demote
signature - the LifeCycleSignature object to be used to record information about the demote
Returns:
LifeCycleManaged
Throws:
WTException
LifeCycleException

doDeny

public LifeCycleManaged doDeny(LifeCycleManaged object,
                               LifeCycleSignature signature)
                        throws WTException,
                               LifeCycleException
Transition the object from the gate back to the phase, initating the appropriate workflow and recording history.

Supported API: false

Specified by:
doDeny in interface LifeCycleServiceSvr
Parameters:
object - the LifeCycleManaged object to be used in the demote
signature - the LifeCycleSignature object to be used to record information about the demote
Returns:
LifeCycleManaged
Throws:
WTException
LifeCycleException

doDrop

public LifeCycleManaged doDrop(LifeCycleManaged object,
                               LifeCycleSignature signature)
                        throws WTException,
                               LifeCycleException
Remove the object from the life cycle and set its state to DROPPED. Also, terminate the associated workflow(s).

Supported API: false

Specified by:
doDrop in interface LifeCycleServiceSvr
Parameters:
object - the LifeCycleManaged object to be used in the demote
signature - the LifeCycleSignature object to be used to record information about the demote
Returns:
LifeCycleManaged
Throws:
WTException
LifeCycleException

doReassign

public LifeCycleManaged doReassign(LifeCycleManaged object,
                                   LifeCycleTemplateReference lctRef)
                            throws WTException,
                                   LifeCycleException
Re-assign the object to a new life cycle. Transfer current phase information to history.

Supported API: false

Specified by:
doReassign in interface LifeCycleServiceSvr
Parameters:
object - the LifeCycleManaged object to be reassigned
lctRef -
Returns:
LifeCycleManaged
Throws:
WTException
LifeCycleException

validateSubmit

public LifeCycleManaged validateSubmit(LifeCycleManaged object)
                                throws WTException,
                                       LifeCycleException
Perform pre-submit validations

Supported API: false

Specified by:
validateSubmit in interface LifeCycleServiceSvr
Parameters:
object - the LifeCycleManaged object to be submitted
Returns:
LifeCycleManaged
Throws:
WTException
LifeCycleException

validatePromote

public LifeCycleSignature validatePromote(LifeCycleManaged object,
                                          LifeCycleSignature signature)
                                   throws WTException,
                                          LifeCycleException
Perform pre-promote validations

Supported API: false

Specified by:
validatePromote in interface LifeCycleServiceSvr
Parameters:
object - the LifeCycleManaged object to be promoted
signature - the LifeCycleSignature object to be used to record information about the promote
Returns:
LifeCycleSignature
Throws:
WTException
LifeCycleException

validateDemote

public LifeCycleSignature validateDemote(LifeCycleManaged object,
                                         LifeCycleSignature signature)
                                  throws WTException,
                                         LifeCycleException
Perform pre-demote validations

Supported API: false

Specified by:
validateDemote in interface LifeCycleServiceSvr
Parameters:
object - the LilfeCycleManaged object to be demoted
signature - the LifeCycleSignature object used to record information about the demote
Returns:
LifeCycleSignature
Throws:
WTException
LifeCycleException

validateDeny

public LifeCycleSignature validateDeny(LifeCycleManaged object,
                                       LifeCycleSignature signature)
                                throws WTException,
                                       LifeCycleException
Perform pre-deny validations

Supported API: false

Specified by:
validateDeny in interface LifeCycleServiceSvr
Parameters:
object - the LilfeCycleManaged object to be demoted
signature - the LifeCycleSignature object used to record information about the demote
Returns:
LifeCycleSignature
Throws:
WTException
LifeCycleException

validateDrop

public LifeCycleSignature validateDrop(LifeCycleManaged object,
                                       LifeCycleSignature signature)
                                throws WTException,
                                       LifeCycleException
Perform pre-drop validations

Supported API: false

Specified by:
validateDrop in interface LifeCycleServiceSvr
Parameters:
object - the LifeCycleManaged object that should be voted on
signature - the LifeCycleSignature object used to record information about the vote
Returns:
LifeCycleSignature
Throws:
WTException
LifeCycleException

validateVote

public LifeCycleSignature validateVote(LifeCycleManaged object,
                                       LifeCycleSignature signature)
                                throws WTException,
                                       LifeCycleException
Perform pre-vote validations

Supported API: false

Specified by:
validateVote in interface LifeCycleServiceSvr
Parameters:
object - the LifeCycleManaged object that should be voted on
signature - the LifeCycleSignature object used to record information about the vote
Returns:
LifeCycleSignature
Throws:
WTException
LifeCycleException

validateReassign

public LifeCycleManaged validateReassign(LifeCycleManaged object,
                                         LifeCycleTemplateReference lctRef)
                                  throws WTException,
                                         LifeCycleException
Perform pre-reassign validations

Supported API: false

Specified by:
validateReassign in interface LifeCycleServiceSvr
Parameters:
object - the LifeCycleManaged object that should be reassigned
lctRef -
Returns:
LifeCycleManaged
Throws:
WTException
LifeCycleException

saveHistory

public LifeCycleHistory saveHistory(LifeCycleManaged object,
                                    Phase aPhase,
                                    String event)
                             throws WTException,
                                    LifeCycleException
Create a history entry based on a life cycle event. This method is invoked for each of:

 1. StandardLifeCycleService.ENTER_PHASE
    #  Default: History event recorded
 2. StandardLifeCycleService.SUBMIT
    # Default: History event recorded
 3. StandardLifeCycleService.PROMOTE
    # Default: History event recorded
 4. StandardLifeCycleService.VOTE
    # Default: Signature created but no history event recorded
 5. StandardLifeCycleService.DEMOTE
    # Default: History event recorded
 6. StandardLifeCycleService.DROP
    # Default: History event recorded
 7. StandardLifeCycleService.DENY
    # Default: History event recorded
 8. StandardLifeCycleService.RETEAM
    # Default: History event recorded
 9. StandardLifeCycleService.REASSIGN
    # Default: History event recorded
 


Supported API: false

Specified by:
saveHistory in interface LifeCycleServiceSvr
Parameters:
object - the LifeCycleManaged object that the history is associated to
aPhase - the Phase object that the history will be associated to
event - the name of the event that History is associated to
Returns:
LifeCycleHistory
Throws:
WTException
LifeCycleException

getPhaseName

public String getPhaseName(LifeCycleManaged object)
                    throws WTException,
                           LifeCycleException
Answer the phase name of the current phase for the specified life cycle managed object

Supported API: false

Specified by:
getPhaseName in interface LifeCycleServiceSvr
Parameters:
object - the LifeCycleManaged object used as search criteria in the retrieval of the name of the phase
Returns:
String
Throws:
WTException
LifeCycleException

getRunningInstances

public Enumeration getRunningInstances(String templateName)
                                throws WTException,
                                       LifeCycleException
Deprecated. at 5.0 - Use the whereUsed methods instead.

Answer an enumeration of LifeCycleManaged objects current in the specified life cycle. Caution - this could be a large result set.

Supported API: false

Specified by:
getRunningInstances in interface LifeCycleServiceSvr
Parameters:
templateName - the name of the LifeCycleTemplate used as search criteria in the retrieval of LifeCycleManaged objects associated to the LifeCycleTemplate name
Returns:
Enumeration
Throws:
WTException
LifeCycleException

submit

public void submit(WTObject object)
            throws WTException,
                   LifeCycleException
Submit the object for review. This executes doSubmit. This method should be used by the Workflow robot to complete a Submit.

Supported API: false

Specified by:
submit in interface LifeCycleServiceSvr
Parameters:
object - the LifeCycleManaged object that should be submitted for approval
Throws:
WTException
LifeCycleException

promote

public void promote(WTObject object)
             throws WTException,
                    LifeCycleException
Promote an object to the next phase. This executes doPromote. This method should be used by the Workflow robot to promote the object to the next phase. If the object is not already at the gate, the Submit robotable method is first executed.

Supported API: false

Specified by:
promote in interface LifeCycleServiceSvr
Parameters:
object - the LifeCycleManaged object that should be promoted
Throws:
WTException
LifeCycleException

demote

public void demote(WTObject object)
            throws WTException,
                   LifeCycleException
Demote the object to the previous phase. This executes the doDemote method. This method should be used by the Workflow robot.

Supported API: false

Specified by:
demote in interface LifeCycleServiceSvr
Parameters:
object - the LifeCycleManaged object that should be demoted.
Throws:
WTException
LifeCycleException

deny

public void deny(WTObject object)
          throws WTException,
                 LifeCycleException
Return the object to the submitter, removing it from the gate. This process executes the doDeny method. This method should be used by the Workflow robot.

Supported API: false

Specified by:
deny in interface LifeCycleServiceSvr
Parameters:
object - the LifeCycleManaged object that should be denied
Throws:
WTException
LifeCycleException

drop

public void drop(WTObject object)
          throws WTException,
                 LifeCycleException
Transition the object to an end state. This process executes the doDrop. This method should be used by the Workflow robot.

Supported API: false

Specified by:
drop in interface LifeCycleServiceSvr
Parameters:
object - the LifeCycleManaged object that should be moved to a final/dropped state
Throws:
WTException
LifeCycleException

setState

public LifeCycleManaged setState(LifeCycleManaged object,
                                 State aState)
                          throws WTException,
                                 LifeCycleException
Transition the object to an different state. This process executes the validateSetState. This method should be used by the Workflow SetState robot.

Supported API: false

Specified by:
setState in interface LifeCycleServiceSvr
Parameters:
object - the LifeCycleManaged object
aState - The state to set the LifeCycleManaged object to.
Returns:
LifeCycleManaged
Throws:
WTException
LifeCycleException

setState

public LifeCycleManaged setState(LifeCycleManaged object,
                                 int aStateOrdinal)
                          throws WTException,
                                 LifeCycleException
Transition the object to an different state. This process executes the validateSetState. This method should be used by the Workflow SetState robot.

Supported API: false

Specified by:
setState in interface LifeCycleServiceSvr
Parameters:
object - the LifeCycleManagedObject.
aStateOrdinal - The ordianal value of the state to set the LifeCycleManaged object to.
Returns:
LifeCycleManaged
Throws:
WTException
LifeCycleException

validateSetState

public PhaseTemplate validateSetState(LifeCycleManaged object,
                                      State aState)
                               throws WTException,
                                      LifeCycleException
Used by setState, checks that the state the Workflow SetState robot is tying to set the object to is valid.

Supported API: false

Specified by:
validateSetState in interface LifeCycleServiceSvr
Parameters:
object - The LifeCycleManagedObject
aState - The state to set the LifeCycleManagedObject to, this state must be validated.
Returns:
PhaseTemplate
Throws:
WTException
LifeCycleException

validateSetState

public PhaseTemplate validateSetState(LifeCycleManaged object,
                                      int aStateOrdinal)
                               throws WTException,
                                      LifeCycleException
Used by setState, checks that the state the Workflow SetState robot is tying to set the object to is valid.

Supported API: false

Specified by:
validateSetState in interface LifeCycleServiceSvr
Parameters:
object - The LifeCycleManagedObject.
aStateOrdinal - The state ordinal value to set the LifeCycleManagedObject to, this state must be validated.
Returns:
PhaseTemplate
Throws:
WTException
LifeCycleException

doSetState

public LifeCycleManaged doSetState(LifeCycleManaged object,
                                   PhaseTemplate aPhaseTemplate)
                            throws WTException,
                                   LifeCycleException
Sets the state of the object. Used by the Workflow SetState robot.

Supported API: false

Specified by:
doSetState in interface LifeCycleServiceSvr
Parameters:
object - The LifeCycleManagedObject
aPhaseTemplate - The phasetemplate to set the lifecyclemanagedobject to indicated by the state from setState.
Returns:
LifeCycleManaged
Throws:
WTException
LifeCycleException

whereUsed

public QueryResult whereUsed(LifeCycleTemplate aTemplate)
                      throws WTException,
                             LifeCycleException
Given a LifeCycleTemplate, return a QueryResult containing all LifeCycleManaged objects that use it

Supported API: false

Specified by:
whereUsed in interface LifeCycleServiceSvr
Parameters:
aTemplate -
Returns:
QueryResult
Throws:
WTException
LifeCycleException

whereUsed

public QueryResult whereUsed(LifeCycleTemplateMaster aMaster)
                      throws WTException,
                             LifeCycleException
Given a LifeCycleTemplateMaster, return a QueryResult containing all LifeCycleManaged objects that use any iteration of it

Supported API: false

Specified by:
whereUsed in interface LifeCycleServiceSvr
Parameters:
aMaster -
Returns:
QueryResult
Throws:
WTException
LifeCycleException

setState

public WTObject setState(WTObject object,
                         State aState)
                  throws WTException,
                         LifeCycleException
Used to Validate the WTObject from the robot and pass onto setState.

Supported API: false

Specified by:
setState in interface LifeCycleServiceSvr
Parameters:
object - The WTObject containing the LifeCycleManaged object.
aState - The state to set the LifeCycle to.
Returns:
WTObject
Throws:
WTException
LifeCycleException

setState

public WTObject setState(WTObject object,
                         Integer aStateOrdinal)
                  throws WTException,
                         LifeCycleException
Used to Validate the WTObject from the robot and pass onto setState.

Supported API: false

Specified by:
setState in interface LifeCycleServiceSvr
Parameters:
object - The WTObject containing the LifeCycleManaged object.
aStateOrdinal - A ordinal value which corresponds to a state in the LifeCycle.
Returns:
WTObject
Throws:
WTException
LifeCycleException

whereUsed

public QueryResult whereUsed(WfProcessTemplateMaster master)
                      throws WTException,
                             LifeCycleException
Given a WfProcessTemplateMaster, return a QueryResult containing all PhaseTemplate objects that use it.

Supported API: false

Specified by:
whereUsed in interface LifeCycleServiceSvr
Parameters:
master -
Returns:
QueryResult
Throws:
WTException
LifeCycleException

whereUsed

public QueryResult whereUsed(WfProcessTemplate template)
                      throws WTException,
                             LifeCycleException
Given a WfProcessTemplate, return a QueryResult containing all PhaseTemplate objects that use it

Supported API: false

Specified by:
whereUsed in interface LifeCycleServiceSvr
Parameters:
template -
Returns:
QueryResult
Throws:
WTException
LifeCycleException

setState

public WTList setState(WTList list,
                       State aState)
                throws WTException,
                       LifeCycleException
Transition the objects in the collection to a different state. This process executes the validateSetState. This method should be used by the Workflow SetState robot.

Supported API: false

Specified by:
setState in interface LifeCycleServiceSvr
Parameters:
list - a collection of lifecycle managed objects
aState - The state to set the LifeCycleManaged object to.
Returns:
WTList
Throws:
WTException
LifeCycleException

setState

public WTList setState(WTList list,
                       Map map)
                throws WTException,
                       LifeCycleException
Transition the objects in the collection to a different state. This process executes the validateSetState. This method should be used by the Workflow SetState robot.

Supported API: false

Specified by:
setState in interface LifeCycleServiceSvr
Parameters:
list - a collection of lifecycle managed objects
map - The state to set the LifeCycleManaged object to. Key= LCMO. Value = State.
Returns:
WTList
Throws:
WTException
LifeCycleException

assignToLifeCycle

private Persistable assignToLifeCycle(Persistable object,
                                      WTContainerRef context_ref)
                               throws WTException,
                                      LifeCycleException
Throws:
WTException
LifeCycleException

assignToLifeCycle

private void assignToLifeCycle(WTList collection,
                               WTContainerRef context,
                               boolean persist)
                        throws WTException,
                               LifeCycleException
Throws:
WTException
LifeCycleException

getPhaseTemplateMaps

private WTKeyedMap getPhaseTemplateMaps(WTCollection collection)
                                 throws WTException
Throws:
WTException

doReassign

private LifeCycleManaged doReassign(LifeCycleManaged object,
                                    LifeCycleTemplateReference lctRef,
                                    WTContainerRef context_ref)
                             throws WTException,
                                    LifeCycleException
Throws:
WTException
LifeCycleException

performStartupProcess

protected void performStartupProcess()
                              throws ManagerException
Override the method from StandardManager to provide LifeCycleServices with custom startup for event subscription. When subscribing create an anonymous inner class adapter per subscription to handle each specific event being subscribed to.

Overrides:
performStartupProcess in class StandardManager
Throws:
ManagerException

registerAsListener

protected void registerAsListener()
                           throws ManagerException
Register as a listener for dispatched events. This method registers for:
 1. PRE_STORE
 2. POST_STORE
 3. CLEANUP_LINK
 4. PRE_DELETE
 5. PRE_CHANGE_IDENTITY
 

Throws:
ManagerException

processPreStoreEvent

protected void processPreStoreEvent(WTCollection collection)
                             throws WTException
Do pre-store processing on life cycle managed objects.

This initializes the State cookie.

Throws:
WTException

processPostStoreEvent

protected void processPostStoreEvent(WTList collection)
                              throws WTException
Do post-store processing on life cycle managed objects.

This hooks the object to an initial phase.

Throws:
WTException

processPostLCTMStoreEvent

protected void processPostLCTMStoreEvent(WTCollection lctms)
                                  throws WTException
Do post-store processing on new life cycle templates.

This initializes default transitions.

Throws:
WTException

processCleanupLinkEvent

protected void processCleanupLinkEvent(Map history,
                                       Map criteria)
                                throws WTException
Do cleanup link processing on life cycle managed objects.

This removes "roleB" objects from CurrentPhase & ObjectHistory links

Throws:
WTException

processCleanupPhaseLinkEvent

protected void processCleanupPhaseLinkEvent(PhaseLink link)
                                     throws WTException
Do cleanup link processing on Phase objects.

This removes "roleB" objects from Phase links

Throws:
WTException

processCleanupAdHocAclLinkEvent

protected void processCleanupAdHocAclLinkEvent(AdHocAclLink link)
                                        throws WTException
Do cleanup link processing on AdHocAclSpec objects.

This removes "roleB" objects from CurrentPhase & ObjectHistory links

Throws:
WTException

processCleanupDefaultCriterionEvent

protected void processCleanupDefaultCriterionEvent(DefaultCriterion link)
                                            throws WTException
Do cleanup link processing on Criterion objects.

This removes "roleB" objects from DefaultCriterion links

Throws:
WTException

validateCheckinTemplateNotInUse

protected void validateCheckinTemplateNotInUse(LifeCycleTemplate lct)
                                        throws WTException
On PRE_CHECKIN event, ensure there are no Life Cycle Managed objects using this Life Cycle Template

Throws:
WTException

validatePreDeleteTemplateNotInUse

protected void validatePreDeleteTemplateNotInUse(LifeCycleTemplate lct)
                                          throws WTException
On PRE_DELETE event, ensure there are no Life Cycle Managed objects using this Life Cycle Template

Throws:
WTException

copyObjectsRelatedToLifeCycleTemplate

protected void copyObjectsRelatedToLifeCycleTemplate(LifeCycleTemplate original,
                                                     LifeCycleTemplate working)
                                              throws WTException
On PostCheckout event, copy all the objects related the Life Cycle Template from the original to the working

Throws:
WTException

copyPhaseTemplateAndRelatedObjects

protected PhaseTemplate copyPhaseTemplateAndRelatedObjects(PhaseTemplate originalPt,
                                                           PhaseTemplate prevWorkingPt,
                                                           LifeCycleTemplate workingLct)
                                                    throws WTException
For each PhaseTemplate found, copy that object and all related objects.

Throws:
WTException

copyTransitions

protected void copyTransitions(LifeCycleTemplate src,
                               LifeCycleTemplate dest)
                        throws WTException
Copies all PhaseSuccession objects between the phase templates of the source and destination life cycle templates.

Throws:
WTException

getPhaseCopyMap

private WTValuedMap getPhaseCopyMap(LifeCycleTemplate src,
                                    LifeCycleTemplate dest)
                             throws WTException
Returns a non-inflated map of the phase templates of the source life cycle template to their counterparts (phase templates having matching states) of the destination life cycle template.

Throws:
WTException

getTransitions

private WTCollection getTransitions(LifeCycleTemplate lct)
                             throws WTException
Returns an inflated collection of the phase succession links associated with the phase templates of the argument life cycle template.

Throws:
WTException

processReteam

protected void processReteam(LifeCycleManaged object)
                      throws WTException
On RETEAM, complete the appropriate life cycle processing

Throws:
WTException

processRollback

protected void processRollback(LifeCycleManaged object)
                        throws WTException
On POST_ROLLBACK, complete the appropriate life cycle processing

Throws:
WTException

processPreRevise

protected void processPreRevise(LifeCycleManaged object)
                         throws WTException
On Revise, clear out the cookie information

Throws:
WTException

cloneCriteria

private void cloneCriteria(Phase aPhase,
                           PhaseTemplate aPhaseTemplate)
                    throws WTException
Runtime Object Management *

Throws:
WTException

cloneCriteria

private void cloneCriteria(WTCollection collection,
                           WTKeyedMap phaseMap,
                           WTKeyedMap phaseTemplateMap)
                    throws WTException
Throws:
WTException

initializeStateCookie

private void initializeStateCookie(WTCollection collection)
                            throws LifeCycleException,
                                   WTException
Throws:
LifeCycleException
WTException

initializeStateCookie

private LifeCycleManaged initializeStateCookie(LifeCycleManaged object)
                                        throws LifeCycleException
Throws:
LifeCycleException

createPhaseInstance

private Phase createPhaseInstance(LifeCycleManaged object,
                                  PhaseTemplate aPhaseTemplate)
                           throws WTException
Throws:
WTException

getPhaseCriteria

private Vector getPhaseCriteria(Phase aPhase)
                         throws WTException
Setters/Getters *

Throws:
WTException

getPhaseCriteria

private Vector getPhaseCriteria(PhaseTemplate aPhaseTemplate)
                         throws WTException
Throws:
WTException

buildCriteriaVector

private Vector buildCriteriaVector(QueryResult results)
                            throws WTException
Throws:
WTException

saveHistory

private LifeCycleHistory saveHistory(LifeCycleManaged object,
                                     Phase aPhase,
                                     String event,
                                     Timestamp timestamp)
                              throws WTException,
                                     LifeCycleException
Throws:
WTException
LifeCycleException

doSetState

private LifeCycleManaged doSetState(LifeCycleManaged object,
                                    PhaseTemplate aPhaseTemplate,
                                    Timestamp timestamp)
                             throws WTException,
                                    LifeCycleException
Throws:
WTException
LifeCycleException

setState

private LifeCycleManaged setState(LifeCycleManaged object,
                                  State aState,
                                  Timestamp timestamp)
                           throws WTException,
                                  LifeCycleException
Throws:
WTException
LifeCycleException

setState

private LifeCycleState setState(LifeCycleManaged object,
                                LifeCycleTemplateReference lctRef,
                                State aState,
                                boolean atGate)
                         throws WTException,
                                WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

setStates

private void setStates(WTList list,
                       Map phaseTemplateMap,
                       boolean atGate)
                throws WTException,
                       WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

setStates

private void setStates(WTList list,
                       LifeCycleTemplateReference lctRef,
                       State aState,
                       boolean preserveState,
                       boolean atGate)
                throws WTException,
                       WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

getInitialPhase

private PhaseTemplate getInitialPhase(LifeCycleManaged object)
                               throws LifeCycleException
Throws:
LifeCycleException

getInitialPhase

private PhaseTemplate getInitialPhase(LifeCycleTemplate template)
                               throws LifeCycleException
Throws:
LifeCycleException

getPhaseTemplate

private PhaseTemplate getPhaseTemplate(LifeCycleManaged object)
                                throws LifeCycleException
Throws:
LifeCycleException

getPhaseTemplate

private PhaseTemplate getPhaseTemplate(AdHocAclSpec ahas)
                                throws LifeCycleException,
                                       WTException
Throws:
LifeCycleException
WTException

getPhaseTemplate

private PhaseTemplate getPhaseTemplate(Criterion criterion)
                                throws LifeCycleException,
                                       WTException
Throws:
LifeCycleException
WTException

setCurrentPhase

private Phase setCurrentPhase(LifeCycleManaged object,
                              Phase phase)
                       throws LifeCycleException,
                              WTException
Throws:
LifeCycleException
WTException

setCurrentPhase

private void setCurrentPhase(WTCollection collection,
                             WTKeyedMap phaseMap)
                      throws LifeCycleException,
                             WTException
Throws:
LifeCycleException
WTException

getAssignedState

private State getAssignedState(PhaseTemplate aPhaseTemplate)
                        throws LifeCycleException
Throws:
LifeCycleException

isCookieInitialized

private boolean isCookieInitialized(LifeCycleManaged object)
                             throws WTException
Throws:
WTException

setState

private LifeCycleState setState(LifeCycleManaged object,
                                State aState,
                                boolean atGate)
                         throws WTException,
                                WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

setTemplate

private void setTemplate(LifeCycleManaged object,
                         LifeCycleTemplate aTemplate)
                  throws WTException,
                         WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

getSuccessorPhase

private PhaseTemplate getSuccessorPhase(PhaseTemplate current)
                                 throws WTException
Answer the next phase in the Life Cycle. Returns 'null' if not found.

Throws:
WTException

getPredecessorPhase

private PhaseTemplate getPredecessorPhase(PhaseTemplate current)
                                   throws WTException
Answer the next phase in the Life Cycle or null if current is the initial phase (no predecessor).

Throws:
WTException

processReviseTransition

private void processReviseTransition(WTCollection collection)
                              throws WTException,
                                     LifeCycleException
Set the LifeCycleState based on LifeCycle REVISE transition for revised objects. This method assumes that it's only called within a Transaction block, currently as part of a persist transaction.

Throws:
WTException
LifeCycleException

findTemplateMasterByClass

private Enumeration findTemplateMasterByClass(Class targetClass,
                                              WTContainerRef context)
                                       throws LifeCycleException
Answer an enumeration of templates which accepts the specified class in this container.

Throws:
LifeCycleException

findTemplateMasterByName

private LifeCycleTemplateMaster findTemplateMasterByName(String name,
                                                         WTContainerRef context)
                                                  throws LifeCycleException
Answer an enumeration of templates which accepts the specified class in this container.

Throws:
LifeCycleException

findDefaultTemplate

private LifeCycleTemplate findDefaultTemplate()
                                       throws LifeCycleException
Throws:
LifeCycleException

findDefaultTemplate

private LifeCycleTemplate findDefaultTemplate(LifeCycleManaged object)
                                       throws LifeCycleException
Throws:
LifeCycleException

findDefaultMaster

private LifeCycleTemplateMaster findDefaultMaster()
                                           throws LifeCycleException
Throws:
LifeCycleException

applyLifeCyclePermissions

private void applyLifeCyclePermissions(WTCollection collection,
                                       boolean persist)
                                throws WTException
Throws:
WTException

createPhases

private WTKeyedMap createPhases(WTCollection collection,
                                WTKeyedMap phaseTemplates)
                         throws WTException,
                                WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

createPhase

private Phase createPhase(LifeCycleManaged object,
                          PhaseTemplate aPhaseTemplate)
                   throws WTException,
                          WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

doStateTransition

private void doStateTransition(WTList collection,
                               String historyEvent,
                               WTKeyedMap phaseTemplateMap,
                               WTContainerRef context,
                               boolean persist)
                        throws LifeCycleException,
                               WTException
Throws:
LifeCycleException
WTException

saveHistory

public WTList saveHistory(WTList list,
                          WTKeyedMap phaseMap,
                          String event)
                   throws WTException,
                          LifeCycleException
Throws:
WTException
LifeCycleException

doStateTransition

private LifeCycleManaged doStateTransition(LifeCycleManaged object,
                                           PhaseTemplate nextPhaseTemplate,
                                           String historyEvent,
                                           WTContainerRef context_ref,
                                           Timestamp timestamp)
                                    throws LifeCycleException,
                                           WTException
Throws:
LifeCycleException
WTException

validatePersistence

private boolean validatePersistence(WTCollection collection)
                             throws WTException
Throws:
WTException

getPhaseSignatures

private Vector getPhaseSignatures(LifeCycleManaged object,
                                  WTUser user,
                                  QuerySpec select)
                           throws WTException
Throws:
WTException

getPhaseSignatures

private QueryResult getPhaseSignatures(LifeCycleManaged object,
                                       Phase aPhase)
                                throws WTException
Throws:
WTException

getPhaseSignatures

private Map getPhaseSignatures(WTList objects,
                               WTKeyedMap phaseMap)
                        throws WTException
Throws:
WTException

findRevisedObjects

private WTCollection findRevisedObjects(WTCollection collection)
                                 throws WTException
In a collection, find a list of all objects that are the result of a Revise, New View Version, New One-Off Version action. Ignore Sandbox created One-Off versions

Throws:
WTException

cleanupCurrentPhase

private void cleanupCurrentPhase(LifeCycleManaged object,
                                 Phase current,
                                 LifeCycleHistory aHistory)
                          throws WTException
Cleanup methods

Throws:
WTException

cleanupCurrentPhases

private void cleanupCurrentPhases(WTList objects,
                                  WTList aHistoryList)
                           throws WTException
Throws:
WTException

removePhaseData

private void removePhaseData(LifeCycleManaged object,
                             Phase current,
                             LifeCycleHistory aHistory)
                      throws WTException
Throws:
WTException

removePhaseData

private void removePhaseData(WTList objects,
                             WTKeyedMap phaseMap,
                             WTList histories)
                      throws WTException
Throws:
WTException

removePhaseData

private void removePhaseData(Map map)
                      throws WTException
Throws:
WTException

cleanupSignatures

private void cleanupSignatures(WTList objects,
                               WTKeyedMap phaseMap,
                               WTList histories)
                        throws WTException
Throws:
WTException

cleanupSignatures

private void cleanupSignatures(LifeCycleManaged object,
                               Phase currentPhase,
                               LifeCycleHistory aHistory)
                        throws WTException
Throws:
WTException

cleanupCriteria

private void cleanupCriteria(Phase aPhase,
                             LifeCycleHistory aHistory)
                      throws WTException
Throws:
WTException

createPhaseCriteriaMap

private Map createPhaseCriteriaMap(Object[] phases)
                            throws WTException
Throws:
WTException

cleanupCriteria

private void cleanupCriteria(WTList objects,
                             WTKeyedMap phaseMap,
                             WTList histories)
                      throws WTException
Throws:
WTException

cleanupObjectHistory

private void cleanupObjectHistory(Map map)
                           throws WTException
Throws:
WTException

findNumberOfTargets

private int findNumberOfTargets(Map map)
                         throws WTException
Throws:
WTException

getOidsOfLinks

private long[] getOidsOfLinks(Map map,
                              int mycount)
                       throws WTException
Throws:
WTException

getOidsOfPhases

private long[] getOidsOfPhases(Map map)
                        throws WTException
Throws:
WTException

getOidsOfObjects

private long[] getOidsOfObjects(Map map)
                         throws WTException
Throws:
WTException

deleteSignatures

private static void deleteSignatures(long[] lcmOids)
                              throws WTException
Throws:
WTException

deleteCriterion

private static void deleteCriterion(long[] lchOids)
                             throws WTException
Throws:
WTException

deleteCurrentPhase

private void deleteCurrentPhase(LifeCycleManaged object,
                                Phase current)
                         throws WTException
Throws:
WTException

deleteCurrentPhases

private void deleteCurrentPhases(WTList objects,
                                 WTKeyedMap phaseMap)
                          throws WTException
Throws:
WTException

initiateGateWorkflow

private Phase initiateGateWorkflow(PhaseTemplate aPhaseTemplate,
                                   Phase aPhase,
                                   LifeCycleManaged object)
                            throws WTException
Throws:
WTException

initiatePhaseWorkflow

private Phase initiatePhaseWorkflow(PhaseTemplate aPhaseTemplate,
                                    Phase aPhase,
                                    LifeCycleManaged object,
                                    WTContainerRef context_ref)
                             throws WTException
Throws:
WTException

initiatePhaseWorkflow

private void initiatePhaseWorkflow(WTKeyedMap phaseTemplateMap,
                                   WTKeyedMap phaseMap,
                                   WTCollection collection)
                            throws WTException
Throws:
WTException

initiateWorkflow

private WTValuedMap initiateWorkflow(WTValuedMap objToWfDefMap,
                                     WTKeyedMap objToWfNameMap,
                                     WTCollection collection)
                              throws WTException
Throws:
WTException

initiateWorkflow

private WfProcess initiateWorkflow(WfProcessDefinition aDefinition,
                                   Phase aPhase,
                                   LifeCycleManaged object,
                                   WTContainerRef context_ref)
                            throws WTException
Throws:
WTException

createRobotLifeCycleSignature

private LifeCycleSignature createRobotLifeCycleSignature(WTObject object,
                                                         Role role)
                                                  throws WTException
Throws:
WTException

whereUsed

public QueryResult whereUsed(WfProcess process)
                      throws WTException,
                             LifeCycleException
Throws:
WTException
LifeCycleException

constructProcessName

private String constructProcessName(WfProcessDefinition aPT,
                                    LifeCycleManaged obj)
                             throws WTException
Throws:
WTException

terminateProcesses

private void terminateProcesses(Enumeration enum)
                         throws WTException
Throws:
WTException

getLifeCycleManaged

private LifeCycleManaged getLifeCycleManaged(Phase phase)
                                      throws WTException,
                                             LifeCycleException
Throws:
WTException
LifeCycleException

validateState

private PhaseTemplate validateState(LifeCycleManaged object,
                                    State aState)
                             throws WTException,
                                    LifeCycleException
Throws:
WTException
LifeCycleException

validateState

private WTKeyedMap validateState(WTCollection collection,
                                 State aState,
                                 Map stateMap)
                          throws WTException,
                                 LifeCycleException
This API validates the state of each object in the collection and puts it's nextPhaseTemplate in a map to return to the caller.

Parameters:
collection - a collection of lifecycle managed objects
aState - a state to apply to all objects in a collection
Throws:
WTException
LifeCycleException

validateState

private PhaseTemplate validateState(LifeCycleManaged object,
                                    int aStateOrdinal)
                             throws WTException,
                                    LifeCycleException
Throws:
WTException
LifeCycleException

stateSearch

private PhaseTemplate stateSearch(LifeCycleTemplate aTemplate,
                                  State aState)
                           throws QueryException,
                                  WTException
Throws:
QueryException
WTException

buildAdHocAcl

private void buildAdHocAcl(List objects,
                           List membershipList,
                           Map phaseTemplates)
                    throws WTException
Adhoc ACL methods *

Throws:
WTException

buildAdHocAcl

private void buildAdHocAcl(LifeCycleManaged object,
                           Phase aPhase)
                    throws WTException
Throws:
WTException

buildAdHocAcl

private void buildAdHocAcl(LifeCycleManaged object,
                           PhaseTemplate pt)
                    throws WTException
Throws:
WTException

getAdHocAclSpec

private AdHocAclSpec getAdHocAclSpec(PhaseTemplate pt)
                              throws WTException
Caching methods *

Throws:
WTException

getInitialPhaseCache

protected InitialPhaseCache getInitialPhaseCache()

getLifeCycleTemplateCache

protected LifeCycleTemplateCache getLifeCycleTemplateCache()

getAdHocAclSpecCache

protected AdHocAclSpecCache getAdHocAclSpecCache()

getCriterionCache

protected CriterionCache getCriterionCache()

getLifeCycleTemplateNameCache

protected static LifeCycleTemplateNameCache getLifeCycleTemplateNameCache()

createLifeCycleTemplateNameCache

private static void createLifeCycleTemplateNameCache()

getPhaseTemplateCache

protected PhaseTemplateCache getPhaseTemplateCache()

isInitialPhase

private boolean isInitialPhase(PhaseTemplate currentPT)
                        throws WTException
Utilities *

Throws:
WTException

getStringOfObjectIdentities

private String getStringOfObjectIdentities(QueryResult qr)
                                    throws WTException,
                                           LifeCycleException
Throws:
WTException
LifeCycleException

getStringOfPhaseTemplates

private String getStringOfPhaseTemplates(QueryResult qr)
                                  throws WTException,
                                         LifeCycleException
Throws:
WTException
LifeCycleException

userIsARolePlayer

private boolean userIsARolePlayer(WTRoleHolder2 roleHolder,
                                  WTUser user,
                                  Role role)
                           throws WTException,
                                  LifeCycleException
Throws:
WTException
LifeCycleException

isGroupMember

private boolean isGroupMember(WTUser user,
                              Vector vp)
                       throws WTException
Throws:
WTException

shouldBeManaged

private WTCollection shouldBeManaged(WTCollection collection)
                              throws WTException
Determine if a Persistable object should be life cycle managed
 1. Working copies are not managed
 

Returns:
boolean
Throws:
WTException

shouldBeManaged

private boolean shouldBeManaged(Persistable object)
                         throws WTException
Throws:
WTException

isWorkingCopy

private boolean isWorkingCopy(Persistable object)
                       throws WTException
Throws:
WTException

isWorkingCopy

private WTCollection isWorkingCopy(WTCollection collection)
                            throws WTException
Throws:
WTException

isFirstIteration

private boolean isFirstIteration(Persistable object)
                          throws WTException
Throws:
WTException

isCheckedOut

private boolean isCheckedOut(Persistable object)
                      throws WTException
Throws:
WTException

validateLifeCycleTemplate

private LifeCycleTemplate validateLifeCycleTemplate(LifeCycleTemplateReference lctr,
                                                    boolean useLatest)
                                             throws WTException
Throws:
WTException

validateIsLatestIteration

private void validateIsLatestIteration(LifeCycleManaged object,
                                       String action)
                                throws WTException
Throws:
WTException

markWorkItemAsComplete

private void markWorkItemAsComplete(LifeCycleSignature signature,
                                    LifeCycleManaged object)
                             throws WTException
Throws:
WTException

replaceCriteria

private Vector replaceCriteria(Phase aPhase,
                               Vector criteria)
                        throws WTException
Runtime object management *

Throws:
WTException

buildHistory

private LifeCycleHistory buildHistory(LifeCycleManaged object,
                                      Phase aPhase,
                                      String historyEvent)
                               throws WTException
History support *

Throws:
WTException

logOrDelete

private void logOrDelete(LifeCycleSignature aSignature,
                         LifeCycleHistory aHistory,
                         boolean deleting)
                  throws WTException
Throws:
WTException

logOrDelete

private void logOrDelete(Criterion aCriterion,
                         LifeCycleHistory aHistory,
                         boolean deleting)
                  throws WTException
Throws:
WTException

roleContentsChanged

private boolean roleContentsChanged(Role aRole,
                                    RoleHolder2 prevRoleHolder,
                                    RoleHolder2 newRoleHolder)
                             throws WTException
Throws:
WTException

getLifeCycleTemplate

private LifeCycleTemplate getLifeCycleTemplate(PhaseTemplate pt)
                                        throws WTException
Throws:
WTException

getLocale

private Locale getLocale()
                  throws WTException
Throws:
WTException

getLCT

private LifeCycleTemplate getLCT(String aTemplateName)
                          throws WTException
Search for a LifeCycleTemplate with the given name. Look in the classis container.

Throws:
WTException

getLCT

private LifeCycleTemplate getLCT(String aTemplateName,
                                 WTContainerRef context)
                          throws WTException
Search the specified WTContainer for a LifeCycleTemplate with the given name. The specified WTContainer can be null in which case the global-context is searched. If a template is not found, null is returned.

Throws:
WTException

findTeamsObjects

private Enumeration findTeamsObjects(Team team)
                              throws WTException
This method finds all the Life Cycle Managed objects associated with the team so that the acls can get rebuilt for shared objects.

Throws:
WTException

validateLifeCycleTemplateObjects

private static boolean validateLifeCycleTemplateObjects(LifeCycleTemplate template)
                                                 throws WTException
Throws:
WTException

validatePhaseTemplateWorklfows

private static boolean validatePhaseTemplateWorklfows(PhaseTemplate phaseTemplate,
                                                      LifeCycleTemplate template)
                                               throws WTException
Throws:
WTException

mismatchedOrgs

private static boolean mismatchedOrgs(WfProcessDefinition def,
                                      String templateOrg)
                               throws WTException
Throws:
WTException

getOrgContainer

private static WTContainerRef getOrgContainer(WTContained object)
                                       throws WTException
Throws:
WTException

getPhase

private Phase getPhase(LifeCycleManaged object)
                throws WTException
Answer the CurrentPhase link for the object

Throws:
WTException

getPhases

private WTKeyedMap getPhases(WTList objects)
                      throws WTException
Throws:
WTException

findPhasesAndAddToMap

private void findPhasesAndAddToMap(long[] phaseOids,
                                   Map map)
                            throws WTException
Throws:
WTException

addNonIteratedPhaseIdsToMap

private long[] addNonIteratedPhaseIdsToMap(WTKeyedMap map,
                                           Map nonIterated,
                                           long[] phaseOids,
                                           int count)
                                    throws WTException
Throws:
WTException

addIteratedPhaseIdsToMap

private long[] addIteratedPhaseIdsToMap(WTKeyedMap map,
                                        Map iterated,
                                        long[] phaseOids,
                                        int count)
                                 throws WTException
Throws:
WTException

putObjectsIntoSearchBuckets

private void putObjectsIntoSearchBuckets(WTList objects,
                                         WTKeyedMap map,
                                         Map iterated,
                                         Map nonIterated)
                                  throws WTException
Throws:
WTException

setPhase

private void setPhase(LifeCycleManaged object,
                      Phase phase)
               throws WTException
Throws:
WTException

getOid

private ObjectIdentifier getOid(Object obj)

createSubcollectionsByKey

private List createSubcollectionsByKey(WTCollection collection)
                                throws WTException
Throws:
WTException

addToMapCollection

private void addToMapCollection(Map map,
                                Persistable object,
                                WTCollection collection)

validateReassign

public void validateReassign(WTCollection objects,
                             LifeCycleTemplateReference lctRef,
                             State state)
                      throws WTException,
                             LifeCycleException
Throws:
WTException
LifeCycleException

doReassign

private void doReassign(WTList list,
                        LifeCycleTemplateReference lctRef,
                        WTContainerRef context_ref,
                        State state,
                        boolean preserveState)
                 throws WTException,
                        LifeCycleException
Throws:
WTException
LifeCycleException

validateAtGate

private void validateAtGate(WTCollection lcmObjects)
                     throws WTException
This API validates whether or not all objects in the collection are not at the gate. If some objects are, a multi-object exception will be thrown.

Throws:
WTException

validateReassign

private void validateReassign(WTCollection lcmObjects,
                              LifeCycleTemplateReference lctRef)
                       throws WTException
This API validates whether or not all objects in the collection are are in a state where they can be assigned. If not, a multi-object exception will be thrown.

Throws:
WTException

validateIsLatestIteration

private void validateIsLatestIteration(WTCollection objects,
                                       String action)
                                throws WTException
Throws:
WTException

validateSetState

private WTKeyedMap validateSetState(WTCollection collection,
                                    State aState,
                                    Map stateMap)
                             throws WTException,
                                    LifeCycleException
Throws:
WTException
LifeCycleException

doSetState

private void doSetState(WTList list,
                        WTKeyedMap phaseTemplateMap)
                 throws WTException,
                        LifeCycleException
Throws:
WTException
LifeCycleException

resetNonBasicAttributes

private LifeCycleManaged resetNonBasicAttributes(LifeCycleManaged object)
                                          throws WTException
Remove the attributes that are not basic as the object no longer uses acls or teams

Throws:
WTException

getPhaseTemplatesForInitialization

private Set getPhaseTemplatesForInitialization(WTCollection lcts)
                                        throws WTException
Returns a Set of properly ordered WTList instances containing the PhaseTemplate instances of the argument collection of life cycle templates. "Properly ordered" means that each phase template is arranged according to its canonical (NEXT) successor relationship.

Throws:
WTException

newInitialPhasesSpec

private QuerySpec newInitialPhasesSpec(WTCollection lcts)
                                throws WTException
Returns a query spec selecting the initial phase template of each of the argument life cycle templates, NULL, and NULL. The NULLs are to make the SELECTed columns UNION-compatible with the query spec returned by newSuccessorPhaseSpec().

Throws:
WTException

newSuccessorPhasesSpec

private QuerySpec newSuccessorPhasesSpec(WTCollection lcts)
                                  throws WTException
Returns a query spec selecting the all non-initial phase templates of each of the argument life cycle templates and a reference to each such phase template's predecessor. The query actually SELECTs the classname and OID columns, so it is UNION-compatible with the query spec returned by newInitialPhaseSpec(). However, these columns are combined into a single WTReference object in the query result.

Throws:
WTException