@Service @Transactional public class ModelServiceImpl extends Object implements ModelService
| Modifier and Type | Field and Description |
|---|---|
protected BpmnJsonConverter |
bpmnJsonConverter |
protected BpmnXMLConverter |
bpmnXMLConverter |
protected CmmnJsonConverter |
cmmnJsonConverter |
protected CmmnXmlConverter |
cmmnXMLConverter |
protected ModelHistoryRepository |
modelHistoryRepository |
protected ModelImageService |
modelImageService |
protected ModelRelationRepository |
modelRelationRepository |
protected ModelRepository |
modelRepository |
static String |
NAMESPACE |
protected com.fasterxml.jackson.databind.ObjectMapper |
objectMapper |
protected static String |
PROCESS_NOT_FOUND_MESSAGE_KEY |
| Constructor and Description |
|---|
ModelServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addOrUpdateExtensionElement(String name,
String value,
UserTask userTask) |
protected Map<String,String> |
convertToModelKeyMap(Map<String,Model> modelMap) |
Model |
createModel(ModelRepresentation model,
String editorJson,
org.flowable.idm.api.User createdBy) |
Model |
createModel(Model newModel,
org.flowable.idm.api.User createdBy) |
String |
createModelJson(ModelRepresentation model) |
protected ModelHistory |
createNewModelhistory(Model model) |
Model |
createNewModelVersion(Model modelObject,
String comment,
org.flowable.idm.api.User updatedBy) |
ModelHistory |
createNewModelVersionAndReturnModelHistory(Model modelObject,
String comment,
org.flowable.idm.api.User updatedBy) |
void |
deleteModel(String modelId) |
protected void |
deleteModelAndChildren(Model model) |
BpmnModel |
getBpmnModel(AbstractModel model) |
BpmnModel |
getBpmnModel(AbstractModel model,
Map<String,Model> formMap,
Map<String,Model> decisionTableMap) |
byte[] |
getBpmnXML(AbstractModel model) |
byte[] |
getBpmnXML(BpmnModel bpmnModel) |
CmmnModel |
getCmmnModel(AbstractModel model) |
CmmnModel |
getCmmnModel(AbstractModel model,
Map<String,Model> formMap,
Map<String,Model> decisionTableMap,
Map<String,Model> caseModelMap,
Map<String,Model> processModelMap) |
byte[] |
getCmmnXML(AbstractModel model) |
byte[] |
getCmmnXML(CmmnModel cmmnModel) |
Model |
getModel(String modelId) |
Long |
getModelCountForUser(org.flowable.idm.api.User user,
int modelType) |
ModelHistory |
getModelHistory(String modelId,
String modelHistoryId) |
ModelRepresentation |
getModelRepresentation(String modelId) |
List<AbstractModel> |
getModelsByModelType(Integer modelType) |
protected void |
handleAppModelProcessRelations(AbstractModel appModel,
com.fasterxml.jackson.databind.node.ObjectNode appModelJsonNode) |
protected void |
handleBpmnProcessDecisionTaskModelRelations(AbstractModel bpmnProcessModel,
com.fasterxml.jackson.databind.node.ObjectNode editorJsonNode) |
protected void |
handleBpmnProcessFormModelRelations(AbstractModel bpmnProcessModel,
com.fasterxml.jackson.databind.node.ObjectNode editorJsonNode) |
protected void |
handleCmmnCaseModelRelations(AbstractModel caseModel,
com.fasterxml.jackson.databind.node.ObjectNode editorJsonNode) |
protected void |
handleCmmnDecisionModelRelations(AbstractModel caseModel,
com.fasterxml.jackson.databind.node.ObjectNode editorJsonNode) |
protected void |
handleCmmnFormModelRelations(AbstractModel caseModel,
com.fasterxml.jackson.databind.node.ObjectNode editorJsonNode) |
protected void |
handleCmmnProcessModelRelations(AbstractModel caseModel,
com.fasterxml.jackson.databind.node.ObjectNode editorJsonNode) |
protected void |
handleModelRelations(AbstractModel bpmnProcessModel,
Set<String> idsReferencedInJson,
String relationshipType)
Generic handling of model relations: deleting/adding where needed.
|
ModelRepresentation |
importNewVersion(String modelId,
String fileName,
InputStream modelStream) |
protected AbstractModel |
internalCreateNewModelVersion(Model modelObject,
String comment,
org.flowable.idm.api.User updatedBy,
boolean returnModelHistory) |
protected void |
internalDeleteModelAndChildren(Model model,
List<Model> allModels) |
protected Model |
internalSave(String name,
String key,
String description,
String editorJson,
boolean newVersion,
String newVersionComment,
byte[] imageBytes,
org.flowable.idm.api.User updatedBy,
Model modelObject) |
protected Model |
persistModel(Model model) |
protected void |
persistModelHistory(ModelHistory modelHistory) |
protected void |
populateModelBasedOnHistory(Model model,
ModelHistory basedOn) |
ReviveModelResultRepresentation |
reviveProcessModelHistory(ModelHistory modelHistory,
org.flowable.idm.api.User user,
String newVersionComment) |
Model |
saveModel(Model modelObject) |
Model |
saveModel(Model modelObject,
String editorJson,
byte[] imageBytes,
boolean newVersion,
String newVersionComment,
org.flowable.idm.api.User updatedBy) |
Model |
saveModel(String modelId,
String name,
String key,
String description,
String editorJson,
boolean newVersion,
String newVersionComment,
org.flowable.idm.api.User updatedBy) |
ModelKeyRepresentation |
validateModelKey(Model model,
Integer modelType,
String key) |
public static final String NAMESPACE
protected static final String PROCESS_NOT_FOUND_MESSAGE_KEY
@Autowired protected ModelImageService modelImageService
@Autowired protected ModelRepository modelRepository
@Autowired protected ModelHistoryRepository modelHistoryRepository
@Autowired protected ModelRelationRepository modelRelationRepository
@Autowired protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
protected BpmnJsonConverter bpmnJsonConverter
protected BpmnXMLConverter bpmnXMLConverter
protected CmmnJsonConverter cmmnJsonConverter
protected CmmnXmlConverter cmmnXMLConverter
public Model getModel(String modelId)
getModel in interface ModelServicepublic ModelRepresentation getModelRepresentation(String modelId)
getModelRepresentation in interface ModelServicepublic List<AbstractModel> getModelsByModelType(Integer modelType)
getModelsByModelType in interface ModelServicepublic ModelHistory getModelHistory(String modelId, String modelHistoryId)
getModelHistory in interface ModelServicepublic byte[] getBpmnXML(AbstractModel model)
getBpmnXML in interface ModelServicepublic byte[] getBpmnXML(BpmnModel bpmnModel)
getBpmnXML in interface ModelServicepublic byte[] getCmmnXML(AbstractModel model)
getCmmnXML in interface ModelServicepublic byte[] getCmmnXML(CmmnModel cmmnModel)
getCmmnXML in interface ModelServicepublic ModelKeyRepresentation validateModelKey(Model model, Integer modelType, String key)
validateModelKey in interface ModelServicepublic String createModelJson(ModelRepresentation model)
createModelJson in interface ModelServicepublic Model createModel(Model newModel, org.flowable.idm.api.User createdBy)
createModel in interface ModelServicepublic Model createModel(ModelRepresentation model, String editorJson, org.flowable.idm.api.User createdBy)
createModel in interface ModelServicepublic ModelRepresentation importNewVersion(String modelId, String fileName, InputStream modelStream)
importNewVersion in interface ModelServicepublic Model createNewModelVersion(Model modelObject, String comment, org.flowable.idm.api.User updatedBy)
createNewModelVersion in interface ModelServicepublic ModelHistory createNewModelVersionAndReturnModelHistory(Model modelObject, String comment, org.flowable.idm.api.User updatedBy)
createNewModelVersionAndReturnModelHistory in interface ModelServiceprotected AbstractModel internalCreateNewModelVersion(Model modelObject, String comment, org.flowable.idm.api.User updatedBy, boolean returnModelHistory)
public Model saveModel(Model modelObject)
saveModel in interface ModelServicepublic Model saveModel(Model modelObject, String editorJson, byte[] imageBytes, boolean newVersion, String newVersionComment, org.flowable.idm.api.User updatedBy)
saveModel in interface ModelServicepublic Model saveModel(String modelId, String name, String key, String description, String editorJson, boolean newVersion, String newVersionComment, org.flowable.idm.api.User updatedBy)
saveModel in interface ModelServiceprotected Model internalSave(String name, String key, String description, String editorJson, boolean newVersion, String newVersionComment, byte[] imageBytes, org.flowable.idm.api.User updatedBy, Model modelObject)
public void deleteModel(String modelId)
deleteModel in interface ModelServiceprotected void deleteModelAndChildren(Model model)
protected void internalDeleteModelAndChildren(Model model, List<Model> allModels)
public ReviveModelResultRepresentation reviveProcessModelHistory(ModelHistory modelHistory, org.flowable.idm.api.User user, String newVersionComment)
reviveProcessModelHistory in interface ModelServicepublic BpmnModel getBpmnModel(AbstractModel model)
getBpmnModel in interface ModelServicepublic BpmnModel getBpmnModel(AbstractModel model, Map<String,Model> formMap, Map<String,Model> decisionTableMap)
getBpmnModel in interface ModelServicepublic CmmnModel getCmmnModel(AbstractModel model)
getCmmnModel in interface ModelServicepublic CmmnModel getCmmnModel(AbstractModel model, Map<String,Model> formMap, Map<String,Model> decisionTableMap, Map<String,Model> caseModelMap, Map<String,Model> processModelMap)
getCmmnModel in interface ModelServiceprotected void addOrUpdateExtensionElement(String name, String value, UserTask userTask)
public Long getModelCountForUser(org.flowable.idm.api.User user, int modelType)
getModelCountForUser in interface ModelServiceprotected void persistModelHistory(ModelHistory modelHistory)
protected void handleBpmnProcessFormModelRelations(AbstractModel bpmnProcessModel, com.fasterxml.jackson.databind.node.ObjectNode editorJsonNode)
protected void handleBpmnProcessDecisionTaskModelRelations(AbstractModel bpmnProcessModel, com.fasterxml.jackson.databind.node.ObjectNode editorJsonNode)
protected void handleCmmnFormModelRelations(AbstractModel caseModel, com.fasterxml.jackson.databind.node.ObjectNode editorJsonNode)
protected void handleCmmnDecisionModelRelations(AbstractModel caseModel, com.fasterxml.jackson.databind.node.ObjectNode editorJsonNode)
protected void handleCmmnCaseModelRelations(AbstractModel caseModel, com.fasterxml.jackson.databind.node.ObjectNode editorJsonNode)
protected void handleCmmnProcessModelRelations(AbstractModel caseModel, com.fasterxml.jackson.databind.node.ObjectNode editorJsonNode)
protected void handleAppModelProcessRelations(AbstractModel appModel, com.fasterxml.jackson.databind.node.ObjectNode appModelJsonNode)
protected void handleModelRelations(AbstractModel bpmnProcessModel, Set<String> idsReferencedInJson, String relationshipType)
protected ModelHistory createNewModelhistory(Model model)
protected void populateModelBasedOnHistory(Model model, ModelHistory basedOn)
Copyright © 2018 Flowable. All rights reserved.