Class HvlBpmnProcessServiceImpl

java.lang.Object
tr.com.havelsan.javarch.bpmn.admin.starter.module.process.logic.HvlBpmnProcessServiceImpl
All Implemented Interfaces:
HvlBpmnProcessService

@Service public class HvlBpmnProcessServiceImpl extends Object implements HvlBpmnProcessService
The class which implements HvlBpmnProcessService
  • Constructor Details

  • Method Details

    • save

      public Long save(@Valid @Valid HvlBpmnProcessModel processModel, Long sourceProcessId)
      Adds provided object.
      Specified by:
      save in interface HvlBpmnProcessService
      Parameters:
      processModel - the process model
      sourceProcessId - the source process's id if cloning is wanted
      Returns:
      the long
    • update

      public Long update(@Valid @Valid HvlBpmnProcessModel processModel, boolean newVersion)
      Edits object associated provided object.
      Specified by:
      update in interface HvlBpmnProcessService
      Parameters:
      processModel - the process model
      newVersion - the new version
      Returns:
      the long
    • delete

      public void delete(@NotNull @NotNull Long id)
      Removes object according to provided parameter.
      Specified by:
      delete in interface HvlBpmnProcessService
      Parameters:
      id - the id
    • deployProcess

      public void deployProcess(@NotNull @NotNull Long id)
      Deploy process.
      Specified by:
      deployProcess in interface HvlBpmnProcessService
      Parameters:
      id - the id
    • importProcess

      public Long importProcess(byte[] xmlBytes, boolean isSystemProcess)
      Imports a bpmn xml.
      Specified by:
      importProcess in interface HvlBpmnProcessService
      Parameters:
      xmlBytes - the xml bytes
      isSystemProcess - the is system process
      Returns:
      the long
    • importAll

      public List<HvlBpmnProcessModel> importAll(byte[] zipBytes) throws IOException
      Imports all bpmn xml files from a zip file.
      Specified by:
      importAll in interface HvlBpmnProcessService
      Parameters:
      zipBytes - the zip bytes
      Throws:
      IOException - the io exception
    • exportProcess

      @Transactional(readOnly=true) public Map<String,byte[]> exportProcess(@NotNull @NotNull Long id)
      Exports process as bpmn xml.
      Specified by:
      exportProcess in interface HvlBpmnProcessService
      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 interface HvlBpmnProcessService
      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 interface HvlBpmnProcessService
      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 interface HvlBpmnProcessService
      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 interface HvlBpmnProcessService
      Parameters:
      namespace - the namespace
      Returns:
      the list
    • lock

      public void lock(@NotNull @NotNull Long id)
      Lock the process.
      Specified by:
      lock in interface HvlBpmnProcessService
      Parameters:
      id - the id
    • unlock

      public void unlock(@NotNull @NotNull Long id)
      Unlock the process.
      Specified by:
      unlock in interface HvlBpmnProcessService
      Parameters:
      id - the id
    • isLocked

      @Transactional(readOnly=true) public boolean isLocked(@NotNull @NotNull Long id)
      Check the process is locked.
      Specified by:
      isLocked in interface HvlBpmnProcessService
      Parameters:
      id - the id
      Returns:
      the boolean
    • getProcessById

      @Transactional(readOnly=true) public HvlBpmnProcessModel getProcessById(@NotNull @NotNull Long id)
      Gets process by id.
      Specified by:
      getProcessById in interface HvlBpmnProcessService
      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 interface HvlBpmnProcessService
      Parameters:
      key - the key
      Returns:
      the process model
    • isSystemProcess

      @Transactional(readOnly=true) public boolean isSystemProcess(@NotNull @NotNull Long processId)
      Check the process is system process
      Specified by:
      isSystemProcess in interface HvlBpmnProcessService
      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 interface HvlBpmnProcessService
      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 interface HvlBpmnProcessService
      Parameters:
      modelId - the model id
      values - the values
    • getNamespaceList

      public List<String> getNamespaceList()
      Gets namespace list.
      Specified by:
      getNamespaceList in interface HvlBpmnProcessService
      Returns:
      the namespace list