public class ModuleInstance extends Object implements XmlEntity, Collectible, ModelInstanceAware, EntityWithId, ProcessInstanceParent
Modifier | Constructor and Description |
---|---|
protected |
ModuleInstance()
Creates new empty instance of
ModuleInstance . |
|
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 . |
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.
|
Context |
getContext()
Returns the context of this module.
|
com.whitestein.lsps.model.ElementWithId |
getElement(ModelProviderClientService modelProviderService)
Returns the model element.
|
String |
getElementId()
Returns the element id.
|
String |
getElementId(ModelProviderClientService modelProviderService)
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.
|
ModuleInstance |
makeCopy(ModelInstance targetModelInstance)
Returns deep copy.
|
void |
postUnmarshal(javax.xml.bind.Unmarshaller unmarshaller,
Object parent)
Callback method invoked after unmarshalling XML data into target.
|
void |
preUnmarshal(javax.xml.bind.Unmarshaller unmarshaller,
Object parent)
Callback method invoked before unmarshalling into target.
|
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.
|
String |
toString() |
protected ModuleInstance()
ModuleInstance
.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 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(ModelProviderClientService modelProviderService)
ModelIdentifiable
getElement
in interface ModelIdentifiable
public String getElementId(ModelProviderClientService modelProviderService)
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 void preUnmarshal(javax.xml.bind.Unmarshaller unmarshaller, Object parent)
UnmarshalCallback
preUnmarshal
in interface UnmarshalCallback
parent
- instance of JAXB mapped class that will eventually reference target.
null when target is root element.public void postUnmarshal(javax.xml.bind.Unmarshaller unmarshaller, Object parent)
UnmarshalCallback
postUnmarshal
in interface UnmarshalCallback
parent
- instance of JAXB mapped class that will reference target.
null when target is root element.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 makeCopy(ModelInstance targetModelInstance)
targetModelInstance
- Copyright © 2007-2018 Whitestein Technologies. All Rights Reserved.