Interface DataInstanceService

All Known Implementing Classes:
DataInstanceServiceImpl

public interface DataInstanceService
Since:
6.0
Author:
Zhao Na, Elias Ricken de Medeiros, Feng Hui, Matthieu Chaffotte
  • Method Details

    • createDataInstance

      void createDataInstance(SDataInstance dataInstance) throws SDataInstanceException
      Create dataInstance in DB for given dataInstance
      Parameters:
      dataInstance - SDataInstance object
      Throws:
      SDataInstanceException
    • updateDataInstance

      void updateDataInstance(SDataInstance dataInstance, EntityUpdateDescriptor descriptor) throws SDataInstanceException
      Update the specific dataInstance according to the given descriptor
      Parameters:
      dataInstance - SDataInstance object will be updated
      descriptor - Update description
      Throws:
      SDataInstanceException
    • deleteDataInstance

      void deleteDataInstance(SDataInstance dataInstance) throws SDataInstanceException
      Delete the specific dataInstance
      Parameters:
      dataInstance - SDataInstance object will be deleted
      Throws:
      SDataInstanceException
    • getDataInstance

      SDataInstance getDataInstance(long dataInstanceId) throws SDataInstanceException
      Get dataInstance by its id
      Parameters:
      dataInstanceId - Identifier of dataInstance
      Returns:
      a SDataInstance object
      Throws:
      SDataInstanceException
    • getDataInstance

      SDataInstance getDataInstance(String dataName, long containerId, String containerType, ParentContainerResolver parentContainerResolver) throws SDataInstanceException
      Get dataInstance visible in the specific container
      Parameters:
      dataName - Name of data instance
      containerId - Identifier of container
      containerType - Type of container, e.g process instance, activity instance and so on.
      Returns:
      a SDataInstance object
      Throws:
      SDataInstanceException
    • getDataInstances

      List<SDataInstance> getDataInstances(List<String> dataNames, long containerId, String containerType, ParentContainerResolver parentContainerResolver) throws SDataInstanceException
      Get dataInstances visible in the specific container for given names
      Parameters:
      dataNames - A list of names of data instances
      containerId - Identifier of container
      containerType - Type of container, e.g process instance, activity instance and so on.
      Returns:
      a list of SDataInstance objects
      Throws:
      SDataInstanceException
    • getDataInstances

      List<SDataInstance> getDataInstances(long containerId, String containerType, ParentContainerResolver parentContainerResolver, int fromIndex, int numberOfResults) throws SDataInstanceException
      Get all dataInstances visible in the specific container
      Parameters:
      containerId - Identifier of container
      containerType - Type of container, e.g process instance, activity instance and so on.
      Returns:
      Throws:
      SDataInstanceException
    • getLocalDataInstance

      SDataInstance getLocalDataInstance(String dataName, long containerId, String containerType) throws SDataInstanceException
      Get the local dataInstance by name in a certain container, the dataInstance is existed in this container
      Parameters:
      dataName - Name of dataInstance
      containerId - Identifier of container
      containerType - Type of container, e.g process instance, activity instance and so on.
      Returns:
      an SDataInstance object
      Throws:
      SDataInstanceException
    • getLocalDataInstances

      List<SDataInstance> getLocalDataInstances(long containerId, String containerType, int fromIndex, int numberOfResults) throws SDataInstanceException
      Get a list of local dataInstances for the specific container, those dataInstances must belong to the specified container. This method is paginated.
      Parameters:
      containerId - Identifier of container
      containerType - Type of container, e.g process instance, activity instance and so on.
      Returns:
      a list of SDataInstance objects
      Throws:
      SDataInstanceException
    • getSADataInstance

      SADataInstance getSADataInstance(long sourceObjectId, long time) throws SDataInstanceException
      Get SADataInstance object for specific dataInstance at the specific time
      Parameters:
      sourceObjectId - Identifier of data instance which has been archived
      time - The archive time
      Returns:
      an SADataInstance object
      Throws:
      SDataInstanceException
    • getSADataInstance

      SADataInstance getSADataInstance(long containerId, String containerType, ParentContainerResolver parentContainerResolver, String dataName, long time) throws SDataInstanceException
      Get SADataInstance object archived in the specific time for name specified dataInstance in a container
      Parameters:
      containerId - Identifier of container
      containerType - Type of container, e.g process instance, activity instance and so on.
      dataName - Name of data instance
      time - The archive time
      Returns:
      an SADataInstance object
      Throws:
      SDataInstanceException
    • getSADataInstances

      List<SADataInstance> getSADataInstances(long containerId, String containerType, ParentContainerResolver parentContainerResolver, List<String> dataNames, long time) throws SDataInstanceException
      Get all SADataInstance objects archived after specific time for specific dataInstance in a container
      Parameters:
      containerId - Identifier of container
      containerType - Type of container, e.g process instance, activity instance and so on.
      dataNames - Name of data
      time - The archive time
      Returns:
      a list of SADataInstance objects
      Throws:
      SDataInstanceException
    • getNumberOfDataInstances

      long getNumberOfDataInstances(long containerId, String containerType, ParentContainerResolver parentContainerResolver) throws SDataInstanceException
      Get number of dataInstance for specified container
      Parameters:
      containerId - Identifier of container
      containerType - Type of container, e.g process instance, activity instance and so on.
      Returns:
      the number of dataInstances
      Throws:
      SDataInstanceException
    • getLastSADataInstance

      SADataInstance getLastSADataInstance(String dataName, long containerId, String containerType, ParentContainerResolver parentContainerResolver) throws SDataInstanceException
      Gets the last archived SADataInstance object for the named data in the container.
      Parameters:
      dataName - the name of the data
      containerId - the identifier of the container
      containerType - the type of the container
      Returns:
      the last archived SADataInstance
      Throws:
      SDataInstanceException
    • getLastLocalSADataInstances

      List<SADataInstance> getLastLocalSADataInstances(long containerId, String containerType, int startIndex, int maxResults) throws SDataInstanceException
      Gets the last archived SADataInstance objects of the container.
      Parameters:
      containerId - the identifier of the container
      containerType - the type of the container
      startIndex -
      maxResults -
      Returns:
      the last archived SADataInstance
      Throws:
      SDataInstanceException
    • getLocalSADataInstances

      List<SADataInstance> getLocalSADataInstances(long containerId, String containerType, int fromIndex, int maxResults) throws SDataInstanceException
      Get the local SADataInstances for this element
      Parameters:
      containerId -
      containerType -
      fromIndex -
      maxResults -
      Returns:
      Throws:
      SDataInstanceException
    • deleteLocalArchivedDataInstances

      void deleteLocalArchivedDataInstances(long containerId, String dataInstanceContainerType) throws SDataInstanceException
      Delete all local archived data instances for a specified container
      Parameters:
      containerId -
      dataInstanceContainerType -
      Throws:
      SDataInstanceException
      Since:
      6.1
    • deleteLocalArchivedDataInstances

      void deleteLocalArchivedDataInstances(List<Long> containerIds, String dataInstanceContainerType) throws SDataInstanceException
      Delete all local archived data instances for multiple containers having the same type
      Parameters:
      containerIds - containers
      dataInstanceContainerType - type of the containers
      Throws:
      SDataInstanceException
      Since:
      7.8
    • deleteLocalDataInstances

      void deleteLocalDataInstances(long containerId, String dataInstanceContainerType, boolean dataPresent) throws SDataInstanceException
      Delete all local active data instances for a specified container
      Parameters:
      containerId -
      dataInstanceContainerType -
      dataPresent -
      Throws:
      SDataInstanceException
      Since:
      6.1