public class BasicWorkflowServiceImpl extends Object implements BasicWorkflowService
| Modifier and Type | Field and Description |
|---|---|
protected AuthorizeService |
authorizeService |
protected CollectionService |
collectionService |
protected GroupService |
groupService |
protected HandleService |
handleService |
protected InstallItemService |
installItemService |
protected ItemService |
itemService |
protected Map<UUID,Boolean> |
noEMail |
protected TaskListItemService |
taskListItemService |
protected WorkflowCuratorService |
workflowCuratorService |
protected BasicWorkflowItemService |
workflowItemService |
protected String[] |
workflowText
Symbolic names of workflow steps.
|
protected WorkspaceItemService |
workspaceItemService |
WFSTATE_ARCHIVE, WFSTATE_STEP1, WFSTATE_STEP1POOL, WFSTATE_STEP2, WFSTATE_STEP2POOL, WFSTATE_STEP3, WFSTATE_STEP3POOL, WFSTATE_SUBMIT| Modifier | Constructor and Description |
|---|---|
protected |
BasicWorkflowServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
WorkspaceItem |
abort(Context context,
BasicWorkflowItem workflowItem,
EPerson e)
abort() aborts a workflow, completely deleting it (administrator do this)
(it will basically do a reject from any state - the item ends up back in
the user's PersonalWorkspace
|
void |
addInitialWorkspaceItemPolicies(Context context,
WorkspaceItem workspaceItem) |
void |
advance(Context context,
BasicWorkflowItem workflowItem,
EPerson e)
advance() sends an item forward in the workflow (reviewers,
approvers, and editors all do an 'approve' to move the item forward) if
the item arrives at the submit state, then remove the WorkflowItem and
call the archive() method to put it in the archive, and email notify the
submitter of a successful submission
|
boolean |
advance(Context context,
BasicWorkflowItem workflowItem,
EPerson e,
boolean curate,
boolean record)
advance() sends an item forward in the workflow (reviewers,
approvers, and editors all do an 'approve' to move the item forward) if
the item arrives at the submit state, then remove the WorkflowItem and
call the archive() method to put it in the archive, and email notify the
submitter of a successful submission
|
Item |
archive(Context context,
BasicWorkflowItem workflowItem)
Commit the contained item to the main archive.
|
void |
claim(Context context,
BasicWorkflowItem workflowItem,
EPerson e)
claim() claims a workflow task for an EPerson
|
protected void |
createTasks(Context c,
BasicWorkflowItem wi,
List<EPerson> epa) |
void |
deleteCollection(Context context,
Collection collection) |
protected boolean |
doState(Context context,
BasicWorkflowItem workflowItem,
int newstate,
EPerson newowner) |
List<String> |
getEPersonDeleteConstraints(Context context,
EPerson ePerson) |
protected String |
getEPersonName(EPerson e) |
List<String> |
getFlywayMigrationLocations() |
String |
getItemTitle(BasicWorkflowItem wi)
get the title of the item in this workflow
|
String |
getMyDSpaceLink() |
List<BasicWorkflowItem> |
getOwnedTasks(Context context,
EPerson e)
getOwnedTasks() returns a List of WorkflowItems containing the tasks
claimed and owned by an EPerson.
|
List<BasicWorkflowItem> |
getPooledTasks(Context context,
EPerson e)
getPooledTasks() returns a List of WorkflowItems an EPerson could claim
(as a reviewer, etc.) for display on a user's MyDSpace page.
|
String |
getSubmitterName(BasicWorkflowItem wi)
get the name of the eperson who started this workflow
|
int |
getWorkflowID(String state)
Translate symbolic name of workflow state into number.
|
Group |
getWorkflowRoleGroup(Context context,
Collection collection,
String roleName,
Group roleGroup) |
String |
getWorkflowText(int state)
Get the text representing the given workflow state
|
protected void |
logWorkflowEvent(Context context,
Item item,
BasicWorkflowItem workflowItem,
EPerson actor,
int newstate,
EPerson newOwner,
Collection mycollection,
int oldState,
Group newOwnerGroup) |
protected void |
notifyGroupOfTask(Context c,
BasicWorkflowItem wi,
Group mygroup,
List<EPerson> epa) |
protected void |
notifyOfArchive(Context context,
Item item,
Collection coll)
notify the submitter that the item is archived
|
void |
notifyOfCuration(Context c,
BasicWorkflowItem wi,
List<EPerson> ePeople,
String taskName,
String action,
String message) |
protected void |
notifyOfReject(Context context,
BasicWorkflowItem workflowItem,
EPerson e,
String reason) |
protected void |
recordApproval(Context context,
BasicWorkflowItem workflowItem,
EPerson e) |
protected void |
recordStart(Context context,
Item myitem) |
protected WorkspaceItem |
returnToWorkspace(Context c,
BasicWorkflowItem wfi)
Return the workflow item to the workspace of the submitter.
|
WorkspaceItem |
sendWorkflowItemBackSubmission(Context context,
BasicWorkflowItem workflowItem,
EPerson ePerson,
String provenancePrefix,
String rejection_message) |
BasicWorkflowItem |
start(Context context,
WorkspaceItem wsi)
startWorkflow() begins a workflow - in a single transaction do away with
the PersonalWorkspace entry and turn it into a WorkflowItem.
|
BasicWorkflowItem |
startWithoutNotify(Context c,
WorkspaceItem wsi)
startWithoutNotify() starts the workflow normally, but disables
notifications (useful for large imports,) for the first workflow step -
subsequent notifications happen normally
|
void |
unclaim(Context context,
BasicWorkflowItem workflowItem,
EPerson e)
unclaim() returns an owned task/item to the pool
|
@Autowired(required=true) protected AuthorizeService authorizeService
@Autowired(required=true) protected CollectionService collectionService
@Autowired(required=true) protected GroupService groupService
@Autowired(required=true) protected HandleService handleService
@Autowired(required=true) protected InstallItemService installItemService
@Autowired(required=true) protected ItemService itemService
@Autowired(required=true) protected TaskListItemService taskListItemService
@Autowired(required=true) protected WorkflowCuratorService workflowCuratorService
@Autowired(required=true) protected BasicWorkflowItemService workflowItemService
@Autowired(required=true) protected WorkspaceItemService workspaceItemService
protected final String[] workflowText
public int getWorkflowID(String state)
BasicWorkflowServicegetWorkflowID in interface BasicWorkflowServicestate - symbolic name of workflow state, must be one of
the elements of workflowText array.public void addInitialWorkspaceItemPolicies(Context context, WorkspaceItem workspaceItem) throws SQLException, AuthorizeException
addInitialWorkspaceItemPolicies in interface WorkflowService<BasicWorkflowItem>SQLExceptionAuthorizeExceptionpublic BasicWorkflowItem start(Context context, WorkspaceItem wsi) throws SQLException, AuthorizeException, IOException
WorkflowServicestart in interface WorkflowService<BasicWorkflowItem>context - Contextwsi - The WorkspaceItem to convert to a workflow itemSQLExceptionAuthorizeExceptionIOExceptionpublic BasicWorkflowItem startWithoutNotify(Context c, WorkspaceItem wsi) throws SQLException, AuthorizeException, IOException
WorkflowServicestartWithoutNotify in interface WorkflowService<BasicWorkflowItem>SQLExceptionAuthorizeExceptionIOExceptionpublic List<BasicWorkflowItem> getOwnedTasks(Context context, EPerson e) throws SQLException
BasicWorkflowServicegetOwnedTasks in interface BasicWorkflowServicee - The EPerson we want to fetch owned tasks for.SQLExceptionpublic List<BasicWorkflowItem> getPooledTasks(Context context, EPerson e) throws SQLException
BasicWorkflowServicegetPooledTasks in interface BasicWorkflowServicee - The Eperson we want to fetch the pooled tasks for.SQLExceptionpublic void claim(Context context, BasicWorkflowItem workflowItem, EPerson e) throws SQLException, IOException, AuthorizeException
BasicWorkflowServiceclaim in interface BasicWorkflowServiceworkflowItem - WorkflowItem to do the claim one - The EPerson doing the claimSQLExceptionIOExceptionAuthorizeExceptionpublic void advance(Context context, BasicWorkflowItem workflowItem, EPerson e) throws SQLException, IOException, AuthorizeException
BasicWorkflowServiceadvance in interface BasicWorkflowServicecontext - ContextworkflowItem - WorkflowItem do do the approval one - EPerson doing the approvalSQLExceptionIOExceptionAuthorizeExceptionpublic boolean advance(Context context, BasicWorkflowItem workflowItem, EPerson e, boolean curate, boolean record) throws SQLException, IOException, AuthorizeException
BasicWorkflowServiceadvance in interface BasicWorkflowServicecontext - ContextworkflowItem - WorkflowItem do do the approval one - EPerson doing the approvalcurate - boolean indicating whether curation tasks should be donerecord - boolean indicating whether to record actionSQLExceptionIOExceptionAuthorizeExceptionpublic void unclaim(Context context, BasicWorkflowItem workflowItem, EPerson e) throws SQLException, IOException, AuthorizeException
BasicWorkflowServiceunclaim in interface BasicWorkflowServicecontext - ContextworkflowItem - WorkflowItem to operate one - EPerson doing the operationSQLExceptionIOExceptionAuthorizeExceptionpublic WorkspaceItem abort(Context context, BasicWorkflowItem workflowItem, EPerson e) throws SQLException, AuthorizeException, IOException
WorkflowServiceabort in interface WorkflowService<BasicWorkflowItem>context - ContextworkflowItem - WorkflowItem to operate one - EPerson doing the operationSQLExceptionAuthorizeExceptionIOExceptionprotected boolean doState(Context context, BasicWorkflowItem workflowItem, int newstate, EPerson newowner) throws SQLException, IOException, AuthorizeException
protected void logWorkflowEvent(Context context, Item item, BasicWorkflowItem workflowItem, EPerson actor, int newstate, EPerson newOwner, Collection mycollection, int oldState, Group newOwnerGroup)
public String getWorkflowText(int state)
BasicWorkflowServicegetWorkflowText in interface BasicWorkflowServicestate - the workflow statepublic Item archive(Context context, BasicWorkflowItem workflowItem) throws SQLException, IOException, AuthorizeException
archive in interface WorkflowService<BasicWorkflowItem>SQLExceptionIOExceptionAuthorizeExceptionprotected void notifyOfArchive(Context context, Item item, Collection coll) throws SQLException, IOException
SQLExceptionIOExceptionprotected WorkspaceItem returnToWorkspace(Context c, BasicWorkflowItem wfi) throws SQLException, IOException, AuthorizeException
c - Contextwfi - WorkflowItem to be 'dismantled'SQLExceptionIOExceptionAuthorizeExceptionpublic WorkspaceItem sendWorkflowItemBackSubmission(Context context, BasicWorkflowItem workflowItem, EPerson ePerson, String provenancePrefix, String rejection_message) throws SQLException, AuthorizeException, IOException
sendWorkflowItemBackSubmission in interface WorkflowService<BasicWorkflowItem>SQLExceptionAuthorizeExceptionIOExceptionprotected void createTasks(Context c, BasicWorkflowItem wi, List<EPerson> epa) throws SQLException
SQLExceptionpublic void notifyOfCuration(Context c, BasicWorkflowItem wi, List<EPerson> ePeople, String taskName, String action, String message) throws SQLException, IOException
notifyOfCuration in interface BasicWorkflowServiceSQLExceptionIOExceptionprotected void notifyGroupOfTask(Context c, BasicWorkflowItem wi, Group mygroup, List<EPerson> epa) throws SQLException, IOException
SQLExceptionIOExceptionpublic String getMyDSpaceLink()
getMyDSpaceLink in interface WorkflowService<BasicWorkflowItem>protected void notifyOfReject(Context context, BasicWorkflowItem workflowItem, EPerson e, String reason)
public String getItemTitle(BasicWorkflowItem wi) throws SQLException
BasicWorkflowServicegetItemTitle in interface BasicWorkflowServicewi - the workflow item objectSQLExceptionpublic String getSubmitterName(BasicWorkflowItem wi) throws SQLException
BasicWorkflowServicegetSubmitterName in interface BasicWorkflowServicewi - the workflow itemSQLExceptionprotected String getEPersonName(EPerson e) throws SQLException
SQLExceptionprotected void recordApproval(Context context, BasicWorkflowItem workflowItem, EPerson e) throws SQLException, IOException, AuthorizeException
protected void recordStart(Context context, Item myitem) throws SQLException, IOException, AuthorizeException
public void deleteCollection(Context context, Collection collection) throws SQLException, IOException, AuthorizeException
deleteCollection in interface WorkflowService<BasicWorkflowItem>SQLExceptionIOExceptionAuthorizeExceptionpublic List<String> getEPersonDeleteConstraints(Context context, EPerson ePerson) throws SQLException
getEPersonDeleteConstraints in interface WorkflowService<BasicWorkflowItem>SQLExceptionpublic Group getWorkflowRoleGroup(Context context, Collection collection, String roleName, Group roleGroup) throws SQLException, AuthorizeException
getWorkflowRoleGroup in interface WorkflowService<BasicWorkflowItem>SQLExceptionAuthorizeExceptionpublic List<String> getFlywayMigrationLocations()
getFlywayMigrationLocations in interface WorkflowService<BasicWorkflowItem>Copyright © 2016 DuraSpace. All Rights Reserved.