org.dspace.eperson
Class Supervisor

java.lang.Object
  extended by org.dspace.eperson.Supervisor

public class Supervisor
extends Object

Class 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: 3762 $
Author:
Richard Jones

Field Summary
static int POLICY_EDITOR
          value to use for editor policies
static int POLICY_NONE
          value to use for no policy set
static int POLICY_OBSERVER
          value to use for observer policies
 
Method Summary
static void add(Context context, int groupID, int wsItemID, int policy)
          adds a supervision order to the database
static boolean isOrder(Context context, int wsItemID, int groupID)
          finds out if there is a supervision order that matches this set of values
static void remove(Context context, int wsItemID, int groupID)
          removes the requested group from the requested workspace item in terms of supervision.
static void removeRedundant(Context context)
          removes redundant entries in the supervision orders database
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

POLICY_NONE

public static int POLICY_NONE
value to use for no policy set


POLICY_EDITOR

public static int POLICY_EDITOR
value to use for editor policies


POLICY_OBSERVER

public static int POLICY_OBSERVER
value to use for observer policies

Method Detail

isOrder

public static boolean isOrder(Context context,
                              int wsItemID,
                              int groupID)
                       throws SQLException
finds out if there is a supervision order that matches this set of values

Parameters:
context - the context this object exists in
wsItemID - the workspace item to be supervised
groupID - the group to be doing the supervising
Returns:
boolean true if there is an order that matches, false if not
Throws:
SQLException

remove

public static void remove(Context context,
                          int wsItemID,
                          int groupID)
                   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 in
wsItemID - the ID of the workspace item
groupID - the ID of the group to be removed from the item
Throws:
SQLException
AuthorizeException

removeRedundant

public static void removeRedundant(Context context)
                            throws SQLException
removes redundant entries in the supervision orders database

Parameters:
context - the context this object exists in
Throws:
SQLException

add

public static void add(Context context,
                       int groupID,
                       int wsItemID,
                       int policy)
                throws SQLException,
                       AuthorizeException
adds a supervision order to the database

Parameters:
context - the context this object exists in
groupID - the ID of the group which will supervise
wsItemID - the ID of the workspace item to be supervised
policy - String containing the policy type to be used
Throws:
SQLException
AuthorizeException


Copyright © 2010 DuraSpace. All Rights Reserved.