public class WorkflowUtils extends Util
| Modifier and Type | Field and Description |
|---|---|
static org.apache.log4j.Logger |
log
log4j category
|
| Constructor and Description |
|---|
WorkflowUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
createCollectionWorkflowRole(Context context,
int collectionId,
java.lang.String roleId,
Group group)
WORKFLOW ROLE MANAGEMENT
|
static void |
deleteRoleGroup(Context context,
Collection collection,
java.lang.String roleID) |
static java.util.HashMap<java.lang.String,Role> |
getAllExternalRoles(Collection thisCollection) |
static java.util.HashMap<java.lang.String,Role> |
getCollectionAndRepositoryRoles(Collection thisCollection) |
static java.util.HashMap<java.lang.String,Role> |
getCollectionRoles(Collection thisCollection) |
static java.lang.String |
getOriginalURL(javax.servlet.http.HttpServletRequest request)
Get the original request URL.
|
static java.lang.String |
getRequestLogInfo(javax.servlet.http.HttpServletRequest request)
Return a string for logging, containing useful information about the
current request - the URL, the method and parameters.
|
static Group |
getRoleGroup(Context context,
int collectionId,
Role role) |
static void |
sendAlert(javax.servlet.http.HttpServletRequest request,
java.lang.Exception exception)
Send an alert to the designated "alert recipient" - that is, when a
database error or internal error occurs, this person is sent an e-mail
with details.
|
static void |
storeOriginalURL(javax.servlet.http.HttpServletRequest request)
Put the original request URL into the request object as an attribute for
later use.
|
encodeBitstreamName, encodeBitstreamName, formatFileSize, getBoolParameter, getControlledVocabulariesDisplayValueLocalized, getIntParameter, getIntParameters, getSourceVersion, getSubmitButton, nonBreakSpacepublic static java.lang.String getRequestLogInfo(javax.servlet.http.HttpServletRequest request)
request - the request object.public static java.lang.String getOriginalURL(javax.servlet.http.HttpServletRequest request)
request - the HTTP requestpublic static void storeOriginalURL(javax.servlet.http.HttpServletRequest request)
request - the HTTP requestpublic static void sendAlert(javax.servlet.http.HttpServletRequest request,
java.lang.Exception exception)
The recipient is configured via the "alert.recipient" property in
dspace.cfg. If this property is omitted, no alerts are
sent.
This method "swallows" any exception that might occur - it will just be logged. This is because this method will usually be invoked as part of an error handling routine anyway.
request - the HTTP request leading to the errorexception - the exception causing the error, or nullpublic static void createCollectionWorkflowRole(Context context, int collectionId, java.lang.String roleId, Group group) throws AuthorizeException, java.sql.SQLException
AuthorizeExceptionjava.sql.SQLExceptionpublic static void deleteRoleGroup(Context context, Collection collection, java.lang.String roleID) throws java.sql.SQLException, java.io.IOException, WorkflowConfigurationException
java.sql.SQLExceptionjava.io.IOExceptionWorkflowConfigurationExceptionpublic static java.util.HashMap<java.lang.String,Role> getCollectionRoles(Collection thisCollection) throws java.io.IOException, WorkflowConfigurationException
java.io.IOExceptionWorkflowConfigurationExceptionpublic static java.util.HashMap<java.lang.String,Role> getCollectionAndRepositoryRoles(Collection thisCollection) throws java.io.IOException, WorkflowConfigurationException
java.io.IOExceptionWorkflowConfigurationExceptionpublic static java.util.HashMap<java.lang.String,Role> getAllExternalRoles(Collection thisCollection) throws java.io.IOException, WorkflowConfigurationException
java.io.IOExceptionWorkflowConfigurationExceptionCopyright © 2018 DuraSpace. All Rights Reserved.