org.dspace.authorize
Class PolicySet

java.lang.Object
  extended by org.dspace.authorize.PolicySet

public class PolicySet
extends Object

Was Hack/Tool to set policies for items, bundles, and bitstreams. Now has helpful method, setPolicies();

Version:
$Revision: 3735 $
Author:
dstuve

Constructor Summary
PolicySet()
           
 
Method Summary
static void main(String[] argv)
          Command line interface to setPolicies - run to see arguments
static void setPolicies(Context c, int containerType, int containerID, int contentType, int actionID, int groupID, boolean isReplace, boolean clearOnly)
          Useful policy wildcard tool.
static void setPoliciesFilter(Context c, int containerType, int containerID, int contentType, int actionID, int groupID, boolean isReplace, boolean clearOnly, String filter)
          Useful policy wildcard tool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PolicySet

public PolicySet()
Method Detail

main

public static void main(String[] argv)
                 throws Exception
Command line interface to setPolicies - run to see arguments

Throws:
Exception

setPolicies

public static void setPolicies(Context c,
                               int containerType,
                               int containerID,
                               int contentType,
                               int actionID,
                               int groupID,
                               boolean isReplace,
                               boolean clearOnly)
                        throws SQLException,
                               AuthorizeException
Useful policy wildcard tool. Can set entire collections' contents' policies

Parameters:
c - current context
containerType - type, Constants.ITEM or Constants.COLLECTION
containerID - ID of container (DB primary key)
contentType - type (BUNDLE, ITEM, or BITSTREAM)
actionID - action ID
groupID - group ID (database key)
isReplace - if true, existing policies are removed first, otherwise add to existing policies
clearOnly - if true, just delete policies for matching objects
Throws:
SQLException - if database problem
AuthorizeException - if current user is not authorized to change these policies

setPoliciesFilter

public static void setPoliciesFilter(Context c,
                                     int containerType,
                                     int containerID,
                                     int contentType,
                                     int actionID,
                                     int groupID,
                                     boolean isReplace,
                                     boolean clearOnly,
                                     String filter)
                              throws SQLException,
                                     AuthorizeException
Useful policy wildcard tool. Can set entire collections' contents' policies

Parameters:
c - current context
containerType - type, Constants.ITEM or Constants.COLLECTION
containerID - ID of container (DB primary key)
contentType - type (BUNDLE, ITEM, or BITSTREAM)
actionID - action ID
groupID - group ID (database key)
isReplace - if true, existing policies are removed first, otherwise add to existing policies
clearOnly - if true, just delete policies for matching objects
filter - if non-null, only process bitstreams whose names contain filter
Throws:
SQLException - if database problem
AuthorizeException - if current user is not authorized to change these policies


Copyright © 2010 DuraSpace. All Rights Reserved.