/** * @param c current context * @param containerType type, Constants.ITEM or Constants.COLLECTION * @param containerID ID of container (DB primary key) * @param contentType ID of container (DB primary key) * @param actionID action ID (e.g. Constants.READ) * @param groupID group ID (database key) * @param isReplace if <code>true</code>, existing policies are removed first, * otherwise add to existing policies * @param clearOnly if non-null, only process bitstreams whose names contain filter * @param name policy name * @param description policy descrption * @param startDate policy start date * @param endDate policy end date * @throws SQLException if database error * @throws AuthorizeException if authorization error */ public static void setPolicies(Context c, int containerType, UUID containerID, int contentType, int actionID, UUID groupID, boolean isReplace, boolean clearOnly, String name, String description, Date startDate, Date endDate) throws SQLException, AuthorizeException { setPoliciesFilter(c, containerType, containerID, contentType, actionID, groupID, isReplace, clearOnly, null, name, description, startDate, endDate); }
/** * Useful policy wildcard tool. Can set entire collections' contents' * policies * * @param c current context * @param containerType type, Constants.ITEM or Constants.COLLECTION * @param containerID ID of container (DB primary key) * @param contentType type (BUNDLE, ITEM, or BITSTREAM) * @param actionID action ID * @param groupID group ID (database key) * @param isReplace if <code>true</code>, existing policies are removed first, * otherwise add to existing policies * @param clearOnly if <code>true</code>, just delete policies for matching * objects * @throws SQLException if database error * if database problem * @throws AuthorizeException if authorization error * if current user is not authorized to change these policies */ public static void setPolicies(Context c, int containerType, UUID containerID, int contentType, int actionID, UUID groupID, boolean isReplace, boolean clearOnly) throws SQLException, AuthorizeException { setPoliciesFilter(c, containerType, containerID, contentType, actionID, groupID, isReplace, clearOnly, null, null, null, null, null); }
/** * Useful policy wildcard tool. Can set entire collections' contents' * policies * * @param c current context * @param containerType type, Constants.ITEM or Constants.COLLECTION * @param containerID ID of container (DB primary key) * @param contentType type (BUNDLE, ITEM, or BITSTREAM) * @param actionID action ID (e.g. Constants.READ) * @param groupID group ID (database key) * @param isReplace if <code>true</code>, existing policies are removed first, * otherwise add to existing policies * @param clearOnly if <code>true</code>, just delete policies for matching * objects * @param filter if non-null, only process bitstreams whose names contain filter * @throws SQLException if database error * if database problem * @throws AuthorizeException if authorization error * if current user is not authorized to change these policies */ public static void setPoliciesFilter(Context c, int containerType, UUID containerID, int contentType, int actionID, UUID groupID, boolean isReplace, boolean clearOnly, String filter) throws SQLException, AuthorizeException { setPoliciesFilter(c, containerType, containerID, contentType, actionID, groupID, isReplace, clearOnly, filter, null, null, null, null); }
setPoliciesFilter(c, containertype, containerID, contenttype, actionID, groupID, isReplace, false, filter);