public class ModuleInstance extends 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.
|
String |
getElementId()
Returns the element id.
|
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.
|
String |
getName()
Returns the module name.
|
String |
getPath()
Returns the full path to this element as a string.
|
QID |
getPathQID()
Returns the full path to this element as a QID.
|
Collection<ProcessInstance> |
getProcessInstances()
Returns immutable collection of child process instances.
|
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.
|
String |
toString() |
public ModuleInstance(ModelInstance modelInstance, Context context)
ModuleInstance
.modelInstance
- context
- NullPointerException
- if modelInstance
is nullpublic ModuleInstance(long id, ModelInstance modelInstance, Context context)
ModuleInstance
.id
- modelInstance
- context
- NullPointerException
- if modelInstance
is nullpublic ModuleInstance(ModelInstance modelInstance, com.whitestein.lsps.model.ProcessModel processModel)
ModuleInstance
for given
ProcessModel
.modelInstance
- processModel
- NullPointerException
- if modelInstance
is nullpublic ModuleInstance(SModuleInstance source, ModelInstance modelInstance)
source
- modelInstance
- public SModuleInstance toSerializable(SModelInstance smi, MarshallerConfig config)
smi
- config
- public long getId()
EntityWithId
getId
in interface EntityWithId
public ModuleInstanceState getState()
public void setState(ModuleInstanceState state)
state
- public boolean isSuspended()
public String getName()
public Context getContext()
getContext
in interface ProcessInstanceParent
public com.whitestein.lsps.model.ElementWithId getElement(ModelProvider modelProvider)
ModelIdentifiable
getElement
in interface ModelIdentifiable
public String getElementId(ModelProvider modelProvider)
ModelIdentifiable
getElementId
in interface ModelIdentifiable
public String getElementId()
public ProcessInstance addProcessInstance(ProcessInstance processInstance)
addProcessInstance
in interface ProcessInstanceParent
processInstance
- public boolean removeProcessInstance(ProcessInstance processInstance)
removeProcessInstance
in interface ProcessInstanceParent
processInstance
- public ProcessInstance addNewProcessInstance(com.whitestein.lsps.model.ContextModelElement element)
addNewProcessInstance
in interface ProcessInstanceParent
element
- NullPointerException
- if element
is nullpublic ProcessInstance addNewProcessInstance(Context context)
addNewProcessInstance
in interface ProcessInstanceParent
context
- NullPointerException
- if context
is nullpublic Collection<ProcessInstance> getProcessInstances()
public ModelInstance getModelInstance()
ModelInstanceAware
getModelInstance
in interface ModelInstanceAware
public void rebind(ModelInstance modelInstance)
ModelInstanceAware
rebind
in interface ModelInstanceAware
public ModuleInstance getModuleInstance()
ProcessInstanceParent
getModuleInstance
in interface ProcessInstanceParent
public Collection<Collectible> getReferences()
Collectible
getReferences
in interface Collectible
public boolean isPersistent()
Collectible
isPersistent
in interface Collectible
public void collect()
Collectible
collect
in interface Collectible
public QID getPathQID()
ProcessInstanceParent
getPathQID
in interface ProcessInstanceParent
public String getPath()
ProcessInstanceParent
getPath
in interface ProcessInstanceParent
public ModuleInstance createCopy(ModelInstance targetModelInstance)
public void finishCopy(com.whitestein.lsps.engine.state.xml.Copiable source, CopyHelper helper)
protected void convertToDirectReferences()
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.