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 Detail

      • getDataInstance

        SDataInstance getDataInstance​(java.lang.String dataName,
                                      long containerId,
                                      java.lang.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

        java.util.List<SDataInstance> getDataInstances​(java.util.List<java.lang.String> dataNames,
                                                       long containerId,
                                                       java.lang.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

        java.util.List<SDataInstance> getDataInstances​(long containerId,
                                                       java.lang.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​(java.lang.String dataName,
                                           long containerId,
                                           java.lang.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

        java.util.List<SDataInstance> getLocalDataInstances​(long containerId,
                                                            java.lang.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,
                                         java.lang.String containerType,
                                         ParentContainerResolver parentContainerResolver,
                                         java.lang.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

        java.util.List<SADataInstance> getSADataInstances​(long containerId,
                                                          java.lang.String containerType,
                                                          ParentContainerResolver parentContainerResolver,
                                                          java.util.List<java.lang.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,
                                      java.lang.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​(java.lang.String dataName,
                                             long containerId,
                                             java.lang.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

        java.util.List<SADataInstance> getLastLocalSADataInstances​(long containerId,
                                                                   java.lang.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

        java.util.List<SADataInstance> getLocalSADataInstances​(long containerId,
                                                               java.lang.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,
                                              java.lang.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​(java.util.List<java.lang.Long> containerIds,
                                              java.lang.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,
                                      java.lang.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