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)
ModelProvidergetProcessModel in interface ModelProviderpublic com.whitestein.lsps.model.ProcessModel getProcessModel(String hash)
ModelProvidergetProcessModel in interface ModelProviderpublic long getModelId(String hash)
ModelProviderLspsRuntimeException if the model does not exist.getModelId in interface ModelProviderpublic String getModelHash(long modelId)
ModelProviderLspsRuntimeException if the model does not exist.getModelHash in interface ModelProviderpublic boolean isActive(long modelId)
ModelProviderisActive in interface ModelProviderpublic com.whitestein.lsps.model.ElementWithId getModelElement(long modelId,
String elementId,
com.whitestein.lsps.model.ElementType... types)
ModelProvidergetModelElement in interface ModelProviderpublic com.whitestein.lsps.model.ElementWithId getModelElement(long modelId,
com.whitestein.lsps.model.ElementType type,
String elementId)
ModelProvidergetModelElement in interface ModelProviderpublic Type resolveType(long moduleId, String qualifiedName) throws ValidationException
ModelProviderresolveType in interface ModelProviderValidationExceptionpublic RecordType resolveRecordType(long moduleId, String qualifiedName) throws ValidationException
ModelProviderresolveRecordType in interface ModelProviderValidationException - if model with given id does not existpublic RecordType getRecordTypeForEntity(Object object, long modelId)
ModelProvidergetRecordTypeForEntity in interface ModelProviderpublic CompatibilityVersion getCompatibilityVersion(long modelId)
ModelProvidergetCompatibilityVersion in interface ModelProviderpublic Object getComponent(String name)
ComponentServicegetComponent in interface ComponentServicename - the component namepublic <T> T getComponent(String name, Class<T> clazz)
ComponentServicegetComponent in interface ComponentServiceT - the component classname - the component nameclazz - the component classpublic <T> T getComponent(Class<T> clazz)
ComponentServicegetComponent in interface ComponentServiceT - the component classclazz - the component classpublic <T> List<T> getComponents(Class<T> clazz)
ComponentServicegetComponents in interface ComponentServiceT - the component classclazz - the component nameCopyright © 2007-2020 Whitestein Technologies. All Rights Reserved.