public interface WorkbasketService
| Modifier and Type | Method and Description |
|---|---|
void |
addDistributionTarget(String sourceWorkbasketId,
String targetWorkbasketId)
Add a distribution target to a workbasket.
|
void |
checkAuthorization(String workbasketKey,
String domain,
WorkbasketPermission... permission)
This method checks the authorization for the actual User.
|
void |
checkAuthorization(String workbasketId,
WorkbasketPermission... permission)
This method checks the authorization for the actual User.
|
Workbasket |
createWorkbasket(Workbasket workbasket)
Create a new Workbasket.
|
WorkbasketAccessItem |
createWorkbasketAccessItem(WorkbasketAccessItem workbasketAccessItem)
Create and persist a new
WorkbasketAccessItem with a WorkbasketId, an accessId and permissions. |
WorkbasketAccessItemQuery |
createWorkbasketAccessItemQuery()
This method provides a query builder for querying the database.
|
WorkbasketQuery |
createWorkbasketQuery()
This method provides a query builder for querying the database.
|
boolean |
deleteWorkbasket(String workbasketId)
Deletes the workbasket by the given ID of it.
|
void |
deleteWorkbasketAccessItem(String id)
Deletes a specific
WorkbasketAccessItem. |
void |
deleteWorkbasketAccessItemsForAccessId(String accessId)
Deletes all WorkbasketAccessItems using the given AccessId of a user.
|
BulkOperationResults<String,TaskanaException> |
deleteWorkbaskets(List<String> workbasketsIds)
Deletes a list of workbaskets.
|
List<WorkbasketSummary> |
getDistributionSources(String workbasketId)
Returns the distribution sources for a given workbasket.
|
List<WorkbasketSummary> |
getDistributionSources(String workbasketKey,
String domain)
Returns the distribution sources for a given workbasket.
|
List<WorkbasketSummary> |
getDistributionTargets(String workbasketId)
Returns the distribution targets for a given workbasket.
|
List<WorkbasketSummary> |
getDistributionTargets(String workbasketKey,
String domain)
Returns the distribution targets for a given workbasket.
|
List<WorkbasketPermission> |
getPermissionsForWorkbasket(String workbasketId)
Returns a set with all permissions of the current user at this workbasket.
If the workbasketId is invalid, an empty list of permissions is returned since there is no distinction made between the situation that the workbasket is not found and the caller has no permissions on the workbasket. |
Workbasket |
getWorkbasket(String workbasketId)
Get Workbasket for a given id.
|
Workbasket |
getWorkbasket(String workbasketKey,
String domain)
Get Workbasket for a given key.
|
List<WorkbasketAccessItem> |
getWorkbasketAccessItems(String workbasketId)
Get all
s for a Workbasket. |
Workbasket |
newWorkbasket(String key,
String domain)
Returns a new workbasket which is not persisted.
|
WorkbasketAccessItem |
newWorkbasketAccessItem(String workbasketId,
String accessId)
Returns a new WorkbasketAccessItem which is not persisted.
|
void |
removeDistributionTarget(String sourceWorkbasketId,
String targetWorkbasketId)
Remove a distribution target from a workbasket.
|
void |
setDistributionTargets(String sourceWorkbasketId,
List<String> targetWorkbasketIds)
Set the distribution targets for a workbasket.
|
void |
setWorkbasketAccessItems(String workbasketId,
List<WorkbasketAccessItem> wbAccessItems)
Setting up the new WorkbasketAccessItems for a Workbasket.
|
Workbasket |
updateWorkbasket(Workbasket workbasket)
Update a Workbasket.
|
WorkbasketAccessItem |
updateWorkbasketAccessItem(WorkbasketAccessItem workbasketAccessItem)
This method updates a
WorkbasketAccessItem. |
Workbasket getWorkbasket(String workbasketId) throws WorkbasketNotFoundException, NotAuthorizedException
workbasketId - the Id of the Workbasket requestedWorkbasketNotFoundException - If the Workbasket with workbasketId is not foundNotAuthorizedException - If the current user or group does not have the permissions for interactions.Workbasket getWorkbasket(String workbasketKey, String domain) throws WorkbasketNotFoundException, NotAuthorizedException
workbasketKey - the Key of the Workbasket requesteddomain - the domain of the workbasketWorkbasketNotFoundException - If the Workbasket with workbasketId is not foundNotAuthorizedException - If the current user or group does not have the permissions for interactions.Workbasket createWorkbasket(Workbasket workbasket) throws InvalidWorkbasketException, NotAuthorizedException, WorkbasketAlreadyExistException, DomainNotFoundException
workbasket - The Workbasket to createInvalidWorkbasketException - If a required property of the Workbasket is not set.NotAuthorizedException - if the current user is not member of role BUSINESS_ADMIN or ADMINWorkbasketAlreadyExistException - if the workbasket exists alreadyDomainNotFoundException - if the domain does not exist in the configuration.Workbasket updateWorkbasket(Workbasket workbasket) throws NotAuthorizedException
workbasket - The Workbasket to updateNotAuthorizedException - if the current user is not authorized to update the work basketWorkbasketAccessItem newWorkbasketAccessItem(String workbasketId, String accessId)
workbasketId - the workbasket id used to identify the referenced workbasketaccessId - the group id or user id for which access is controlledWorkbasketAccessItem createWorkbasketAccessItem(WorkbasketAccessItem workbasketAccessItem) throws InvalidArgumentException, NotAuthorizedException, WorkbasketNotFoundException
WorkbasketAccessItem with a WorkbasketId, an accessId and permissions.workbasketAccessItem - the new workbasketAccessItemInvalidArgumentException - when the preconditions dont match the required ones.NotAuthorizedException - if the current user is not member of role BUSINESS_ADMIN or ADMINWorkbasketNotFoundException - if the workbasketAccessItem refers to a not existing workbasketWorkbasketAccessItem updateWorkbasketAccessItem(WorkbasketAccessItem workbasketAccessItem) throws InvalidArgumentException, NotAuthorizedException
WorkbasketAccessItem.workbasketAccessItem - the WorkbasketAccessItemInvalidArgumentException - if accessid or workbasketId is changed in the workbasketAccessItemNotAuthorizedException - if the current user is not member of role BUSINESS_ADMIN or ADMINvoid deleteWorkbasketAccessItem(String id) throws NotAuthorizedException
WorkbasketAccessItem.id - the id of the WorbasketAccessItem to be deletedNotAuthorizedException - if the current user is not member of role BUSINESS_ADMIN or ADMINvoid checkAuthorization(String workbasketId, WorkbasketPermission... permission) throws NotAuthorizedException, WorkbasketNotFoundException
workbasketId - the id of the workbasket we want to accesspermission - the needed WorkbasketPermission If more than one permission is specified, the current user
needs all of them.NotAuthorizedException - if the current user has not the requested authorization for the specified workbasketWorkbasketNotFoundException - if the workbasket cannot be found for the given ID.void checkAuthorization(String workbasketKey, String domain, WorkbasketPermission... permission) throws NotAuthorizedException, WorkbasketNotFoundException
workbasketKey - the key of the workbasket we want to accessdomain - the domain of the workbasket we want to accesspermission - the needed WorkbasketPermission. If more than one permission is specified, the current user
needs all of them.NotAuthorizedException - if the current user has not the requested permission for the specified workbasketWorkbasketNotFoundException - if no workbasket can be found for the given key+domain values.List<WorkbasketAccessItem> getWorkbasketAccessItems(String workbasketId) throws NotAuthorizedException
s for a Workbasket.workbasketId - the id of the WorkbasketNotAuthorizedException - if the current user is not member of role BUSINESS_ADMIN or ADMINvoid setWorkbasketAccessItems(String workbasketId, List<WorkbasketAccessItem> wbAccessItems) throws InvalidArgumentException, NotAuthorizedException
workbasketId - ID of the access-target workbasket.wbAccessItems - List of WorkbasketAccessItems which does replace all current stored ones.InvalidArgumentException - will be thrown when the parameter is NULL or member doesn´t match the preconditionsNotAuthorizedException - if the current user is not member of role BUSINESS_ADMIN or ADMINWorkbasketQuery createWorkbasketQuery()
WorkbasketQueryWorkbasketAccessItemQuery createWorkbasketAccessItemQuery() throws NotAuthorizedException
WorkbasketAccessItemQueryNotAuthorizedException - if the current user is not member of role BUSINESS_ADMIN or ADMINWorkbasket newWorkbasket(String key, String domain)
key - the workbasket key used to identify the workbasketdomain - the domain of the new workbasketList<WorkbasketPermission> getPermissionsForWorkbasket(String workbasketId)
workbasketId - the id of the referenced workbasketList with all WorkbasketPermissions of the caller on the requested workbasket.List<WorkbasketSummary> getDistributionTargets(String workbasketId) throws NotAuthorizedException, WorkbasketNotFoundException
workbasketId - the id of the referenced workbasketNotAuthorizedException - if the current user has no read permission for the specified workbasketWorkbasketNotFoundException - if the workbasket doesn't existList<WorkbasketSummary> getDistributionTargets(String workbasketKey, String domain) throws NotAuthorizedException, WorkbasketNotFoundException
workbasketKey - the key of the referenced workbasketdomain - the domain of the referenced workbasketNotAuthorizedException - if the current user has no read permission for the specified workbasketWorkbasketNotFoundException - if the workbasket doesn't existvoid setDistributionTargets(String sourceWorkbasketId, List<String> targetWorkbasketIds) throws NotAuthorizedException, WorkbasketNotFoundException
sourceWorkbasketId - the id of the source workbasket for which the distribution targets are to be settargetWorkbasketIds - a list of the ids of the target workbasketsNotAuthorizedException - if the current used doesn't have READ permission for the source workbasketWorkbasketNotFoundException - if either the source workbasket or any of the target workbaskets don't existvoid addDistributionTarget(String sourceWorkbasketId, String targetWorkbasketId) throws NotAuthorizedException, WorkbasketNotFoundException
sourceWorkbasketId - the id of the source workbaskettargetWorkbasketId - the id of the target workbasketNotAuthorizedException - if the current user doesn't have READ permission for the source workbasketWorkbasketNotFoundException - if either the source workbasket or the target workbasket doesn't existvoid removeDistributionTarget(String sourceWorkbasketId, String targetWorkbasketId) throws NotAuthorizedException
sourceWorkbasketId - The id of the source workbaskettargetWorkbasketId - The id of the target workbasketNotAuthorizedException - If the current user doesn't have READ permission for the source workbasketboolean deleteWorkbasket(String workbasketId) throws NotAuthorizedException, WorkbasketNotFoundException, WorkbasketInUseException, InvalidArgumentException
workbasketId - Id of the workbasket which should be deleted.NotAuthorizedException - if the current user got no permissions for this interaction.WorkbasketNotFoundException - if the workbasket does not exist.WorkbasketInUseException - if the workbasket does contain task-content.InvalidArgumentException - if the workbasketId is NULL or EMPTYBulkOperationResults<String,TaskanaException> deleteWorkbaskets(List<String> workbasketsIds) throws NotAuthorizedException, WorkbasketNotFoundException, WorkbasketInUseException, InvalidArgumentException
workbasketsIds - the ids of the workbaskets to delete.InvalidArgumentException - if the WorkbasketId parameter is NULLNotAuthorizedExceptionWorkbasketNotFoundExceptionWorkbasketInUseExceptionList<WorkbasketSummary> getDistributionSources(String workbasketId) throws NotAuthorizedException, WorkbasketNotFoundException
workbasketId - the id of the referenced workbasketNotAuthorizedException - if the current user has no read permission for the specified workbasketWorkbasketNotFoundException - if the workbasket doesn't existList<WorkbasketSummary> getDistributionSources(String workbasketKey, String domain) throws NotAuthorizedException, WorkbasketNotFoundException
workbasketKey - the key of the referenced workbasketdomain - the domain of the referenced workbasketNotAuthorizedException - if the current user has no read permission for the specified workbasketWorkbasketNotFoundException - if the workbasket doesn't existvoid deleteWorkbasketAccessItemsForAccessId(String accessId) throws NotAuthorizedException
accessId - of a taskana-user.NotAuthorizedException - if the current user is not member of role BUSINESS_ADMIN or ADMINCopyright © 2018. All rights reserved.