Class SupervisorServiceImpl

    • Field Detail

      • itemService

        @Autowired(required=true)
        protected ItemService itemService
    • Constructor Detail

      • SupervisorServiceImpl

        protected SupervisorServiceImpl()
    • Method Detail

      • isOrder

        public boolean isOrder​(Context context,
                               WorkspaceItem workspaceItem,
                               Group group)
                        throws SQLException
        Description copied from interface: SupervisorService
        finds out if there is a supervision order that matches this set of values
        Specified by:
        isOrder in interface SupervisorService
        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

        public void remove​(Context context,
                           WorkspaceItem workspaceItem,
                           Group group)
                    throws SQLException,
                           AuthorizeException
        Description copied from interface: SupervisorService
        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
        Specified by:
        remove in interface SupervisorService
        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

        public void add​(Context context,
                        Group group,
                        WorkspaceItem workspaceItem,
                        int policy)
                 throws SQLException,
                        AuthorizeException
        Description copied from interface: SupervisorService
        adds a supervision order to the database
        Specified by:
        add in interface SupervisorService
        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.