| java.lang.Object org.dspace.app.xmlui.aspect.administrative.FlowContainerUtils
FlowContainerUtils | public class FlowContainerUtils (Code) | | Utility methods to processes actions on Communities and Collections.
author: scott phillips |
Method Summary | |
public static FlowResult | changeCollectionDefaultReadToAnonymous(Context context, int collectionID) Change the default read priveleges to the anonymous group.
If getCollectionDefaultRead() returns -1 or the anonymous group then nothing
is done. | public static String | checkXMLFragment(String value) Check whether this metadata value is a proper XML fragment. | public static int | createCollectionDefaultReadGroup(Context context, int collectionID) Change default privleges from the anonymous group to a new group that will be created and
approrpate privleges assigned. | public static String | escapeXMLEntities(String value) Sanatize any XML that was inputed by the user, this will clean up
any unescaped characters so that they can be stored as proper XML. | public static int | getCollectionDefaultRead(Context context, int collectionID) Look up the id of a group authorized for one of the given roles. | public static int | getCollectionRole(Context context, int collectionID, String roleName) Look up the id of a group authorized for one of the given roles. | public static int | getTemplateItemID(Context context, int collectionID) Look up the id of the template item for a given collection.
Parameters: context - The current DSpace context. Parameters: collectionID - The collection id. | public static FlowResult | processCreateCollection(Context context, int communityID, Request request) Create a new collection
Parameters: context - The current DSpace context. Parameters: communityID - The id of the parent community. | public static FlowResult | processCreateCommunity(Context context, int communityID, Request request) Create a new community
Parameters: context - The current DSpace context. Parameters: communityID - The id of the parent community (-1 for a top-level community). | public static FlowResult | processDeleteCollection(Context context, int collectionID) Delete collection itself
Parameters: context - The current DSpace context. Parameters: collectionID - The collection id. | public static FlowResult | processDeleteCollectionRole(Context context, int collectionID, String roleName, int groupID) Delete one of collection's roles
Parameters: context - The current DSpace context. Parameters: collectionID - The collection id. Parameters: roleName - ADMIN, WF_STEP1, WF_STEP2, WF_STEP3, SUBMIT, DEFAULT_READ. Parameters: groupID - The id of the group associated with this role. | public static FlowResult | processDeleteCommunity(Context context, int communityID) Delete community itself
Parameters: context - The current DSpace context. Parameters: communityID - The community id. | public static FlowResult | processEditCollection(Context context, int collectionID, boolean deleteLogo, Request request) Process the collection metadata edit form. | public static FlowResult | processEditCommunity(Context context, int communityID, boolean deleteLogo, Request request) Process the community metadata edit form. |
ROLE_ADMIN | final public static String ROLE_ADMIN(Code) | | Possible Collection roles
|
ROLE_DEFAULT_READ | final public static String ROLE_DEFAULT_READ(Code) | | |
changeCollectionDefaultReadToAnonymous | public static FlowResult changeCollectionDefaultReadToAnonymous(Context context, int collectionID) throws SQLException, AuthorizeException, UIException(Code) | | Change the default read priveleges to the anonymous group.
If getCollectionDefaultRead() returns -1 or the anonymous group then nothing
is done.
Parameters: context - The current DSpace context. Parameters: collectionID - The collection id. A process result's object. |
checkXMLFragment | public static String checkXMLFragment(String value)(Code) | | Check whether this metadata value is a proper XML fragment. If the value is not
then an error message will be returned that might (sometimes not) tell the user how
to correct the problem.
Parameters: value - The metadat's value An error string of the problem or null if there is no problem with the metadata's value. |
createCollectionDefaultReadGroup | public static int createCollectionDefaultReadGroup(Context context, int collectionID) throws SQLException, AuthorizeException, UIException(Code) | | Change default privleges from the anonymous group to a new group that will be created and
approrpate privleges assigned. The id of this new group will be returned.
Parameters: context - The current DSpace context. Parameters: collectionID - The collection id. The group ID of the new group. |
escapeXMLEntities | public static String escapeXMLEntities(String value)(Code) | | Sanatize any XML that was inputed by the user, this will clean up
any unescaped characters so that they can be stored as proper XML.
These are errors that in general we want to take care of on behalf
of the user.
Parameters: value - The unsantized value A sanatized value |
getCollectionDefaultRead | public static int getCollectionDefaultRead(Context context, int collectionID) throws SQLException, AuthorizeException(Code) | | Look up the id of a group authorized for one of the given roles. If no group is currently
authorized to preform this role then a new group will be created and assigned the role.
Parameters: context - The current DSpace context. Parameters: collectionID - The collection id. Parameters: roleName - ADMIN, WF_STEP1, WF_STEP2, WF_STEP3, SUBMIT, DEFAULT_READ. The id of the group associated with that particular role. |
getCollectionRole | public static int getCollectionRole(Context context, int collectionID, String roleName) throws SQLException, AuthorizeException, IOException(Code) | | Look up the id of a group authorized for one of the given roles. If no group is currently
authorized to preform this role then a new group will be created and assigned the role.
Parameters: context - The current DSpace context. Parameters: collectionID - The collection id. Parameters: roleName - ADMIN, WF_STEP1, WF_STEP2, WF_STEP3, SUBMIT, DEFAULT_READ. The id of the group associated with that particular role, or -1 if the role was not found. |
getTemplateItemID | public static int getTemplateItemID(Context context, int collectionID) throws SQLException, AuthorizeException, IOException(Code) | | Look up the id of the template item for a given collection.
Parameters: context - The current DSpace context. Parameters: collectionID - The collection id. The id of the template item. throws: IOException - |
processCreateCollection | public static FlowResult processCreateCollection(Context context, int communityID, Request request) throws SQLException, AuthorizeException, IOException(Code) | | Create a new collection
Parameters: context - The current DSpace context. Parameters: communityID - The id of the parent community. A process result's object. |
processCreateCommunity | public static FlowResult processCreateCommunity(Context context, int communityID, Request request) throws AuthorizeException, IOException, SQLException(Code) | | Create a new community
Parameters: context - The current DSpace context. Parameters: communityID - The id of the parent community (-1 for a top-level community). A process result's object. |
processDeleteCollectionRole | public static FlowResult processDeleteCollectionRole(Context context, int collectionID, String roleName, int groupID) throws SQLException, UIException, IOException, AuthorizeException(Code) | | Delete one of collection's roles
Parameters: context - The current DSpace context. Parameters: collectionID - The collection id. Parameters: roleName - ADMIN, WF_STEP1, WF_STEP2, WF_STEP3, SUBMIT, DEFAULT_READ. Parameters: groupID - The id of the group associated with this role. A process result's object. |
processEditCollection | public static FlowResult processEditCollection(Context context, int collectionID, boolean deleteLogo, Request request) throws SQLException, IOException, AuthorizeException(Code) | | Process the collection metadata edit form.
Parameters: context - The current DSpace context. Parameters: collectionID - The collection id. Parameters: deleteLogo - Determines if the logo should be deleted along with the metadata editing action. Parameters: request - the Cocoon request object A process result's object. |
processEditCommunity | public static FlowResult processEditCommunity(Context context, int communityID, boolean deleteLogo, Request request) throws AuthorizeException, IOException, SQLException(Code) | | Process the community metadata edit form.
Parameters: context - The current DSpace context. Parameters: communityID - The community id. Parameters: deleteLogo - Determines if the logo should be deleted along with the metadata editing action. Parameters: request - the Cocoon request object A process result's object. |
|
|