DLESE Tools
v1.6.0

org.dlese.dpc.schemedit.action
Class DCSSchemEditAction

java.lang.Object
  extended by org.apache.struts.action.Action
      extended by org.dlese.dpc.schemedit.action.DCSAction
          extended by org.dlese.dpc.schemedit.action.AbstractSchemEditAction
              extended by org.dlese.dpc.schemedit.action.DCSSchemEditAction

public class DCSSchemEditAction
extends AbstractSchemEditAction

Controller for the Metdata Editor that handles Indexed records rather than reading and writing records directly to disk.

Author:
ostwald

Field Summary
protected static boolean debug
          Description of the Field
 
Fields inherited from class org.dlese.dpc.schemedit.action.AbstractSchemEditAction
firstPage, homePage, xmlFormat
 
Fields inherited from class org.dlese.dpc.schemedit.action.DCSAction
accessManager, collectionRegistry, dcsDataManager, frameworkRegistry, ndrServiceEnabled, repositoryManager, repositoryService, requiredRole, sessionRegistry, userManager
 
Fields inherited from class org.apache.struts.action.Action
defaultLocale, servlet
 
Constructor Summary
DCSSchemEditAction()
           
 
Method Summary
 org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response)
          Description of the Method
protected  String getXmlFormat()
          Gets the xmlFormat attribute of the DCSSchemEditAction object
protected  org.apache.struts.action.ActionForward handleCancelRequest(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response)
          NOT YET DOCUMENTED
protected  org.apache.struts.action.ActionForward handleDeleteElement(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.ActionForward handleEditRequest(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response)
          Description of the Method
protected  org.apache.struts.action.ActionForward handleMissingCommand(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 class
protected  org.apache.struts.action.ActionForward handleNewRecordRequest(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.ActionForward handleOtherCommands(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.ActionForward handleSaveRequest(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response, SchemEditValidator validator)
          Description of the Method
protected  CATServiceHelper initSuggestionServiceHelper(SchemEditForm sef)
          Initializes the suggestionServiceHelper for this framework, or returns
protected  void prtln(String s)
          Print a line to standard out.
protected  void prtlnErr(String s)
          Description of the Method
protected  void putRecord(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, uniqueValueCheck
 
Methods inherited from class org.dlese.dpc.schemedit.action.DCSAction
getMetaDataFramework, getRequiredContextAttributeValue, getSessionBean, getSessionUser, getSessionUser, getSessionUserName, initializeFromContext
 
Methods 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

protected static boolean debug
Description of the Field

Constructor Detail

DCSSchemEditAction

public DCSSchemEditAction()
Method Detail

getXmlFormat

protected String getXmlFormat()
Gets the xmlFormat attribute of the DCSSchemEditAction object

Specified by:
getXmlFormat in class AbstractSchemEditAction
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:
execute in class AbstractSchemEditAction
Parameters:
mapping - the ActionMapping
form - the ActionForm
request - the Request
response - the Response
Returns:
Description of the Return Value
Throws:
IOException - Description of the Exception
ServletException - 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:
handleOtherCommands in class AbstractSchemEditAction
Parameters:
mapping - the ActionMapping
form - the ActionForm
request - the Request
response - the Response
Returns:
forward to appropriate JSP page
Throws:
ServletException - Description of the Exception
MissingLockException - 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:
handleMissingCommand in class AbstractSchemEditAction
Parameters:
mapping - the ActionMapping
form - the ActionForm
request - the Request
response - 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:
handleSaveRequest in class AbstractSchemEditAction
Parameters:
mapping - the ActionMapping
form - the ActionForm
request - the Request
response - the Response
validator - Description of the Parameter
Returns:
Description of the Return Value
Throws:
ServletException - Description of the Exception
MissingLockException - 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:
handleDeleteElement in class AbstractSchemEditAction
Parameters:
mapping - the actionMapping
form - the actionForm
request - the request
validator - 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:
handleCancelRequest in class AbstractSchemEditAction
Parameters:
mapping - the ActionMapping
form - the ActionForm
request - the Request
response - 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:
handleEditRequest in class AbstractSchemEditAction
Parameters:
mapping - the ActionMapping
form - the ActionForm
request - the Request
response - 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:
handleNewRecordRequest in class AbstractSchemEditAction
Parameters:
mapping - the ActionMapping
form - the ActionForm
request - the Request
response - 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:
putRecord in class AbstractSchemEditAction
Parameters:
mapping - Description of the Parameter
form - Description of the Parameter
request - Description of the Parameter
Throws:
Exception - if save operation is unsuccessful
RecordUpdateException - Description of the Exception

initSuggestionServiceHelper

protected CATServiceHelper initSuggestionServiceHelper(SchemEditForm sef)
                                                throws Exception
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

protected void prtln(String s)
Print a line to standard out.

Overrides:
prtln in class AbstractSchemEditAction
Parameters:
s - The String to print.

prtlnErr

protected void prtlnErr(String s)
Description of the Method

Overrides:
prtlnErr in class AbstractSchemEditAction
Parameters:
s - Description of the Parameter

DLESE Tools
v1.6.0