public class FlowContainerUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static AuthorizeService |
authorizeService |
protected static CollectionService |
collectionService |
protected static CommunityService |
communityService |
protected static GroupService |
groupService |
protected static HarvestedCollectionService |
harvestedCollectionService |
protected static ItemService |
itemService |
protected static ResourcePolicyService |
resourcePolicyService |
static String |
ROLE_ADMIN
Possible Collection roles
|
static String |
ROLE_DEFAULT_READ |
static String |
ROLE_SUBMIT |
static String |
ROLE_WF_STEP1 |
static String |
ROLE_WF_STEP2 |
static String |
ROLE_WF_STEP3 |
protected static WorkflowService |
workflowService |
| Constructor and Description |
|---|
FlowContainerUtils() |
| Modifier and Type | Method and Description |
|---|---|
static FlowResult |
changeCollectionDefaultReadToAnonymous(Context context,
UUID collectionID)
Change the default read privileges to the anonymous group.
|
static String |
checkXMLFragment(String value)
Check whether this metadata value is a proper XML fragment.
|
static UUID |
createCollectionDefaultReadGroup(Context context,
UUID collectionID)
Change default privileges from the anonymous group to a new group that will be created and
appropriate privileges assigned.
|
static String |
escapeXMLEntities(String value)
Sanitize any XML that was inputed by the user, this will clean up
any unescaped characters so that they can be stored as proper XML.
|
static Group |
getCollectionDefaultRead(Context context,
Collection collection)
Look up the id of a group authorized for one of the given roles.
|
static UUID |
getCollectionRole(Context context,
UUID collectionID,
String roleName)
Look up the id of a group authorized for one of the given roles.
|
static UUID |
getCommunityRole(Context context,
UUID communityID,
String roleName)
Look up the id of a group authorized for one of the given roles.
|
static UUID |
getTemplateItemID(Context context,
UUID collectionID)
Look up the id of the template item for a given collection.
|
static FlowResult |
processCreateCollection(Context context,
UUID communityID,
org.apache.cocoon.environment.Request request)
Create a new collection
|
static FlowResult |
processCreateCommunity(Context context,
UUID communityID,
org.apache.cocoon.environment.Request request)
Create a new community.
|
static FlowResult |
processCurateCollection(Context context,
UUID dsoID,
org.apache.cocoon.environment.Request request)
processCurateCollection
Utility method to process curation tasks
submitted via the DSpace GUI
|
static FlowResult |
processCurateCommunity(Context context,
UUID dsoID,
org.apache.cocoon.environment.Request request)
Utility method to process curation tasks submitted via the DSpace GUI.
|
static FlowResult |
processDeleteCollection(Context context,
UUID collectionID)
Delete collection itself
|
static FlowResult |
processDeleteCollectionRole(Context context,
UUID collectionID,
String roleName,
UUID groupID)
Delete one of collection's roles
|
static FlowResult |
processDeleteCommunity(Context context,
UUID communityID)
Delete community itself.
|
static FlowResult |
processDeleteCommunityRole(Context context,
UUID communityID,
String roleName,
UUID groupID)
Delete one of a community's roles
|
static FlowResult |
processDeleteTemplateItem(Context context,
UUID collectionID)
Delete a collection's template item (which is not a member of the collection).
|
static FlowResult |
processEditCollection(Context context,
UUID collectionID,
boolean deleteLogo,
org.apache.cocoon.environment.Request request)
Process the collection metadata edit form.
|
static FlowResult |
processEditCommunity(Context context,
UUID communityID,
boolean deleteLogo,
org.apache.cocoon.environment.Request request)
Process the community metadata edit form.
|
static FlowResult |
processQueueCollection(Context context,
UUID dsoID,
org.apache.cocoon.environment.Request request)
Queues curation tasks.
|
static FlowResult |
processQueueCommunity(Context context,
UUID dsoID,
org.apache.cocoon.environment.Request request)
queues curation tasks.
|
static FlowResult |
processReimportCollection(Context context,
UUID collectionID,
org.apache.cocoon.environment.Request request)
Purge the collection of all items, then run a fresh harvest cycle.
|
static FlowResult |
processRunCollectionHarvest(Context context,
UUID collectionID,
org.apache.cocoon.environment.Request request)
Use the collection's harvest settings to immediately perform a harvest cycle.
|
static FlowResult |
processSetupCollectionHarvesting(Context context,
UUID collectionID,
org.apache.cocoon.environment.Request request)
Process the collection harvesting options form.
|
static FlowResult |
testOAISettings(Context context,
org.apache.cocoon.environment.Request request)
Test the supplied OAI settings.
|
public static final String ROLE_ADMIN
public static final String ROLE_WF_STEP1
public static final String ROLE_WF_STEP2
public static final String ROLE_WF_STEP3
public static final String ROLE_SUBMIT
public static final String ROLE_DEFAULT_READ
protected static final AuthorizeService authorizeService
protected static final ResourcePolicyService resourcePolicyService
protected static final CommunityService communityService
protected static final CollectionService collectionService
protected static final ItemService itemService
protected static final GroupService groupService
protected static final HarvestedCollectionService harvestedCollectionService
protected static final WorkflowService workflowService
public static FlowResult processEditCollection(Context context, UUID collectionID, boolean deleteLogo, org.apache.cocoon.environment.Request request) throws SQLException, IOException, AuthorizeException
context - The current DSpace context.collectionID - The collection id.deleteLogo - Determines if the logo should be deleted along with the metadata editing action.request - the Cocoon request objectSQLException - passed through.IOException - passed through.AuthorizeException - passed through.public static FlowResult processSetupCollectionHarvesting(Context context, UUID collectionID, org.apache.cocoon.environment.Request request) throws SQLException, IOException, AuthorizeException
context - The current DSpace context.collectionID - The collection id.request - the Cocoon request objectSQLException - passed through.IOException - passed through.AuthorizeException - passed through.public static FlowResult processRunCollectionHarvest(Context context, UUID collectionID, org.apache.cocoon.environment.Request request) throws SQLException, IOException, AuthorizeException, CrosswalkException, ParserConfigurationException, SAXException, TransformerException
context - The current DSpace context.collectionID - The collection id.request - the Cocoon request objectSQLException - passed through.IOException - passed through.AuthorizeException - passed through.TransformerException - passed through.SAXException - passed through.ParserConfigurationException - passed through.CrosswalkException - passed through.public static FlowResult processReimportCollection(Context context, UUID collectionID, org.apache.cocoon.environment.Request request) throws SQLException, IOException, AuthorizeException, CrosswalkException, ParserConfigurationException, SAXException, TransformerException, BrowseException
context - The current DSpace context.collectionID - The collection id.request - the Cocoon request objectSQLException - passed through.IOException - passed through.AuthorizeException - passed through.TransformerException - passed through.SAXException - passed through.ParserConfigurationException - passed through.CrosswalkException - passed through.BrowseException - passed through.public static FlowResult testOAISettings(Context context, org.apache.cocoon.environment.Request request)
context - session context.request - user's request.public static UUID getTemplateItemID(Context context, UUID collectionID) throws SQLException, AuthorizeException, IOException
context - The current DSpace context.collectionID - The collection id.SQLException - passed through.AuthorizeException - passed through.IOException - passed through.public static UUID getCollectionRole(Context context, UUID collectionID, String roleName) throws SQLException, AuthorizeException, IOException, TransformerException, SAXException, WorkflowConfigurationException, ParserConfigurationException, WorkflowException
context - The current DSpace context.collectionID - The collection id.roleName - ADMIN, WF_STEP1, WF_STEP2, WF_STEP3, SUBMIT, DEFAULT_READ.SQLException - passed through.AuthorizeException - passed through.IOException - passed through.TransformerException - passed through.SAXException - passed through.WorkflowConfigurationException - passed through.ParserConfigurationException - passed through.WorkflowException - passed through.public static FlowResult processDeleteCollectionRole(Context context, UUID collectionID, String roleName, UUID groupID) throws SQLException, UIException, IOException, AuthorizeException, WorkflowConfigurationException
context - The current DSpace context.collectionID - The collection id.roleName - ADMIN, WF_STEP1, WF_STEP2, WF_STEP3, SUBMIT, DEFAULT_READ.groupID - The id of the group associated with this role.SQLException - passed through.UIException - passed through.IOException - passed through.WorkflowConfigurationException - passed through.AuthorizeException - passed through.public static Group getCollectionDefaultRead(Context context, Collection collection) throws SQLException, AuthorizeException
context - The current DSpace context.collection - The collection.SQLException - passed through.AuthorizeException - passed through.public static UUID createCollectionDefaultReadGroup(Context context, UUID collectionID) throws SQLException, AuthorizeException, UIException
context - The current DSpace context.collectionID - The collection id.SQLException - passed through.AuthorizeException - passed through.UIException - passed through.public static FlowResult changeCollectionDefaultReadToAnonymous(Context context, UUID collectionID) throws SQLException, AuthorizeException, UIException, IOException
context - The current DSpace context.collectionID - The collection id.SQLException - passed through.AuthorizeException - passed through.UIException - passed through.IOException - passed through.public static FlowResult processDeleteCollection(Context context, UUID collectionID) throws SQLException, AuthorizeException, IOException
context - The current DSpace context.collectionID - The collection id.SQLException - passed through.AuthorizeException - passed through.IOException - passed through.public static FlowResult processCreateCollection(Context context, UUID communityID, org.apache.cocoon.environment.Request request) throws SQLException, AuthorizeException, IOException
context - The current DSpace context.communityID - The id of the parent community.request - user's request.SQLException - passed through.AuthorizeException - passed through.IOException - passed through.public static FlowResult processCreateCommunity(Context context, UUID communityID, org.apache.cocoon.environment.Request request) throws AuthorizeException, IOException, SQLException
context - The current DSpace context.communityID - The id of the parent community (-1 for a top-level community).request - user's request.AuthorizeException - passed through.IOException - passed through.SQLException - passed through.public static FlowResult processEditCommunity(Context context, UUID communityID, boolean deleteLogo, org.apache.cocoon.environment.Request request) throws AuthorizeException, IOException, SQLException
context - The current DSpace context.communityID - The community id.deleteLogo - Determines if the logo should be deleted along with the metadata editing action.request - the Cocoon request objectAuthorizeException - passed through.IOException - passed through.SQLException - passed through.public static FlowResult processDeleteCommunity(Context context, UUID communityID) throws SQLException, AuthorizeException, IOException
context - The current DSpace context.communityID - The community id.SQLException - passed through.AuthorizeException - passed through.IOException - passed through.public static UUID getCommunityRole(Context context, UUID communityID, String roleName) throws SQLException, AuthorizeException, IOException
context - The current DSpace context.communityID - The collection id.roleName - ADMIN.SQLException - passed through.AuthorizeException - passed through.IOException - passed through.public static FlowResult processDeleteCommunityRole(Context context, UUID communityID, String roleName, UUID groupID) throws SQLException, UIException, IOException, AuthorizeException
context - The current DSpace context.communityID - The community id.roleName - ADMIN.groupID - The id of the group associated with this role.SQLException - passed through.UIException - passed through.IOException - passed through.AuthorizeException - passed through.public static FlowResult processDeleteTemplateItem(Context context, UUID collectionID) throws SQLException, AuthorizeException, IOException
context - session context.collectionID - the collection.SQLException - passed through.AuthorizeException - passed through.IOException - passed through.public static FlowResult processCurateCollection(Context context, UUID dsoID, org.apache.cocoon.environment.Request request) throws AuthorizeException, IOException, SQLException, Exception
context - session context.dsoID - the object to be curated.request - user's request.AuthorizeException - passed through.IOException - passed through.SQLException - passed through.Exceptionpublic static FlowResult processQueueCollection(Context context, UUID dsoID, org.apache.cocoon.environment.Request request) throws AuthorizeException, IOException, SQLException, Exception
context - session context.dsoID - the object to be curated.request - user's request.AuthorizeException - passed through.IOException - passed through.SQLException - passed through.Exceptionpublic static FlowResult processCurateCommunity(Context context, UUID dsoID, org.apache.cocoon.environment.Request request) throws AuthorizeException, IOException, SQLException, Exception
context - session context.dsoID - object to be curated.request - user's requestAuthorizeException - passed through.IOException - passed through.SQLException - passed through.Exceptionpublic static FlowResult processQueueCommunity(Context context, UUID dsoID, org.apache.cocoon.environment.Request request) throws AuthorizeException, IOException, SQLException, Exception
context - session context.dsoID - object to be curated.request - user's request.AuthorizeException - passed through.IOException - passed through.SQLException - passed through.Exceptionpublic static String checkXMLFragment(String value)
value - The metadata valuepublic static String escapeXMLEntities(String value)
value - The unsanitized valueCopyright © 2016 DuraSpace. All rights reserved.