Class StandAloneSchemEditAction

java.lang.Object
org.apache.struts.action.Action
Direct Known Subclasses:
CollectionConfigAction, FrameworkConfigAction

public class StandAloneSchemEditAction extends AbstractSchemEditAction
Metadata Editor controller for xml records to be created and edited in a particular disk directory rather than reading and writing to a indexed repository.
Author:
ostwald
  • Field Details

    • debug

      protected static boolean debug
      Description of the Field
    • recordsDir

      protected File recordsDir
  • Constructor Details

    • StandAloneSchemEditAction

      public StandAloneSchemEditAction()
  • Method Details

    • getXmlFormat

      protected String getXmlFormat()
      Gets the xmlFormat attribute of the StandAloneSchemEditAction 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 copied from class: AbstractSchemEditAction
      Processes the specified HTTP request and creates the corresponding HTTP response by forwarding to a JSP that will create it. Returns an ActionForward instance that maps to the Struts forwarding name "xxx.xxx," which must be configured in struts-config.xml to forward to the JSP page that will handle the request.
      Overrides:
      execute in class AbstractSchemEditAction
      Parameters:
      mapping - Description of the Parameter
      form - Description of the Parameter
      request - Description of the Parameter
      response - Description of the Parameter
      Returns:
      Description of the Return Value
      Throws:
      IOException - Description of the Exception
      ServletException - Description of the Exception
    • getRecordsDir

      protected File getRecordsDir()
      Gets the recordsDir attribute of the StandAloneSchemEditAction object
      Returns:
      The recordsDir value
    • getRemoteRecord

      protected org.dom4j.Document getRemoteRecord(String recId) throws ServletException
      Obtain a record via Web Service.
      Parameters:
      recId - Description of the Parameter
      Returns:
      Description of the Return Value
      Throws:
      ServletException - Description of the Exception
    • 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 forward control to the home page for this framework.
      Specified by:
      handleMissingCommand in class AbstractSchemEditAction
      Parameters:
      mapping - Description of the Parameter
      form - Description of the Parameter
      request - Description of the Parameter
      response - Description of the Parameter
      Returns:
      Description of the Return Value
      Throws:
      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
      Description of the Method
      Overrides:
      handleOtherCommands in class AbstractSchemEditAction
      Parameters:
      mapping - Description of the Parameter
      form - Description of the Parameter
      request - Description of the Parameter
      response - Description of the Parameter
      Returns:
      Description of the Return Value
      Throws:
      ServletException - Description of the Exception
      MissingLockException - NOT YET DOCUMENTED
    • saveRecord

      protected org.apache.struts.action.ActionErrors saveRecord(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response, SchemEditValidator validator) throws MissingLockException
      Save a record to disk. With the exception of MissingLock errors and Exceptions thrown by putRecord, exceptions are caught and returned as ActionErrors.
      Throws:
      MissingLockException
    • 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 copied from class: AbstractSchemEditAction
      Description of the Method
      Specified by:
      handleSaveRequest in class AbstractSchemEditAction
      Parameters:
      mapping - Description of the Parameter
      form - Description of the Parameter
      request - Description of the Parameter
      response - Description of the Parameter
      validator - Description of the Parameter
      Returns:
      Description of the Return Value
      Throws:
      ServletException - Description of the Exception
      MissingLockException - Description of the Exception
    • getFileToEdit

      protected File getFileToEdit(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, SchemaHelper schemaHelper) throws Exception
      Gets the fileToEdit attribute of the StandAloneSchemEditAction object
      Parameters:
      mapping - Description of the Parameter
      form - Description of the Parameter
      request - Description of the Parameter
      schemaHelper - Description of the Parameter
      Returns:
      The fileToEdit value
      Throws:
      Exception - 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
      Description of the Method
      Specified by:
      handleNewRecordRequest in class AbstractSchemEditAction
      Parameters:
      mapping - Description of the Parameter
      form - Description of the Parameter
      request - Description of the Parameter
      response - Description of the Parameter
      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
      Description copied from class: AbstractSchemEditAction
      Cancels editing of current metadata record.
      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 - Description of the Parameter
      form - Description of the Parameter
      request - Description of the Parameter
      response - Description of the Parameter
      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
      Saves a metadata record either to disk
      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
    • handleChangeIdRequest

      protected org.apache.struts.action.ActionForward handleChangeIdRequest(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, SchemaHelper schemaHelper, SchemEditValidator validator)
      Description of the Method
      Parameters:
      mapping - Description of the Parameter
      form - Description of the Parameter
      request - Description of the Parameter
      schemaHelper - Description of the Parameter
      validator - Description of the Parameter
      Returns:
      Description of the Return Value
    • prtln

      protected void prtln(String s)
      Print a line to standard out.
      Overrides:
      prtln in class AbstractSchemEditAction
      Parameters:
      s - The String to print.