Class HvlBpmnProcessServiceImpl
java.lang.Object
tr.com.havelsan.javarch.bpmn.admin.starter.module.process.logic.HvlBpmnProcessServiceImpl
- All Implemented Interfaces:
HvlBpmnProcessService
The class which implements
HvlBpmnProcessService
-
Constructor Summary
ConstructorDescriptionHvlBpmnProcessServiceImpl
(HvlBpmnProcessRepository processRepository, HvlBpmnProcessMapper processMapper, HvlBpmnProcessQueryGenerator processQueryGenerator, HvlBpmnProcessDiagramService processDiagramService, HvlBpmnProcessVersionService processVersionService, HvlBpmnRepositoryService bpmnRepositoryService, HvlBpmnProcessProperties processProperties, HvlProcessDocAttachmentOperationalManager hvlProcessDocAttachmentOperationalManager, HvlProcessGeneratedDocOperationalManager hvlProcessGeneratedDocOperationalManager) Instantiates a new HvlBpmnProcessServiceImpl. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Removes object according to provided parameter.void
deployProcess
(@NotNull Long id) Deploy process.byte[]
Exports all processes as zip file.exportProcess
(@NotNull Long id) Exports process as bpmn xml.Gets namespace list.getProcessById
(@NotNull Long id) Gets process by id.getProcessByKey
(@NotNull String key) Gets process by key.com.fasterxml.jackson.databind.node.ObjectNode
getProcessModelNode
(@NotNull Long modelId) Gets process model node.importAll
(byte[] zipBytes) Imports all bpmn xml files from a zip file.importProcess
(byte[] xmlBytes, boolean isSystemProcess) Imports a bpmn xml.boolean
Check the process is locked.boolean
isSystemProcess
(@NotNull Long processId) Check the process is system processvoid
Lock the process.queryCategoryList
(@NotBlank @Size(min=3,max=64) String namespace) Query as list.queryList
(@NotNull HvlBpmnProcessQueryModel processQueryModel) Query as list.tr.com.havelsan.javarch.data.commons.pageable.HvlPage<HvlBpmnProcessModel>
queryPage
(@NotNull HvlBpmnProcessQueryModel processQueryModel) Query as page.save
(@Valid HvlBpmnProcessModel processModel, Long sourceProcessId) Adds provided object.void
saveProcessModelNode
(@NotNull Long modelId, @NotEmpty org.springframework.util.MultiValueMap<String, String> values) Saves process model node.void
Unlock the process.update
(@Valid HvlBpmnProcessModel processModel, boolean newVersion) Edits object associated provided object.
-
Constructor Details
-
HvlBpmnProcessServiceImpl
public HvlBpmnProcessServiceImpl(HvlBpmnProcessRepository processRepository, HvlBpmnProcessMapper processMapper, HvlBpmnProcessQueryGenerator processQueryGenerator, HvlBpmnProcessDiagramService processDiagramService, HvlBpmnProcessVersionService processVersionService, HvlBpmnRepositoryService bpmnRepositoryService, HvlBpmnProcessProperties processProperties, HvlProcessDocAttachmentOperationalManager hvlProcessDocAttachmentOperationalManager, HvlProcessGeneratedDocOperationalManager hvlProcessGeneratedDocOperationalManager) Instantiates a new HvlBpmnProcessServiceImpl.- Parameters:
processRepository
- the process repositoryprocessMapper
- the process mapperprocessQueryGenerator
- the process query generatorprocessDiagramService
- the process diagram serviceprocessVersionService
- the process version servicebpmnRepositoryService
- the bpmn repository serviceprocessProperties
- the process propertieshvlProcessDocAttachmentOperationalManager
- the process doc attachment operational managerhvlProcessGeneratedDocOperationalManager
- the process generated doc operational manager
-
-
Method Details
-
save
Adds provided object.- Specified by:
save
in interfaceHvlBpmnProcessService
- Parameters:
processModel
- the process modelsourceProcessId
- the source process's id if cloning is wanted- Returns:
- the long
-
update
Edits object associated provided object.- Specified by:
update
in interfaceHvlBpmnProcessService
- Parameters:
processModel
- the process modelnewVersion
- the new version- Returns:
- the long
-
delete
Removes object according to provided parameter.- Specified by:
delete
in interfaceHvlBpmnProcessService
- Parameters:
id
- the id
-
deployProcess
Deploy process.- Specified by:
deployProcess
in interfaceHvlBpmnProcessService
- Parameters:
id
- the id
-
importProcess
Imports a bpmn xml.- Specified by:
importProcess
in interfaceHvlBpmnProcessService
- Parameters:
xmlBytes
- the xml bytesisSystemProcess
- the is system process- Returns:
- the long
-
importAll
Imports all bpmn xml files from a zip file.- Specified by:
importAll
in interfaceHvlBpmnProcessService
- Parameters:
zipBytes
- the zip bytes- Throws:
IOException
- the io exception
-
exportProcess
Exports process as bpmn xml.- Specified by:
exportProcess
in interfaceHvlBpmnProcessService
- Parameters:
id
- the id- Returns:
- the map
-
exportAll
@Transactional(readOnly=true) public byte[] exportAll(@NotEmpty @NotEmpty List<Long> idList) throws IOException Exports all processes as zip file.- Specified by:
exportAll
in interfaceHvlBpmnProcessService
- Parameters:
idList
- the id list- Returns:
- the byte [ ]
- Throws:
IOException
- the io exception
-
queryList
@Transactional(readOnly=true) public List<HvlBpmnProcessModel> queryList(@NotNull @NotNull HvlBpmnProcessQueryModel processQueryModel) Query as list.- Specified by:
queryList
in interfaceHvlBpmnProcessService
- Parameters:
processQueryModel
- the process query model- Returns:
- the list
-
queryPage
public tr.com.havelsan.javarch.data.commons.pageable.HvlPage<HvlBpmnProcessModel> queryPage(@NotNull @NotNull HvlBpmnProcessQueryModel processQueryModel) Query as page.- Specified by:
queryPage
in interfaceHvlBpmnProcessService
- Parameters:
processQueryModel
- the process query model- Returns:
- the hvl page
-
queryCategoryList
@Transactional(readOnly=true) public List<String> queryCategoryList(@NotBlank @Size(min=3,max=64) @NotBlank @Size(min=3,max=64) String namespace) Query as list.- Specified by:
queryCategoryList
in interfaceHvlBpmnProcessService
- Parameters:
namespace
- the namespace- Returns:
- the list
-
lock
Lock the process.- Specified by:
lock
in interfaceHvlBpmnProcessService
- Parameters:
id
- the id
-
unlock
Unlock the process.- Specified by:
unlock
in interfaceHvlBpmnProcessService
- Parameters:
id
- the id
-
isLocked
Check the process is locked.- Specified by:
isLocked
in interfaceHvlBpmnProcessService
- Parameters:
id
- the id- Returns:
- the boolean
-
getProcessById
Gets process by id.- Specified by:
getProcessById
in interfaceHvlBpmnProcessService
- Parameters:
id
- the id- Returns:
- the process by id
-
getProcessByKey
@Transactional(readOnly=true) public HvlBpmnProcessModel getProcessByKey(@NotNull @NotNull String key) Gets process by key.- Specified by:
getProcessByKey
in interfaceHvlBpmnProcessService
- Parameters:
key
- the key- Returns:
- the process model
-
isSystemProcess
Check the process is system process- Specified by:
isSystemProcess
in interfaceHvlBpmnProcessService
- Parameters:
processId
- the process id- Returns:
- the boolean
-
getProcessModelNode
@Transactional(readOnly=true) public com.fasterxml.jackson.databind.node.ObjectNode getProcessModelNode(@NotNull @NotNull Long modelId) Gets process model node.- Specified by:
getProcessModelNode
in interfaceHvlBpmnProcessService
- Parameters:
modelId
- the model id- Returns:
- the process model node
-
saveProcessModelNode
@Transactional public void saveProcessModelNode(@NotNull @NotNull Long modelId, @NotEmpty @NotEmpty org.springframework.util.MultiValueMap<String, String> values) Saves process model node.- Specified by:
saveProcessModelNode
in interfaceHvlBpmnProcessService
- Parameters:
modelId
- the model idvalues
- the values
-
getNamespaceList
Gets namespace list.- Specified by:
getNamespaceList
in interfaceHvlBpmnProcessService
- Returns:
- the namespace list
-