public class WorkbasketServiceImpl extends Object implements WorkbasketService
| Constructor and Description |
|---|
WorkbasketServiceImpl() |
WorkbasketServiceImpl(TaskanaEngine taskanaEngine,
WorkbasketMapper workbasketMapper,
DistributionTargetMapper distributionTargetMapper,
WorkbasketAccessMapper workbasketAccessMapper) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkAuthorization(String workbasketKey,
WorkbasketAuthorization workbasketAuthorization)
This method checks the authorization with the saved one for the actual User.
|
Workbasket |
createWorkbasket(Workbasket newWorkbasket)
Create a new Workbasket.
|
WorkbasketAccessItem |
createWorkbasketAuthorization(WorkbasketAccessItem workbasketAccessItem)
Create and persist a new Workbasket Authorization with a Workbasket and a AccessId.
|
WorkbasketQuery |
createWorkbasketQuery()
This method provides a query builder for querying the database.
|
void |
deleteWorkbasketAuthorization(String id)
Deletes a specific authorization.
|
List<WorkbasketAccessItem> |
getAllAuthorizations()
Get all authorizations of the workbasket.
|
Workbasket |
getWorkbasket(String workbasketId)
Get Workbasket for a given id.
|
WorkbasketAccessItem |
getWorkbasketAuthorization(String id)
This method get one WorkbasketAccessItem with an id.
|
List<WorkbasketAccessItem> |
getWorkbasketAuthorizations(String workbasketKey)
Get all authorizations for a Workbasket.
|
Workbasket |
getWorkbasketByKey(String workbasketKey)
Get Workbasket for a given key.
|
List<Workbasket> |
getWorkbaskets()
Get all available Workbaskets.
|
List<Workbasket> |
getWorkbaskets(List<WorkbasketAuthorization> permissions)
This method returns the workbaskets for which the current user has all permissions specified in the permissions
list.
|
Workbasket |
newWorkbasket()
Returns a new workbasket which is not persisted.
|
Workbasket |
updateWorkbasket(Workbasket workbasketToUpdate)
Update a Workbasket.
|
WorkbasketAccessItem |
updateWorkbasketAuthorization(WorkbasketAccessItem workbasketAccessItem)
This method updates an Workbasket Authorization.
|
public WorkbasketServiceImpl()
public WorkbasketServiceImpl(TaskanaEngine taskanaEngine, WorkbasketMapper workbasketMapper, DistributionTargetMapper distributionTargetMapper, WorkbasketAccessMapper workbasketAccessMapper)
public Workbasket getWorkbasket(String workbasketId) throws WorkbasketNotFoundException, InvalidWorkbasketException
WorkbasketServicegetWorkbasket in interface WorkbasketServiceworkbasketId - the Id of the Workbasket requestedWorkbasketNotFoundException - If the Workbasket with workbasketId is not foundInvalidWorkbasketException - If required properties are missing in the found Workbasketpublic Workbasket getWorkbasketByKey(String workbasketKey) throws WorkbasketNotFoundException, InvalidWorkbasketException
WorkbasketServicegetWorkbasketByKey in interface WorkbasketServiceworkbasketKey - the Key of the Workbasket requestedWorkbasketNotFoundException - If the Workbasket with workbasketId is not foundInvalidWorkbasketException - If required properties are missing in the found Workbasketpublic List<Workbasket> getWorkbaskets(List<WorkbasketAuthorization> permissions)
WorkbasketServicegetWorkbaskets in interface WorkbasketServicepermissions - a List of WorkbasketAuthorization enumspublic List<Workbasket> getWorkbaskets()
WorkbasketServicegetWorkbaskets in interface WorkbasketServicepublic Workbasket createWorkbasket(Workbasket newWorkbasket) throws InvalidWorkbasketException, WorkbasketNotFoundException
WorkbasketServicecreateWorkbasket in interface WorkbasketServicenewWorkbasket - The Workbasket to createInvalidWorkbasketException - If a required property of the Workbasket is not set.WorkbasketNotFoundException - If the to be created work basket references a distribution target that does not existpublic Workbasket updateWorkbasket(Workbasket workbasketToUpdate) throws NotAuthorizedException, WorkbasketNotFoundException, InvalidWorkbasketException
WorkbasketServiceupdateWorkbasket in interface WorkbasketServiceworkbasketToUpdate - The Workbasket to updateNotAuthorizedException - if the current user is not authorized to update the work basketWorkbasketNotFoundException - if the updated work basket references a distribution target that does not existInvalidWorkbasketException - if a required property of the workbasket is not setpublic WorkbasketAccessItem createWorkbasketAuthorization(WorkbasketAccessItem workbasketAccessItem)
WorkbasketServicecreateWorkbasketAuthorization in interface WorkbasketServiceworkbasketAccessItem - the new workbasketAccessItempublic WorkbasketAccessItem getWorkbasketAuthorization(String id)
WorkbasketServicegetWorkbasketAuthorization in interface WorkbasketServiceid - the id of the requested WorkbasketAccessItemWorkbasketAccessItempublic void deleteWorkbasketAuthorization(String id)
WorkbasketServicedeleteWorkbasketAuthorization in interface WorkbasketServiceid - the id of the WorbasketAccessItem to be deletedpublic List<WorkbasketAccessItem> getAllAuthorizations()
WorkbasketServicegetAllAuthorizations in interface WorkbasketServicepublic void checkAuthorization(String workbasketKey, WorkbasketAuthorization workbasketAuthorization) throws NotAuthorizedException
WorkbasketServicecheckAuthorization in interface WorkbasketServiceworkbasketKey - the key of the workbasket we want to accessworkbasketAuthorization - the needed AuthorizationNotAuthorizedException - if the current user has not the requested authorization fot the specified workbasketpublic WorkbasketAccessItem updateWorkbasketAuthorization(WorkbasketAccessItem workbasketAccessItem)
WorkbasketServiceupdateWorkbasketAuthorization in interface WorkbasketServiceworkbasketAccessItem - the Authorizationpublic List<WorkbasketAccessItem> getWorkbasketAuthorizations(String workbasketKey)
WorkbasketServicegetWorkbasketAuthorizations in interface WorkbasketServiceworkbasketKey - the key of the Workbasketpublic WorkbasketQuery createWorkbasketQuery()
WorkbasketServicecreateWorkbasketQuery in interface WorkbasketServiceWorkbasketQuerypublic Workbasket newWorkbasket()
WorkbasketServicenewWorkbasket in interface WorkbasketServiceCopyright © 2018. All rights reserved.