Package org.dspace.eperson.service
Interface SupervisorService
-
- All Known Implementing Classes:
SupervisorServiceImpl
public interface SupervisorServiceClass to represent the supervisor, primarily for use in applying supervisor activities to the database, such as setting and unsetting supervision orders and so forth.- Version:
- $Revision$
- Author:
- Richard Jones
-
-
Field Summary
Fields Modifier and Type Field Description static intPOLICY_EDITORvalue to use for editor policiesstatic intPOLICY_NONEvalue to use for no policy setstatic intPOLICY_OBSERVERvalue to use for observer policies
-
Method Summary
All Methods Instance Methods Abstract 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
-
POLICY_NONE
static final int POLICY_NONE
value to use for no policy set- See Also:
- Constant Field Values
-
POLICY_EDITOR
static final int POLICY_EDITOR
value to use for editor policies- See Also:
- Constant Field Values
-
POLICY_OBSERVER
static final int POLICY_OBSERVER
value to use for observer policies- See Also:
- Constant Field Values
-
-
Method Detail
-
isOrder
boolean isOrder(Context context, WorkspaceItem workspaceItem, Group group) throws SQLException
finds out if there is a supervision order that matches this set of values- 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
void remove(Context context, WorkspaceItem workspaceItem, Group group) throws SQLException, AuthorizeException
removes 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- 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
void add(Context context, Group group, WorkspaceItem workspaceItem, int policy) throws SQLException, AuthorizeException
adds a supervision order to the database- 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.
-
-