Package org.dlese.dpc.schemedit.action
Class FrameworkConfigAction
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.StandAloneSchemEditAction
org.dlese.dpc.schemedit.action.FrameworkConfigAction
Controller for the DcsDataFramework editor. As a stand-alone schemedit action, this supports framework-config files
to be created and edited in a particular directory, and is not connected to the index or repository.
- Author:
- ostwald
$Id: FrameworkConfigAction.java,v 1.6 2009/03/20 23:33:55 jweather Exp $
-
Field Summary
Fields inherited from class org.dlese.dpc.schemedit.action.StandAloneSchemEditAction
recordsDirFields 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) Place the name of the edited framework in the request before calling super.execute.protected FilegetFileToEdit(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, SchemaHelper schemaHelper) Gets the fileToEdit attribute of the StandAloneSchemEditAction objectprotected FileGets the recordsDir attribute of the StandAloneSchemEditAction objectprotected StringGets the xmlFormat attribute of the StandAloneSchemEditAction objectprotected 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 forward control to the home page for this framework.protected voidPrint a line to standard out.protected voidputRecord(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request) Saves a metadata record either to diskMethods inherited from class org.dlese.dpc.schemedit.action.StandAloneSchemEditAction
getRemoteRecord, handleCancelRequest, handleChangeIdRequest, handleEditRequest, handleNewRecordRequest, handleOtherCommands, handleSaveRequest, saveRecordMethods inherited from class org.dlese.dpc.schemedit.action.AbstractSchemEditAction
attachNewElement, getEditorMapping, getMetaDataFramework, getValidator, handleDeleteElement, handleExitCommand, handleGuardedExit, handleMissingLockException, handleTimedOutGuardedExit, isDocDirty, prtlnErr, 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
-
Constructor Details
-
FrameworkConfigAction
public FrameworkConfigAction()
-
-
Method Details
-
getXmlFormat
Description copied from class:StandAloneSchemEditActionGets the xmlFormat attribute of the StandAloneSchemEditAction object- Overrides:
getXmlFormatin classStandAloneSchemEditAction- Returns:
- The xmlFormat value
-
getRecordsDir
Description copied from class:StandAloneSchemEditActionGets the recordsDir attribute of the StandAloneSchemEditAction object- Overrides:
getRecordsDirin classStandAloneSchemEditAction- Returns:
- The recordsDir 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 Place the name of the edited framework in the request before calling super.execute.- Overrides:
executein classStandAloneSchemEditAction- Parameters:
mapping- Description of the Parameterform- Description of the Parameterrequest- Description of the Parameterresponse- Description of the Parameter- Returns:
- Description of the Return Value
- Throws:
IOException- Description of the ExceptionServletException- 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 Description copied from class:StandAloneSchemEditActionGets the fileToEdit attribute of the StandAloneSchemEditAction object- Overrides:
getFileToEditin classStandAloneSchemEditAction- Parameters:
mapping- Description of the Parameterform- Description of the Parameterrequest- Description of the ParameterschemaHelper- Description of the Parameter- Returns:
- The fileToEdit value
- Throws:
Exception- Description of the Exception
-
putRecord
protected void putRecord(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request) throws Exception Description copied from class:StandAloneSchemEditActionSaves a metadata record either to disk- Overrides:
putRecordin classStandAloneSchemEditAction- Parameters:
mapping- Description of the Parameterform- Description of the Parameterrequest- Description of the Parameter- Throws:
Exception- if save operation is unsuccessful
-
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 Description copied from class:StandAloneSchemEditActionRequests without a command forward control to the home page for this framework.- Overrides:
handleMissingCommandin classStandAloneSchemEditAction- Parameters:
mapping- Description of the Parameterform- Description of the Parameterrequest- Description of the Parameterresponse- Description of the Parameter- Returns:
- Description of the Return Value
- Throws:
ServletException- Description of the Exception
-
prtln
Description copied from class:StandAloneSchemEditActionPrint a line to standard out.- Overrides:
prtlnin classStandAloneSchemEditAction- Parameters:
s- The String to print.
-