Package org.dspace.supervision
Class SupervisionOrderServiceImpl
- java.lang.Object
-
- org.dspace.supervision.SupervisionOrderServiceImpl
-
- All Implemented Interfaces:
DSpaceCRUDService<SupervisionOrder>,SupervisionOrderService
public class SupervisionOrderServiceImpl extends Object implements SupervisionOrderService
Implementation ofSupervisionOrderService- Author:
- Mohamed Eskander (mohamed.eskander at 4science dot it)
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSupervisionOrderServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SupervisionOrdercreate(Context context)SupervisionOrdercreate(Context context, Item item, Group group)Creates a new SupervisionOrdervoiddelete(Context context, SupervisionOrder supervisionOrder)SupervisionOrderfind(Context context, int id)List<SupervisionOrder>findAll(Context context)Find all supervision orders currently storedList<SupervisionOrder>findByItem(Context context, Item item)Find all supervision orders for a given ItemSupervisionOrderfindByItemAndGroup(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.
-
-
-
Method Detail
-
create
public SupervisionOrder create(Context context) throws SQLException, AuthorizeException
- Specified by:
createin interfaceDSpaceCRUDService<SupervisionOrder>- Throws:
SQLExceptionAuthorizeException
-
find
public SupervisionOrder find(Context context, int id) throws SQLException
- 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
public SupervisionOrder create(Context context, Item item, Group group) throws SQLException
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
public List<SupervisionOrder> findAll(Context context) throws SQLException
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
public List<SupervisionOrder> findByItem(Context context, Item item) throws SQLException
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
public boolean isSupervisor(Context context, EPerson ePerson, Item item) throws SQLException
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
-
-