Interface SupervisorService

  • All Known Implementing Classes:
    SupervisorServiceImpl

    public interface SupervisorService
    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$
    Author:
    Richard Jones
    • 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 in
        workspaceItem - the workspace item to be supervised
        group - 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 in
        workspaceItem - the ID of the workspace item
        group - 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 in
        group - the ID of the group which will supervise
        workspaceItem - the ID of the workspace item to be supervised
        policy - 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.