Package org.dlese.dpc.schemedit.action
Class DCSSchemEditAction
java.lang.Object
org.apache.struts.action.Action
org.dlese.dpc.schemedit.action.DCSAction
org.dlese.dpc.schemedit.action.AbstractSchemEditAction
org.dlese.dpc.schemedit.action.DCSSchemEditAction
Controller for the Metdata Editor that handles Indexed records rather than
reading and writing records directly to disk.
- Author:
- ostwald
-
Field Summary
FieldsFields inherited from class org.dlese.dpc.schemedit.action.AbstractSchemEditAction
firstPage, homePage, xmlFormatFields inherited from class org.dlese.dpc.schemedit.action.DCSAction
accessManager, collectionRegistry, dcsDataManager, frameworkRegistry, ndrServiceEnabled, repositoryManager, repositoryService, requiredRole, sessionRegistry, userManagerFields inherited from class org.apache.struts.action.Action
defaultLocale, servlet -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.struts.action.ActionForwardexecute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response) Description of the Methodprotected StringGets the xmlFormat attribute of the DCSSchemEditAction objectprotected org.apache.struts.action.ActionForwardhandleCancelRequest(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response) NOT YET DOCUMENTEDprotected org.apache.struts.action.ActionForwardhandleDeleteElement(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, SchemEditValidator validator) Wrap handleDeleteElement so we can update suggestion service helper in the case that the standards field has been deleted.protected org.apache.struts.action.ActionForwardhandleEditRequest(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response) Description of the Methodprotected org.apache.struts.action.ActionForwardhandleMissingCommand(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response) Requests without a command are an error for the DCSSchemEditAction classprotected org.apache.struts.action.ActionForwardhandleNewRecordRequest(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response) Placeholder method to overide that of AbstractSchemEditAction.protected org.apache.struts.action.ActionForwardhandleOtherCommands(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response) Handles requests containing a "command" parameter that was not handled in the superclass.protected org.apache.struts.action.ActionForwardhandleSaveRequest(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response, SchemEditValidator validator) Description of the Methodprotected CATServiceHelperInitializes the suggestionServiceHelper for this framework, or returnsprotected voidPrint a line to standard out.protected voidDescription of the Methodprotected voidputRecord(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request) Saves a metadata record either to disk in the case of a stand-alone metadata editor, or to the repository manager in the case of the integrated metadata editor.Methods inherited from class org.dlese.dpc.schemedit.action.AbstractSchemEditAction
attachNewElement, getEditorMapping, getMetaDataFramework, getValidator, handleExitCommand, handleGuardedExit, handleMissingLockException, handleTimedOutGuardedExit, isDocDirty, uniqueUrlCheck, uniqueValueCheckMethods inherited from class org.dlese.dpc.schemedit.action.DCSAction
getMetaDataFramework, getRequiredContextAttributeValue, getSessionBean, getSessionUser, getSessionUser, getSessionUserName, initializeFromContextMethods inherited from class org.apache.struts.action.Action
addErrors, addMessages, execute, generateToken, getDataSource, getDataSource, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
-
Field Details
-
debug
protected static boolean debugDescription of the Field
-
-
Constructor Details
-
DCSSchemEditAction
public DCSSchemEditAction()
-
-
Method Details
-
getXmlFormat
Gets the xmlFormat attribute of the DCSSchemEditAction object- Specified by:
getXmlFormatin classAbstractSchemEditAction- Returns:
- The xmlFormat value
-
execute
public org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException Description of the Method- Overrides:
executein classAbstractSchemEditAction- Parameters:
mapping- the ActionMappingform- the ActionFormrequest- the Requestresponse- the Response- Returns:
- Description of the Return Value
- Throws:
IOException- Description of the ExceptionServletException- Description of the Exception
-
handleOtherCommands
protected org.apache.struts.action.ActionForward handleOtherCommands(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response) throws ServletException, MissingLockException Handles requests containing a "command" parameter that was not handled in the superclass.- Overrides:
handleOtherCommandsin classAbstractSchemEditAction- Parameters:
mapping- the ActionMappingform- the ActionFormrequest- the Requestresponse- the Response- Returns:
- forward to appropriate JSP page
- Throws:
ServletException- Description of the ExceptionMissingLockException- if a lock to the record being edited is not held.
-
handleMissingCommand
protected org.apache.struts.action.ActionForward handleMissingCommand(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response) throws ServletException Requests without a command are an error for the DCSSchemEditAction class- Specified by:
handleMissingCommandin classAbstractSchemEditAction- Parameters:
mapping- the ActionMappingform- the ActionFormrequest- the Requestresponse- the Response- Returns:
- Description of the Return Value
- Throws:
ServletException- Description of the Exception
-
handleSaveRequest
protected org.apache.struts.action.ActionForward handleSaveRequest(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response, SchemEditValidator validator) throws ServletException, MissingLockException Description of the Method- Specified by:
handleSaveRequestin classAbstractSchemEditAction- Parameters:
mapping- the ActionMappingform- the ActionFormrequest- the Requestresponse- the Responsevalidator- Description of the Parameter- Returns:
- Description of the Return Value
- Throws:
ServletException- Description of the ExceptionMissingLockException- Description of the Exception
-
handleDeleteElement
protected org.apache.struts.action.ActionForward handleDeleteElement(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, SchemEditValidator validator) throws ServletException Wrap handleDeleteElement so we can update suggestion service helper in the case that the standards field has been deleted.- Overrides:
handleDeleteElementin classAbstractSchemEditAction- Parameters:
mapping- the actionMappingform- the actionFormrequest- the requestvalidator- NOT YET DOCUMENTED- Returns:
- Description of the Return Value
- Throws:
ServletException- Description of the Exception
-
handleCancelRequest
protected org.apache.struts.action.ActionForward handleCancelRequest(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response) throws ServletException NOT YET DOCUMENTED- Specified by:
handleCancelRequestin classAbstractSchemEditAction- Parameters:
mapping- the ActionMappingform- the ActionFormrequest- the Requestresponse- the Response- Returns:
- NOT YET DOCUMENTED
- Throws:
ServletException- NOT YET DOCUMENTED
-
handleEditRequest
protected org.apache.struts.action.ActionForward handleEditRequest(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response) throws ServletException Description of the Method- Specified by:
handleEditRequestin classAbstractSchemEditAction- Parameters:
mapping- the ActionMappingform- the ActionFormrequest- the Requestresponse- the Response- Returns:
- Description of the Return Value
- Throws:
ServletException- Description of the Exception
-
handleNewRecordRequest
protected org.apache.struts.action.ActionForward handleNewRecordRequest(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response) throws ServletException Placeholder method to overide that of AbstractSchemEditAction. Never used but necessary to avoid compile error.- Specified by:
handleNewRecordRequestin classAbstractSchemEditAction- Parameters:
mapping- the ActionMappingform- the ActionFormrequest- the Requestresponse- the Response- Returns:
- Description of the Return Value
- Throws:
ServletException- Description of the Exception
-
putRecord
protected void putRecord(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request) throws Exception, RecordUpdateException Saves a metadata record either to disk in the case of a stand-alone metadata editor, or to the repository manager in the case of the integrated metadata editor.- Specified by:
putRecordin classAbstractSchemEditAction- Parameters:
mapping- Description of the Parameterform- Description of the Parameterrequest- Description of the Parameter- Throws:
Exception- if save operation is unsuccessfulRecordUpdateException- Description of the Exception
-
initSuggestionServiceHelper
Initializes the suggestionServiceHelper for this framework, or returns- Parameters:
sef- The ActionForm- Returns:
- The suggestionServiceHelper value, or null if this framework does not implement a suggestionService
- Throws:
Exception- if a SuggestServiceHelper cannot be initialized
-
prtln
Print a line to standard out.- Overrides:
prtlnin classAbstractSchemEditAction- Parameters:
s- The String to print.
-
prtlnErr
Description of the Method- Overrides:
prtlnErrin classAbstractSchemEditAction- Parameters:
s- Description of the Parameter
-