org.kuali.rice.kns.web.struts.form
Class KualiMaintenanceForm

java.lang.Object
  extended by org.apache.struts.action.ActionForm
      extended by org.kuali.rice.kns.web.struts.form.pojo.PojoFormBase
          extended by org.kuali.rice.kns.web.struts.form.KualiForm
              extended by org.kuali.rice.kns.web.struts.form.KualiDocumentFormBase
                  extended by org.kuali.rice.kns.web.struts.form.KualiMaintenanceForm
All Implemented Interfaces:
Serializable, PojoForm

public class KualiMaintenanceForm
extends KualiDocumentFormBase

This class is the base action form for all maintenance documents.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.kuali.rice.kns.web.struts.form.KualiForm
KualiForm.TabState
 
Field Summary
protected  MaintenanceDocumentRestrictions authorizations
           
protected  String businessObjectClassName
           
protected  String description
           
protected static org.apache.log4j.Logger LOG
           
protected  String lookedUpCollectionName
          The name of the collection looked up (by a multiple value lookup)
protected  String lookupResultsBOClassName
          The type of result returned by the multi-value lookup TODO: to be persisted in the lookup results service instead?
protected  String lookupResultsSequenceNumber
          Used to indicate which result set we're using when refreshing/returning from a multi-value lookup
protected  String maintenanceAction
           
protected  Map<String,String> newMaintainableValues
           
protected  Map<String,String> oldMaintainableValues
           
protected  boolean readOnly
           
protected static long serialVersionUID
           
 
Fields inherited from class org.kuali.rice.kns.web.struts.form.KualiDocumentFormBase
adHocActionRequestCodes, attachmentFile, documentActions, editingMode, suppressAllButtons
 
Fields inherited from class org.kuali.rice.kns.web.struts.form.KualiForm
extraButtons
 
Fields inherited from class org.kuali.rice.kns.web.struts.form.pojo.PojoFormBase
requiredNonEditableProperties
 
Fields inherited from class org.apache.struts.action.ActionForm
multipartRequestHandler, servlet
 
Constructor Summary
KualiMaintenanceForm()
           
 
Method Summary
 void addRequiredNonEditableProperties()
          This method adds the required property names, that are not directly editable by user on the html page, to a list, regardless of the context in which they appear.
 String getAdditionalSectionsFile()
           
 MaintenanceDocumentRestrictions getAuthorizations()
          Gets the authorizations attribute.
 String getBusinessObjectClassName()
           
 String getDescription()
           
 String getLookedUpCollectionName()
           
 String getLookupResultsBOClassName()
           
 String getLookupResultsSequenceNumber()
           
 String getMaintenanceAction()
           
 Map getNewMaintainableValues()
           
 Map getOldMaintainableValues()
           
 List getSections()
          Merges rows of old and new for each section (tab) of the ui.
 boolean isReadOnly()
           
protected  String parseAddCollectionName(String propertyName)
          This method returns the collection name (including nested collections) from a propertyName string
 void populate(javax.servlet.http.HttpServletRequest request)
          Hook into populate so we can set the maintenance documents and feed the field values to its maintainables.
protected  void populateAttachmentPropertyForBO(MaintenanceDocumentBase maintenanceDocument)
           
 void postprocessRequestParameters(Map requestParameters)
          Override the default method to add the if statement which can't be called until after parameters from a multipart request have been made accessible, but which must be called before the parameter values are used to instantiate and populate business objects.
 String retrieveFormValueForLookupInquiryParameters(String parameterName, String parameterValueLocation)
          This overridden method handles the case where maint doc properties do not reflect the true nature of the
 void setAuthorizations(MaintenanceDocumentRestrictions authorizations)
          Sets the authorizations attribute value.
 void setBusinessObjectClassName(String businessObjectClassName)
           
 void setDescription(String description)
           
 void setLookedUpCollectionName(String lookedUpCollectionName)
           
 void setLookupResultsBOClassName(String lookupResultsBOClassName)
           
 void setLookupResultsSequenceNumber(String lookupResultsSequenceNumber)
           
 void setMaintenanceAction(String maintenanceAction)
           
 void setNewMaintainableValues(Map newMaintainableValues)
          Sets the newMaintainableValues attribute value.
 void setOldMaintainableValues(Map oldMaintainableValues)
          Sets the oldMaintainableValues attribute value.
 void setReadOnly(boolean readOnly)
           
 boolean shouldMethodToCallParameterBeUsed(String methodToCallParameterName, String methodToCallParameterValue, javax.servlet.http.HttpServletRequest request)
          This overridden method ...
 boolean shouldPropertyBePopulatedInForm(String requestParameterName, javax.servlet.http.HttpServletRequest request)
          This overridden method ...
 
Methods inherited from class org.kuali.rice.kns.web.struts.form.KualiDocumentFormBase
buildHtmlLink, customInitMaxUploadSizes, getActionRequests, getActionRequestsRequiringApproval, getAdditionalScriptFile, getAdditionalScriptFiles, getAdHocActionRequestCodes, getAdHocRoutePerson, getAdHocRoutePersons, getAdHocRouteWorkgroup, getAdHocRouteWorkgroups, getAnnotation, getAttachmentFile, getBoNotes, getCommand, getDefaultDocumentTypeName, getDocId, getDocNum, getDocTypeName, getDocument, getDocumentActions, getDocumentHandlerUrl, getEditingMode, getFormKey, getInitiator, getInitiatorNetworkId, getMessageMapFromPreviousRequest, getNewAdHocRoutePerson, getNewAdHocRouteWorkgroup, getNewNote, getPersonInquiryUrlLink, getSelectedActionRequests, getStandardHeaderFields, getSuperUserAnnotation, getWorkflowDocument, hasDocumentId, initializeHeaderNavigationTabs, instantiateDocument, isDocumentEnRoute, isFormDocumentInitialized, isHasWorkflowDocument, isReturnToActionList, isStateAllowsApproveOrDisapprove, isStateAllowsApproveSingleActionRequest, isStateInitiatedFinalCancelled, isStateProcessedOrDisapproved, isSuperUserApproveDocumentAuthorized, isSuperUserApproveSingleActionRequestAuthorized, isSuperUserAuthorized, isSuperUserDisapproveDocumentAuthorized, isSuppressAllButtons, isUserDocumentInitiator, populateHeaderFields, reset, setActionRequests, setAdditionalScriptFile, setAdditionalScriptFiles, setAdHocActionRequestCodes, setAdHocRoutePersons, setAdHocRouteWorkgroups, setAnnotation, setAttachmentFile, setBoNotes, setCommand, setDerivedValuesOnForm, setDocId, setDocNum, setDocTypeName, setDocument, setDocumentActions, setEditingMode, setFormKey, setMessageMapFromPreviousRequest, setNewAdHocRoutePerson, setNewAdHocRouteWorkgroup, setNewNote, setReturnToActionList, setSelectedActionRequests, setSuperUserAnnotation, setSuppressAllButtons, validate
 
Methods inherited from class org.kuali.rice.kns.web.struts.form.KualiForm
clearEditablePropertyInformation, getActionFormUtilMap, getAnchor, getBackLocation, getCurrentTabIndex, getDisplayedErrors, getDisplayedInfo, getDisplayedWarnings, getDocInfo, getExtraButton, getExtraButtons, getFieldNameToFocusOnAfterSubmit, getHeaderNavigationTabs, getMethodToCall, getNavigationCss, getNextArbitrarilyHighIndex, getNumColumns, getRefreshCaller, getTabState, getTabStates, incrementTabIndex, isFieldLevelHelpEnabled, populateBackLocation, populateFieldLevelHelpEnabled, reset, setActionFormUtilMap, setAnchor, setBackLocation, setCurrentTabIndex, setDocInfo, setExtraButton, setExtraButtons, setFieldLevelHelpEnabled, setFieldNameToFocusOnAfterSubmit, setHeaderNavigationTabs, setMethodToCall, setNavigationCss, setNumColumns, setRefreshCaller, setTabStates
 
Methods inherited from class org.kuali.rice.kns.web.struts.form.pojo.PojoFormBase
addMaxUploadSize, cacheUnconvertedValue, copyPopulateEditablePropertiesToActionEditableProperties, formatterClassForKeypath, formatValue, getActionEditablePropertiesGuid, getEditableProperties, getFormatter, getFormatterTypes, getIsNewForm, getMaxUploadSizes, getMethodToCallsToBypassSessionRetrievalForGETRequests, getParameter, getParameterValues, getPopulateEditableProperties, getPopulateEditablePropertiesGuid, getPropertyType, getRequiredNonEditableProperties, getStrutsActionMappingScope, getUnconvertedValues, getUnknownKeys, initMaxUploadSizes, isPropertyEditable, isPropertyNonEditableButRequired, populateForProperty, processValidationFail, registerEditableProperty, registerIsNewForm, registerRequiredNonEditableProperty, registerStrutsActionMappingScope, setActionEditablePropertiesGuid, setFormatterType, setFormatterTypes, setPopulateEditablePropertiesGuid, setUnconvertedValues
 
Methods inherited from class org.apache.struts.action.ActionForm
getMultipartRequestHandler, getServlet, getServletWrapper, setMultipartRequestHandler, setServlet, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final org.apache.log4j.Logger LOG

serialVersionUID

protected static final long serialVersionUID
See Also:
Constant Field Values

businessObjectClassName

protected String businessObjectClassName

description

protected String description

readOnly

protected boolean readOnly

oldMaintainableValues

protected Map<String,String> oldMaintainableValues

newMaintainableValues

protected Map<String,String> newMaintainableValues

maintenanceAction

protected String maintenanceAction

lookupResultsSequenceNumber

protected String lookupResultsSequenceNumber
Used to indicate which result set we're using when refreshing/returning from a multi-value lookup


lookupResultsBOClassName

protected String lookupResultsBOClassName
The type of result returned by the multi-value lookup TODO: to be persisted in the lookup results service instead?


lookedUpCollectionName

protected String lookedUpCollectionName
The name of the collection looked up (by a multiple value lookup)


authorizations

protected MaintenanceDocumentRestrictions authorizations
Constructor Detail

KualiMaintenanceForm

public KualiMaintenanceForm()
Method Detail

addRequiredNonEditableProperties

public void addRequiredNonEditableProperties()
Description copied from interface: PojoForm
This method adds the required property names, that are not directly editable by user on the html page, to a list, regardless of the context in which they appear. Request parameter names corresponding to these properties will be populated into the form.

Specified by:
addRequiredNonEditableProperties in interface PojoForm
Overrides:
addRequiredNonEditableProperties in class KualiDocumentFormBase
See Also:
KualiDocumentFormBase.addRequiredNonEditableProperties()

postprocessRequestParameters

public void postprocessRequestParameters(Map requestParameters)
Override the default method to add the if statement which can't be called until after parameters from a multipart request have been made accessible, but which must be called before the parameter values are used to instantiate and populate business objects.

Specified by:
postprocessRequestParameters in interface PojoForm
Overrides:
postprocessRequestParameters in class PojoFormBase
Parameters:
requestParameters -

populate

public void populate(javax.servlet.http.HttpServletRequest request)
Hook into populate so we can set the maintenance documents and feed the field values to its maintainables.

Specified by:
populate in interface PojoForm
Overrides:
populate in class KualiDocumentFormBase

populateAttachmentPropertyForBO

protected void populateAttachmentPropertyForBO(MaintenanceDocumentBase maintenanceDocument)

getSections

public List getSections()
Merges rows of old and new for each section (tab) of the ui. Also, renames fields to prevent naming conflicts and does setting of read only fields.

Returns:
Returns the maintenanceSections.

getMaintenanceAction

public String getMaintenanceAction()
Returns:
Returns the maintenanceAction.

getBusinessObjectClassName

public String getBusinessObjectClassName()
Returns:
Returns the businessObjectClassName.

setBusinessObjectClassName

public void setBusinessObjectClassName(String businessObjectClassName)
Parameters:
businessObjectClassName - The businessObjectClassName to set.

getDescription

public String getDescription()
Returns:
Returns the description.

setDescription

public void setDescription(String description)
Parameters:
description - The description to set.

isReadOnly

public boolean isReadOnly()
Returns:
Returns the isReadOnly.

setReadOnly

public void setReadOnly(boolean readOnly)
Parameters:
readOnly - The isReadOnly to set.

getNewMaintainableValues

public Map getNewMaintainableValues()
Returns:
Returns the newMaintainableValues.

getOldMaintainableValues

public Map getOldMaintainableValues()
Returns:
Returns the oldMaintainableValues.

setMaintenanceAction

public void setMaintenanceAction(String maintenanceAction)
Parameters:
maintenanceAction - The maintenanceAction to set.

getAuthorizations

public MaintenanceDocumentRestrictions getAuthorizations()
Gets the authorizations attribute.

Returns:
Returns the authorizations.

setAuthorizations

public void setAuthorizations(MaintenanceDocumentRestrictions authorizations)
Sets the authorizations attribute value.

Parameters:
authorizations - The authorizations to set.

setNewMaintainableValues

public void setNewMaintainableValues(Map newMaintainableValues)
Sets the newMaintainableValues attribute value.

Parameters:
newMaintainableValues - The newMaintainableValues to set.

setOldMaintainableValues

public void setOldMaintainableValues(Map oldMaintainableValues)
Sets the oldMaintainableValues attribute value.

Parameters:
oldMaintainableValues - The oldMaintainableValues to set.

getLookupResultsSequenceNumber

public String getLookupResultsSequenceNumber()

setLookupResultsSequenceNumber

public void setLookupResultsSequenceNumber(String lookupResultsSequenceNumber)

getLookupResultsBOClassName

public String getLookupResultsBOClassName()

setLookupResultsBOClassName

public void setLookupResultsBOClassName(String lookupResultsBOClassName)

getLookedUpCollectionName

public String getLookedUpCollectionName()

setLookedUpCollectionName

public void setLookedUpCollectionName(String lookedUpCollectionName)

getAdditionalSectionsFile

public String getAdditionalSectionsFile()

retrieveFormValueForLookupInquiryParameters

public String retrieveFormValueForLookupInquiryParameters(String parameterName,
                                                          String parameterValueLocation)
This overridden method handles the case where maint doc properties do not reflect the true nature of the

Overrides:
retrieveFormValueForLookupInquiryParameters in class KualiForm
Parameters:
parameterName - the name of the parameter, as expected by the lookup or inquiry frameworks
parameterValueLocation - the name of the property containing the value of the parameter
Returns:
the value of the parameter
See Also:
KualiForm.retrieveFormValueForLookupInquiryParameters(java.lang.String, java.lang.String)

parseAddCollectionName

protected String parseAddCollectionName(String propertyName)
This method returns the collection name (including nested collections) from a propertyName string

Parameters:
propertyName - a parameterValueLocation w/ KRADConstants.MAINTENANCE_NEW_MAINTAINABLE + KRADConstants.ADD_PREFIX + "." stripped off the front
Returns:
the collectionName

shouldPropertyBePopulatedInForm

public boolean shouldPropertyBePopulatedInForm(String requestParameterName,
                                               javax.servlet.http.HttpServletRequest request)
This overridden method ...

Specified by:
shouldPropertyBePopulatedInForm in interface PojoForm
Overrides:
shouldPropertyBePopulatedInForm in class KualiDocumentFormBase
Parameters:
requestParameterName - the name of the request parameter
request - the HTTP request
Returns:
whether the parameter should be
See Also:
KualiDocumentFormBase.shouldPropertyBePopulatedInForm(java.lang.String, javax.servlet.http.HttpServletRequest)

shouldMethodToCallParameterBeUsed

public boolean shouldMethodToCallParameterBeUsed(String methodToCallParameterName,
                                                 String methodToCallParameterValue,
                                                 javax.servlet.http.HttpServletRequest request)
This overridden method ...

Overrides:
shouldMethodToCallParameterBeUsed in class KualiDocumentFormBase
See Also:
KualiDocumentFormBase.shouldMethodToCallParameterBeUsed(java.lang.String, java.lang.String, javax.servlet.http.HttpServletRequest)


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.