Package org.dspace.eperson
Class SupervisorServiceImpl
- java.lang.Object
-
- org.dspace.eperson.SupervisorServiceImpl
-
- All Implemented Interfaces:
SupervisorService
public class SupervisorServiceImpl extends Object implements SupervisorService
-
-
Field Summary
Fields Modifier and Type Field Description protected ItemServiceitemServiceprotected ResourcePolicyServiceresourcePolicyService-
Fields inherited from interface org.dspace.eperson.service.SupervisorService
POLICY_EDITOR, POLICY_NONE, POLICY_OBSERVER
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSupervisorServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(Context context, Group group, WorkspaceItem workspaceItem, int policy)adds a supervision order to the databasebooleanisOrder(Context context, WorkspaceItem workspaceItem, Group group)finds out if there is a supervision order that matches this set of valuesvoidremove(Context context, WorkspaceItem workspaceItem, Group group)removes the requested group from the requested workspace item in terms of supervision.
-
-
-
Field Detail
-
itemService
@Autowired(required=true) protected ItemService itemService
-
resourcePolicyService
@Autowired(required=true) protected ResourcePolicyService resourcePolicyService
-
-
Method Detail
-
isOrder
public boolean isOrder(Context context, WorkspaceItem workspaceItem, Group group) throws SQLException
Description copied from interface:SupervisorServicefinds out if there is a supervision order that matches this set of values- Specified by:
isOrderin interfaceSupervisorService- Parameters:
context- the context this object exists inworkspaceItem- the workspace item to be supervisedgroup- the group to be doing the supervising- Returns:
- boolean true if there is an order that matches, false if not
- Throws:
SQLException- An exception that provides information on a database access error or other errors.
-
remove
public void remove(Context context, WorkspaceItem workspaceItem, Group group) throws SQLException, AuthorizeException
Description copied from interface:SupervisorServiceremoves the requested group from the requested workspace item in terms of supervision. This also removes all the policies that group has associated with the item- Specified by:
removein interfaceSupervisorService- Parameters:
context- the context this object exists inworkspaceItem- the ID of the workspace itemgroup- the ID of the group to be removed from the item- 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.
-
add
public void add(Context context, Group group, WorkspaceItem workspaceItem, int policy) throws SQLException, AuthorizeException
Description copied from interface:SupervisorServiceadds a supervision order to the database- Specified by:
addin interfaceSupervisorService- Parameters:
context- the context this object exists ingroup- the ID of the group which will superviseworkspaceItem- the ID of the workspace item to be supervisedpolicy- String containing the policy type to be used- 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.
-
-