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 Details

    • requiredNonEditableProperties

      protected Set<String> requiredNonEditableProperties
      Deprecated.
  • Constructor Details

    • PojoFormBase

      public PojoFormBase()
      Deprecated.
  • Method Details

    • postprocessRequestParameters

      public void postprocessRequestParameters(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. 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:
      postprocessRequestParameters in interface PojoForm
      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.
      Specified by:
      populate in interface PojoForm
    • populateForProperty

      public void populateForProperty(String paramPath, Object paramValue, Map params)
      Deprecated.
      Populates a given parameter value into the given property path
      Parameters:
      paramPath - the path to a property within the form
      paramValue - the value of that property
      params - the Map of parameters from the request
    • getPropertyType

      Deprecated.
      Delegates to PropertyUtils.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.
      Throws:
      NoSuchMethodException
      InvocationTargetException
      IllegalAccessException
    • getFormatter

      protected Formatter getFormatter(String keypath, Class propertyType)
      Deprecated.
      Retrieves a formatter for the keypath and property type.
      Parameters:
      keypath -
      propertyType -
      Returns:
    • formatterClassForKeypath

      protected Class formatterClassForKeypath(String keypath)
      Deprecated.
      Retrieves any formatters associated specially with the keypath.
      Parameters:
      keypath -
      Returns:
    • formatValue

      public Object formatValue(Object value, String keypath, Class type)
      Deprecated.
      Tries to format the provided value by passing it to a suitable Formatter. 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:
      formatValue in interface PojoForm
    • setFormatterType

      public void setFormatterType(String keypath, Class type)
      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 to Formatter.getFormatter(Class), which is the default mechanism.
    • getUnconvertedValues

      public Map getUnconvertedValues()
      Deprecated.
      Specified by:
      getUnconvertedValues in interface PojoForm
    • setUnconvertedValues

      public void setUnconvertedValues(Map unconvertedValues)
      Deprecated.
    • getUnknownKeys

      protected List getUnknownKeys()
      Deprecated.
    • cacheUnconvertedValue

      protected void cacheUnconvertedValue(String key, Object value)
      Deprecated.
    • processValidationFail

      public void processValidationFail()
      Deprecated.
      Specified by:
      processValidationFail in interface PojoForm
    • getFormatterTypes

      public Map getFormatterTypes()
      Deprecated.
      Gets the formatterTypes attribute.
      Returns:
      Returns the formatterTypes.
    • setFormatterTypes

      public void setFormatterTypes(Map formatterTypes)
      Deprecated.
      Sets the formatterTypes attribute value.
      Parameters:
      formatterTypes - The formatterTypes to set.
    • addMaxUploadSize

      protected final void addMaxUploadSize(String sizeString)
      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

      public final List<String> getMaxUploadSizes()
      Deprecated.
    • registerEditableProperty

      public void registerEditableProperty(String editablePropertyName)
      Deprecated.
      Specified by:
      registerEditableProperty in interface PojoForm
    • registerRequiredNonEditableProperty

      public void registerRequiredNonEditableProperty(String requiredNonEditableProperty)
      Deprecated.
    • clearEditablePropertyInformation

      public void clearEditablePropertyInformation()
      Deprecated.
      Description copied from interface: PojoForm
      Reinitializes the form to allow it to register the editable properties of the currently processing request.
      Specified by:
      clearEditablePropertyInformation in interface PojoForm
    • getEditableProperties

      public Set<String> getEditableProperties()
      Deprecated.
      Specified by:
      getEditableProperties in interface PojoForm
    • isPropertyEditable

      public boolean isPropertyEditable(String propertyName)
      Deprecated.
    • addRequiredNonEditableProperties

      public void addRequiredNonEditableProperties()
      Deprecated.
      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
      See Also:
    • isPropertyNonEditableButRequired

      public boolean isPropertyNonEditableButRequired(String propertyName)
      Deprecated.
    • getParameter

      protected String getParameter(javax.servlet.http.HttpServletRequest request, String parameterName)
      Deprecated.
    • getParameterValues

      protected String[] getParameterValues(javax.servlet.http.HttpServletRequest request, String parameterName)
      Deprecated.
    • getRequiredNonEditableProperties

      public Set<String> getRequiredNonEditableProperties()
      Deprecated.
      Specified by:
      getRequiredNonEditableProperties in interface PojoForm
    • registerStrutsActionMappingScope

      public void registerStrutsActionMappingScope(String strutsActionMappingScope)
      Deprecated.
      Description copied from interface: PojoForm
      Sets 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:
      registerStrutsActionMappingScope in interface PojoForm
      Parameters:
      strutsActionMappingScope -
      See Also:
    • getStrutsActionMappingScope

      public String getStrutsActionMappingScope()
      Deprecated.
    • registerIsNewForm

      public void registerIsNewForm(boolean isNewForm)
      Deprecated.
      Specified by:
      registerIsNewForm in interface PojoForm
      See Also:
    • getIsNewForm

      public boolean getIsNewForm()
      Deprecated.
      Specified by:
      getIsNewForm in interface PojoForm
    • shouldPropertyBePopulatedInForm

      public boolean shouldPropertyBePopulatedInForm(String requestParameterName, javax.servlet.http.HttpServletRequest request)
      Deprecated.
      Description copied from interface: PojoForm
      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. 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:
      shouldPropertyBePopulatedInForm in interface PojoForm
      Parameters:
      requestParameterName - the name of the request parameter
      request - the HTTP request
      Returns:
      whether the parameter should be
      See Also:
    • getMethodToCallsToBypassSessionRetrievalForGETRequests

      public Set<String> 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:
      getMethodToCallsToBypassSessionRetrievalForGETRequests in interface PojoForm
      Returns:
      See Also:
    • setPopulateEditablePropertiesGuid

      public void setPopulateEditablePropertiesGuid(String guid)
      Deprecated.
      Sets the guid to editable properties consulted during population
      Specified by:
      setPopulateEditablePropertiesGuid in interface PojoForm
      Parameters:
      guid - the key to the editable properties for this form
    • getPopulateEditablePropertiesGuid

      public String getPopulateEditablePropertiesGuid()
      Deprecated.
      Returns:
      the guid for the populate editable properties
    • setActionEditablePropertiesGuid

      public void setActionEditablePropertiesGuid(String guid)
      Deprecated.
      Sets the guid of the editable properties which were registered by the action
      Specified by:
      setActionEditablePropertiesGuid in interface PojoForm
      Parameters:
      guid - the guid of the action editable properties
      See Also:
    • getActionEditablePropertiesGuid

      public String getActionEditablePropertiesGuid()
      Deprecated.
      Returns:
      the guid of the editable properties which had been registered by the action processing
    • getPopulateEditableProperties

      public Set<String> 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