atg.projects.b2cstore
Class B2CProfileFormHandler

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.droplet.EmptyFormHandler
              extended by atg.droplet.GenericFormHandler
                  extended by atg.userprofiling.ProfileForm
                      extended by atg.userprofiling.ProfileFormHandler
                          extended by atg.scenario.userprofiling.ScenarioProfileFormHandler
                              extended by atg.commerce.profile.CommerceProfileFormHandler
                                  extended by atg.projects.b2cstore.B2CProfileFormHandler
All Implemented Interfaces:
DropletFormHandler, atg.naming.AbsoluteNameable, NameContextBindingListener, NameContextElement, atg.naming.NameContextParentable, NameResolver, AdminableService, atg.nucleus.Configured, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, atg.process.ProcessConstants, atg.scenario.ScenarioConstants, atg.scenario.targeting.SlotConstants, java.util.EventListener

public class B2CProfileFormHandler
extends CommerceProfileFormHandler

Before creating the user, check whether the user has requested that her/his billing address be used as the shipping address. If so, copy the billing address fields into the shipping address.

After creating the user, update current user's secondaryAddressMap (in the profile repository) to include the shipping address, indexed with the nickname provided.


Nested Class Summary
 
Nested classes/interfaces inherited from class atg.userprofiling.ProfileForm
ProfileForm.ProfileFormHashtableWrapper
 
Field Summary
static java.lang.String CLASS_VERSION
          Class version string
static java.lang.String RESOURCE_BUNDLE
           
 
Fields inherited from class atg.userprofiling.ProfileFormHandler
mClearValuesOnCreate, mClearValuesOnLogin, mClearValuesOnUpdate
 
Fields inherited from class atg.userprofiling.ProfileForm
CONFIRMPASSWORD_PARAM, DEFAULT_CREATE_PROFILE_TYPE, DEFAULT_LOGIN_PROFILE_TYPE, DEFAULT_LOGOUT_PROFILE_TYPE, HANDLE_CREATE, HANDLE_CREATE_PARAM, HANDLE_FAILURE, HANDLE_LOGIN, HANDLE_LOGIN_PARAM, HANDLE_SUCCESS, ID_NAME, mBadPasswordDelay, mChangePasswordErrorURL, mChangePasswordSuccessURL, mCheckForRequiredParameters, mCheckForRequiredProperties, mCheckForRequiredPropertiesAfterUpdate, mCompareValueInCopyPropertiesOnLogin, mConfirmOldPassword, mConfirmPassword, mCreateErrorURL, mCreateProfileType, mCreateSuccessURL, mDeleteErrorURL, mDeleteSuccessURL, mExpireSessionOnLogout, mExtractDefaultValuesFromProfile, mLoginErrorURL, mLoginProfileType, mLoginSuccessURL, mLogoutErrorURL, mLogoutProfileType, mLogoutSuccessURL, mProfileTools, mPropertiesToAddOnLogin, mPropertiesToCopyOnLogin, mRepositoryId, MSG_ERR_CREATING_PROFILE, MSG_ERR_DELETING_PROFILE, MSG_ERR_UPDATING_PROFILE, MSG_ILLEGAL_ARGUMENT, MSG_INVALID_ADD_PROPERTY, MSG_INVALID_LOGIN, MSG_INVALID_PASSWORD, MSG_MISSING_LOGIN, MSG_MISSING_OLD_PASSWORD, MSG_MISSING_PASSWORD, MSG_MISSING_PROFILE, MSG_MISSING_PROFILE_TOOLS, MSG_MISSING_REQUIRED_PROPERTY, MSG_NO_SUCH_PROFILE_PROPERTY, MSG_NO_TYPE_CONVERTER, MSG_PASSWORD_SAME_AS_OLD_PASSWORD, MSG_PASSWORDS_DO_NOT_MATCH, MSG_PERMISSION_DEFINED_PASSWORD_CHANGE, MSG_READ_ONLY_PROFILE_PROPERTY, MSG_TYPE_CONVERSION_ERR, MSG_USER_ALREADY_EXISTS, MSG_WARNING_PROFILE_TOOLS, mSwapEventListeners, mTrimProperties, mUpdateErrorURL, mUpdateSuccessURL, mUserLoginManager, mUsingLdapProfile, mValue, NULL_SENTINEL, OLDPASSWORD_PARAM, REPOSITORY_ID_PROPERTY_NAME, RESOURCE_BUNDLE_NAME, STATUS_ERROR_REDIRECT, STATUS_ERROR_STAY, STATUS_SUCCESS
 
Fields inherited from class atg.droplet.GenericFormHandler
PARAM_DEFER_FORWARD_OR_REDIRECT, PARAM_USE_FORWARDS
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.scenario.ScenarioConstants
ATTR_SCENARIO_REDIRECT, PROPERTY_REFERENCE_TARGET, PROPERTY_REFERENCE_TYPE, PROPERTY_SCENARIO_INSTANCES, PROPERTY_SLOT_INSTANCES
 
Fields inherited from interface atg.process.ProcessConstants
COLLECTIVE_CLONE_PROPERTIES, DEFAULT_INITIAL_TIME_DELAY, DEFAULT_MAX_BATCH_SIZE, DEFAULT_PROCESS_FILE_EXTENSION, DEFAULT_TEMPLATE_FILE_EXTENSION, INDIVIDUAL_CLONE_PROPERTIES, INPUT_PORT_BATCH_TIMER, INPUT_PORT_COLLECTIVE_TIMER, INPUT_PORT_DISABLE_PROCESS, INPUT_PORT_GLOBAL_EVENT, INPUT_PORT_INDIVIDUAL_EVENT, INPUT_PORT_INDIVIDUAL_TIMER, INPUT_PORT_MIGRATION_UPDATE, INPUT_PORT_PROCESS_UPDATE, INPUT_PORT_SEGMENT_START_TIMER, JMS_TYPE_BATCH_TIMER, JMS_TYPE_COLLECTIVE_TIMER, JMS_TYPE_DISABLE_PROCESS, JMS_TYPE_INDIVIDUAL_TIMER, JMS_TYPE_MIGRATION_DELETE, JMS_TYPE_MIGRATION_UPDATE, JMS_TYPE_PROCESS_UPDATE, MIGRATION_STATUS_DONE, MIGRATION_STATUS_IN_PROGRESS, OUTPUT_PORT_BATCH_TIMER, OUTPUT_PORT_COLLECTIVE_TIMER, OUTPUT_PORT_INDIVIDUAL_TIMER, OUTPUT_PORT_MIGRATION_UPDATE, OUTPUT_PORT_PROCESS_UPDATE, OUTPUT_PORT_SEGMENT_START_TIMER, PROPERTY_AUTHOR, PROPERTY_COLLECTIVE_INSTANCE, PROPERTY_CONTEXT_BOOLEANS, PROPERTY_CONTEXT_DATES, PROPERTY_CONTEXT_DOUBLES, PROPERTY_CONTEXT_LONGS, PROPERTY_CONTEXT_STRINGS, PROPERTY_COUNT, PROPERTY_CREATED_BY_RECURRING_EVENT, PROPERTY_CREATION_TIME, PROPERTY_CREATOR_ID, PROPERTY_EVENT_TYPE, PROPERTY_ID, PROPERTY_LAST_MODIFIED_BY, PROPERTY_LAST_QUERY_ID, PROPERTY_MESSAGE_BEAN, PROPERTY_MIGRATION_INFO, PROPERTY_MIGRATION_INFOS, PROPERTY_MIGRATION_STATUS, PROPERTY_MODIFICATION_TIME, PROPERTY_NEW_MODIFICATION_TIME, PROPERTY_NUM_TRANSITION_RETRIES, PROPERTY_OLD_MODIFICATION_TIME, PROPERTY_PDL, PROPERTY_PROCESS_INFO, PROPERTY_PROCESS_NAME, PROPERTY_PROCESS_STATUS, PROPERTY_SEGMENT_NAME, PROPERTY_SEGMENT_NAMES, PROPERTY_SERVER_ID, PROPERTY_SERVER_TYPE, PROPERTY_STATE, PROPERTY_STATE_MACHINE_VERSION, PROPERTY_STEP, PROPERTY_SUBJECT, PROPERTY_TEMPLATE_NAME, STEP_ACTIONS_1, STEP_ACTIONS_2, STEP_NEXT_STATE_1, STEP_NEXT_STATE_2, UNDEFINED_TIMESTAMP_VALUE, WILDCARD_MATCH_ALL
 
Fields inherited from interface atg.scenario.targeting.SlotConstants
PROFILE_SLOT_TYPE, PROPERTY_ID, PROPERTY_SLOT_ITEMS, PROPERTY_SLOT_NAME, PROPERTY_SLOT_OFFSET, PROPERTY_SLOT_PRIORITIES, PROPERTY_SLOT_PROFILE, TRANS_MGR
 
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
DEFAULT_LOG_TRACE_STATUS
 
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
 
Constructor Summary
B2CProfileFormHandler()
          Constructs an instanceof B2CProfileFormHandler
 
Method Summary
 java.lang.String[] getAddressProperties()
          Returns property addressProperties, naming the properties in a secondary address record.
 java.util.List getAddressPropertyList()
          If the address property list is null, the initializeAddressPropertyList method is called to create a list from the appropriate property manager class.
 java.lang.String[] getCardProperties()
          Returns property cardProperties, naming the properties in a credit card entry.
 java.util.List getCardPropertyList()
          If the CardPropertyList is null, the initializeCardPropertyList method is called to create a list from the appropriate property manager class.
 java.lang.String getChangeAddressNicknameErrorURL()
          Returns property changeAddressNicknameErrorURL, used to redirect user in case of an error updating an address nickname.
 java.lang.String getChangeAddressNicknameSuccessURL()
          Returns property changeAddressNicknameSuccessURL, used to redirect user when an address nickname is successfully updated.
 java.lang.String getCreateCardErrorURL()
          Returns property createCardErrorURL, used to redirect user in case of an error adding a new credit card.
 java.lang.String getCreateCardSuccessURL()
          Returns property createCardSuccessURL, used to redirect user if a new credit card was successfully added.
 java.lang.String getDefaultCarrier()
           
 java.lang.String getDefaultCreditCardID()
           
 java.lang.String getEditAddress()
          Returns property editAddress, naming the address to be edited in the edit_secondary_address.jhtml page.
 java.util.Map getEditValue()
           
 java.lang.String getNewAddressErrorURL()
          Returns property newAddressErrorURL, used to redirect user in case of an error creating an address.
 java.lang.String getNewAddressSuccessURL()
          Returns property newAddressSuccessURL, used to redirect user after successfully creating an address.
 java.lang.String getRemoveAddress()
          Returns property removeAddress, naming the address to be removed by handleRemoveAddress().
 java.lang.String getRemoveCard()
          Returns property removeCard, naming the address to be removed by handleRemoveCard().
 java.lang.String getRemoveCardErrorURL()
          Returns property removeCardErrorURL, used to redirect user in case of an error removing a credit card.
 java.lang.String getRemoveCardSuccessURL()
          Returns property removeCardSuccessURL, used to redirect user in a credit card is successfully removed.
 java.lang.String[] getRequiredAddressProperties()
          Returns property requiredAddressProperties, naming the properties considered mandatory when creating a secondary address record.
 java.lang.String getUpdateAddressErrorURL()
          Returns property updateAddressErrorURL, used to redirect user in case of an error updating an address.
 java.lang.String getUpdateAddressSuccessURL()
          Returns property updateAddressSuccessURL, used to redirect user when an address is successfully updated.
 boolean handleChangeAddressNickname(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Changes the key in the secondaryAddresses map for the given address.
 boolean handleCreateNewCreditCard(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Creates a new credit card using the entries entered in the editValue map by the credit_card.jhtml page
 boolean handleEditAddress(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Copy the named seconary address into the editValue map, allowing the user to edit them in the edit_secondary_address.jhtml page.
 boolean handleNewAddress(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Creates a new shipping address using the entries entered in the editValue map by the new_shipping_address.jhtml page.
 boolean handleRemoveAddress(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This handler deletes a secondary address named in the removeAddress property.
 boolean handleRemoveCard(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Delete a specified credit card for the current user.
 boolean handleSelectDefaultAddress(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Copy the contents of a secondary address (identified in the editValue map by the entry defaultAddressNickname) to the default shipping address.
 boolean handleSetExpressCheckout(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Enable or disable express checkout If disabling, clear the default credit card in the user's profile so that that credit card may be safely deleted.
 boolean handleSetExpressCheckoutPreferences(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Set values used for express checkout
 boolean handleUpdateAddress(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Update the secondary address as modified by the user.
 boolean handleUpdateAddressAndMakeDefault(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Update the secondary address as modified by the user, and copy its contents to the default shipping address.
 java.util.List initializeAddressPropertyList()
          This method initializes the list of properties that are used for the Address information.
 java.util.List initializeCardPropertyList()
          This method initializes the list of properties that are used for the Credit card information.
 boolean isCompatibilityMode()
          Return the value of the CompatibilityMode property.
 boolean isShipToBillingAddress()
          Returns property shipToBillingAddress, indicating that the billing address should be copied to the shipping address.
protected  boolean makeCreditCardDefault(Profile pProfile, java.lang.String pCreditCardID)
          Make the credit card identified by pCreditCardID default in the given profile.
protected  void postCreateUser(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Set the registration date to 'now'.
protected  void preCreateUser(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Before creating the user, this method: Copies the first, middle, and last names to the billing address.
 void setAddressProperties(java.lang.String[] pAddressProperties)
          Sets property addressProperties, naming the properties in a secondary address record.
 void setAddressPropertyList(java.util.List pAddressPropertyList)
          Sets the Address property list, which is a list that mirrors the original design of the AddressProperties property with the property names defined in a configuration file.
 void setCardProperties(java.lang.String[] pCardProperties)
          Sets property cardProperties, naming the properties in a credit card entry.
 void setCardPropertyList(java.util.List pCardPropertyList)
          Sets the Card property list, which is a list that mirrors the original design of the AddressProperties property with the proeprty names defined in a configuration file.
 void setChangeAddressNicknameErrorURL(java.lang.String pChangeAddressNicknameErrorURL)
          Sets property changeAddressNicknameErrorURL, used to redirect user in case of an error updating an address nickname.
 void setChangeAddressNicknameSuccessURL(java.lang.String pChangeAddressNicknameSuccessURL)
          Sets property changeAddressNicknameSuccessURL, used to redirect user when an address nickname is successfully updated.
 void setCompatibilityMode(boolean pCompatibilityMode)
          Sets the compatibility Mode property.
 void setCreateCardErrorURL(java.lang.String pCreateCardErrorURL)
          Sets property createCardErrorURL, used to redirect user in case of an error adding a new credit card.
 void setCreateCardSuccessURL(java.lang.String pCreateCardSuccessURL)
          Sets property createCardSuccessURL, used to redirect user if a new credit card was successfully added.
 void setDefaultCarrier(java.lang.String pShipper)
           
 void setDefaultCreditCardID(java.lang.String pID)
           
 void setEditAddress(java.lang.String pEditAddress)
          Sets property editAddress, naming the address to be edited in the edit_secondary_address.jhtml page.
 void setNewAddressErrorURL(java.lang.String pNewAddressErrorURL)
          Sets property newAddressErrorURL, used to redirect user in case of an error creating an address.
 void setNewAddressSuccessURL(java.lang.String pNewAddressSuccessURL)
          Sets property newAddressSuccessURL, used to redirect user after successfully creating an address.
 void setRemoveAddress(java.lang.String pRemoveAddress)
          Sets property removeAddress, naming the address to be removed by handleRemoveAddress().
 void setRemoveCard(java.lang.String pRemoveCard)
          Sets property removeCard, naming the address to be removed by handleRemoveCard().
 void setRemoveCardErrorURL(java.lang.String pRemoveCardErrorURL)
          Sets property removeCardErrorURL, used to redirect user in case of an error removing a credit card.
 void setRemoveCardSuccessURL(java.lang.String pRemoveCardSuccessURL)
          Sets property removeCardSuccessURL, used to redirect user when a credit card is successfully removed.
 void setRequiredAddressProperties(java.lang.String[] pRequiredAddressProperties)
          Sets property requiredAddressProperties, naming the properties considered mandatory when creating a secondary address record.
 void setShipToBillingAddress(boolean pShipToBillingAddress)
          Sets property shipToBillingAddress, indicating that the billing address should be copied to the shipping address.
 void setUpdateAddressErrorURL(java.lang.String pUpdateAddressErrorURL)
          Sets property updateAddressErrorURL, used to redirect user in case of an error updating an address.
 void setUpdateAddressSuccessURL(java.lang.String pUpdateAddressSuccessURL)
          Sets property updateAddressSuccessURL, used to redirect user when an address is successfully updated.
protected  boolean validateCreditCard(java.util.HashMap card, java.util.ResourceBundle bundle)
          Validate the credit card number entered and the expiration date (must be later than today).
 
Methods inherited from class atg.commerce.profile.CommerceProfileFormHandler
addProperty, copyProperty, formatUserMessage, getAddCostCenterDescription, getAddCostCenterErrorURL, getAddCostCenterIdentifier, getAddCostCenterSuccessURL, getCatalogTools, getDefaultLocale, getEditCostCenterDescription, getEditCostCenterErrorURL, getEditCostCenterIdentifier, getEditCostCenterSuccessURL, getOrderManager, getPriceListManager, getPricingTools, getPromotionTools, getRemoveCostCenterErrorURL, getRemoveCostCenterIdentifier, getRemoveCostCenterSuccessURL, getShoppingCart, getUserLocale, getUserPricingModels, handleAddCostCenter, handleEditCostCenter, handleRemoveCostCenter, isDefaultCostCenter, isDetermineCatalog, isDeterminePriceList, postLoginUser, processException, setAddCostCenterDescription, setAddCostCenterErrorURL, setAddCostCenterIdentifier, setAddCostCenterSuccessURL, setCatalogTools, setDefaultCostCenter, setDefaultLocale, setDetermineCatalog, setDeterminePriceList, setEditCostCenterDescription, setEditCostCenterErrorURL, setEditCostCenterIdentifier, setEditCostCenterSuccessURL, setOrderManager, setPriceListManager, setPricingTools, setPromotionTools, setRemoveCostCenterErrorURL, setRemoveCostCenterIdentifier, setRemoveCostCenterSuccessURL, setShoppingCart, setUserPricingModels
 
Methods inherited from class atg.scenario.userprofiling.ScenarioProfileFormHandler
addScenarioInstances, addSlotInstances, getScenarioManager, handleCreate, handleDelete, handleLogin, handleLogout, handleUpdate, isOverrideFormHandlerRedirect, setOverrideFormHandlerRedirect, setScenarioManager
 
Methods inherited from class atg.userprofiling.ProfileFormHandler
addProfileUpdateListener, checkFormError, createProfileItem, getClearValuesOnCreate, getClearValuesOnLogin, getClearValuesOnUpdate, getExpiredPasswordService, getProfile, getProfileUpdateEvent, getProfileUpdateTrigger, getRepositoryId, getRequestLocale, getTestPassword, getUpdateRepositoryId, getVerifyPasswordSuccessURL, handleCancel, handleClear, handleVerifyPassword, isCreateNewUser, isGenerateProfileUpdateEvents, isSendCookie, postLogoutUser, postUpdateUser, preLoginUser, preLogoutUser, preUpdateUser, propagateLocale, removeProfileUpdateListener, sendProfileUpdateEvent, setClearValuesOnCreate, setClearValuesOnLogin, setClearValuesOnUpdate, setCreateNewUser, setExpiredPasswordService, setGenerateProfileUpdateEvents, setProfile, setProfileUpdateEvent, setProfileUpdateTrigger, setRepositoryId, setRequestLocale, setTestPassword, setUpdateRepositoryId, setVerifyPasswordSuccessURL, shouldCreateNewUser
 
Methods inherited from class atg.userprofiling.ProfileForm
addMulti, addPropertiesOnLogin, addSwapEventListener, addUser, changePassword, checkFormSuccess, checkForRequiredParameters, checkForRequiredProperties, checkForRequiredProperties, commitTransaction, copyPropertiesOnLogin, copyPropertyValue, createUser, doStartService, ensureTransaction, findUser, findUser, formatUserMessage, formatUserMessage, formatUserMessage, formatUserMessage, generatePropertyPath, getAddMultiPropertyName, getAddMultiPropertyValue, getBadPasswordDelay, getChangePasswordErrorURL, getChangePasswordSuccessURL, getCheckForRequiredParameters, getCheckForRequiredProperties, getCheckForRequiredPropertiesAfterUpdate, getCreateErrorURL, getCreateProfileType, getCreateSuccessURL, getDeleteErrorURL, getDeleteSuccessURL, getDescriptor, getExpireSessionOnLogout, getLoginErrorURL, getLoginProfileType, getLoginSuccessURL, getLogoutErrorURL, getLogoutProfileType, getLogoutSuccessURL, getProcessPropertyNames, getProfileItem, getProfileTools, getPropertiesToAddOnLogin, getPropertiesToCopyOnLogin, getStringValueProperty, getTransactionDemarcation, getTransactionManager, getTrimProperties, getUpdateErrorURL, getUpdateSuccessURL, getUserLocale, getUserLoginManager, getValue, getValueFromArrayString, getValueFromObject, getValueFromObjectArray, getValueFromString, getValueFromStringArray, getValueMap, getValueProperty, handleAddMulti, handleChangePassword, handleValueDictionaryByParameters, isCompareValueInCopyPropertiesOnLogin, isConfirmOldPassword, isConfirmPassword, isExtractDefaultValuesFromProfile, isInvalidateAllChildSessions, isTrimProperty, isUsingLdapProfile, postAddMulti, postChangePassword, postDeleteUser, postValueDictionaryByParameters, preAddMulti, preChangePassword, preDeleteUser, preValueDictionaryByParameters, removeSwapEventListener, removeUser, sendProfileSwapEvent, setBadPasswordDelay, setChangePasswordErrorURL, setChangePasswordSuccessURL, setCheckForRequiredParameters, setCheckForRequiredProperties, setCheckForRequiredPropertiesAfterUpdate, setCompareValueInCopyPropertiesOnLogin, setConfirmOldPassword, setConfirmPassword, setCreateErrorURL, setCreateProfileType, setCreateSuccessURL, setDeleteErrorURL, setDeleteSuccessURL, setExpireSessionOnLogout, setExtractDefaultValuesFromProfile, setInvalidateAllChildSessions, setLoginErrorURL, setLoginProfileType, setLoginSuccessURL, setLogoutErrorURL, setLogoutProfileType, setLogoutSuccessURL, setProfileTools, setPropertiesToAddOnLogin, setPropertiesToCopyOnLogin, setTrimProperties, setUpdateErrorURL, setUpdateSuccessURL, setUserLoginManager, setUsingLdapProfile, setValueDictionaryByParameters, setValueProperty, updateLDAPProfileAttributes, updatePasswordValue, updateProfileAttributes, updateProfileAttributes, updateUser, updateUser, userAlreadyExists, valueIsEmpty
 
Methods inherited from class atg.droplet.GenericFormHandler
addFormException, addUncheckedFormException, afterSet, beforeSet, checkFormRedirect, createFormSubmissionMessage, getCancelURL, getCheckForValidSession, getFormError, getFormExceptions, getFormName, getMessagePort, getMessageSource, getMessageType, getPropertyExceptions, getSendMessages, getUncheckedFormExceptions, handleFormException, handleUncheckedFormException, hasUncheckedFormExceptions, isDeferForwardsAndRedirects, isRestorableForm, isUseForwards, isValidSession, redirectOrForward, resetFormExceptions, setCancelURL, setCheckForValidSession, setDeferForwardsAndRedirects, setFormName, setMessagePort, setMessageSource, setMessageType, setRestorableForm, setSendMessages, setUseForwards
 
Methods inherited from class atg.droplet.EmptyFormHandler
afterGet, beforeGet
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values

RESOURCE_BUNDLE

public static java.lang.String RESOURCE_BUNDLE
Constructor Detail

B2CProfileFormHandler

public B2CProfileFormHandler()
Constructs an instanceof B2CProfileFormHandler

Method Detail

getEditValue

public java.util.Map getEditValue()
Returns:
The value of the property EditValue. This is a map that stores the pending values for an editing operations on the B2CStore profile

setShipToBillingAddress

public void setShipToBillingAddress(boolean pShipToBillingAddress)
Sets property shipToBillingAddress, indicating that the billing address should be copied to the shipping address.


isShipToBillingAddress

public boolean isShipToBillingAddress()
Returns property shipToBillingAddress, indicating that the billing address should be copied to the shipping address.


setDefaultCreditCardID

public void setDefaultCreditCardID(java.lang.String pID)
Parameters:
pID - The credit card ID to be used as the default credit card

getDefaultCreditCardID

public java.lang.String getDefaultCreditCardID()

setDefaultCarrier

public void setDefaultCarrier(java.lang.String pShipper)

getDefaultCarrier

public java.lang.String getDefaultCarrier()

setAddressProperties

public void setAddressProperties(java.lang.String[] pAddressProperties)
Sets property addressProperties, naming the properties in a secondary address record.


getAddressProperties

public java.lang.String[] getAddressProperties()
Returns property addressProperties, naming the properties in a secondary address record.


setCompatibilityMode

public void setCompatibilityMode(boolean pCompatibilityMode)
Sets the compatibility Mode property. This property is used by the various initialize methods to determine whether the list of properties should be populated from the property arrays or whether the properties should be initialized from the property manager. By default this is set to false which uses the property manager properties.

Parameters:
pCompatibilityMode - - true will cause the behavior to be identical to previous versions (pre 5.5), false is the new behavior. Defaults is false.

isCompatibilityMode

public boolean isCompatibilityMode()
Return the value of the CompatibilityMode property.


setAddressPropertyList

public void setAddressPropertyList(java.util.List pAddressPropertyList)
Sets the Address property list, which is a list that mirrors the original design of the AddressProperties property with the property names defined in a configuration file. This List will be created by the initializeAddressPropertyList method creating the appropriate list containing the values from the property manager.

Parameters:
the - Address property list that needs to be set.

getAddressPropertyList

public java.util.List getAddressPropertyList()
If the address property list is null, the initializeAddressPropertyList method is called to create a list from the appropriate property manager class.

Returns:
a List that contains the Address properties that are available

initializeAddressPropertyList

public java.util.List initializeAddressPropertyList()
This method initializes the list of properties that are used for the Address information. It consults the compatibilityMode property to determine whether the old style of defining the property names are used true or whether the property manager should be used false. This is the method that should be overriden if new properties are added to the list of Address properties. The easiest way to add new properties is to do the following: List newList = super.initializeAddressPropertyList(); newList.add("yourownproperty");


setRequiredAddressProperties

public void setRequiredAddressProperties(java.lang.String[] pRequiredAddressProperties)
Sets property requiredAddressProperties, naming the properties considered mandatory when creating a secondary address record.


getRequiredAddressProperties

public java.lang.String[] getRequiredAddressProperties()
Returns property requiredAddressProperties, naming the properties considered mandatory when creating a secondary address record.


setCardProperties

public void setCardProperties(java.lang.String[] pCardProperties)
Sets property cardProperties, naming the properties in a credit card entry.


getCardProperties

public java.lang.String[] getCardProperties()
Returns property cardProperties, naming the properties in a credit card entry.


setCardPropertyList

public void setCardPropertyList(java.util.List pCardPropertyList)
Sets the Card property list, which is a list that mirrors the original design of the AddressProperties property with the proeprty names defined in a configuration file. This List List will be created by the initializeCardPropertyList method creating the appropriate list containing the values from the property manager.

Parameters:
the - CardPropertyList list that needs to be set.

getCardPropertyList

public java.util.List getCardPropertyList()
If the CardPropertyList is null, the initializeCardPropertyList method is called to create a list from the appropriate property manager class.

Returns:
a List that contains the Credit card properties that are available.

initializeCardPropertyList

public java.util.List initializeCardPropertyList()
This method initializes the list of properties that are used for the Credit card information. It consults the compatibilityMode property to determine whether the old style of defining the property names are used true or whether the property manager should be used false. This is the method that should be overriden if new properties are added to the list of Credit card properties. The easiest way to add new properties is to do the following: List newList = super.initializeCardPropertyList(); newList.add("yourownproperty");


setEditAddress

public void setEditAddress(java.lang.String pEditAddress)
Sets property editAddress, naming the address to be edited in the edit_secondary_address.jhtml page.


getEditAddress

public java.lang.String getEditAddress()
Returns property editAddress, naming the address to be edited in the edit_secondary_address.jhtml page.


setRemoveAddress

public void setRemoveAddress(java.lang.String pRemoveAddress)
Sets property removeAddress, naming the address to be removed by handleRemoveAddress().


getRemoveAddress

public java.lang.String getRemoveAddress()
Returns property removeAddress, naming the address to be removed by handleRemoveAddress().


setRemoveCard

public void setRemoveCard(java.lang.String pRemoveCard)
Sets property removeCard, naming the address to be removed by handleRemoveCard().


getRemoveCard

public java.lang.String getRemoveCard()
Returns property removeCard, naming the address to be removed by handleRemoveCard().


setNewAddressSuccessURL

public void setNewAddressSuccessURL(java.lang.String pNewAddressSuccessURL)
Sets property newAddressSuccessURL, used to redirect user after successfully creating an address.


getNewAddressSuccessURL

public java.lang.String getNewAddressSuccessURL()
Returns property newAddressSuccessURL, used to redirect user after successfully creating an address.


setNewAddressErrorURL

public void setNewAddressErrorURL(java.lang.String pNewAddressErrorURL)
Sets property newAddressErrorURL, used to redirect user in case of an error creating an address.


getNewAddressErrorURL

public java.lang.String getNewAddressErrorURL()
Returns property newAddressErrorURL, used to redirect user in case of an error creating an address.


setUpdateAddressSuccessURL

public void setUpdateAddressSuccessURL(java.lang.String pUpdateAddressSuccessURL)
Sets property updateAddressSuccessURL, used to redirect user when an address is successfully updated.


getUpdateAddressSuccessURL

public java.lang.String getUpdateAddressSuccessURL()
Returns property updateAddressSuccessURL, used to redirect user when an address is successfully updated.


setUpdateAddressErrorURL

public void setUpdateAddressErrorURL(java.lang.String pUpdateAddressErrorURL)
Sets property updateAddressErrorURL, used to redirect user in case of an error updating an address.


getUpdateAddressErrorURL

public java.lang.String getUpdateAddressErrorURL()
Returns property updateAddressErrorURL, used to redirect user in case of an error updating an address.


setChangeAddressNicknameSuccessURL

public void setChangeAddressNicknameSuccessURL(java.lang.String pChangeAddressNicknameSuccessURL)
Sets property changeAddressNicknameSuccessURL, used to redirect user when an address nickname is successfully updated.


getChangeAddressNicknameSuccessURL

public java.lang.String getChangeAddressNicknameSuccessURL()
Returns property changeAddressNicknameSuccessURL, used to redirect user when an address nickname is successfully updated.


setChangeAddressNicknameErrorURL

public void setChangeAddressNicknameErrorURL(java.lang.String pChangeAddressNicknameErrorURL)
Sets property changeAddressNicknameErrorURL, used to redirect user in case of an error updating an address nickname.


getChangeAddressNicknameErrorURL

public java.lang.String getChangeAddressNicknameErrorURL()
Returns property changeAddressNicknameErrorURL, used to redirect user in case of an error updating an address nickname.


setCreateCardSuccessURL

public void setCreateCardSuccessURL(java.lang.String pCreateCardSuccessURL)
Sets property createCardSuccessURL, used to redirect user if a new credit card was successfully added.


getCreateCardSuccessURL

public java.lang.String getCreateCardSuccessURL()
Returns property createCardSuccessURL, used to redirect user if a new credit card was successfully added.


setCreateCardErrorURL

public void setCreateCardErrorURL(java.lang.String pCreateCardErrorURL)
Sets property createCardErrorURL, used to redirect user in case of an error adding a new credit card.


getCreateCardErrorURL

public java.lang.String getCreateCardErrorURL()
Returns property createCardErrorURL, used to redirect user in case of an error adding a new credit card.


setRemoveCardSuccessURL

public void setRemoveCardSuccessURL(java.lang.String pRemoveCardSuccessURL)
Sets property removeCardSuccessURL, used to redirect user when a credit card is successfully removed.


getRemoveCardSuccessURL

public java.lang.String getRemoveCardSuccessURL()
Returns property removeCardSuccessURL, used to redirect user in a credit card is successfully removed.


setRemoveCardErrorURL

public void setRemoveCardErrorURL(java.lang.String pRemoveCardErrorURL)
Sets property removeCardErrorURL, used to redirect user in case of an error removing a credit card.


getRemoveCardErrorURL

public java.lang.String getRemoveCardErrorURL()
Returns property removeCardErrorURL, used to redirect user in case of an error removing a credit card.


preCreateUser

protected void preCreateUser(DynamoHttpServletRequest pRequest,
                             DynamoHttpServletResponse pResponse)
                      throws javax.servlet.ServletException,
                             java.io.IOException
Before creating the user, this method:
  1. Copies the first, middle, and last names to the billing address.

    Overrides:
    preCreateUser in class ProfileForm
    Parameters:
    pRequest - the servlet's request
    pResponse - the servlet's response
    Throws:
    javax.servlet.ServletException - if there was an error while executing the code
    java.io.IOException - if there was an error with servlet io

postCreateUser

protected void postCreateUser(DynamoHttpServletRequest pRequest,
                              DynamoHttpServletResponse pResponse)
                       throws javax.servlet.ServletException,
                              java.io.IOException
Set the registration date to 'now'. If the user has asked to use the same address for shipping and billing, make it so.

Overrides:
postCreateUser in class CommerceProfileFormHandler
Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

handleNewAddress

public boolean handleNewAddress(DynamoHttpServletRequest pRequest,
                                DynamoHttpServletResponse pResponse)
                         throws javax.servlet.ServletException,
                                java.io.IOException
Creates a new shipping address using the entries entered in the editValue map by the new_shipping_address.jhtml page. The address will be indexed using the nickname provided by the user.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

handleEditAddress

public boolean handleEditAddress(DynamoHttpServletRequest pRequest,
                                 DynamoHttpServletResponse pResponse)
                          throws javax.servlet.ServletException,
                                 java.io.IOException
Copy the named seconary address into the editValue map, allowing the user to edit them in the edit_secondary_address.jhtml page.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

handleUpdateAddress

public boolean handleUpdateAddress(DynamoHttpServletRequest pRequest,
                                   DynamoHttpServletResponse pResponse)
                            throws RepositoryException,
                                   javax.servlet.ServletException,
                                   java.io.IOException
Update the secondary address as modified by the user.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io
RepositoryException

handleUpdateAddressAndMakeDefault

public boolean handleUpdateAddressAndMakeDefault(DynamoHttpServletRequest pRequest,
                                                 DynamoHttpServletResponse pResponse)
                                          throws RepositoryException,
                                                 javax.servlet.ServletException,
                                                 java.io.IOException
Update the secondary address as modified by the user, and copy its contents to the default shipping address.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io
RepositoryException

handleChangeAddressNickname

public boolean handleChangeAddressNickname(DynamoHttpServletRequest pRequest,
                                           DynamoHttpServletResponse pResponse)
                                    throws javax.servlet.ServletException,
                                           java.io.IOException
Changes the key in the secondaryAddresses map for the given address.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

handleRemoveAddress

public boolean handleRemoveAddress(DynamoHttpServletRequest pRequest,
                                   DynamoHttpServletResponse pResponse)
                            throws javax.servlet.ServletException,
                                   java.io.IOException
This handler deletes a secondary address named in the removeAddress property. A hyperlink in the address_book.jhtml page both sets the property and invokes the handler.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

handleSelectDefaultAddress

public boolean handleSelectDefaultAddress(DynamoHttpServletRequest pRequest,
                                          DynamoHttpServletResponse pResponse)
                                   throws javax.servlet.ServletException,
                                          java.io.IOException
Copy the contents of a secondary address (identified in the editValue map by the entry defaultAddressNickname) to the default shipping address.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

handleSetExpressCheckout

public boolean handleSetExpressCheckout(DynamoHttpServletRequest pRequest,
                                        DynamoHttpServletResponse pResponse)
                                 throws javax.servlet.ServletException,
                                        java.io.IOException
Enable or disable express checkout If disabling, clear the default credit card in the user's profile so that that credit card may be safely deleted. Note that if you are enabling express checkout, the user must have a valid credit card selected for defaultCreditCard, a valid shipping method selected, and a valid shipping address. Therefore, it's better to use handleSetExpressCheckout() to enable express checkout instead of this method, since the former will set these values and ensure express checkout is enabled at the same time. This handler should now be used only to disable express checkout.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

handleSetExpressCheckoutPreferences

public boolean handleSetExpressCheckoutPreferences(DynamoHttpServletRequest pRequest,
                                                   DynamoHttpServletResponse pResponse)
                                            throws javax.servlet.ServletException,
                                                   java.io.IOException
Set values used for express checkout

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

makeCreditCardDefault

protected boolean makeCreditCardDefault(Profile pProfile,
                                        java.lang.String pCreditCardID)
Make the credit card identified by pCreditCardID default in the given profile.

Parameters:
pProfile - The Profile object
pCreditCardID - The ID of the credit card to be default pje

handleCreateNewCreditCard

public boolean handleCreateNewCreditCard(DynamoHttpServletRequest pRequest,
                                         DynamoHttpServletResponse pResponse)
                                  throws javax.servlet.ServletException,
                                         java.io.IOException
Creates a new credit card using the entries entered in the editValue map by the credit_card.jhtml page

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

validateCreditCard

protected boolean validateCreditCard(java.util.HashMap card,
                                     java.util.ResourceBundle bundle)
Validate the credit card number entered and the expiration date (must be later than today).

Parameters:
card - A hashmap containing the user-entered credit card data
bundle - A ResourceBundle providing the error message text
Returns:
true if the credit card is valid

handleRemoveCard

public boolean handleRemoveCard(DynamoHttpServletRequest pRequest,
                                DynamoHttpServletResponse pResponse)
                         throws javax.servlet.ServletException,
                                java.io.IOException
Delete a specified credit card for the current user.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io