com.ibm.commerce.inventory.commands
Class CreateStoreAddressCmdImpl
java.lang.Object
CacheableCommandImpl
com.ibm.commerce.command.AbstractECTargetableCommand
com.ibm.commerce.command.TaskCommandImpl
com.ibm.commerce.inventory.commands.CreateStoreAddressCmdImpl
- All Implemented Interfaces:
- CreateStoreAddressCmd, ECCommand, ECTargetableCommand, TaskCommand
- public class CreateStoreAddressCmdImpl
- extends TaskCommandImpl
- implements CreateStoreAddressCmd
Default implementation of the CreateStoreAddressCmd interface. Creates the fulfillment or vendor address.
Requires to have the store id set in the command context. Uses StoreAddressAccessBean.
- See Also:
- Serialized Form
Field Summary |
static java.lang.String |
COPYRIGHT
The internal copyright field. |
Method Summary |
java.lang.String |
getAddress1()
Return vendor address line 1. |
java.lang.String |
getAddress2()
Return vendor address line 2. |
java.lang.String |
getAddress3()
Return vendor address line 3. |
java.lang.String |
getBusinessTitle()
Return the vendor business title. |
java.lang.String |
getCity()
Return the city within this address. |
java.lang.String |
getCountry()
Return the country or region within this address. |
java.lang.String |
getEmail1()
Return the primary e-mail address. |
java.lang.String |
getEmail2()
Return the secondary e-mail address. |
java.lang.String |
getFax1()
Return the primary fax number. |
java.lang.String |
getFax2()
Return the secondary fax number. |
java.lang.String |
getField1()
Return the value of field1. |
java.lang.String |
getField2()
Return the value of field2. |
java.lang.String |
getField3()
Return the value of field3. |
java.lang.String |
getFirstName()
Return the first name for the contact person. |
java.lang.String |
getLastName()
Return the last name for the contact person. |
java.lang.String |
getMemberId()
Return owner identifier. |
java.lang.String |
getMiddleName()
Return the middle name for the contact person. |
java.lang.String |
getNickname()
Return the nickname for the address. |
java.lang.String |
getPersonTitle()
Return the business title for the contact person. |
java.lang.String |
getPhone1()
Return the primary phone number. |
java.lang.String |
getPhone2()
Return the secondary phone number. |
java.lang.String |
getShippingGeoCode()
Return the shipping geographic code. |
java.lang.String |
getState()
Return the state within this address. |
java.lang.String |
getStoreAddressId()
Return the store address identifier. |
java.lang.String |
getTaxGeoCode()
Return the tax geographic code. |
java.lang.String |
getZipCode()
Return the ZIP code within this address. |
protected void |
handleException(java.lang.Exception e, java.lang.String methodName)
Formats an ECException based on the input exception value. |
void |
performExecute()
Performs the execution of creating the address. |
void |
setAddress1(java.lang.String newAddress1)
Set vendor address line 1. |
void |
setAddress2(java.lang.String newAddress2)
Set vendor address line 2. |
void |
setAddress3(java.lang.String newAddress3)
Set vendor address line 3. |
void |
setBusinessTitle(java.lang.String newBusinessTitle)
Set the business title. |
void |
setCity(java.lang.String newCity)
Set the city within this address. |
void |
setCountry(java.lang.String newCountry)
Set the country or region within this address. |
void |
setEmail1(java.lang.String newEmail1)
Set the primary e-mail address. |
void |
setEmail2(java.lang.String newEmail2)
Set the secondary e-mail address. |
void |
setFax1(java.lang.String newFax1)
Set the primary fax number. |
void |
setFax2(java.lang.String newFax2)
Set the secondary fax number. |
void |
setField1(java.lang.String newField1)
Set the value of field1. |
void |
setField2(java.lang.String newField2)
Set the value of field2. |
void |
setField3(java.lang.String newField3)
Set the value of field3. |
void |
setFirstName(java.lang.String newFirstName)
Set the first name for the contact person. |
void |
setLastName(java.lang.String newLastName)
Set the last name for the contact person. |
void |
setMemberId(java.lang.String newMemberId)
Set the owner identifier. |
void |
setMiddleName(java.lang.String newMiddleName)
Set the middle name for the contact person. |
void |
setNickname(java.lang.String newNickname)
Set the nickname for the address. |
void |
setPersonTitle(java.lang.String newPersonTitle)
Set the business title for the contact person. |
void |
setPhone1(java.lang.String newPhone1)
Set the primary phone number. |
void |
setPhone2(java.lang.String newPhone2)
Set the secondary phone number. |
void |
setRequestProperties(TypedProperty reqParms)
Sets request properties. |
void |
setShippingGeoCode(java.lang.String newShippingGeoCode)
Set the shipping geographic code. |
void |
setState(java.lang.String newState)
Set the state within this address. |
void |
setStoreAddressId(java.lang.String newStoreAddressId)
Sets the store address identifier. |
void |
setTaxGeoCode(java.lang.String newTaxGeoCode)
Set the tax geographic code. |
void |
setZipCode(java.lang.String newZipCode)
Set the ZIP code within this address. |
void |
validateParameters()
Checks the information of address to be created. |
Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand |
accessControlCheck, checkIsAllowed, checkParameters, checkResourcePermission, createCommandExecutionEvent, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COPYRIGHT
public static final java.lang.String COPYRIGHT
- The internal copyright field.
- See Also:
- Constant Field Values
CreateStoreAddressCmdImpl
public CreateStoreAddressCmdImpl()
getAddress1
public java.lang.String getAddress1()
- Return vendor address line 1.
-
- Returns:
- Vendor address line 1.
getAddress2
public java.lang.String getAddress2()
- Return vendor address line 2.
-
- Returns:
- Vendor address line 2.
getAddress3
public java.lang.String getAddress3()
- Return vendor address line 3.
-
- Returns:
- Vendor address line 3.
getBusinessTitle
public java.lang.String getBusinessTitle()
- Return the vendor business title.
-
- Returns:
- Vendor business title.
getCity
public java.lang.String getCity()
- Return the city within this address.
-
- Returns:
- Vendor city.
getCountry
public java.lang.String getCountry()
- Return the country or region within this address.
-
- Returns:
- Vendor Country or region.
getEmail1
public java.lang.String getEmail1()
- Return the primary e-mail address.
-
- Returns:
- The e-mail address.
getEmail2
public java.lang.String getEmail2()
- Return the secondary e-mail address.
-
- Returns:
- The secondary e-mail address.
getFax1
public java.lang.String getFax1()
- Return the primary fax number.
-
- Returns:
- Fax number.
getFax2
public java.lang.String getFax2()
- Return the secondary fax number.
-
- Returns:
- Fax number.
getField1
public java.lang.String getField1()
- Return the value of field1.
-
- Returns:
- Field 1.
getField2
public java.lang.String getField2()
- Return the value of field2.
-
- Returns:
- Field 2.
getField3
public java.lang.String getField3()
- Return the value of field3.
-
- Returns:
- Field 3.
getFirstName
public java.lang.String getFirstName()
- Return the first name for the contact person.
-
- Returns:
- Given name.
getLastName
public java.lang.String getLastName()
- Return the last name for the contact person.
-
- Returns:
- Surname.
getMemberId
public java.lang.String getMemberId()
- Return owner identifier.
-
- Returns:
- Owner id.
getMiddleName
public java.lang.String getMiddleName()
- Return the middle name for the contact person.
-
- Returns:
- Middle name.
getNickname
public java.lang.String getNickname()
- Return the nickname for the address.
-
- Returns:
- Address nickname.
getPersonTitle
public java.lang.String getPersonTitle()
- Return the business title for the contact person.
-
- Returns:
- Contact business title.
getPhone1
public java.lang.String getPhone1()
- Return the primary phone number.
-
- Returns:
- Phone number.
getPhone2
public java.lang.String getPhone2()
- Return the secondary phone number.
-
- Returns:
- Phone number.
getShippingGeoCode
public java.lang.String getShippingGeoCode()
- Return the shipping geographic code.
-
- Returns:
- Geographic code.
getState
public java.lang.String getState()
- Return the state within this address.
-
- Returns:
- State.
getStoreAddressId
public java.lang.String getStoreAddressId()
- Return the store address identifier.
-
- Specified by:
- getStoreAddressId in interface CreateStoreAddressCmd
-
- Returns:
- Address id.
getTaxGeoCode
public java.lang.String getTaxGeoCode()
- Return the tax geographic code.
-
- Returns:
- Geographic code.
getZipCode
public java.lang.String getZipCode()
- Return the ZIP code within this address.
-
- Returns:
- Postal code.
setAddress1
public void setAddress1(java.lang.String newAddress1)
- Description copied from interface: CreateStoreAddressCmd
- Set vendor address line 1.
-
- Specified by:
- setAddress1 in interface CreateStoreAddressCmd
-
- Parameters:
- newAddress1 - vendor address line 1
- See Also:
- CreateStoreAddressCmd.setAddress1(java.lang.String)
setAddress2
public void setAddress2(java.lang.String newAddress2)
- Description copied from interface: CreateStoreAddressCmd
- Set vendor address line 2.
-
- Specified by:
- setAddress2 in interface CreateStoreAddressCmd
-
- Parameters:
- newAddress2 - vendor address line 2
- See Also:
- CreateStoreAddressCmd.setAddress2(java.lang.String)
setAddress3
public void setAddress3(java.lang.String newAddress3)
- Description copied from interface: CreateStoreAddressCmd
- Set vendor address line 3.
-
- Specified by:
- setAddress3 in interface CreateStoreAddressCmd
-
- Parameters:
- newAddress3 - vendor address line 3
- See Also:
- CreateStoreAddressCmd.setAddress3(java.lang.String)
setBusinessTitle
public void setBusinessTitle(java.lang.String newBusinessTitle)
- Description copied from interface: CreateStoreAddressCmd
- Set the business title.
-
- Specified by:
- setBusinessTitle in interface CreateStoreAddressCmd
-
- Parameters:
- newBusinessTitle - business title
- See Also:
- CreateStoreAddressCmd.setBusinessTitle(java.lang.String)
setCity
public void setCity(java.lang.String newCity)
- Description copied from interface: CreateStoreAddressCmd
- Set the city within this address.
-
- Specified by:
- setCity in interface CreateStoreAddressCmd
-
- Parameters:
- newCity - city
- See Also:
- CreateStoreAddressCmd.setCity(java.lang.String)
setCountry
public void setCountry(java.lang.String newCountry)
- Description copied from interface: CreateStoreAddressCmd
- Set the country or region within this address.
-
- Specified by:
- setCountry in interface CreateStoreAddressCmd
-
- Parameters:
- newCountry - country or region
- See Also:
- CreateStoreAddressCmd.setCountry(java.lang.String)
setEmail1
public void setEmail1(java.lang.String newEmail1)
- Description copied from interface: CreateStoreAddressCmd
- Set the primary e-mail address.
-
- Specified by:
- setEmail1 in interface CreateStoreAddressCmd
-
- Parameters:
- newEmail1 - e-mail
- See Also:
- CreateStoreAddressCmd.setEmail1(java.lang.String)
setEmail2
public void setEmail2(java.lang.String newEmail2)
- Description copied from interface: CreateStoreAddressCmd
- Set the secondary e-mail address.
-
- Specified by:
- setEmail2 in interface CreateStoreAddressCmd
-
- Parameters:
- newEmail2 - e-mail
- See Also:
- CreateStoreAddressCmd.setEmail2(java.lang.String)
setFax1
public void setFax1(java.lang.String newFax1)
- Description copied from interface: CreateStoreAddressCmd
- Set the primary fax number.
-
- Specified by:
- setFax1 in interface CreateStoreAddressCmd
-
- Parameters:
- newFax1 - fax number
- See Also:
- CreateStoreAddressCmd.setFax1(java.lang.String)
setFax2
public void setFax2(java.lang.String newFax2)
- Description copied from interface: CreateStoreAddressCmd
- Set the secondary fax number.
-
- Specified by:
- setFax2 in interface CreateStoreAddressCmd
-
- Parameters:
- newFax2 - fax number
- See Also:
- CreateStoreAddressCmd.setFax2(java.lang.String)
setField1
public void setField1(java.lang.String newField1)
- Description copied from interface: CreateStoreAddressCmd
- Set the value of field1.
-
- Specified by:
- setField1 in interface CreateStoreAddressCmd
-
- Parameters:
- newField1 - field1
- See Also:
- CreateStoreAddressCmd.setField1(java.lang.String)
setField2
public void setField2(java.lang.String newField2)
- Description copied from interface: CreateStoreAddressCmd
- Set the value of field2.
-
- Specified by:
- setField2 in interface CreateStoreAddressCmd
-
- Parameters:
- newField2 - field2
- See Also:
- CreateStoreAddressCmd.setField2(java.lang.String)
setField3
public void setField3(java.lang.String newField3)
- Description copied from interface: CreateStoreAddressCmd
- Set the value of field3.
-
- Specified by:
- setField3 in interface CreateStoreAddressCmd
-
- Parameters:
- newField3 - field3
- See Also:
- CreateStoreAddressCmd.setField3(java.lang.String)
setFirstName
public void setFirstName(java.lang.String newFirstName)
- Description copied from interface: CreateStoreAddressCmd
- Set the first name for the contact person.
-
- Specified by:
- setFirstName in interface CreateStoreAddressCmd
-
- Parameters:
- newFirstName - given name
- See Also:
- CreateStoreAddressCmd.setFirstName(java.lang.String)
setLastName
public void setLastName(java.lang.String newLastName)
- Description copied from interface: CreateStoreAddressCmd
- Set the last name for the contact person.
-
- Specified by:
- setLastName in interface CreateStoreAddressCmd
-
- Parameters:
- newLastName - surname
- See Also:
- CreateStoreAddressCmd.setLastName(java.lang.String)
setMemberId
public void setMemberId(java.lang.String newMemberId)
- Description copied from interface: CreateStoreAddressCmd
- Set the owner identifier.
-
- Specified by:
- setMemberId in interface CreateStoreAddressCmd
-
- Parameters:
- newMemberId - owner id
- See Also:
- CreateStoreAddressCmd.setMemberId(java.lang.String)
setMiddleName
public void setMiddleName(java.lang.String newMiddleName)
- Description copied from interface: CreateStoreAddressCmd
- Set the middle name for the contact person.
-
- Specified by:
- setMiddleName in interface CreateStoreAddressCmd
-
- Parameters:
- newMiddleName - middle name or initial
- See Also:
- CreateStoreAddressCmd.setMiddleName(java.lang.String)
setNickname
public void setNickname(java.lang.String newNickname)
- Description copied from interface: CreateStoreAddressCmd
- Set the nickname for the address.
-
- Specified by:
- setNickname in interface CreateStoreAddressCmd
-
- Parameters:
- newNickname - address nickname
- See Also:
- CreateStoreAddressCmd.setNickname(java.lang.String)
setPersonTitle
public void setPersonTitle(java.lang.String newPersonTitle)
- Description copied from interface: CreateStoreAddressCmd
- Set the business title for the contact person.
-
- Specified by:
- setPersonTitle in interface CreateStoreAddressCmd
-
- Parameters:
- newPersonTitle - business title
- See Also:
- CreateStoreAddressCmd.setPersonTitle(java.lang.String)
setPhone1
public void setPhone1(java.lang.String newPhone1)
- Description copied from interface: CreateStoreAddressCmd
- Set the primary phone number.
-
- Specified by:
- setPhone1 in interface CreateStoreAddressCmd
-
- Parameters:
- newPhone1 - phone number
- See Also:
- CreateStoreAddressCmd.setPhone1(java.lang.String)
setPhone2
public void setPhone2(java.lang.String newPhone2)
- Description copied from interface: CreateStoreAddressCmd
- Set the secondary phone number.
-
- Specified by:
- setPhone2 in interface CreateStoreAddressCmd
-
- Parameters:
- newPhone2 - phone number
- See Also:
- CreateStoreAddressCmd.setPhone2(java.lang.String)
setShippingGeoCode
public void setShippingGeoCode(java.lang.String newShippingGeoCode)
- Description copied from interface: CreateStoreAddressCmd
- Set the shipping geographic code.
-
- Specified by:
- setShippingGeoCode in interface CreateStoreAddressCmd
-
- Parameters:
- newShippingGeoCode - geographic code
- See Also:
- CreateStoreAddressCmd.setShippingGeoCode(java.lang.String)
setState
public void setState(java.lang.String newState)
- Description copied from interface: CreateStoreAddressCmd
- Set the state within this address.
-
- Specified by:
- setState in interface CreateStoreAddressCmd
-
- Parameters:
- newState - state
- See Also:
- CreateStoreAddressCmd.setState(java.lang.String)
setStoreAddressId
public void setStoreAddressId(java.lang.String newStoreAddressId)
- Sets the store address identifier.
-
- Parameters:
- newStoreAddressId - store address
setTaxGeoCode
public void setTaxGeoCode(java.lang.String newTaxGeoCode)
- Description copied from interface: CreateStoreAddressCmd
- Set the tax geographic code.
-
- Specified by:
- setTaxGeoCode in interface CreateStoreAddressCmd
-
- Parameters:
- newTaxGeoCode - geographic code
- See Also:
- CreateStoreAddressCmd.setTaxGeoCode(java.lang.String)
setZipCode
public void setZipCode(java.lang.String newZipCode)
- Description copied from interface: CreateStoreAddressCmd
- Set the ZIP code within this address.
-
- Specified by:
- setZipCode in interface CreateStoreAddressCmd
-
- Parameters:
- newZipCode - postal code
- See Also:
- CreateStoreAddressCmd.setZipCode(java.lang.String)
setRequestProperties
public void setRequestProperties(TypedProperty reqParms)
throws ECApplicationException
- Sets request properties. Name value pairs. Does not call individual setters, just saves local private copy.
-
- Specified by:
- setRequestProperties in interface CreateStoreAddressCmd
-
- Parameters:
- reqParms - name value pairs
- Throws:
- ECApplicationException
- See Also:
- CreateStoreAddressCmd.setRequestProperties(com.ibm.commerce.datatype.TypedProperty)
validateParameters
public void validateParameters()
throws ECException
- Checks the information of address to be created. Specifically, it checks that nickname and mendor id are present.
-
- Specified by:
- validateParameters in interface ECCommand
- Overrides:
- validateParameters in class AbstractECTargetableCommand
-
- Throws:
- ECApplicationException. - If mandatory parameters are not passed in, specify _ERR_BAD_MISSING_CMD_PARAMETER.
- ECException
performExecute
public void performExecute()
throws ECException
- Performs the execution of creating the address. Before executing, call setter methods to fill in fields.
This method sets the StoreAddressDataBean.
Uses StoreAddressAccessBean.
-
- Specified by:
- performExecute in interface ECCommand
- Overrides:
- performExecute in class AbstractECTargetableCommand
-
- Throws:
- ECException
handleException
protected void handleException(java.lang.Exception e,
java.lang.String methodName)
throws ECException
- Formats an ECException based on the input exception value.
-
- Parameters:
- e - Exception the exception instance to be formatted
- methodName - String the name of the method from which this method was called
- Throws:
- ECException - could be one of many different exceptions including:
- ECApplicationException
- ECSystemException RemoteException
- ECSystemException CreateException
- ECSystemException FinderException
- ECSystemException NamingException
Feedback
(C) Copyright IBM Corporation 1996, 2005. All Rights Reserved.