@Service public class ModelServiceImpl extends Object implements ModelService, ModelInternalService
Modifier and Type | Field and Description |
---|---|
protected BpmnJsonConverter |
bpmnJsonConverter |
protected BpmnXMLConverter |
bpmnXMLConverter |
protected DeploymentService |
deploymentService |
protected GroupHierarchyCache |
groupHierarchyCache |
protected com.activiti.repository.editor.ModelHistoryRepository |
modelHistoryRepository |
protected com.activiti.repository.editor.ModelRelationRepository |
modelRelationRepository |
protected com.activiti.repository.editor.ModelRepository |
modelRepository |
static String |
NAMESPACE |
protected com.fasterxml.jackson.databind.ObjectMapper |
objectMapper |
protected RuntimeAppDefinitionService |
runtimeAppDefinitionService |
protected com.activiti.repository.editor.ModelShareInfoRepository |
shareInfoRepository |
protected UserCache |
userCache |
Constructor and Description |
---|
ModelServiceImpl() |
Modifier and Type | Method and Description |
---|---|
protected void |
addOrReplaceAssignmentsExtraElements(UserTask userTask) |
protected void |
addOrUpdateExtensionElement(String name,
String value,
UserTask userTask) |
protected GraphicInfo |
calculateDiagramSize(BpmnModel bpmnModel) |
protected void |
calculateWidthForArtifacts(Collection<Artifact> artifactList,
BpmnModel bpmnModel,
GraphicInfo diagramInfo) |
protected void |
calculateWidthForFlowElements(Collection<FlowElement> elementList,
BpmnModel bpmnModel,
GraphicInfo diagramInfo) |
com.activiti.domain.editor.Model |
createModel(ModelRepresentation model,
String editorJson,
com.activiti.domain.idm.User createdBy) |
protected com.activiti.domain.editor.ModelHistory |
createNewModelhistory(com.activiti.domain.editor.Model model) |
com.activiti.domain.editor.Model |
createNewModelVersion(com.activiti.domain.editor.Model modelObject,
String comment,
com.activiti.domain.idm.User updatedBy) |
com.activiti.domain.editor.ModelHistory |
createNewModelVersionAndReturnModelHistory(com.activiti.domain.editor.Model modelObject,
String comment,
com.activiti.domain.idm.User updatedBy) |
void |
deleteModel(long modelId,
boolean cascadeHistory,
boolean deleteRuntimeApp) |
protected void |
deleteModelAndChildren(com.activiti.domain.editor.Model model) |
protected void |
generateThumbnailImage(com.activiti.domain.editor.Model model,
com.fasterxml.jackson.databind.node.ObjectNode editorJsonNode) |
BpmnModel |
getBpmnModel(com.activiti.domain.editor.AbstractModel model,
com.activiti.domain.idm.User user,
boolean refreshReferences) |
byte[] |
getBpmnXML(com.activiti.domain.editor.AbstractModel model,
com.activiti.domain.idm.User user) |
byte[] |
getBpmnXML(BpmnModel bpmnModel) |
com.activiti.domain.editor.AbstractModel |
getModel(Long modelId) |
Long |
getModelCountForUser(com.activiti.domain.idm.User user,
int modelType) |
List<com.activiti.domain.editor.AbstractModel> |
getModelsByModelTypeAndReferenceId(Integer modelType,
Long referenceId) |
protected void |
handleAppModelProcessRelations(com.activiti.domain.editor.AbstractModel appModel,
com.fasterxml.jackson.databind.node.ObjectNode appModelJsonNode) |
protected void |
handleBpmnProcessFormModelRelations(com.activiti.domain.editor.AbstractModel bpmnProcessModel,
com.fasterxml.jackson.databind.node.ObjectNode editorJsonNode) |
protected void |
handleModelRelations(com.activiti.domain.editor.AbstractModel bpmnProcessModel,
Set<Long> idsReferencedInJson,
String relationshipType)
Generic handling of model relations: deleting/adding where needed.
|
protected com.activiti.domain.editor.AbstractModel |
internalCreateNewModelVersion(com.activiti.domain.editor.Model modelObject,
String comment,
com.activiti.domain.idm.User updatedBy,
boolean returnModelHistory) |
protected void |
internalDeleteModelAndChildren(com.activiti.domain.editor.Model model,
List<com.activiti.domain.editor.Model> allModels) |
protected com.activiti.domain.editor.Model |
internalSave(String name,
String description,
String editorJson,
boolean newVersion,
String newVersionComment,
byte[] imageBytes,
com.activiti.domain.idm.User updatedBy,
com.activiti.domain.editor.Model modelObject) |
protected com.activiti.domain.editor.Model |
persistModel(com.activiti.domain.editor.Model model) |
protected com.activiti.domain.editor.ModelHistory |
persistModelHistory(com.activiti.domain.editor.ModelHistory modelHistory) |
protected void |
populateModelBasedOnHistory(com.activiti.domain.editor.Model model,
com.activiti.domain.editor.ModelHistory basedOn) |
protected void |
processGraphicInfoList(List<GraphicInfo> graphicInfoList,
GraphicInfo diagramInfo) |
void |
refreshAssignmentsForUserTasks(Collection<FlowElement> flowElements) |
ReviveModelResultRepresentation |
reviveProcessModelHistory(com.activiti.domain.editor.ModelHistory modelHistory,
com.activiti.domain.idm.User user,
String newVersionComment) |
com.activiti.domain.editor.Model |
saveModel(long modelId,
String name,
String description,
String editorJson,
boolean newVersion,
String newVersionComment,
com.activiti.domain.idm.User updatedBy) |
com.activiti.domain.editor.Model |
saveModel(com.activiti.domain.editor.Model modelObject) |
com.activiti.domain.editor.Model |
saveModel(com.activiti.domain.editor.Model modelObject,
String editorJson,
byte[] imageBytes,
boolean newVersion,
String newVersionComment,
com.activiti.domain.idm.User updatedBy) |
protected void |
scaleArtifacts(Collection<Artifact> artifactList,
BpmnModel bpmnModel,
double scaleFactor) |
protected void |
scaleDiagram(BpmnModel bpmnModel,
double scaleFactor) |
protected void |
scaleFlowElements(Collection<FlowElement> elementList,
BpmnModel bpmnModel,
double scaleFactor) |
protected void |
scaleGraphicInfo(GraphicInfo graphicInfo,
double scaleFactor) |
protected void |
scaleGraphicInfoList(List<GraphicInfo> graphicInfoList,
double scaleFactor) |
public static final String NAMESPACE
@Autowired protected DeploymentService deploymentService
@Autowired protected RuntimeAppDefinitionService runtimeAppDefinitionService
@Autowired protected com.activiti.repository.editor.ModelRepository modelRepository
@Autowired protected com.activiti.repository.editor.ModelHistoryRepository modelHistoryRepository
@Autowired protected com.activiti.repository.editor.ModelShareInfoRepository shareInfoRepository
@Autowired protected com.activiti.repository.editor.ModelRelationRepository modelRelationRepository
@Autowired protected GroupHierarchyCache groupHierarchyCache
@Autowired protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
@Autowired protected UserCache userCache
protected BpmnJsonConverter bpmnJsonConverter
protected BpmnXMLConverter bpmnXMLConverter
public com.activiti.domain.editor.AbstractModel getModel(Long modelId)
getModel
in interface ModelService
public List<com.activiti.domain.editor.AbstractModel> getModelsByModelTypeAndReferenceId(Integer modelType, Long referenceId)
getModelsByModelTypeAndReferenceId
in interface ModelService
public byte[] getBpmnXML(com.activiti.domain.editor.AbstractModel model, com.activiti.domain.idm.User user)
getBpmnXML
in interface ModelInternalService
public byte[] getBpmnXML(BpmnModel bpmnModel)
getBpmnXML
in interface ModelService
getBpmnXML
in interface ModelInternalService
@Transactional public com.activiti.domain.editor.Model createModel(ModelRepresentation model, String editorJson, com.activiti.domain.idm.User createdBy)
createModel
in interface ModelInternalService
@Transactional public com.activiti.domain.editor.Model createNewModelVersion(com.activiti.domain.editor.Model modelObject, String comment, com.activiti.domain.idm.User updatedBy)
createNewModelVersion
in interface ModelInternalService
@Transactional public com.activiti.domain.editor.ModelHistory createNewModelVersionAndReturnModelHistory(com.activiti.domain.editor.Model modelObject, String comment, com.activiti.domain.idm.User updatedBy)
createNewModelVersionAndReturnModelHistory
in interface ModelInternalService
protected com.activiti.domain.editor.AbstractModel internalCreateNewModelVersion(com.activiti.domain.editor.Model modelObject, String comment, com.activiti.domain.idm.User updatedBy, boolean returnModelHistory)
public com.activiti.domain.editor.Model saveModel(com.activiti.domain.editor.Model modelObject)
saveModel
in interface ModelInternalService
@Transactional public com.activiti.domain.editor.Model saveModel(com.activiti.domain.editor.Model modelObject, String editorJson, byte[] imageBytes, boolean newVersion, String newVersionComment, com.activiti.domain.idm.User updatedBy)
saveModel
in interface ModelInternalService
@Transactional public com.activiti.domain.editor.Model saveModel(long modelId, String name, String description, String editorJson, boolean newVersion, String newVersionComment, com.activiti.domain.idm.User updatedBy)
saveModel
in interface ModelInternalService
protected com.activiti.domain.editor.Model internalSave(String name, String description, String editorJson, boolean newVersion, String newVersionComment, byte[] imageBytes, com.activiti.domain.idm.User updatedBy, com.activiti.domain.editor.Model modelObject)
@Transactional public void deleteModel(long modelId, boolean cascadeHistory, boolean deleteRuntimeApp)
deleteModel
in interface ModelInternalService
protected void deleteModelAndChildren(com.activiti.domain.editor.Model model)
protected void internalDeleteModelAndChildren(com.activiti.domain.editor.Model model, List<com.activiti.domain.editor.Model> allModels)
@Transactional public ReviveModelResultRepresentation reviveProcessModelHistory(com.activiti.domain.editor.ModelHistory modelHistory, com.activiti.domain.idm.User user, String newVersionComment)
reviveProcessModelHistory
in interface ModelInternalService
public BpmnModel getBpmnModel(com.activiti.domain.editor.AbstractModel model, com.activiti.domain.idm.User user, boolean refreshReferences)
getBpmnModel
in interface ModelService
getBpmnModel
in interface ModelInternalService
public void refreshAssignmentsForUserTasks(Collection<FlowElement> flowElements)
protected void addOrReplaceAssignmentsExtraElements(UserTask userTask)
protected void addOrUpdateExtensionElement(String name, String value, UserTask userTask)
public Long getModelCountForUser(com.activiti.domain.idm.User user, int modelType)
getModelCountForUser
in interface ModelService
protected com.activiti.domain.editor.Model persistModel(com.activiti.domain.editor.Model model)
protected com.activiti.domain.editor.ModelHistory persistModelHistory(com.activiti.domain.editor.ModelHistory modelHistory)
protected void generateThumbnailImage(com.activiti.domain.editor.Model model, com.fasterxml.jackson.databind.node.ObjectNode editorJsonNode)
protected void handleBpmnProcessFormModelRelations(com.activiti.domain.editor.AbstractModel bpmnProcessModel, com.fasterxml.jackson.databind.node.ObjectNode editorJsonNode)
protected void handleAppModelProcessRelations(com.activiti.domain.editor.AbstractModel appModel, com.fasterxml.jackson.databind.node.ObjectNode appModelJsonNode)
protected void handleModelRelations(com.activiti.domain.editor.AbstractModel bpmnProcessModel, Set<Long> idsReferencedInJson, String relationshipType)
protected com.activiti.domain.editor.ModelHistory createNewModelhistory(com.activiti.domain.editor.Model model)
protected void populateModelBasedOnHistory(com.activiti.domain.editor.Model model, com.activiti.domain.editor.ModelHistory basedOn)
protected GraphicInfo calculateDiagramSize(BpmnModel bpmnModel)
protected void scaleDiagram(BpmnModel bpmnModel, double scaleFactor)
protected void calculateWidthForFlowElements(Collection<FlowElement> elementList, BpmnModel bpmnModel, GraphicInfo diagramInfo)
protected void calculateWidthForArtifacts(Collection<Artifact> artifactList, BpmnModel bpmnModel, GraphicInfo diagramInfo)
protected void processGraphicInfoList(List<GraphicInfo> graphicInfoList, GraphicInfo diagramInfo)
protected void scaleFlowElements(Collection<FlowElement> elementList, BpmnModel bpmnModel, double scaleFactor)
protected void scaleArtifacts(Collection<Artifact> artifactList, BpmnModel bpmnModel, double scaleFactor)
protected void scaleGraphicInfoList(List<GraphicInfo> graphicInfoList, double scaleFactor)
protected void scaleGraphicInfo(GraphicInfo graphicInfo, double scaleFactor)
Copyright © 2014–2015 Alfresco. All rights reserved.