org.dspace.app.xmlui.aspect.administrative
Class FlowAuthorizationUtils

java.lang.Object
  extended by org.dspace.app.xmlui.aspect.administrative.FlowAuthorizationUtils

public class FlowAuthorizationUtils
extends Object

FIXME: add documentation

Author:
Alexey maslov

Constructor Summary
FlowAuthorizationUtils()
           
 
Method Summary
static FlowResult processAdvancedPolicyAdd(Context context, String[] groupIDs, int actionID, int resourceID, String[] collectionIDs)
          Process addition of a several authorizations at once, as entered in the wildcard/advanced authorizations tool
static FlowResult processAdvancedPolicyDelete(Context context, int resourceID, String[] collectionIDs)
          Process the deletion of all authorizations across a set of collections, regardless of associated actions or groups.
static FlowResult processDeletePolicies(Context context, String[] policyIDs)
          Delete the policies specified by the policyIDs parameter.
static FlowResult processEditPolicy(Context context, int objectType, int objectID, int policyID, int groupID, int actionID)
          Process the editing of an existing or a newly created policy.
static FlowResult resolveItemIdentifier(Context context, String identifier)
          Resolve an identifier submitted into the item lookup box.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlowAuthorizationUtils

public FlowAuthorizationUtils()
Method Detail

resolveItemIdentifier

public static FlowResult resolveItemIdentifier(Context context,
                                               String identifier)
                                        throws SQLException
Resolve an identifier submitted into the item lookup box. If it contains a slash, it's assumed to be a handle and is resolved by that mechanism into an item, collection or community. Otherwise, it's assumed to be an item and looked up by ID.

Parameters:
context - The current DSpace context.
identifier - The identifier that is to be resolved.
Returns:
A process result's object.
Throws:
SQLException

processEditPolicy

public static FlowResult processEditPolicy(Context context,
                                           int objectType,
                                           int objectID,
                                           int policyID,
                                           int groupID,
                                           int actionID)
                                    throws SQLException,
                                           AuthorizeException
Process the editing of an existing or a newly created policy.

Parameters:
context - The current DSpace context.
objectType - The type of the policy's parent object (ITEM, COLLECTION, COMMUNITY)
objectID - The ID of the policy's parent object
policyID - The ID of the policy being edited (-1 if a new policy is being created)
groupID - The ID of the group to be associated with this policy
actionID - The ID of the action (dependent on the objectType) to be associated with this policy
Returns:
A process result's object.
Throws:
SQLException
AuthorizeException

processDeletePolicies

public static FlowResult processDeletePolicies(Context context,
                                               String[] policyIDs)
                                        throws NumberFormatException,
                                               SQLException,
                                               AuthorizeException
Delete the policies specified by the policyIDs parameter. This assumes that the deletion has been confirmed.

Parameters:
context - The current DSpace context
policyIDs - The unique ids of the policies being deleted.
Returns:
A process result's object.
Throws:
NumberFormatException
SQLException
AuthorizeException

processAdvancedPolicyAdd

public static FlowResult processAdvancedPolicyAdd(Context context,
                                                  String[] groupIDs,
                                                  int actionID,
                                                  int resourceID,
                                                  String[] collectionIDs)
                                           throws NumberFormatException,
                                                  SQLException,
                                                  AuthorizeException
Process addition of a several authorizations at once, as entered in the wildcard/advanced authorizations tool

Parameters:
context - The current DSpace context.
groupIDs - The IDs of the groups to be associated with the newly created policies
actionID - The ID of the action to be associated with the policies
resourceID - Whether the policies will apply to Items or Bitstreams
collectionIDs - The IDs of the collections that the policies will be applied to
Returns:
A process result's object.
Throws:
NumberFormatException
SQLException
AuthorizeException

processAdvancedPolicyDelete

public static FlowResult processAdvancedPolicyDelete(Context context,
                                                     int resourceID,
                                                     String[] collectionIDs)
                                              throws NumberFormatException,
                                                     SQLException,
                                                     AuthorizeException
Process the deletion of all authorizations across a set of collections, regardless of associated actions or groups. This functionality should probably not be used, ever, unless the goal to completely reset a collection for one reason or another.

Parameters:
context - The current DSpace context.
resourceID - Whether the policies will apply to Items or Bitstreams
collectionIDs - The IDs of the collections that the policy wipe will be applied to
Returns:
A process result's object.
Throws:
NumberFormatException
SQLException
AuthorizeException


Copyright © 2013 DuraSpace. All Rights Reserved.