DLESE Tools
v1.6.0

org.dlese.dpc.schemedit.action
Class CollectionConfigAction

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.StandAloneSchemEditAction
                  extended by org.dlese.dpc.schemedit.action.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

Field Summary
 
Fields inherited from class org.dlese.dpc.schemedit.action.StandAloneSchemEditAction
recordsDir
 
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
CollectionConfigAction()
           
 
Method Summary
protected  File getFileToEdit(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, SchemaHelper schemaHelper)
          Gets the fileToEdit attribute of the CollectionConfigAction object
protected  File getRecordsDir()
          Gets the recordsDir attribute of the CollectionConfigAction object
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
protected  String getXmlFormat()
          Gets the xmlFormat attribute of the CollectionConfigAction object
protected  org.apache.struts.action.ActionForward handleOtherCommands(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response)
          handle commands specific to this controller, call the superclasses handleOtherCommands method if a command is not recognized
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)
          Write the saved config file to disk, and update NDR if this collection is registered with the NDR.
protected  void prtln(String s)
          Print a line to standard out.
protected  void prtlnErr(String s)
          NOT YET DOCUMENTED
 
Methods inherited from class org.dlese.dpc.schemedit.action.StandAloneSchemEditAction
execute, getRemoteRecord, handleCancelRequest, handleChangeIdRequest, handleEditRequest, handleMissingCommand, handleNewRecordRequest, putRecord, saveRecord
 
Methods inherited from class org.dlese.dpc.schemedit.action.AbstractSchemEditAction
attachNewElement, getEditorMapping, getMetaDataFramework, handleDeleteElement, 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
 

Constructor Detail

CollectionConfigAction

public CollectionConfigAction()
Method Detail

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

DLESE Tools
v1.6.0