public class AccessStep extends AbstractProcessingStep
| Modifier and Type | Field and Description |
|---|---|
static int |
EDIT_POLICY_STATUS_DUPLICATED_POLICY |
static java.lang.String |
FORM_ACCESS_BUTTON_ADD |
static java.lang.String |
FORM_EDIT_BUTTON_CANCEL |
static java.lang.String |
FORM_EDIT_BUTTON_SAVE |
static int |
STATUS_DUPLICATED_POLICY |
static int |
STATUS_EDIT_POLICY |
static int |
STATUS_ERROR_FORMAT_DATE |
static int |
STATUS_ERROR_MISSING_DATE |
static int |
STATUS_ERROR_SELECT_GROUP |
static java.lang.String |
SUB_INFO_SELECTED_RP |
CANCEL_BUTTON, LAST_PAGE_REACHED, NEXT_BUTTON, PREVIOUS_BUTTON, PROGRESS_BAR_PREFIX, SELECT_CHANGE, STATUS_COMPLETE| Constructor and Description |
|---|
AccessStep() |
| Modifier and Type | Method and Description |
|---|---|
static int |
checkForm(javax.servlet.http.HttpServletRequest request) |
static boolean |
comeFromEditPolicy(javax.servlet.http.HttpServletRequest request) |
int |
doProcessing(Context context,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
SubmissionInfo subInfo)
Do any processing of the information input by the user, and/or perform
step processing (if no user interaction required)
|
static java.util.Date |
getEmbargoUntil(javax.servlet.http.HttpServletRequest request) |
int |
getNumberOfPages(javax.servlet.http.HttpServletRequest request,
SubmissionInfo subInfo)
Retrieves the number of pages that this "step" extends over.
|
static void |
removePolicy(Context context,
java.lang.String buttonPressed) |
static int |
saveOrCancelEditPolicy(Context context,
javax.servlet.http.HttpServletRequest request,
SubmissionInfo subInfo,
java.lang.String buttonPressed,
DSpaceObject dso,
java.lang.String name,
int groupID,
java.lang.String reason) |
static boolean |
wasAddPolicyPressed(java.lang.String buttonPressed) |
static boolean |
wasEditPolicyPressed(Context context,
java.lang.String buttonPressed,
SubmissionInfo subInfo) |
static boolean |
wasRemovePolicyPressed(java.lang.String buttonPressed) |
addErrorField, addErrorMessage, clearErrorFields, getCurrentPage, getErrorFields, getErrorMessage, setCurrentPagepublic static final int STATUS_ERROR_FORMAT_DATE
public static final int STATUS_ERROR_MISSING_DATE
public static final int STATUS_ERROR_SELECT_GROUP
public static final int STATUS_DUPLICATED_POLICY
public static final int EDIT_POLICY_STATUS_DUPLICATED_POLICY
public static final int STATUS_EDIT_POLICY
public static final java.lang.String SUB_INFO_SELECTED_RP
public static final java.lang.String FORM_EDIT_BUTTON_CANCEL
public static final java.lang.String FORM_EDIT_BUTTON_SAVE
public static final java.lang.String FORM_ACCESS_BUTTON_ADD
public int doProcessing(Context context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, SubmissionInfo subInfo) throws javax.servlet.ServletException, java.io.IOException, java.sql.SQLException, AuthorizeException
It is this method's job to save any data to the underlying database, as necessary, and return error messages (if any) which can then be processed by the appropriate user interface (JSP-UI or XML-UI)
NOTE: If this step is a non-interactive step (i.e. requires no UI), then it should perform *all* of its processing in this method!
doProcessing in class AbstractProcessingStepcontext - current DSpace contextrequest - current servlet request objectresponse - current servlet response objectsubInfo - submission info objectjavax.servlet.ServletExceptionjava.io.IOExceptionjava.sql.SQLExceptionAuthorizeExceptionpublic static boolean wasEditPolicyPressed(Context context, java.lang.String buttonPressed, SubmissionInfo subInfo) throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean wasAddPolicyPressed(java.lang.String buttonPressed)
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean wasRemovePolicyPressed(java.lang.String buttonPressed)
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean comeFromEditPolicy(javax.servlet.http.HttpServletRequest request)
throws java.sql.SQLException
java.sql.SQLExceptionpublic static int saveOrCancelEditPolicy(Context context, javax.servlet.http.HttpServletRequest request, SubmissionInfo subInfo, java.lang.String buttonPressed, DSpaceObject dso, java.lang.String name, int groupID, java.lang.String reason) throws AuthorizeException, java.sql.SQLException
AuthorizeExceptionjava.sql.SQLExceptionpublic static void removePolicy(Context context, java.lang.String buttonPressed) throws java.sql.SQLException
java.sql.SQLExceptionpublic static int checkForm(javax.servlet.http.HttpServletRequest request)
public static java.util.Date getEmbargoUntil(javax.servlet.http.HttpServletRequest request)
public int getNumberOfPages(javax.servlet.http.HttpServletRequest request,
SubmissionInfo subInfo)
throws javax.servlet.ServletException
This method may just return 1 for most steps (since most steps consist of a single page). But, it should return a number greater than 1 for any "step" which spans across a number of HTML pages. For example, the configurable "Describe" step (configured using input-forms.xml) overrides this method to return the number of pages that are defined by its configuration file.
Steps which are non-interactive (i.e. they do not display an interface to the user) should return a value of 1, so that they are only processed once!
getNumberOfPages in class AbstractProcessingSteprequest - The HTTP RequestsubInfo - The current submission information objectjavax.servlet.ServletExceptionCopyright © 2018 DuraSpace. All Rights Reserved.