DLESE Tools
v1.6.0

org.dlese.dpc.schemedit.action
Class CreateMastRecordAction

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

public final class CreateMastRecordAction
extends CreateADNRecordAction

A Struts Action controlling interaction during creation of records for the "mast" framework, including iteraction with "metaextract" service to populate record fields.

Ensures that new records have unique URLs across their collection.

Author:
Jonathan Ostwald

Field Summary
 
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
CreateMastRecordAction()
           
 
Method Summary
protected  org.apache.struts.action.ActionForward getConfirmForward(org.apache.struts.action.ActionMapping mapping, CreateADNRecordForm carForm, HttpServletRequest request, HttpServletResponse response)
          Gets the confirmForward attribute of the CreateMastRecordAction object
protected  org.apache.struts.action.ActionForward getCreateForward(org.apache.struts.action.ActionMapping mapping)
          Gets the createForward attribute of the CreateMastRecordAction object
protected  String getXmlFormat()
          Gets the xmlFormat attribute of the CreateMastRecordAction object
protected  Document makeRecordDoc(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 void setDebug(boolean isDebugOutput)
          Sets the debug attribute of the CreateMastRecordAction class
protected  org.apache.struts.action.ActionErrors validateForm(HttpServletRequest request, CreateADNRecordForm carForm, MetaDataFramework mastFramework)
          Validate the input from user.
 
Methods inherited from class org.dlese.dpc.schemedit.action.CreateRecordAction
execute, handleSubmit
 
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

CreateMastRecordAction

public CreateMastRecordAction()
Method Detail

getXmlFormat

protected String getXmlFormat()
Gets the xmlFormat attribute of the CreateMastRecordAction object

Overrides:
getXmlFormat in class CreateADNRecordAction
Returns:
The xmlFormat value

getCreateForward

protected org.apache.struts.action.ActionForward getCreateForward(org.apache.struts.action.ActionMapping mapping)
Gets the createForward attribute of the CreateMastRecordAction object

Overrides:
getCreateForward in class CreateADNRecordAction
Parameters:
mapping - NOT YET DOCUMENTED
Returns:
The createForward value

getConfirmForward

protected org.apache.struts.action.ActionForward getConfirmForward(org.apache.struts.action.ActionMapping mapping,
                                                                   CreateADNRecordForm carForm,
                                                                   HttpServletRequest request,
                                                                   HttpServletResponse response)
Gets the confirmForward attribute of the CreateMastRecordAction object

Overrides:
getConfirmForward in class CreateADNRecordAction
Parameters:
mapping - the ActionMapping
carForm - the ActionForm
request - the Request
response - the Response
Returns:
The confirmForward value

makeRecordDoc

protected 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). If MetaExtract is unable to provide an instance Document (e.g., it returns an error), then create a new instanceDoc and pass the metaextract message back to caller as an ActionError.

Overrides:
makeRecordDoc in class CreateADNRecordAction
Parameters:
carForm - the ActionForm
framework - the MetaDataFramework of the record being created
errors - messages passed back to caller
Returns:
Description of the Return Value
Throws:
Exception - Description of the Exception

validateForm

protected org.apache.struts.action.ActionErrors validateForm(HttpServletRequest request,
                                                             CreateADNRecordForm carForm,
                                                             MetaDataFramework mastFramework)
Validate the input from user. Put changed or default values into carForm. After this method returns, the form, carForm (rather than request), is used to process user input

Overrides:
validateForm in class CreateADNRecordAction
Parameters:
request - Description of the Parameter
carForm - Description of the Parameter
mastFramework - NOT YET DOCUMENTED
Returns:
Description of the Return Value

setDebug

public static void setDebug(boolean isDebugOutput)
Sets the debug attribute of the CreateMastRecordAction class

Parameters:
isDebugOutput - The new debug value

DLESE Tools
v1.6.0