Class CollectionConfigAction


public final class CollectionConfigAction extends StandAloneSchemEditAction
Controller for the Collection Settings editor. Automatically reloads saved config file so that changes take effect immediately.
Author:
ostwald
  • Constructor Details

    • CollectionConfigAction

      public CollectionConfigAction()
  • Method Details

    • getValidator

      protected SchemEditValidator getValidator(org.apache.struts.action.ActionForm form, org.apache.struts.action.ActionMapping mapping, HttpServletRequest request)
      Gets the validator attribute of the CollectionConfigAction object
      Overrides:
      getValidator in class AbstractSchemEditAction
      Parameters:
      form - Description of the Parameter
      mapping - Description of the Parameter
      request - Description of the Parameter
      Returns:
      The validator value
    • getRecordsDir

      protected File getRecordsDir()
      Gets the recordsDir attribute of the CollectionConfigAction object
      Overrides:
      getRecordsDir in class StandAloneSchemEditAction
      Returns:
      The recordsDir value
    • getXmlFormat

      protected String getXmlFormat()
      Gets the xmlFormat attribute of the CollectionConfigAction object
      Overrides:
      getXmlFormat in class StandAloneSchemEditAction
      Returns:
      The xmlFormat value
    • 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
      Write the saved config file to disk, and update NDR if this collection is registered with the NDR.
      Overrides:
      handleSaveRequest in class StandAloneSchemEditAction
      Parameters:
      mapping - the ActionMapping
      form - the ActionForm
      request - the Request
      response - the Response
      validator - the special validator for configs
      Returns:
      Description of the Return Value
      Throws:
      ServletException - Description of the Exception
      MissingLockException - if this config is currently being edited by someone else
    • 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
      handle commands specific to this controller, call the superclasses handleOtherCommands method if a command is not recognized
      Overrides:
      handleOtherCommands in class StandAloneSchemEditAction
      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 - 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 CollectionConfigAction object
      Overrides:
      getFileToEdit in class StandAloneSchemEditAction
      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
    • prtln

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

      protected void prtlnErr(String s)
      NOT YET DOCUMENTED
      Overrides:
      prtlnErr in class AbstractSchemEditAction
      Parameters:
      s - NOT YET DOCUMENTED