Package org.dlese.dpc.schemedit.action
Class CreateRecordAction
java.lang.Object
org.apache.struts.action.Action
org.dlese.dpc.schemedit.action.DCSAction
org.dlese.dpc.schemedit.action.CreateRecordAction
- Direct Known Subclasses:
CreateADNRecordAction
A Struts Action controlling interaction during creation of metadata records
for frameworks that require an initial data-entry screen before entering the
metadata editor. For example, in the ADN framework, a url must first be
checked for uniqueness before a record is created.
- Author:
- Jonathan Ostwald
-
Field Summary
Fields 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 abstract org.apache.struts.action.ActionForwardgetConfirmForward(org.apache.struts.action.ActionMapping mapping, CreateADNRecordForm carForm, HttpServletRequest request, HttpServletResponse response) Gets the confirmForward attribute of the CreateRecordAction objectprotected abstract org.apache.struts.action.ActionForwardgetCreateForward(org.apache.struts.action.ActionMapping mapping) Gets the createForward attribute of the CreateRecordAction objectprotected abstract StringGets the xmlFormat attribute of the CreateRecordAction objectprotected org.apache.struts.action.ActionForwardhandleSubmit(CreateADNRecordForm carForm, MetaDataFramework framework, org.apache.struts.action.ActionMapping mapping, HttpServletRequest request, HttpServletResponse response) NOT YET DOCUMENTEDprotected abstract org.dom4j.DocumentmakeRecordDoc(CreateADNRecordForm carForm, MetaDataFramework framework, org.apache.struts.action.ActionMapping mapping, HttpServletRequest request, HttpServletResponse response) Create an empty collection metadata document and populate from ActionForm (carForm).static voidsetDebug(boolean isDebugOutput) Sets the debug attribute of the CreateRecordAction classprotected abstract org.apache.struts.action.ActionErrorsvalidateForm(HttpServletRequest request, CreateADNRecordForm carForm, MetaDataFramework framework) Validate the input from user.Methods 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
-
CreateRecordAction
public CreateRecordAction()
-
-
Method Details
-
getXmlFormat
Gets the xmlFormat attribute of the CreateRecordAction object- Returns:
- The xmlFormat value
-
getCreateForward
protected abstract org.apache.struts.action.ActionForward getCreateForward(org.apache.struts.action.ActionMapping mapping) Gets the createForward attribute of the CreateRecordAction object- Parameters:
mapping- NOT YET DOCUMENTED- Returns:
- The createForward value
-
getConfirmForward
protected abstract org.apache.struts.action.ActionForward getConfirmForward(org.apache.struts.action.ActionMapping mapping, CreateADNRecordForm carForm, HttpServletRequest request, HttpServletResponse response) Gets the confirmForward attribute of the CreateRecordAction object- Parameters:
mapping- NOT YET DOCUMENTEDcarForm- NOT YET DOCUMENTEDrequest- NOT YET DOCUMENTEDresponse- NOT YET DOCUMENTED- Returns:
- The confirmForward 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 Processes the specified HTTP request and creates the corresponding HTTP response by forwarding to a JSP that will create it. Returns anActionForwardinstance that maps to a Struts forwarding name, which must be configured in struts-config.xml to forward to the JSP page that will handle the request.- Overrides:
executein classorg.apache.struts.action.Action- Parameters:
mapping- The ActionMapping used to select this instanceform- The ActionForm for the given pagerequest- The HTTP request we are processingresponse- The HTTP response we are creating- Returns:
- The ActionForward instance describing where and how control should be forwarded
- Throws:
IOException- if an input/output error occursServletException- if a servlet exception occurs
-
handleSubmit
protected org.apache.struts.action.ActionForward handleSubmit(CreateADNRecordForm carForm, MetaDataFramework framework, org.apache.struts.action.ActionMapping mapping, HttpServletRequest request, HttpServletResponse response) NOT YET DOCUMENTED- Parameters:
carForm- NOT YET DOCUMENTEDframework- NOT YET DOCUMENTEDmapping- NOT YET DOCUMENTEDrequest- NOT YET DOCUMENTEDresponse- NOT YET DOCUMENTED- Returns:
- NOT YET DOCUMENTED
-
makeRecordDoc
protected abstract org.dom4j.Document makeRecordDoc(CreateADNRecordForm carForm, MetaDataFramework framework, org.apache.struts.action.ActionMapping mapping, HttpServletRequest request, HttpServletResponse response) throws Exception Create an empty collection metadata document and populate from ActionForm (carForm). Passes any error information back as an ActionError -used, for example, when a webservice response contains an error that we want to propagate back up to the user.- Parameters:
carForm- the ActionFormframework- the MetaDataFramework of the record being created- Returns:
- Description of the Return Value
- Throws:
Exception- Description of the Exception
-
validateForm
protected abstract org.apache.struts.action.ActionErrors validateForm(HttpServletRequest request, CreateADNRecordForm carForm, MetaDataFramework framework) Validate the input from user. Put changed or default values into carForm. After this method returns carForm (rather than request) is used to process user input.- Parameters:
request- the RequestcarForm- the ActionFormframework- the MetaDataFramework of the record being created- Returns:
- Description of the Return Value
-
setDebug
public static void setDebug(boolean isDebugOutput) Sets the debug attribute of the CreateRecordAction class- Parameters:
isDebugOutput- The new debug value
-