public class ModuleInstance extends java.lang.Object implements Collectible, ModelInstanceAware, EntityWithId, ProcessInstanceParent
| Constructor and Description |
|---|
ModuleInstance(long id,
ModelInstance modelInstance,
Context context)
Creates new instance of
ModuleInstance. |
ModuleInstance(ModelInstance modelInstance,
Context context)
Creates new instance of
ModuleInstance. |
ModuleInstance(ModelInstance modelInstance,
com.whitestein.lsps.model.ProcessModel processModel)
Creates new instance of
ModuleInstance for given
ProcessModel. |
ModuleInstance(SModuleInstance source,
ModelInstance modelInstance)
Creates a new instance from the serialized companion.
|
| Modifier and Type | Method and Description |
|---|---|
ProcessInstance |
addNewProcessInstance(Context context)
Adds new child process instance.
|
ProcessInstance |
addNewProcessInstance(com.whitestein.lsps.model.ContextModelElement element)
modelInstance
Adds new child process instance.
|
ProcessInstance |
addProcessInstance(ProcessInstance processInstance)
Adds a process instances as a child of this module instance.
|
void |
collect()
Removes itself from the process.
|
protected void |
convertToDirectReferences() |
ModuleInstance |
createCopy(ModelInstance targetModelInstance)
Creates a copy without references to other objects.
|
void |
finishCopy(com.whitestein.lsps.engine.state.xml.Copiable source,
CopyHelper helper)
Copy references.
|
Context |
getContext()
Returns the context of this module.
|
com.whitestein.lsps.model.ElementWithId |
getElement(ModelProvider modelProvider)
Returns the model element.
|
java.lang.String |
getElementId()
Returns the element id.
|
java.lang.String |
getElementId(ModelProvider modelProvider)
Returns the model element id.
|
long |
getId()
Returns the id.
|
ModelInstance |
getModelInstance()
Returns the model instance.
|
ModuleInstance |
getModuleInstance()
Returns the enclosing module instance.
|
java.lang.String |
getName()
Returns the module name.
|
java.lang.String |
getPath()
Returns the full path to this element as a string.
|
QID |
getPathQID()
Returns the full path to this element as a QID.
|
java.util.Collection<ProcessInstance> |
getProcessInstances()
Returns immutable collection of child process instances.
|
java.util.Collection<Collectible> |
getReferences()
Returns collection of all referenced collectible objects.
|
ModuleInstanceState |
getState()
Returns the module instance state.
|
boolean |
isPersistent()
Returns true if this object cannot be collected.
|
boolean |
isSuspended()
Returns true if this module instance is suspended.
|
void |
rebind(ModelInstance modelInstance)
Re-bind to the provided model instance.
|
boolean |
removeProcessInstance(ProcessInstance processInstance)
Removes a process instance.
|
void |
setState(ModuleInstanceState state)
Sets the module instance state.
|
SModuleInstance |
toSerializable(SModelInstance smi,
MarshallerConfig config)
Creates a serializable object.
|
java.lang.String |
toString() |
public ModuleInstance(ModelInstance modelInstance, Context context)
ModuleInstance.modelInstance - context - java.lang.NullPointerException - if modelInstance is nullpublic ModuleInstance(long id,
ModelInstance modelInstance,
Context context)
ModuleInstance.id - modelInstance - context - java.lang.NullPointerException - if modelInstance is nullpublic ModuleInstance(ModelInstance modelInstance, com.whitestein.lsps.model.ProcessModel processModel)
ModuleInstance for given
ProcessModel.modelInstance - processModel - java.lang.NullPointerException - if modelInstance is nullpublic ModuleInstance(SModuleInstance source, ModelInstance modelInstance)
source - modelInstance - public SModuleInstance toSerializable(SModelInstance smi, MarshallerConfig config)
smi - config - public long getId()
EntityWithIdgetId in interface EntityWithIdpublic ModuleInstanceState getState()
public void setState(ModuleInstanceState state)
state - public boolean isSuspended()
public java.lang.String getName()
public Context getContext()
getContext in interface ProcessInstanceParentpublic com.whitestein.lsps.model.ElementWithId getElement(ModelProvider modelProvider)
ModelIdentifiablegetElement in interface ModelIdentifiablepublic java.lang.String getElementId(ModelProvider modelProvider)
ModelIdentifiablegetElementId in interface ModelIdentifiablepublic java.lang.String getElementId()
public ProcessInstance addProcessInstance(ProcessInstance processInstance)
addProcessInstance in interface ProcessInstanceParentprocessInstance - public boolean removeProcessInstance(ProcessInstance processInstance)
removeProcessInstance in interface ProcessInstanceParentprocessInstance - public ProcessInstance addNewProcessInstance(com.whitestein.lsps.model.ContextModelElement element)
addNewProcessInstance in interface ProcessInstanceParentelement - java.lang.NullPointerException - if element is nullpublic ProcessInstance addNewProcessInstance(Context context)
addNewProcessInstance in interface ProcessInstanceParentcontext - java.lang.NullPointerException - if context is nullpublic java.util.Collection<ProcessInstance> getProcessInstances()
public ModelInstance getModelInstance()
ModelInstanceAwaregetModelInstance in interface ModelInstanceAwarepublic void rebind(ModelInstance modelInstance)
ModelInstanceAwarerebind in interface ModelInstanceAwarepublic ModuleInstance getModuleInstance()
ProcessInstanceParentgetModuleInstance in interface ProcessInstanceParentpublic java.util.Collection<Collectible> getReferences()
CollectiblegetReferences in interface Collectiblepublic boolean isPersistent()
CollectibleisPersistent in interface Collectiblepublic void collect()
Collectiblecollect in interface Collectiblepublic QID getPathQID()
ProcessInstanceParentgetPathQID in interface ProcessInstanceParentpublic java.lang.String getPath()
ProcessInstanceParentgetPath in interface ProcessInstanceParentpublic ModuleInstance createCopy(ModelInstance targetModelInstance)
public void finishCopy(com.whitestein.lsps.engine.state.xml.Copiable source,
CopyHelper helper)
public java.lang.String toString()
toString in class java.lang.Objectprotected void convertToDirectReferences()
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.