Class VorgangAPI


  • public class VorgangAPI
    extends AEntityAPI<Vorgang>
    API class for manipulation of Vorgang entities.
    Author:
    XIMA MEDIA GmbH
    • Constructor Detail

      • VorgangAPI

        public VorgangAPI()
    • Method Detail

      • getVorgangBy

        public Vorgang getVorgangBy​(UserContext uc,
                                    String vorgangProzessID)
        Method for determining a Vorgang by the process ID.
        Parameters:
        uc - UserContext the user context in which the action is to be performed.
        vorgangProzessID - String the process ID of the Vorgang.
        Returns:
        Vorgang the searched process.
        Since:
        2.4.3
      • addAttachment

        public Vorgang addAttachment​(UserContext uc,
                                     Vorgang vorgang,
                                     Attachment attachment)
        Method for adding a attachment to a Vorgang.
        Parameters:
        uc - UserContext the user context in which the action is to be performed.
        vorgang - the Vorgang, to which the attachment should be added.
        attachment - Attachment the one to add.
        Returns:
        Vorgang, to which the attachment was added.
      • getParent

        @Nullable
        public Vorgang getParent​(UserContext uc,
                                 Vorgang formRecord)
        Parameters:
        uc - The user context for the user who initiated this query.
        formRecord - Form record for which to find the parent.
        Returns:
        The parent form record of the given form record, or null if no parent exists.
      • getChildren

        public List<Vorgang> getChildren​(UserContext uc,
                                         Vorgang formRecord)
        Parameters:
        uc - The user context for the user who initiated this query.
        formRecord - Form record for which to find the parent.
        Returns:
        All children of the given form record, or an empty list if no children exist.
      • getVorgangsData

        public ExtendedEntityModel<Vorgang> getVorgangsData​(UserContext uc,
                                                            String prozessId,
                                                            de.xima.cmn.criteria.QueryCriteriaManager qcm,
                                                            EProjectSpecificDBTable tableType)
        Method for determining of process data of a concrete Vorgang by a process ID.
        Parameters:
        uc - UserContext the user context in which the action is to be performed.
        prozessId - String the process ID of the process which data should be loaded.
        qcm - QueryCriteriaManager with specific filter parameters.
        tableType - EProjectSpecificDBTable specifies from which table the data should be determined.
        Returns:
        generic object of process data.
        Since:
        4.3.2
      • getVorgangsData

        public ExtendedEntityModel<Vorgang> getVorgangsData​(UserContext uc,
                                                            Projekt project,
                                                            Vorgang v,
                                                            de.xima.cmn.criteria.QueryCriteriaManager qcm,
                                                            EProjectSpecificDBTable tableType)
        Method for determining of process data of a concrete Vorgang of a Projekt.
        Parameters:
        uc - UserContext the user context in which the action is to be performed.
        project - the Projekt to which the process belongs.
        v - the Vorgang whose data is to be determined.
        qcm - QueryCriteriaManager with specific filter parameters.
        tableType - EProjectSpecificDBTable specifies from which table the data should be determined.
        Returns:
        generic object of process data or null.
        Since:
        4.3.2
      • getVorgaengeDataTotalCount

        public long getVorgaengeDataTotalCount​(UserContext uc,
                                               Projekt project,
                                               Postfach inbox,
                                               de.xima.cmn.criteria.QueryCriteriaManager qcm,
                                               EProjectSpecificDBTable tableType)
        Method for determining the total number of process data of the processes of a Projekt and a Postfach.
        Parameters:
        uc - UserContext the user context in which the action is to be performed.
        project - the Projekt to which the processes belongs.
        inbox - the Postfach in which the processes lie.
        qcm - QueryCriteriaManager with specific filter parameters.
        tableType - EProjectSpecificDBTable specifies from which table the data should be determined. If the EProjectSpecificDBTable.DATA_INBOX table type is selected, the inbox parameter can be set to null.
        Returns:
        Number of elements.
        Since:
        4.3.2
      • getVorgaengeDataTotalCount

        public long getVorgaengeDataTotalCount​(UserContext uc,
                                               Projekt project,
                                               de.xima.cmn.criteria.QueryCriteriaManager qcm,
                                               EProjectSpecificDBTable tableType,
                                               Postfach... inboxes)
        Method for determining the total number of process data of the processes of a Projekt and a Postfach.
        Parameters:
        uc - UserContext the user context in which the action is to be performed.
        project - the Projekt to which the processes belongs.
        inboxes - the array of Postfach in which the processes lie.
        qcm - QueryCriteriaManager with specific filter parameters.
        tableType - EProjectSpecificDBTable specifies from which table the data should be determined. If the EProjectSpecificDBTable.DATA_INBOX table type is selected, the inbox parameter can be set to null.
        Returns:
        Number of elements.
        Since:
        4.3.2
      • getVorgaengeDataTotalCount

        public long getVorgaengeDataTotalCount​(UserContext uc,
                                               Projekt project,
                                               de.xima.cmn.criteria.QueryCriteriaManager qcm,
                                               EProjectSpecificDBTable tableType)
        Method for determining the total number of process data of the processes of a Projekt.
        Parameters:
        uc - UserContext the user context in which the action is to be performed.
        project - the Projekt to which the processes belongs.
        qcm - QueryCriteriaManager with specific filter parameters.
        tableType - EProjectSpecificDBTable specifies from which table the data should be determined.
        Returns:
        Number of elements.
        Since:
        4.3.2
      • getCustomAttributes

        public Map<String,​String> getCustomAttributes​(UserContext uc,
                                                            Vorgang v)
        Method for determining all custom attributes of a Vorgang.
        Parameters:
        uc - UserContext the user context in which the action is to be performed.
        v - Vorgang, whose custom attributes are to be determined.
        Returns:
        Map with elements.
        Since:
        4.2.0
      • getFormRecordReviewData

        public IFormRecordReviewData getFormRecordReviewData​(UserContext uc,
                                                             IInboxFormRecordRequest inboxRequest)
        Gets the form record review data for a given process id
        Parameters:
        uc - UserContext to use
        inboxRequest - holds the request data
        Returns:
        the form record review data (including meta data) of the form record
        Since:
        7.0.0
      • getFormRecordBaseData

        public List<IFormRecordBaseData> getFormRecordBaseData​(UserContext uc,
                                                               de.xima.cmn.criteria.QueryCriteriaManager qcm)
        Gets the form record base data for the given query
        Parameters:
        uc - UserContext to use
        qcm - defines the query
        Returns:
        list of form record data (including meta data) of the form record
        Since:
        7.0.0
      • getFormRecordDoiInitData

        public IFormRecordDoiInitData getFormRecordDoiInitData​(UserContext uc,
                                                               Vorgang formRecord)
        Gets the data that was used to initialize the Double opt-in of the given form record
        Parameters:
        uc - UserContext to use
        formRecord - to get Double opt-in initialization data for
        Returns:
        data that was used to initialize the Double opt-in of the given form record or null if the form record is not in a Double opt-in 'state'
        Since:
        7.0.0
      • bulkMarkRead

        public int bulkMarkRead​(UserContext uc,
                                List<Long> formRecordIds,
                                boolean read)
        Bulk updates the 'read' value of all form records with the given IDs to the given 'read' value iff the authenticated user given by the user context has permission to access the form records. If the user context does not provide an authenticated user (e.g. a virtual user) no form records will be updated.
        Parameters:
        uc - UserContext with an authenticated user for database transactions. For creating a user context for an authenticated user see UserContextFactory.forUser(IUser).
        formRecordIds - List of IDs of the form records that the user requests to be updated.
        read - Boolean value to set the attribute 'gelesen' to
        Returns:
        the number of updated records
        Throws:
        de.xima.cmn.dao.exceptions.UpdateException - if the given user context does not provide an authenticated user.
        Since:
        6.2.1
      • bulkMove

        public int bulkMove​(UserContext uc,
                            Set<Long> formRecordIds,
                            Postfach inbox)
        Bulk moves all form records with the given IDs to the given inbox iff the authenticated user given by the user context has permission to access the form records. If the user context does not provide an authenticated user (e.g. a virtual user) no form records will be updated.
        Parameters:
        uc - UserContext with an authenticated user for database transactions. For creating a user context for an authenticated user see UserContextFactory.forUser(IUser).
        formRecordIds - Set of IDs of the form records that the user requests to be updated.
        Returns:
        the number of updated records.
        Throws:
        de.xima.cmn.dao.exceptions.UpdateException - if the given user context does not provide an authenticated user.
        Since:
        8.0.2
      • bulkDelete

        public int bulkDelete​(UserContext uc,
                              List<Long> formRecordIds)
        Bulk deletes all form records with the given IDs iff the authenticated user given by the user context has permission to access the form records and the form records can be deleted (the state allows deletion). If the user context does not provide an authenticated user (e.g. a virtual user) no form records will be deleted.
        Parameters:
        uc - UserContext with an authenticated user for database transactions. For creating a user context for an authenticated user see UserContextFactory.forUser(IUser).
        formRecordIds - List of IDs of the form records that the user requests to be deleted.
        Returns:
        the number of deleted form records.
        Throws:
        de.xima.cmn.dao.exceptions.DeleteException - if the given entity context does not provide an authenticated user.
        Since:
        6.2.1
      • correctStatus

        @Deprecated
        public Vorgang correctStatus​(UserContext uc,
                                     Vorgang formRecord,
                                     Status targetState,
                                     IUser user)
        Deprecated.
        The old workflow is deprecated, use method for the new workflow.
        Performs a correction on the form record, i.e. saves the form data and changes the state, but does not execute the workflow.
        Parameters:
        uc - Current user context.
        formRecord - Form record to process.
        targetState - Target state to set.
        user - User who initiated the correction.
        Returns:
        The updated form record entity.
      • correctStatus

        @Deprecated
        public Vorgang correctStatus​(UserContext uc,
                                     Vorgang formRecord,
                                     Status targetState,
                                     Benutzer user)
        Deprecated.
        The old workflow is deprecated, use method for the new workflow.
        Performs a correction on the form record, i.e. saves the form data and changes the state, but does not execute the workflow.
        Parameters:
        uc - Current user context.
        formRecord - Form record to process.
        targetState - Target state to set.
        user - User who initiated the correction.
        Returns:
        The updated form record entity.