Package de.xima.fc.api.entity
Class VorgangAPI
- java.lang.Object
-
- de.xima.fc.api.ASubAPI
-
- de.xima.fc.api.entity.AEntityAPI<Vorgang>
-
- de.xima.fc.api.entity.VorgangAPI
-
public class VorgangAPI extends AEntityAPI<Vorgang>
API class for manipulation ofVorgangentities.- Author:
- XIMA MEDIA GmbH
-
-
Field Summary
-
Fields inherited from class de.xima.fc.api.entity.AEntityAPI
entityClass
-
-
Constructor Summary
Constructors Constructor Description VorgangAPI()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description IExclusiveFormRecordLockResultacquireExclusiveFormRecordLock(UserContext uc, IBasicFormRecordRequestData req)Acquires an exclusive lock on the form record.VorgangaddAttachment(UserContext uc, Vorgang vorgang, Attachment attachment)Method for adding a attachment to aVorgang.intbulkDelete(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).intbulkMarkRead(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.intbulkMove(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.VorgangcorrectStatus(UserContext uc, Vorgang formRecord, Status targetState, Benutzer user)Deprecated.The old workflow is deprecated, use method for the new workflow.VorgangcorrectStatus(UserContext uc, Vorgang formRecord, Status targetState, IUser user)Deprecated.The old workflow is deprecated, use method for the new workflow.List<Vorgang>getAllByBenutzer(UserContext uc, Benutzer benutzer)Deprecated.List<Vorgang>getAllByPostfach(UserContext uc, Postfach postfach)List<Vorgang>getChildren(UserContext uc, Vorgang formRecord)Map<String,String>getCustomAttributes(UserContext uc, Vorgang v)Method for determining all custom attributes of aVorgang.List<IFormRecordBaseData>getFormRecordBaseData(UserContext uc, de.xima.cmn.criteria.QueryCriteriaManager qcm)Gets the form record base data for the given queryIFormRecordDoiInitDatagetFormRecordDoiInitData(UserContext uc, Vorgang formRecord)Gets the data that was used to initialize the Double opt-in of the given form recordIFormRecordReviewDatagetFormRecordReviewData(UserContext uc, IInboxFormRecordRequest inboxRequest)Gets the form record review data for a given process idVorganggetParent(UserContext uc, Vorgang formRecord)List<ExtendedEntityModel<Vorgang>>getVorgaengeData(UserContext uc, Projekt project, de.xima.cmn.criteria.QueryCriteriaManager qcm)List<ExtendedEntityModel<Vorgang>>getVorgaengeData(UserContext uc, Projekt project, de.xima.cmn.criteria.QueryCriteriaManager qcm, EProjectSpecificDBTable tableType)Method for determining of process data by aProjekt.List<ExtendedEntityModel<Vorgang>>getVorgaengeData(UserContext uc, Projekt project, de.xima.cmn.criteria.QueryCriteriaManager qcm, EProjectSpecificDBTable tableType, Postfach... inboxes)Method for determining of process data by a project and inboxes.List<ExtendedEntityModel<Vorgang>>getVorgaengeData(UserContext uc, Projekt project, Postfach inbox, de.xima.cmn.criteria.QueryCriteriaManager qcm)List<ExtendedEntityModel<Vorgang>>getVorgaengeData(UserContext uc, Projekt project, Postfach inbox, de.xima.cmn.criteria.QueryCriteriaManager qcm, EProjectSpecificDBTable tableType)Method for determining of process data by a project and a inbox.longgetVorgaengeDataTotalCount(UserContext uc, Projekt project, de.xima.cmn.criteria.QueryCriteriaManager qcm)longgetVorgaengeDataTotalCount(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 aProjekt.longgetVorgaengeDataTotalCount(UserContext uc, Projekt project, de.xima.cmn.criteria.QueryCriteriaManager qcm, EProjectSpecificDBTable tableType, Postfach... inboxes)longgetVorgaengeDataTotalCount(UserContext uc, Projekt project, Postfach inbox, de.xima.cmn.criteria.QueryCriteriaManager qcm)longgetVorgaengeDataTotalCount(UserContext uc, Projekt project, Postfach inbox, de.xima.cmn.criteria.QueryCriteriaManager qcm, EProjectSpecificDBTable tableType)VorganggetVorgangBy(UserContext uc, Projekt projekt, String vorgangProzessID)VorganggetVorgangBy(UserContext uc, String vorgangProzessID)Method for determining aVorgangby the process ID.ExtendedEntityModel<Vorgang>getVorgangsData(UserContext uc, Projekt project, Vorgang v, de.xima.cmn.criteria.QueryCriteriaManager qcm)ExtendedEntityModel<Vorgang>getVorgangsData(UserContext uc, Projekt project, Vorgang v, de.xima.cmn.criteria.QueryCriteriaManager qcm, EProjectSpecificDBTable tableType)ExtendedEntityModel<Vorgang>getVorgangsData(UserContext uc, String prozessId, de.xima.cmn.criteria.QueryCriteriaManager qcm)ExtendedEntityModel<Vorgang>getVorgangsData(UserContext uc, String prozessId, de.xima.cmn.criteria.QueryCriteriaManager qcm, EProjectSpecificDBTable tableType)Method for determining of process data of a concreteVorgangby a process ID.IExclusiveFormRecordLockResultreleaseExclusiveFormRecordLock(UserContext uc, IBasicFormRecordRequestData req)Releases an exclusive lock on the form record.-
Methods inherited from class de.xima.fc.api.entity.AEntityAPI
create, create, delete, delete, deleteAllBy, deleteById, deleteById, getAll, getAllBy, getAttributes, getAttributes, getBy, getById, getById, getEntityRefs, getSingleAttributes, getSingleAttributes, resultTotalCount, resultTotalCount, update, update
-
Methods inherited from class de.xima.fc.api.ASubAPI
getHandlerProvider
-
-
-
-
Method Detail
-
getVorgangBy
public Vorgang getVorgangBy(UserContext uc, String vorgangProzessID)
Method for determining aVorgangby the process ID.- Parameters:
uc-UserContextthe user context in which the action is to be performed.vorgangProzessID-Stringthe process ID of theVorgang.- Returns:
Vorgangthe searched process.- Since:
- 2.4.3
-
getVorgangBy
public Vorgang getVorgangBy(UserContext uc, Projekt projekt, String vorgangProzessID)
-
addAttachment
public Vorgang addAttachment(UserContext uc, Vorgang vorgang, Attachment attachment)
Method for adding a attachment to aVorgang.- Parameters:
uc-UserContextthe user context in which the action is to be performed.vorgang- theVorgang, to which the attachment should be added.attachment-Attachmentthe 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
nullif 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.
-
getAllByPostfach
public List<Vorgang> getAllByPostfach(UserContext uc, Postfach postfach)
- Parameters:
uc-UserContextthe user context in which the action is to be performed.postfach-Postfach, whose processes are to be determined.- Returns:
ListofVorgang.- Since:
- 2.4.5
-
getVorgaengeData
public List<ExtendedEntityModel<Vorgang>> getVorgaengeData(UserContext uc, Projekt project, Postfach inbox, de.xima.cmn.criteria.QueryCriteriaManager qcm, EProjectSpecificDBTable tableType)
Method for determining of process data by a project and a inbox.- Parameters:
uc-UserContextthe user context in which the action is to be performed.project- theProjektthe processes are assigned.inbox- thePostfachin which the processes lie.qcm-QueryCriteriaManagerwith specific filter parameters.tableType-EProjectSpecificDBTablespecifies from which table the data should be determined. If theEProjectSpecificDBTable.DATA_INBOXtable type is selected, the inbox parameter can be set tonull.- Returns:
Listwith generic objects of process data.- Since:
- 4.3.2
-
getVorgaengeData
public List<ExtendedEntityModel<Vorgang>> getVorgaengeData(UserContext uc, Projekt project, de.xima.cmn.criteria.QueryCriteriaManager qcm, EProjectSpecificDBTable tableType, Postfach... inboxes)
Method for determining of process data by a project and inboxes.- Parameters:
uc-UserContextthe user context in which the action is to be performed.project- theProjektthe processes are assigned.inboxes- the array ofPostfachin which the processes lie.qcm-QueryCriteriaManagerwith specific filter parameters.tableType-EProjectSpecificDBTablespecifies from which table the data should be determined. If theEProjectSpecificDBTable.DATA_INBOXtable type is selected, the inbox parameter can be set tonull.- Returns:
Listwith generic objects of process data.- Since:
- 4.3.2
-
getVorgaengeData
public List<ExtendedEntityModel<Vorgang>> getVorgaengeData(UserContext uc, Projekt project, de.xima.cmn.criteria.QueryCriteriaManager qcm, EProjectSpecificDBTable tableType)
Method for determining of process data by aProjekt.- Parameters:
uc-UserContextthe user context in which the action is to be performed.project- theProjektthe processes are assigned.qcm-QueryCriteriaManagerwith specific filter parameters.tableType-EProjectSpecificDBTablespecifies from which table the data should be determined.- Returns:
Listwith generic objects of process data.- Since:
- 4.3.2
-
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 concreteVorgangby a process ID.- Parameters:
uc-UserContextthe user context in which the action is to be performed.prozessId-Stringthe process ID of the process which data should be loaded.qcm-QueryCriteriaManagerwith specific filter parameters.tableType-EProjectSpecificDBTablespecifies 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)
- Parameters:
uc-UserContextthe user context in which the action is to be performed.project- theProjektto which the process belongs.v- theVorgangwhose data is to be determined.qcm-QueryCriteriaManagerwith specific filter parameters.tableType-EProjectSpecificDBTablespecifies 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 aProjektand aPostfach.- Parameters:
uc-UserContextthe user context in which the action is to be performed.project- theProjektto which the processes belongs.inbox- thePostfachin which the processes lie.qcm-QueryCriteriaManagerwith specific filter parameters.tableType-EProjectSpecificDBTablespecifies from which table the data should be determined. If theEProjectSpecificDBTable.DATA_INBOXtable type is selected, the inbox parameter can be set tonull.- 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 aProjektand aPostfach.- Parameters:
uc-UserContextthe user context in which the action is to be performed.project- theProjektto which the processes belongs.inboxes- the array ofPostfachin which the processes lie.qcm-QueryCriteriaManagerwith specific filter parameters.tableType-EProjectSpecificDBTablespecifies from which table the data should be determined. If theEProjectSpecificDBTable.DATA_INBOXtable type is selected, the inbox parameter can be set tonull.- 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 aProjekt.- Parameters:
uc-UserContextthe user context in which the action is to be performed.project- theProjektto which the processes belongs.qcm-QueryCriteriaManagerwith specific filter parameters.tableType-EProjectSpecificDBTablespecifies 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 aVorgang.- Parameters:
uc-UserContextthe user context in which the action is to be performed.v-Vorgang, whose custom attributes are to be determined.- Returns:
Mapwith 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-UserContextto useinboxRequest- 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-UserContextto useqcm- 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-UserContextto useformRecord- 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. avirtual user) no form records will be updated.- Parameters:
uc-UserContextwith an authenticated user for database transactions. For creating a user context for an authenticated user seeUserContextFactory.forUser(IUser).formRecordIds-Listof IDs of the form records that the user requests to be updated.read-Booleanvalue 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. avirtual user) no form records will be updated.- Parameters:
uc-UserContextwith an authenticated user for database transactions. For creating a user context for an authenticated user seeUserContextFactory.forUser(IUser).formRecordIds-Setof 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. avirtual user) no form records will be deleted.- Parameters:
uc-UserContextwith an authenticated user for database transactions. For creating a user context for an authenticated user seeUserContextFactory.forUser(IUser).formRecordIds-Listof 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 recordentity.
-
acquireExclusiveFormRecordLock
public IExclusiveFormRecordLockResult acquireExclusiveFormRecordLock(UserContext uc, IBasicFormRecordRequestData req)
Acquires an exclusive lock on the form record.- Parameters:
uc-UserContextto be usedreq-IBasicFormRecordRequestDataidentifying the form record to be locked- Returns:
- result which tells if the operation was successful or not
- Since:
- 6.6.13 & 7.0.5
-
releaseExclusiveFormRecordLock
public IExclusiveFormRecordLockResult releaseExclusiveFormRecordLock(UserContext uc, IBasicFormRecordRequestData req)
Releases an exclusive lock on the form record.- Parameters:
uc-UserContextto be usedreq-IBasicFormRecordRequestDataidentifying the form record to be unlocked- Returns:
- result which tells if the operation was successful or not
- Since:
- 6.6.13 & 7.0.5
-
getAllByBenutzer
@Deprecated public List<Vorgang> getAllByBenutzer(UserContext uc, Benutzer benutzer)
Deprecated.Method for determining allVorgangs associated with theBenutzer. TheVorgangare determined by theBenutzerGruppeand itsPostfach.- Parameters:
uc-UserContextthe user context in which the action is to be performed.benutzer-Benutzer, which is assigned to the processes.- Returns:
ListofVorgang- Since:
- 2.4.3
-
getVorgaengeData
@Deprecated public List<ExtendedEntityModel<Vorgang>> getVorgaengeData(UserContext uc, Projekt project, de.xima.cmn.criteria.QueryCriteriaManager qcm)
Deprecated.- Parameters:
uc-UserContextthe user context in which the action is to be performed.project- theProjektthe processes are assigned.qcm-QueryCriteriaManagerwith specific filter parameters.- Returns:
Listwith generic objects of process data.
-
getVorgaengeData
@Deprecated public List<ExtendedEntityModel<Vorgang>> getVorgaengeData(UserContext uc, Projekt project, Postfach inbox, de.xima.cmn.criteria.QueryCriteriaManager qcm)
Deprecated.- Parameters:
uc-UserContextthe user context in which the action is to be performed.project- theProjektthe processes are assigned.inbox- thePostfachin which the processes lie.qcm-QueryCriteriaManagerwith specific filter parameters.- Returns:
Listwith generic objects of process data.
-
getVorgangsData
@Deprecated public ExtendedEntityModel<Vorgang> getVorgangsData(UserContext uc, String prozessId, de.xima.cmn.criteria.QueryCriteriaManager qcm)
- Parameters:
uc-UserContextthe user context in which the action is to be performed.prozessId-Stringthe process ID of the process whose data is to be loaded.qcm-QueryCriteriaManagerwith specific filter parameters.- Returns:
- generic object of process data.
-
getVorgangsData
@Deprecated public ExtendedEntityModel<Vorgang> getVorgangsData(UserContext uc, Projekt project, Vorgang v, de.xima.cmn.criteria.QueryCriteriaManager qcm)
Deprecated.- Parameters:
uc-UserContextthe user context in which the action is to be performed.project- theProjektto which the process belongs.v- theVorgangwhose data is to be determined.qcm-QueryCriteriaManagerwith specific filter parameters.- Returns:
- generic object of process data or
null.
-
getVorgaengeDataTotalCount
@Deprecated public long getVorgaengeDataTotalCount(UserContext uc, Projekt project, de.xima.cmn.criteria.QueryCriteriaManager qcm)
Deprecated.- Parameters:
uc-UserContextthe user context in which the action is to be performed.project- theProjektto which the processes belongs.qcm-QueryCriteriaManagerwith specific filter parameters.- Returns:
- Number of elements.
-
getVorgaengeDataTotalCount
@Deprecated public long getVorgaengeDataTotalCount(UserContext uc, Projekt project, Postfach inbox, de.xima.cmn.criteria.QueryCriteriaManager qcm)
Deprecated.- Parameters:
uc-UserContextthe user context in which the action is to be performed.project- theProjektto which the processes belongs.inbox- thePostfachin which the processes lie.qcm-QueryCriteriaManagerwith specific filter parameters. If theEProjectSpecificDBTable.DATA_INBOXtable type is selected, the inbox parameter can be set tonull.- Returns:
- Number of elements.
-
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 recordentity.
-
-