public interface DocumentRoleService extends Service
DocumentRole
s.Modifier and Type | Method and Description |
---|---|
BatchOperation<Void,BatchOperationError> |
batchAssignMissingUsers(List<DocumentVersion> documentVersions,
String roleName,
List<String> userIds)
Creates an operation which can be used to update document roles such that all of the given user IDs are on the
given document lifecycle role on all of the given documents.
|
BatchOperation<Void,BatchOperationError> |
batchUpdateDocumentRoles(List<DocumentRoleUpdate> documentRoleUpdates)
Creates an operation which can be used to update document roles.
|
GetDocumentRolesResponse |
getDocumentRoles(List<DocumentVersion> documentVersions,
String roleName)
Retrieves a
GetDocumentRolesResponse object, which can be used to retrieve any manually assigned
DocumentRole s for a given document. |
GetGroupInDocumentRolesResponse |
getGroupInDocumentRoles(Group group,
List<DocumentRole> documentRoles)
For the given group, returns a
GetGroupInDocumentRolesResponse which can be used to check if the group is
in a particular document role. |
GetMissingAssignmentsDocumentResponse |
getMissingAssignments(List<DocumentVersion> documentVersions,
String roleName,
List<String> userIds)
Retrieves a
GetMissingAssignmentsDocumentResponse which can be used to check for an incompleteness of
document roles. |
GetUserInDocumentRolesResponse |
getUserInDocumentRoles(String userId,
List<DocumentRole> documentRoles)
For a given userId, retrieves a
GetUserInDocumentRolesResponse which can be used to check if the user is
in a particular document role. |
DocumentRoleUpdate |
newDocumentRoleUpdate(String roleName,
DocumentVersion documentVersion)
Creates a
DocumentRoleUpdate which can be submitted to batchUpdateDocumentRoles(List) to update
document roles on a particular document. |
GetDocumentRolesResponse getDocumentRoles(List<DocumentVersion> documentVersions, String roleName)
GetDocumentRolesResponse
object, which can be used to retrieve any manually assigned
DocumentRole
s for a given document.
The given roleName must be a valid option on each included DocumentVersion
.
documentVersions
- List of DocumentVersions to retrieve roles from. Cannot exceed 500 DocumentVersions.roleName
- name of a document lifecycle role, for example, approver__cGetUserInDocumentRolesResponse getUserInDocumentRoles(String userId, List<DocumentRole> documentRoles)
GetUserInDocumentRolesResponse
which can be used to check if the user is
in a particular document role.
While a GetDocumentRolesResponse
only contains manual assignments, this method will allow you to
check if a user is in a document role from manual or automated assignments (such as Dynamic Access Control).
In addition, this method will check if the user is in a document role indirectly, such as through a group.
userId
- the ID for a user. Cannot be null.documentRoles
- List of DocumentRoles. Cannot be null or exceed 500 DocumentRoles.GetGroupInDocumentRolesResponse getGroupInDocumentRoles(Group group, List<DocumentRole> documentRoles)
GetGroupInDocumentRolesResponse
which can be used to check if the group is
in a particular document role.
While a GetDocumentRolesResponse
only contains direct manual assignments, this method will allow you to
check if a group is in a document role from manual or automated assignments.
group
- a Group object. Cannot be null.documentRoles
- List of document roles to check. Cannot be null or exceed 500 DocumentRoles.DocumentRoleUpdate newDocumentRoleUpdate(String roleName, DocumentVersion documentVersion)
DocumentRoleUpdate
which can be submitted to batchUpdateDocumentRoles(List)
to update
document roles on a particular document.roleName
- name of a document lifecycle role, for example, approver__vdocumentVersion
- a document to update roles onbatchUpdateDocumentRoles(List)
to update
document roles on a documentBatchOperation<Void,BatchOperationError> batchUpdateDocumentRoles(List<DocumentRoleUpdate> documentRoleUpdates)
The way that errors are handled can be specified on the returned BatchOperation
. Once error-handling has
been specified, the method BatchOperation.execute()
must be called to finally execute the update.
For example:
documentRoleService.batchUpdateDocumentRoles(documentRoleUpdates).rollbackOnErrors().execute()
documentRoleUpdates
- a List of DocumentRoleUpdates to update. Cannot be null or exceed 500 DocumentRoleUpdates.GetMissingAssignmentsDocumentResponse getMissingAssignments(List<DocumentVersion> documentVersions, String roleName, List<String> userIds)
GetMissingAssignmentsDocumentResponse
which can be used to check for an incompleteness of
document roles.
The given roleName must be a valid option on each included DocumentVersion
.
documentVersions
- a List of DocumentVersions to check. Cannot be null or exceed 500 documents.roleName
- name of a document lifecycle role, for example, approver__cuserIds
- a List of user IDs. Cannot be null or exceed 500 IDs.GetMissingAssignmentsDocumentResponse
object which can be used to check for incompleteness of document rolesBatchOperation<Void,BatchOperationError> batchAssignMissingUsers(List<DocumentVersion> documentVersions, String roleName, List<String> userIds)
The given roleName must be a valid option on each included DocumentVersion
.
The way that errors are handled can be specified on the returned BatchOperation
. Once error-handling has
been specified, the method BatchOperation.execute()
must be called to finally execute the update.
For example:
documentRoleService.batchUpdateDocumentRoles(documentRoleUpdates).rollbackOnErrors().execute()
documentVersions
- a List of document versions. Cannot be null or exceed 500 DocumentVersions.roleName
- name of a document lifecycle role, for example, approver__vuserIds
- a List of user IDs. Cannot be null or exceed 500 IDs.Copyright © Veeva Systems 2017–2020. All rights reserved.