com.ibm.commerce.giftregistry.struts

Class GiftRegistryUpdateActionForm

  • All Implemented Interfaces:
    java.io.Serializable, org.apache.commons.beanutils.DynaBean
    Direct Known Subclasses:
    UserGiftRegistryAdminCreateActionForm, UserGiftRegistryCreateActionForm


    public class GiftRegistryUpdateActionForm
    extends GiftRegistryBaseValidatorActionForm
    implements java.io.Serializable
    This action form handles request data that updates or creates a registry. This action form validates all the incoming request parameters using rules specified in stores GiftRegistryAddress.properties. This form expects the following parameter names in the request properties, if such parameters are used. That is, these parameters should have the names below when they are configured in the service_mapping_config.xml file:
    • ECGiftRegistryConstants.EC_GIFT_REGISTRY_SHIPPING_PREFERENCE
    • EC_GIFT_REGISTRY_REGISTRANT_PASSWORD_VERIFY
    • ECGiftRegistryConstants.EC_GIFT_REGISTRY_GUEST_PASSWORD
    • EC_GIFT_REGISTRY_GUEST_PASSWORD_VERIFY
    • ECGiftRegistryConstants.EC_GIFT_REGISTRY_REGISTRANT_PASSWORD
    • ECGiftRegistryConstants.EC_GIFT_REGISTRY_EVENT_DAY
    • ECGiftRegistryConstants.EC_GIFT_REGISTRY_EVENT_MONTH
    • ECGiftRegistryConstants.EC_GIFT_REGISTRY_EVENT_YEAR
    • ECGiftRegistryConstants.EC_GIFT_REGISTRY_EVENT_DATE
    • ECGiftRegistryConstants.EC_GIFT_REGISTRY_ADDRESS_TYPE
    • ECGiftRegistryConstants.EC_GIFT_REGISTRY_SHIPPING_PREFERENCE
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String CLASS_NAME
      The name of this class
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      MappingResult getServiceMappingResult(org.apache.struts.action.ActionMapping mapping, java.util.Map inMap, javax.servlet.http.HttpServletRequest request)
      Creates a service mapping result that can be used to invoke the gift registry service that updates a gift registry.
      java.util.Map updateMappingInput(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request, java.util.Map inMap)
      Inserts into the given map an eventDate string that is constructed out of eventDay, eventMonth, and eventYear.
      org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)
      Validates request properties in the given request.
      • Methods inherited from class org.apache.struts.validator.DynaValidatorForm

        getPage, getResultValueMap, getValidationKey, getValidatorResults, reset, setPage, setValidatorResults
      • Methods inherited from class org.apache.struts.action.DynaActionForm

        contains, get, get, get, getDynaClass, getMap, getString, getStrings, initialize, initialize, remove, reset, set, set, set, toString
      • Methods inherited from class org.apache.struts.action.ActionForm

        getMultipartRequestHandler, getServletWrapper, setMultipartRequestHandler, setServlet, validate
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.apache.commons.beanutils.DynaBean

        contains, get, get, get, getDynaClass, remove, set, set, set
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
      • CLASS_NAME

        public static final java.lang.String CLASS_NAME
        The name of this class
    • Constructor Detail

      • GiftRegistryUpdateActionForm

        public GiftRegistryUpdateActionForm()
    • Method Detail

      • getServiceMappingResult

        public MappingResult getServiceMappingResult(org.apache.struts.action.ActionMapping mapping,
                                                     java.util.Map inMap,
                                                     javax.servlet.http.HttpServletRequest request)
                                              throws ECException
        Creates a service mapping result that can be used to invoke the gift registry service that updates a gift registry. See GiftRegistryBaseValidatorForm#getServiceMappingResult()
        Overrides:
        getServiceMappingResult in class GiftRegistryBaseValidatorActionForm
        Parameters:
        mapping - the action mapping for this action
        inMap - the map that contains all the existing request parameters
        request - the request this action is processing
        Returns:
        MappingResult the service name and UpdateGiftRegistryBOD as service object
        Throws:
        ServiceMappingException - if any mapping error occurs
        ECException - if the conversion from the map to the BOD fails
      • updateMappingInput

        public java.util.Map updateMappingInput(org.apache.struts.action.ActionMapping mapping,
                                                javax.servlet.http.HttpServletRequest request,
                                                java.util.Map inMap)
                                         throws ECException
        Inserts into the given map an eventDate string that is constructed out of eventDay, eventMonth, and eventYear. If eventDate_i is in the original request, it will not be updated. For example, if eventDate_1 = '2002-03-04', and eventYear_1, eventMonth_1, and eventDay_1 will be ignored.
        Parameters:
        maping - mapping used by this action form
        request - the request this form is currently in
        inMap - the inMap that contains given parameters and will be updated.
        Returns:
        the updated input
        Throws:
        ECExceptin - if updating fails
        ECException - thrown when the updating fails.
        See Also:
        GiftRegistryBaseValidatorActionForm.updateMappingInput(ActionMapping, HttpServletRequest, Map)
      • validate

        public org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping,
                                                              javax.servlet.http.HttpServletRequest request)
        Validates request properties in the given request. Errors will be stored in the returned ActionErrors. Currently, event dates are validated.
        Overrides:
        validate in class GiftRegistryBaseValidatorActionForm
        Parameters:
        mapping - the action mapping for this request
        request - the request in which properties are to be validated
        Returns:
        ActionErrors all the errors identified during validation