public class DefaultPrintJobService extends Object implements PrintJobService
| Constructor and Description |
|---|
DefaultPrintJobService() |
| Modifier and Type | Method and Description |
|---|---|
void |
assignJob(WorkflowModel workflow,
PrincipalModel principal)
This method should be used to handle the assignment of the given
UserModel to the given
WorkflowModel. |
WorkflowModel |
createJob(AbstractCommentModel workflowJob,
ItemModel attachment,
PrincipalModel assignee)
This method should be used to create a
WorkflowModel for the given
CommentModel. |
PrincipalModel |
getAssignee(UserModel principal)
Looks for the first occurrence of a parent group of
UserModel principal which is a member of the cockpitgroup. |
List<WorkflowActionModel> |
getCurrentActions(WorkflowModel workflow)
This method should be used to get the current active
WorkflowActionModels of the given
WorkflowModel. |
List<PrintJobHistoryEntryDTO> |
getJobHistory(WorkflowModel workflow)
This method should be used to get a list of
PrintJobHistoryEntryDTO from the WorkflowModel sorted
by
creation time. |
boolean |
isStatusChangeAllowed(UserModel currentUser,
WorkflowModel workflow)
|
void |
setConfigurationService(ConfigurationService configurationService) |
void |
setModelService(ModelService modelService) |
void |
setUserService(UserService userService) |
void |
setWorkflowActionService(WorkflowActionService workflowActionService) |
void |
setWorkflowService(WorkflowService workflowService) |
void |
setWorkflowTemplateService(WorkflowTemplateService workflowTemplateService) |
public void assignJob(WorkflowModel workflow, PrincipalModel principal)
PrintJobServiceUserModel to the given
WorkflowModel.assignJob in interface PrintJobServiceworkflow - the WorkflowModel which will be given the UserModel as assigneeprincipal - the UserModel or UserGroupModel which should
be assigned to the WorkflowModelpublic WorkflowModel createJob(AbstractCommentModel workflowJob, ItemModel attachment, PrincipalModel assignee)
PrintJobServiceWorkflowModel for the given
CommentModel.createJob in interface PrintJobServiceworkflowJob - the CommentModel for which the WorkflowModel
should be created.attachment - the item which should be set to the WorkflowModelassignee - the UserModel or UserGroupModel which should be
set as the assignee of the WorkflowModelWorkflowModelpublic PrincipalModel getAssignee(UserModel principal)
UserModel principal which is a member of the cockpitgroup. We
want to assign WorkflowActionModels to a UserGroupModel instead of a UserModel. Make sure that the
principal is not a member of a sub group of two cockpit groups (e.g. layoutergroup and printadmingroup).getAssignee in interface PrintJobServiceprincipal - the UserModel where the PrincipalModels should be takenPrincipalModel which may be the UserModel itself or one of its groupspublic List<WorkflowActionModel> getCurrentActions(WorkflowModel workflow)
PrintJobServiceWorkflowActionModels of the given
WorkflowModel.getCurrentActions in interface PrintJobServiceworkflow - the WorkflowModel where the current WorkflowActionModel should be foundWorkflowActionModels of the given WorkflowModel or empty List.public List<PrintJobHistoryEntryDTO> getJobHistory(WorkflowModel workflow)
PrintJobServicePrintJobHistoryEntryDTO from the WorkflowModel sorted
by
creation time.getJobHistory in interface PrintJobServiceworkflow - WorkflowModel where the PrintJobHistoryEntryDTO should be taken.PrintJobHistoryEntryDTOs list sorted by creation time.public boolean isStatusChangeAllowed(UserModel currentUser, WorkflowModel workflow)
PrintJobServiceisStatusChangeAllowed in interface PrintJobServicecurrentUser - The user that will be checked permission onworkflow - The affected workflowpublic void setConfigurationService(ConfigurationService configurationService)
public void setModelService(ModelService modelService)
public void setUserService(UserService userService)
public void setWorkflowActionService(WorkflowActionService workflowActionService)
public void setWorkflowService(WorkflowService workflowService)
public void setWorkflowTemplateService(WorkflowTemplateService workflowTemplateService)
Copyright © 2017 SAP SE. All Rights Reserved.