Class PojoFormBase
java.lang.Object
org.apache.struts.action.ActionForm
org.kuali.rice.kns.web.struts.form.pojo.PojoFormBase
- All Implemented Interfaces:
Serializable,PojoForm
- Direct Known Subclasses:
KualiForm
@Deprecated
public class PojoFormBase
extends org.apache.struts.action.ActionForm
implements PojoForm
Deprecated.
KNS Struts deprecated, use KRAD and the Spring MVC framework.
Kuali Foundation modification: javadoc comments changed
This class is the base form which implements the PojoForm interface.
- See Also:
-
Field Summary
FieldsFields inherited from class org.apache.struts.action.ActionForm
multipartRequestHandler, servlet -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidaddMaxUploadSize(String sizeString) Deprecated.Adds the given string as a maximum size to the form.voidDeprecated.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.protected voidcacheUnconvertedValue(String key, Object value) Deprecated.voidDeprecated.Reinitializes the form to allow it to register the editable properties of the currently processing request.voidDeprecated.Copies all editable properties in the populate editable properties to the action editable propertiesprotected voidDeprecated.Subclasses can override this to add their own max upload size to the list.protected ClassformatterClassForKeypath(String keypath) Deprecated.Retrieves any formatters associated specially with the keypath.formatValue(Object value, String keypath, Class type) Deprecated.Tries to format the provided value by passing it to a suitableFormatter.Deprecated.Deprecated.protected org.kuali.rice.core.web.format.FormattergetFormatter(String keypath, Class propertyType) Deprecated.Retrieves a formatter for the keypath and property type.Deprecated.Gets the formatterTypes attribute.booleanDeprecated.Deprecated.Deprecated.Base implementation that returns just "start".protected StringgetParameter(javax.servlet.http.HttpServletRequest request, String parameterName) Deprecated.protected String[]getParameterValues(javax.servlet.http.HttpServletRequest request, String parameterName) Deprecated.Deprecated.Deprecated.protected ClassgetPropertyType(String keypath) Deprecated.Delegates toPropertyUtils.getPropertyType(Object, String)to look up the property type for the provided keypath.Deprecated.Deprecated.Deprecated.protected ListDeprecated.protected final voidDeprecated.Initializes the list of max upload sizes if necessary.booleanisPropertyEditable(String propertyName) Deprecated.booleanisPropertyNonEditableButRequired(String propertyName) Deprecated.voidpopulate(javax.servlet.http.HttpServletRequest request) Deprecated.Populates the form with values from the current request.voidpopulateForProperty(String paramPath, Object paramValue, Map params) Deprecated.Populates a given parameter value into the given property pathvoidpostprocessRequestParameters(Map requestParameters) Deprecated.Method is called after parameters from a multipart request have been made accessible to request.getParameter calls, but before request parameter values are used to instantiate and populate business objects.voidDeprecated.voidregisterEditableProperty(String editablePropertyName) Deprecated.voidregisterIsNewForm(boolean isNewForm) Deprecated.voidregisterRequiredNonEditableProperty(String requiredNonEditableProperty) Deprecated.voidregisterStrutsActionMappingScope(String strutsActionMappingScope) Deprecated.Sets the value of the "scope" attribute for the Struts action mapping corresponding to this form instance.voidDeprecated.Sets the guid of the editable properties which were registered by the actionvoidsetFormatterType(String keypath, Class type) Deprecated.Sets the Formatter class to use for a given keypath.voidsetFormatterTypes(Map formatterTypes) Deprecated.Sets the formatterTypes attribute value.voidDeprecated.Sets the guid to editable properties consulted during populationvoidsetUnconvertedValues(Map unconvertedValues) Deprecated.booleanshouldPropertyBePopulatedInForm(String requestParameterName, javax.servlet.http.HttpServletRequest request) Deprecated.Returns whether a request parameter should be populated as a property of the form, assuming that the request parameter name corresponds to a property on the form.Methods inherited from class org.apache.struts.action.ActionForm
getMultipartRequestHandler, getServlet, getServletWrapper, reset, reset, setMultipartRequestHandler, setServlet, validate, validate
-
Field Details
-
requiredNonEditableProperties
Deprecated.
-
-
Constructor Details
-
PojoFormBase
public PojoFormBase()Deprecated.
-
-
Method Details
-
postprocessRequestParameters
Deprecated.Method is called after parameters from a multipart request have been made accessible to request.getParameter calls, but before request parameter values are used to instantiate and populate business objects. Important note: parameters in the given Map which were created from a multipart-encoded parameter will, apparently, be stored in the given Map as String[] instead of as String.- Specified by:
postprocessRequestParametersin interfacePojoForm- Parameters:
requestParameters-
-
populate
public void populate(javax.servlet.http.HttpServletRequest request) Deprecated.Populates the form with values from the current request. Uses instances of Formatter to convert strings to the Java types of the properties to which they are bound. Values that can't be converted are cached in a map of unconverted values. Returns an ActionErrors containing ActionMessage instances for each conversion error that occurred, if any. -
populateForProperty
Deprecated.Populates a given parameter value into the given property path- Parameters:
paramPath- the path to a property within the formparamValue- the value of that propertyparams- the Map of parameters from the request
-
getPropertyType
protected Class getPropertyType(String keypath) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException Deprecated.Delegates toPropertyUtils.getPropertyType(Object, String)to look up the property type for the provided keypath. Caches the resulting class so that subsequent lookups for the same keypath can be satisfied by looking in the cache. -
getFormatter
Deprecated.Retrieves a formatter for the keypath and property type.- Parameters:
keypath-propertyType-- Returns:
-
formatterClassForKeypath
Deprecated.Retrieves any formatters associated specially with the keypath.- Parameters:
keypath-- Returns:
-
formatValue
Deprecated.Tries to format the provided value by passing it to a suitableFormatter. Adds an ActionMessage to the ActionErrors in the request if a FormatException is thrown.Caution should be used when invoking this method. It should never be called prior to
populate(HttpServletRequest)because the cached request reference could be stale.- Specified by:
formatValuein interfacePojoForm
-
setFormatterType
Deprecated.Sets the Formatter class to use for a given keypath. This class will be used by the form instead of the one returned by calls toFormatter.getFormatter(Class), which is the default mechanism. -
getUnconvertedValues
Deprecated.- Specified by:
getUnconvertedValuesin interfacePojoForm
-
setUnconvertedValues
Deprecated. -
getUnknownKeys
Deprecated. -
cacheUnconvertedValue
Deprecated. -
processValidationFail
public void processValidationFail()Deprecated.- Specified by:
processValidationFailin interfacePojoForm
-
getFormatterTypes
Deprecated.Gets the formatterTypes attribute.- Returns:
- Returns the formatterTypes.
-
setFormatterTypes
Deprecated.Sets the formatterTypes attribute value.- Parameters:
formatterTypes- The formatterTypes to set.
-
addMaxUploadSize
Deprecated.Adds the given string as a maximum size to the form. It will be used if a file upload is used.- Parameters:
sizeString-
-
initMaxUploadSizes
protected final void initMaxUploadSizes()Deprecated.Initializes the list of max upload sizes if necessary. -
customInitMaxUploadSizes
protected void customInitMaxUploadSizes()Deprecated.Subclasses can override this to add their own max upload size to the list. Only the largest passed will be used. -
getMaxUploadSizes
Deprecated. -
registerEditableProperty
Deprecated.- Specified by:
registerEditablePropertyin interfacePojoForm
-
registerRequiredNonEditableProperty
Deprecated. -
clearEditablePropertyInformation
public void clearEditablePropertyInformation()Deprecated.Description copied from interface:PojoFormReinitializes the form to allow it to register the editable properties of the currently processing request.- Specified by:
clearEditablePropertyInformationin interfacePojoForm
-
getEditableProperties
Deprecated.- Specified by:
getEditablePropertiesin interfacePojoForm
-
isPropertyEditable
Deprecated. -
addRequiredNonEditableProperties
public void addRequiredNonEditableProperties()Deprecated.Description copied from interface:PojoFormThis 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:
addRequiredNonEditablePropertiesin interfacePojoForm- See Also:
-
isPropertyNonEditableButRequired
Deprecated. -
getParameter
Deprecated. -
getParameterValues
protected String[] getParameterValues(javax.servlet.http.HttpServletRequest request, String parameterName) Deprecated. -
getRequiredNonEditableProperties
Deprecated.- Specified by:
getRequiredNonEditablePropertiesin interfacePojoForm
-
registerStrutsActionMappingScope
Deprecated.Description copied from interface:PojoFormSets the value of the "scope" attribute for the Struts action mapping corresponding to this form instance. Note that this method name is NOT in the syntax of the conventional POJO setter; this is to prevent clients from maliciously altering the value of this parameter- Specified by:
registerStrutsActionMappingScopein interfacePojoForm- Parameters:
strutsActionMappingScope-- See Also:
-
getStrutsActionMappingScope
Deprecated. -
registerIsNewForm
public void registerIsNewForm(boolean isNewForm) Deprecated.- Specified by:
registerIsNewFormin interfacePojoForm- See Also:
-
getIsNewForm
public boolean getIsNewForm()Deprecated.- Specified by:
getIsNewFormin interfacePojoForm
-
shouldPropertyBePopulatedInForm
public boolean shouldPropertyBePopulatedInForm(String requestParameterName, javax.servlet.http.HttpServletRequest request) Deprecated.Description copied from interface:PojoFormReturns whether a request parameter should be populated as a property of the form, assuming that the request parameter name corresponds to a property on the form. This method makes no determination whether the request parameter is a property of the form, but rather from a security perspective, whether the framework should attempt to set the form property with the same name as the request parameter.- Specified by:
shouldPropertyBePopulatedInFormin interfacePojoForm- Parameters:
requestParameterName- the name of the request parameterrequest- the HTTP request- Returns:
- whether the parameter should be
- See Also:
-
getMethodToCallsToBypassSessionRetrievalForGETRequests
Deprecated.Base implementation that returns just "start". sub-implementations should not add values to Set instance returned by this method, and should create its own instance.- Specified by:
getMethodToCallsToBypassSessionRetrievalForGETRequestsin interfacePojoForm- Returns:
- See Also:
-
setPopulateEditablePropertiesGuid
Deprecated.Sets the guid to editable properties consulted during population- Specified by:
setPopulateEditablePropertiesGuidin interfacePojoForm- Parameters:
guid- the key to the editable properties for this form
-
getPopulateEditablePropertiesGuid
Deprecated.- Returns:
- the guid for the populate editable properties
-
setActionEditablePropertiesGuid
Deprecated.Sets the guid of the editable properties which were registered by the action- Specified by:
setActionEditablePropertiesGuidin interfacePojoForm- Parameters:
guid- the guid of the action editable properties- See Also:
-
getActionEditablePropertiesGuid
Deprecated.- Returns:
- the guid of the editable properties which had been registered by the action processing
-
getPopulateEditableProperties
Deprecated.- Returns:
- the editable properties to be consulted during population
-
copyPopulateEditablePropertiesToActionEditableProperties
public void copyPopulateEditablePropertiesToActionEditableProperties()Deprecated.Copies all editable properties in the populate editable properties to the action editable properties
-