Package org.dlese.dpc.schemedit.action
Class StandAloneSchemEditAction
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
- Direct Known Subclasses:
CollectionConfigAction,FrameworkConfigAction
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 Summary
FieldsModifier and TypeFieldDescriptionprotected static booleanDescription of the Fieldprotected FileFields 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) Processes the specified HTTP request and creates the corresponding HTTP response by forwarding to a JSP that will create it.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 org.dom4j.DocumentgetRemoteRecord(String recId) Obtain a record via Web Service.protected StringGets the xmlFormat attribute of the StandAloneSchemEditAction objectprotected org.apache.struts.action.ActionForwardhandleCancelRequest(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response) Cancels editing of current metadata record.protected org.apache.struts.action.ActionForwardhandleChangeIdRequest(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, SchemaHelper schemaHelper, SchemEditValidator validator) Description of the Methodprotected org.apache.struts.action.ActionForwardhandleEditRequest(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response) Description of the Methodprotected 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 org.apache.struts.action.ActionForwardhandleNewRecordRequest(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response) Description of the Methodprotected org.apache.struts.action.ActionForwardhandleOtherCommands(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response) Description of the Methodprotected org.apache.struts.action.ActionForwardhandleSaveRequest(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response, SchemEditValidator validator) Description of the Methodprotected 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 diskprotected org.apache.struts.action.ActionErrorssaveRecord(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response, SchemEditValidator validator) Save a record to disk.Methods 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
-
Field Details
-
debug
protected static boolean debugDescription of the Field -
recordsDir
-
-
Constructor Details
-
StandAloneSchemEditAction
public StandAloneSchemEditAction()
-
-
Method Details
-
getXmlFormat
Gets the xmlFormat attribute of the StandAloneSchemEditAction object- Specified by:
getXmlFormatin classAbstractSchemEditAction- 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:AbstractSchemEditActionProcesses the specified HTTP request and creates the corresponding HTTP response by forwarding to a JSP that will create it. Returns anActionForwardinstance 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:
executein classAbstractSchemEditAction- 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
-
getRecordsDir
Gets the recordsDir attribute of the StandAloneSchemEditAction object- Returns:
- The recordsDir value
-
getRemoteRecord
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:
handleMissingCommandin classAbstractSchemEditAction- 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
-
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:
handleOtherCommandsin classAbstractSchemEditAction- 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 ExceptionMissingLockException- 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:AbstractSchemEditActionDescription of the Method- Specified by:
handleSaveRequestin classAbstractSchemEditAction- Parameters:
mapping- Description of the Parameterform- Description of the Parameterrequest- Description of the Parameterresponse- Description of the Parametervalidator- Description of the Parameter- Returns:
- Description of the Return Value
- Throws:
ServletException- Description of the ExceptionMissingLockException- 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 Parameterform- Description of the Parameterrequest- Description of the ParameterschemaHelper- 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:
handleNewRecordRequestin classAbstractSchemEditAction- 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
-
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:AbstractSchemEditActionCancels editing of current metadata record.- Specified by:
handleCancelRequestin classAbstractSchemEditAction- Parameters:
mapping- the ActionMappingform- the ActionFormrequest- the Requestresponse- 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:
handleEditRequestin classAbstractSchemEditAction- 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
-
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:
putRecordin classAbstractSchemEditAction- Parameters:
mapping- Description of the Parameterform- Description of the Parameterrequest- 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 Parameterform- Description of the Parameterrequest- Description of the ParameterschemaHelper- Description of the Parametervalidator- Description of the Parameter- Returns:
- Description of the Return Value
-
prtln
Print a line to standard out.- Overrides:
prtlnin classAbstractSchemEditAction- Parameters:
s- The String to print.
-