public class ModelProviderImpl extends Object implements ModelProvider, Serializable
ModelProvider
.Constructor and Description |
---|
ModelProviderImpl(ModelProviderClientService modelProviderService)
Creates new instances.
|
Modifier and Type | Method and Description |
---|---|
CompatibilityVersion |
getCompatibilityVersion(long modelId)
Returns compatibility version for the module.
|
<T> T |
getComponent(Class<T> clazz)
Returns a registered component by its class.
|
Object |
getComponent(String name)
Returns a registered component by its name.
|
<T> T |
getComponent(String name,
Class<T> clazz)
Returns a registered component by its name and class.
|
<T> List<T> |
getComponents(Class<T> clazz)
Returns a list of all registered components which are instances of the
specified class.
|
com.whitestein.lsps.model.ElementWithId |
getModelElement(long modelId,
com.whitestein.lsps.model.ElementType type,
String elementId)
Returns cached model element.
|
com.whitestein.lsps.model.ElementWithId |
getModelElement(long modelId,
String elementId,
com.whitestein.lsps.model.ElementType... types)
Returns model element with specified elementId and type from the specified model.
|
String |
getModelHash(long modelId)
Returns hash of the model.
|
long |
getModelId(String hash)
Returns id of the model under which the model is persisted.
|
com.whitestein.lsps.model.ProcessModel |
getProcessModel(long id)
Returns process model persisted under specified id.
|
com.whitestein.lsps.model.ProcessModel |
getProcessModel(String hash)
Returns process model with specified model runtime hash.
|
RecordType |
getRecordTypeForEntity(Object object,
long modelId)
Returns record type for entity.
|
boolean |
isActive(long modelId)
Returns true if model is loaded and unloadDate is null.
|
RecordType |
resolveRecordType(long moduleId,
String qualifiedName)
Resolves record by its qualified name in given model.
|
Type |
resolveType(long moduleId,
String qualifiedName)
Resolves type by its qualified name in given model.
|
public ModelProviderImpl(ModelProviderClientService modelProviderService)
modelProviderService
- public com.whitestein.lsps.model.ProcessModel getProcessModel(long id)
ModelProvider
getProcessModel
in interface ModelProvider
public com.whitestein.lsps.model.ProcessModel getProcessModel(String hash)
ModelProvider
getProcessModel
in interface ModelProvider
public long getModelId(String hash)
ModelProvider
LspsRuntimeException
if the model does not exist.getModelId
in interface ModelProvider
public String getModelHash(long modelId)
ModelProvider
LspsRuntimeException
if the model does not exist.getModelHash
in interface ModelProvider
public boolean isActive(long modelId)
ModelProvider
isActive
in interface ModelProvider
public com.whitestein.lsps.model.ElementWithId getModelElement(long modelId, String elementId, com.whitestein.lsps.model.ElementType... types)
ModelProvider
getModelElement
in interface ModelProvider
public com.whitestein.lsps.model.ElementWithId getModelElement(long modelId, com.whitestein.lsps.model.ElementType type, String elementId)
ModelProvider
getModelElement
in interface ModelProvider
public Type resolveType(long moduleId, String qualifiedName) throws ValidationException
ModelProvider
resolveType
in interface ModelProvider
ValidationException
public RecordType resolveRecordType(long moduleId, String qualifiedName) throws ValidationException
ModelProvider
resolveRecordType
in interface ModelProvider
ValidationException
- if model with given id does not existpublic RecordType getRecordTypeForEntity(Object object, long modelId)
ModelProvider
getRecordTypeForEntity
in interface ModelProvider
public CompatibilityVersion getCompatibilityVersion(long modelId)
ModelProvider
getCompatibilityVersion
in interface ModelProvider
public Object getComponent(String name)
ComponentService
getComponent
in interface ComponentService
name
- the component namepublic <T> T getComponent(String name, Class<T> clazz)
ComponentService
getComponent
in interface ComponentService
T
- the component classname
- the component nameclazz
- the component classpublic <T> T getComponent(Class<T> clazz)
ComponentService
getComponent
in interface ComponentService
T
- the component classclazz
- the component classpublic <T> List<T> getComponents(Class<T> clazz)
ComponentService
getComponents
in interface ComponentService
T
- the component classclazz
- the component nameCopyright © 2007-2020 Whitestein Technologies. All Rights Reserved.