public class OneModelPersistenceService extends Object implements ModelPersistenceService
Modifier and Type | Field and Description |
---|---|
protected com.edorasware.commons.core.any.AnyWorkObjectDefinitionService |
anyWorkObjectDefinitionService |
protected com.edorasware.gear.core.generic.GenericWorkObjectService |
genericWorkObjectService |
static com.edorasware.commons.core.entity.VariableName<ModelRevision,String> |
LATEST_MODEL_REVISION |
protected com.edorasware.gear.core.maintenance.MaintenanceService |
maintenanceService |
protected ModelService |
modelService |
protected NotificationService |
notificationService |
static com.edorasware.commons.core.entity.VariableName<String,String> |
REVISIONS |
Constructor and Description |
---|
OneModelPersistenceService() |
Modifier and Type | Method and Description |
---|---|
List<String> |
getAllRevisionIds(String modelId)
Get list of revision ids of a model.
|
protected com.edorasware.commons.core.entity.WorkObjectDefinition<?,?> |
getDefinition(com.edorasware.commons.core.entity.Type entityType) |
ModelRevision |
getLatestRevision(String modelGlobalIdValue)
Retrieves the latest model revision.
|
ModelRevision |
getRevision(String modelId,
String revisionId)
Retrieves a specific model revision.
|
void |
init() |
void |
storeModel(String modelId,
com.edorasware.commons.core.entity.Type type,
String name,
String description,
String workspaceId)
Store new model.
|
void |
storeRevision(String modelId,
ModelRevision modelRevision)
Stores a new model revision.
|
void |
updateRevision(String modelId,
ModelRevision modelRevision)
Updates an existing model revision.
|
@Autowired protected com.edorasware.gear.core.generic.GenericWorkObjectService genericWorkObjectService
@Autowired protected com.edorasware.commons.core.any.AnyWorkObjectDefinitionService anyWorkObjectDefinitionService
@Autowired protected com.edorasware.gear.core.maintenance.MaintenanceService maintenanceService
@Autowired protected ModelService modelService
@Autowired protected NotificationService notificationService
public static final com.edorasware.commons.core.entity.VariableName<ModelRevision,String> LATEST_MODEL_REVISION
public void storeModel(String modelId, com.edorasware.commons.core.entity.Type type, String name, String description, String workspaceId)
ModelPersistenceService
storeModel
in interface ModelPersistenceService
modelId
- the model IDtype
- the type of the model to storename
- the name of the model to storedescription
- the description of the model to storeworkspaceId
- the id of the model workspacepublic void storeRevision(String modelId, ModelRevision modelRevision)
ModelPersistenceService
storeRevision
in interface ModelPersistenceService
modelId
- the model IDmodelRevision
- of revision detailspublic void updateRevision(String modelId, ModelRevision modelRevision)
ModelPersistenceService
updateRevision
in interface ModelPersistenceService
modelId
- the model IDmodelRevision
- of revision detailspublic List<String> getAllRevisionIds(String modelId)
ModelPersistenceService
getAllRevisionIds
in interface ModelPersistenceService
modelId
- the model IDpublic ModelRevision getRevision(String modelId, String revisionId)
ModelPersistenceService
getRevision
in interface ModelPersistenceService
modelId
- the model IDrevisionId
- the revision IDnull
if the revision doesn't existpublic ModelRevision getLatestRevision(String modelGlobalIdValue)
ModelPersistenceService
getLatestRevision
in interface ModelPersistenceService
modelGlobalIdValue
- the model IDnull
if the model has no latest revision)public void init()
init
in interface com.edorasware.commons.core.util.service.Service
protected com.edorasware.commons.core.entity.WorkObjectDefinition<?,?> getDefinition(com.edorasware.commons.core.entity.Type entityType)
Copyright © 2010 - 2017 edorasware ag. All Rights Reserved.