public class WorkflowUtils extends Util
| Modifier and Type | Field and Description |
|---|---|
protected static CollectionRoleService |
collectionRoleService |
protected static GroupService |
groupService |
static org.apache.log4j.Logger |
log
log4j category
|
protected static XmlWorkflowFactory |
xmlWorkflowFactory |
| Constructor and Description |
|---|
WorkflowUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
createCollectionWorkflowRole(Context context,
Collection collection,
String roleId,
Group group)
WORKFLOW ROLE MANAGEMENT
|
static void |
deleteRoleGroup(Context context,
Collection collection,
String roleID) |
static HashMap<String,Role> |
getAllExternalRoles(Collection thisCollection) |
static HashMap<String,Role> |
getCollectionAndRepositoryRoles(Collection thisCollection) |
static HashMap<String,Role> |
getCollectionRoles(Collection thisCollection) |
static String |
getOriginalURL(javax.servlet.http.HttpServletRequest request)
Get the original request URL.
|
static 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,
Collection collection,
Role role) |
static void |
sendAlert(javax.servlet.http.HttpServletRequest request,
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, getUUIDParameter, getUUIDParameters, nonBreakSpacepublic static org.apache.log4j.Logger log
protected static final CollectionRoleService collectionRoleService
protected static final GroupService groupService
protected static final XmlWorkflowFactory xmlWorkflowFactory
public static String getRequestLogInfo(javax.servlet.http.HttpServletRequest request)
request - the request object.public static 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,
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, Collection collection, String roleId, Group group) throws AuthorizeException, SQLException
AuthorizeExceptionSQLExceptionpublic static void deleteRoleGroup(Context context, Collection collection, String roleID) throws SQLException, IOException, WorkflowConfigurationException
public static HashMap<String,Role> getCollectionRoles(Collection thisCollection) throws IOException, WorkflowConfigurationException, SQLException
public static HashMap<String,Role> getCollectionAndRepositoryRoles(Collection thisCollection) throws IOException, WorkflowConfigurationException, SQLException
public static HashMap<String,Role> getAllExternalRoles(Collection thisCollection) throws IOException, WorkflowConfigurationException, SQLException
public static Group getRoleGroup(Context context, Collection collection, Role role) throws SQLException
SQLExceptionCopyright © 2016 DuraSpace. All Rights Reserved.