Package org.dspace.workflowbasic
Class BasicWorkflowItemServiceImpl
- java.lang.Object
-
- org.dspace.workflowbasic.BasicWorkflowItemServiceImpl
-
- All Implemented Interfaces:
InProgressSubmissionService<BasicWorkflowItem>,WorkflowItemService<BasicWorkflowItem>,BasicWorkflowItemService
public class BasicWorkflowItemServiceImpl extends Object implements BasicWorkflowItemService
Service implementation for the BasicWorkflowItem object. This class is responsible for all business logic calls for the BasicWorkflowItem object and is autowired by spring. This class should never be accessed directly.- Author:
- kevinvandevelde at atmire.com
-
-
Field Summary
Fields Modifier and Type Field Description protected ItemServiceitemServiceprotected static org.apache.logging.log4j.Loggerloglog4j categoryprotected TaskListItemServicetaskListItemServiceprotected BasicWorkflowItemDAOworkflowItemDAO
-
Constructor Summary
Constructors Modifier Constructor Description protectedBasicWorkflowItemServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcountTotal(Context context)BasicWorkflowItemcreate(Context context, Item item, Collection collection)voiddelete(Context context, BasicWorkflowItem workflowItem)Delete the specified workflow item.voiddeleteByCollection(Context context, Collection collection)Delete all workflow items present in the specified collection.voiddeleteWrapper(Context context, BasicWorkflowItem workflowItem)Deletes submission wrapper, doesn't delete item contentsBasicWorkflowItemfind(Context context, int id)Get a workflow item from the database.List<BasicWorkflowItem>findAll(Context context)return all workflowitemsList<BasicWorkflowItem>findByCollection(Context context, Collection collection)Get all workflow items for a particular collection.BasicWorkflowItemfindByItem(Context context, Item item)Check to see if a particular item is currently under Workflow.List<BasicWorkflowItem>findByOwner(Context context, EPerson ePerson)Retrieve the list of BasicWorkflowItems that the given EPerson is owner of (owner == claimed for review)List<BasicWorkflowItem>findBySubmitter(Context context, EPerson ep)Get all workflow items that were original submissions by a particular e-person.List<BasicWorkflowItem>findPooledTasks(Context context, EPerson ePerson)voidmove(Context context, BasicWorkflowItem inProgressSubmission, Collection fromCollection, Collection toCollection)voidupdate(Context context, BasicWorkflowItem workflowItem)Update the submission, including the unarchived item.
-
-
-
Field Detail
-
log
protected static org.apache.logging.log4j.Logger log
log4j category
-
workflowItemDAO
@Autowired(required=true) protected BasicWorkflowItemDAO workflowItemDAO
-
itemService
@Autowired(required=true) protected ItemService itemService
-
taskListItemService
@Autowired(required=true) protected TaskListItemService taskListItemService
-
-
Method Detail
-
create
public BasicWorkflowItem create(Context context, Item item, Collection collection) throws SQLException, AuthorizeException
- Specified by:
createin interfaceWorkflowItemService<BasicWorkflowItem>- Throws:
SQLExceptionAuthorizeException
-
find
public BasicWorkflowItem find(Context context, int id) throws SQLException
Description copied from interface:WorkflowItemServiceGet a workflow item from the database.- Specified by:
findin interfaceWorkflowItemService<BasicWorkflowItem>- Parameters:
context- The relevant DSpace Context.id- ID of the workflow item- Returns:
- the workflow item, or null if the ID is invalid.
- Throws:
SQLException- An exception that provides information on a database access error or other errors.
-
findAll
public List<BasicWorkflowItem> findAll(Context context) throws SQLException
Description copied from interface:WorkflowItemServicereturn all workflowitems- Specified by:
findAllin interfaceWorkflowItemService<BasicWorkflowItem>- Parameters:
context- The relevant DSpace Context.- Returns:
- List of all workflowItems in system
- Throws:
SQLException- An exception that provides information on a database access error or other errors.
-
findBySubmitter
public List<BasicWorkflowItem> findBySubmitter(Context context, EPerson ep) throws SQLException
Description copied from interface:WorkflowItemServiceGet all workflow items that were original submissions by a particular e-person.- Specified by:
findBySubmitterin interfaceWorkflowItemService<BasicWorkflowItem>- Parameters:
context- The relevant DSpace Context.ep- the eperson- Returns:
- the corresponding workflow items
- Throws:
SQLException- An exception that provides information on a database access error or other errors.
-
deleteByCollection
public void deleteByCollection(Context context, Collection collection) throws SQLException, IOException, AuthorizeException
Description copied from interface:WorkflowItemServiceDelete all workflow items present in the specified collection.- Specified by:
deleteByCollectionin interfaceWorkflowItemService<BasicWorkflowItem>- Parameters:
context- The relevant DSpace Context.collection- the containing collection- Throws:
SQLException- An exception that provides information on a database access error or other errors.IOException- A general class of exceptions produced by failed or interrupted I/O operations.AuthorizeException- Exception indicating the current user of the context does not have permission to perform a particular action.
-
delete
public void delete(Context context, BasicWorkflowItem workflowItem) throws SQLException, AuthorizeException, IOException
Description copied from interface:WorkflowItemServiceDelete the specified workflow item.- Specified by:
deletein interfaceWorkflowItemService<BasicWorkflowItem>- Parameters:
context- The relevant DSpace Context.workflowItem- which workflow item to delete- Throws:
SQLException- An exception that provides information on a database access error or other errors.AuthorizeException- Exception indicating the current user of the context does not have permission to perform a particular action.IOException- A general class of exceptions produced by failed or interrupted I/O operations.
-
findByCollection
public List<BasicWorkflowItem> findByCollection(Context context, Collection collection) throws SQLException
Description copied from interface:WorkflowItemServiceGet all workflow items for a particular collection.- Specified by:
findByCollectionin interfaceWorkflowItemService<BasicWorkflowItem>- Parameters:
context- The relevant DSpace Context.collection- the collection- Returns:
- array of the corresponding workflow items
- Throws:
SQLException- An exception that provides information on a database access error or other errors.
-
findByItem
public BasicWorkflowItem findByItem(Context context, Item item) throws SQLException
Description copied from interface:WorkflowItemServiceCheck to see if a particular item is currently under Workflow. If so, its WorkflowItem is returned. If not, null is returned- Specified by:
findByItemin interfaceWorkflowItemService<BasicWorkflowItem>- Parameters:
context- The relevant DSpace Context.item- the item- Returns:
- workflow item corresponding to the item, or null
- Throws:
SQLException- An exception that provides information on a database access error or other errors.
-
deleteWrapper
public void deleteWrapper(Context context, BasicWorkflowItem workflowItem) throws SQLException, AuthorizeException
Description copied from interface:InProgressSubmissionServiceDeletes submission wrapper, doesn't delete item contents- Specified by:
deleteWrapperin interfaceInProgressSubmissionService<BasicWorkflowItem>- Parameters:
context- contextworkflowItem- submission- Throws:
SQLException- if database errorAuthorizeException- if authorization error
-
update
public void update(Context context, BasicWorkflowItem workflowItem) throws SQLException, AuthorizeException
Description copied from interface:InProgressSubmissionServiceUpdate the submission, including the unarchived item.- Specified by:
updatein interfaceInProgressSubmissionService<BasicWorkflowItem>- Parameters:
context- contextworkflowItem- submission- Throws:
SQLException- if database errorAuthorizeException- if authorization error
-
findPooledTasks
public List<BasicWorkflowItem> findPooledTasks(Context context, EPerson ePerson) throws SQLException
- Specified by:
findPooledTasksin interfaceBasicWorkflowItemService- Throws:
SQLException
-
findByOwner
public List<BasicWorkflowItem> findByOwner(Context context, EPerson ePerson) throws SQLException
Description copied from interface:BasicWorkflowItemServiceRetrieve the list of BasicWorkflowItems that the given EPerson is owner of (owner == claimed for review)- Specified by:
findByOwnerin interfaceBasicWorkflowItemService- Parameters:
context- The relevant DSpace Context.ePerson- The DSpace EPerson object.- Returns:
- a list of BasicWorkflowItem objects
- Throws:
SQLException- An exception that provides information on a database access error or other errors.
-
countTotal
public int countTotal(Context context) throws SQLException
- Specified by:
countTotalin interfaceBasicWorkflowItemService- Throws:
SQLException
-
move
public void move(Context context, BasicWorkflowItem inProgressSubmission, Collection fromCollection, Collection toCollection)
- Specified by:
movein interfaceInProgressSubmissionService<BasicWorkflowItem>
-
-