public class ModelProviderImpl extends Object implements ModelProvider
ModelProvider
.Constructor and Description |
---|
ModelProviderImpl(ModelProviderClientService modelProviderService)
Creates new instances.
|
Modifier and Type | Method and Description |
---|---|
<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.
|
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.
|
static com.whitestein.lsps.model.ProcessModel |
getProcessModel(long id,
ModelProviderClientService modelProviderService)
Returns cached process model.
|
com.whitestein.lsps.model.ProcessModel |
getProcessModel(String hash)
Returns process model with specified model runtime hash.
|
Type |
resolveType(long moduleId,
String qualifiedName)
Resolves type by its qualified name in given model.
|
static Type |
resolveType(long moduleId,
String qualifiedName,
ModelProviderClientService modelProviderService)
Resolves type by its qualified name in given model.
|
public ModelProviderImpl(ModelProviderClientService modelProviderService)
modelProviderService
- public static com.whitestein.lsps.model.ProcessModel getProcessModel(long id, ModelProviderClientService modelProviderService)
id
- modelProviderService
- public static Type resolveType(long moduleId, String qualifiedName, ModelProviderClientService modelProviderService) throws ValidationException
moduleId
- qualifiedName
- modelProviderService
- ValidationException
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 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 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-2018 Whitestein Technologies. All Rights Reserved.