Package org.dspace.supervision
Class SupervisionOrderServiceImpl
java.lang.Object
org.dspace.supervision.SupervisionOrderServiceImpl
- All Implemented Interfaces:
DSpaceCRUDService<SupervisionOrder>,SupervisionOrderService
Implementation of
SupervisionOrderService- Author:
- Mohamed Eskander (mohamed.eskander at 4science dot it)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a new SupervisionOrdervoiddelete(Context context, SupervisionOrder supervisionOrder) Find all supervision orders currently storedfindByItem(Context context, Item item) Find all supervision orders for a given ItemfindByItemAndGroup(Context context, Item item, Group group) Find a supervision order depending on given Item and GroupbooleanisSupervisor(Context context, EPerson ePerson, Item item) Checks if an EPerson is supervisor of an Itemvoidupdate(Context context, List<SupervisionOrder> supervisionOrders) Persist a collection of model objects.voidupdate(Context context, SupervisionOrder supervisionOrder) Persist a model object.
-
Constructor Details
-
SupervisionOrderServiceImpl
protected SupervisionOrderServiceImpl()
-
-
Method Details
-
create
- Specified by:
createin interfaceDSpaceCRUDService<SupervisionOrder>- Throws:
SQLExceptionAuthorizeException
-
find
- Specified by:
findin interfaceDSpaceCRUDService<SupervisionOrder>- Throws:
SQLException
-
update
public void update(Context context, SupervisionOrder supervisionOrder) throws SQLException, AuthorizeException Description copied from interface:DSpaceCRUDServicePersist a model object.- Specified by:
updatein interfaceDSpaceCRUDService<SupervisionOrder>supervisionOrder- object to be persisted.- Throws:
SQLException- passed through.AuthorizeException- passed through.
-
update
public void update(Context context, List<SupervisionOrder> supervisionOrders) throws SQLException, AuthorizeException Description copied from interface:DSpaceCRUDServicePersist a collection of model objects.- Specified by:
updatein interfaceDSpaceCRUDService<SupervisionOrder>supervisionOrders- object to be persisted.- Throws:
SQLException- passed through.AuthorizeException- passed through.
-
delete
public void delete(Context context, SupervisionOrder supervisionOrder) throws SQLException, AuthorizeException - Specified by:
deletein interfaceDSpaceCRUDService<SupervisionOrder>- Throws:
SQLExceptionAuthorizeException
-
create
Description copied from interface:SupervisionOrderServiceCreates a new SupervisionOrder- Specified by:
createin interfaceSupervisionOrderService- Parameters:
context- The DSpace contextitem- the itemgroup- the group- Returns:
- the created Supervision Order on item and group
- Throws:
SQLException- If something goes wrong in the database
-
findAll
Description copied from interface:SupervisionOrderServiceFind all supervision orders currently stored- Specified by:
findAllin interfaceSupervisionOrderService- Parameters:
context- The DSpace context- Returns:
- all Supervision Orders
- Throws:
SQLException- If something goes wrong in the database
-
findByItem
Description copied from interface:SupervisionOrderServiceFind all supervision orders for a given Item- Specified by:
findByItemin interfaceSupervisionOrderService- Parameters:
context- The DSpace contextitem- the item- Returns:
- all Supervision Orders related to the item
- Throws:
SQLException- If something goes wrong in the database
-
findByItemAndGroup
public SupervisionOrder findByItemAndGroup(Context context, Item item, Group group) throws SQLException Description copied from interface:SupervisionOrderServiceFind a supervision order depending on given Item and Group- Specified by:
findByItemAndGroupin interfaceSupervisionOrderService- Parameters:
context- The DSpace contextitem- the itemgroup- the group- Returns:
- the Supervision Order of the item and group
- Throws:
SQLException- If something goes wrong in the database
-
isSupervisor
Description copied from interface:SupervisionOrderServiceChecks if an EPerson is supervisor of an Item- Specified by:
isSupervisorin interfaceSupervisionOrderService- Parameters:
context- The DSpace contextePerson- the ePerson to be checkeditem- the item- Returns:
- true if the ePerson is a supervisor of the item
- Throws:
SQLException- If something goes wrong in the database
-