java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.TaskCommandImpl | +--com.ibm.commerce.contract.commands.CreateLightWeightStoreCmdImpl
The default implementation of CreateLightWeightStore command
Field Summary | |
---|---|
static java.lang.String |
CLASSNAME The name of this class is "com.ibm.commerce.contract.commands.CreateLightWeightStoreCmdImpl". |
static java.lang.String |
COPYRIGHT The internal copyright field. |
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.contract.commands. CreateLightWeightStoreCmd |
defaultCommandClassName,
NAME |
Fields inherited from interface com.ibm.commerce.command. ECCommand |
defaultCommandClassName |
Constructor Summary | |
---|---|
CreateLightWeightStoreCmdImpl() |
Method Summary | |
---|---|
protected
boolean |
additionalMethodAfterStoreCreation() Additional method to be called after the store creation process. |
protected
boolean |
additionalMethodBeforeStoreCreation() Additional method to be called before the store creation process. |
protected
void |
createBussinessPolicies(org.w3c.dom.NodeList bps) Creates bussiness policies. |
protected
void |
createBussinessPolicy(org.w3c.dom.Element e) Creates bussiness policy based one bussiness policy element. |
protected
void |
createInventoryAdjustmentCode(org.w3c.dom.NodeList nl) Createss the Inventory Adjustment Code and Description |
protected
void |
createProfile(org.w3c.dom.NodeList nl) Creates store profile. |
protected
void |
createScheduledCommand(org.w3c.dom.Element ele) Run the Custom Extension Command via the scheduler |
protected
void |
createShippingArrangement(org.w3c.dom.NodeList inlSA) Creates Shipping Arrangement between the Reseller store and the Manufacturer's Shared Fulfillment Center |
protected
void |
createShippingMode(org.w3c.dom.NodeList inlShippingMode) Creates Shipping Modes for the store |
protected
boolean |
createStore() Creates the distributor or reseller store based on the information in store XML string. |
protected
void |
createStoreAddressAndSetContactAndLocationAddress(java.lang.Long storeOrgMemberId,
java.lang.Integer storeId, java.lang.String storeIdentifier,
java.lang.Integer languageId, java.lang.String url) Creates two store addresses (Location and Contact) and popluates storeentdesc table Calls copyOrgAddress to create store addresses |
protected
void |
createStorePath(org.w3c.dom.NodeList pathNodeList) Creates store releationship: relationship with profile store(s) |
protected
void |
createStorePathFromStore(org.w3c.dom.NodeList pathNodeList) Creates store releationship: relationship with channel store |
protected
void |
createSupportedCurrency(org.w3c.dom.NodeList inlCurrency) Sets store supported currencies |
protected
void |
createSupportedLang(org.w3c.dom.NodeList inlLang) Sets store supported languages |
java.lang.String[] |
getBusinessPolicyName() Gets the business policy names. |
java.lang.Integer |
getChannelStoreId() Gets the channel store ID. |
java.lang.Long |
getCreatedByContractId() Gets the contract's ID that created the store. |
java.lang.Integer |
getDefaultShippingModeId() Gets the default shipping mode of the store |
boolean |
getHasMasterCatalogProfileStore() Gets the master catalog if one exists in catalog profile store. |
java.util.Vector |
getPricePolicies() Gets price policies |
java.lang.Long |
getProfileStoreCatalogId() Gets the catalog assets store's catalog ID. |
java.lang.String |
getProfileStoreCatalogName() Gets the catalog asset store's catalog name. |
java.lang.String |
getProfileStoreCatalogOwnerMemberId() Gets the catalog owner's member ID. |
boolean |
getResult() Gets if the store is successfully created |
java.lang.String |
getStore_Id() Gets the store ID. |
java.lang.Integer |
getStoreDefaultLanguageId() Gets the store default language ID. |
org.w3c.dom.Element |
getStoreElement() Gets the Store element |
java.lang.String |
getStoreIdentifier() Gets the store name (identifier) |
java.lang.String |
getStoreInitialState() Gets the store initial state. |
java.lang.String |
getStoreOwnerMemberId() Gets the store owner's member Id |
java.lang.Integer |
getStoreType() Gets the store type:. |
java.lang.String |
getStoreXML() Gets the store XML string. |
protected
org.w3c.dom.Document |
getXMLDoc(java.lang.String xmlString) Gets the XML document from the xml string |
protected
void |
parseXMLDoc(org.w3c.dom.Document XMLDoc) Parses the xml document |
void |
performExecute() Creates the store; Depends on the supplied store XML string, it also creates the store relationships, supported languages, supported currencies, business policies, profiles, shipping modes and shipping arrangements. |
protected
void |
setBusinessPolicyName(java.lang.String[] bpNames) Sets the business policy names. |
void |
setChannelStoreId(java.lang.Integer id) Sets the channel store ID. |
void |
setCreatedByContractId(java.lang.Long id) Sets the contract's ID that created the store. |
protected
void |
setDefaultShippingModeId(java.lang.Integer i) Sets the default shipping mode of the store |
protected
void |
setHasMasterCatalogProfileStore(boolean b) Sets if master catalog exists in catalog asset store. |
protected
void |
setPricePolicies(java.util.Vector v) Sets price policies |
protected
void |
setProfileStoreCatalogId(java.lang.Long id) Sets the catalog asset store's catalog ID. |
protected
void |
setProfileStoreCatalogName(java.lang.String s) Sets the catalog asset store's catalog name. |
protected
void |
setProfileStoreCatalogOwnerMemberId(java.lang.String s) Sets the catalog owner's member ID. |
protected
void |
setResult(boolean r) Sets if the store is successfully created |
protected
void |
setStore_Id(java.lang.String sid) Sets the store ID |
protected
void |
setStoreDefaultLanguageId(java.lang.Integer id) Sets the store default language ID. |
protected
void |
setStoreIdentifier(java.lang.String s) Sets the store name (identifier) |
protected
void |
setStoreInitialState(java.lang.String s) Sets the store initial state. |
protected
void |
setStoreOwnerMemberId(java.lang.String s) Sets the store owner's member Id |
void |
setStoreType(java.lang.Integer i) Sets the store type. |
void |
setStoreXML(java.lang.String s) Sets the store XML string. |
void |
validateParameters() Validates the parameters |
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 |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
public static final java.lang.String CLASSNAME
Constructor Detail |
---|
public CreateLightWeightStoreCmdImpl()
Method Detail |
---|
public org.w3c.dom.Element getStoreElement()
getStoreElement
in interface
CreateLightWeightStoreCmd
public java.util.Vector getPricePolicies()
getPricePolicies
in interface
CreateLightWeightStoreCmd
protected void setPricePolicies(java.util.Vector v)
public boolean getHasMasterCatalogProfileStore()
getHasMasterCatalogProfileStore
in interface
CreateLightWeightStoreCmd
true
found master catalog in one of the specified catalog
profile storefalse
no master catalog was found in one of the specified catalog
profile store, or there was no catalog profile store
specifiedprotected void setHasMasterCatalogProfileStore(boolean b)
public void setStoreXML(java.lang.String s)
setStoreXML
in interface
CreateLightWeightStoreCmd
s
- store XML stringpublic java.lang.String getStoreXML()
getStoreXML
in interface
CreateLightWeightStoreCmd
public java.lang.String getStoreInitialState()
getStoreInitialState
in interface
CreateLightWeightStoreCmd
protected void setStoreInitialState(java.lang.String s)
public void setChannelStoreId(java.lang.Integer id)
setChannelStoreId
in interface
CreateLightWeightStoreCmd
id
- channel store IDpublic java.lang.Integer getChannelStoreId()
getChannelStoreId
in interface
CreateLightWeightStoreCmd
public java.lang.Integer getStoreDefaultLanguageId()
getStoreDefaultLanguageId
in interface
CreateLightWeightStoreCmd
protected void setStoreDefaultLanguageId(java.lang.Integer id)
id
- store default language IDpublic void setCreatedByContractId(java.lang.Long id)
setCreatedByContractId
in interface
CreateLightWeightStoreCmd
id
- contract IDpublic java.lang.Long getCreatedByContractId()
getCreatedByContractId
in interface
CreateLightWeightStoreCmd
public void setStoreType(java.lang.Integer i)
setStoreType
in interface
CreateLightWeightStoreCmd
i
- 0
: distributor proxy store 1
:
reseller hosting store Only 0
and 1
are allowed
herepublic java.lang.Integer getStoreType()
getStoreType
in interface
CreateLightWeightStoreCmd
0
: distributor proxy store 1
: reseller hosting
store Only 0
and 1
will be
returned.public java.lang.Long getProfileStoreCatalogId()
getProfileStoreCatalogId
in interface
CreateLightWeightStoreCmd
protected void setProfileStoreCatalogId(java.lang.Long id)
id
- catalog asset store's catalog IDpublic java.lang.String getProfileStoreCatalogName()
getProfileStoreCatalogName
in interface
CreateLightWeightStoreCmd
protected void setProfileStoreCatalogName(java.lang.String s)
s
- catalog asset store's catalog namepublic java.lang.String getProfileStoreCatalogOwnerMemberId()
getProfileStoreCatalogOwnerMemberId
in interface
CreateLightWeightStoreCmd
protected void setProfileStoreCatalogOwnerMemberId(java.lang.String s)
s
- catalog owner's member ID in
Stringpublic java.lang.String getStore_Id()
getStore_Id
in interface
CreateLightWeightStoreCmd
protected void setStore_Id(java.lang.String sid)
sid
- Store IDpublic java.lang.String[] getBusinessPolicyName()
getBusinessPolicyName
in interface
CreateLightWeightStoreCmd
protected void setBusinessPolicyName(java.lang.String[] bpNames)
bpNames
- business policy namespublic boolean getResult()
getResult
in interface
CreateLightWeightStoreCmd
true: store is created successfully.
false: store is not
created.protected void setResult(boolean r)
public java.lang.String getStoreOwnerMemberId()
getStoreOwnerMemberId
in interface
CreateLightWeightStoreCmd
protected void setStoreOwnerMemberId(java.lang.String s)
public java.lang.String getStoreIdentifier()
getStoreIdentifier
in interface
CreateLightWeightStoreCmd
protected void setStoreIdentifier(java.lang.String s)
public java.lang.Integer getDefaultShippingModeId()
getDefaultShippingModeId
in interface
CreateLightWeightStoreCmd
protected void setDefaultShippingModeId(java.lang.Integer i)
protected boolean additionalMethodBeforeStoreCreation()
true
: the method was executed successfullyfalse
: the method failed to executeprotected boolean additionalMethodAfterStoreCreation()
true
: the method was executed successfullyfalse
: the method failed to executepublic void validateParameters() throws ECException
validateParameters
in interface
ECCommand
validateParameters
in class
AbstractECTargetableCommand
ECException
ECSystemException
- Raised with message _ERR_MISSING_PARAMETER if
Store XML is null or store type (distributor proxy or reseller hosting) is not
set.AbstractECTargetableCommand.validateParameters()
public void performExecute() throws ECException
PaymentsInformation
element in store XML
string is not empty.
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECException
ECSystemException
- Raised with message _ERR_FINDER_EXCEPTION if a
FinderException is occured Raised with message _ERR_REMOTE_EXCEPTION if a
RemoteException is occured Raised with message _ERR_NAMING_EXCEPTION if a
NamingException is occured Raised with message _ERR_CREATE_EXCEPTION if a
CreateException is occured Raised with message _ERR_SQL_EXCEPTION if a SQL
Exception is occured Raised with message _ERR_REMOVE_EXCEPTION if a
RemoteException is occured Raised with message _ERR_PARSE_XML if store xml
cannot be parsed Raised with message _ERR_CONTRACT_CMD_EXEC whenever other
errors are occuredcom.ibm.commerce.command.TaskCommandImpl##performExecute()
protected boolean createStore() throws FinderException, java.rmi.RemoteException, javax.naming.NamingException, CreateException, ECApplicationException, java.sql.SQLException
CreateException
ECApplicationException
- Raised with message
_ERR_CONTRACT_INCORRECT_STORE_IDENTIFIER if an existing store (created by a
different version of this contract) has a different store identifier Raised
with message _ERR_RETRIEVE_LANGUAGE_ID if the language(s) specified in
defaultLocale
and locale
attribute could not be find
Raised with message _ERR_RETRIEVE_MEMBER_GROUP_ID, _ERR_RETRIEVE_USER_ID,
_ERR_RETRIEVE_ORG_ID and _ERR_RETRIEVE_STORE_ID whenever the store owner's
ID could not be retrived by the given distinguish name Raised with message
_ERR_CONTRACT_DUPLICATE_STORE_IDENTIFIER if the owner of this store specified
in the store XML has an existing store in the database with the same store
identifierFinderException
javax.naming.NamingException
java.rmi.RemoteException
java.sql.SQLException
protected org.w3c.dom.Document getXMLDoc(java.lang.String xmlString) throws org.xml.sax.SAXException, java.io.IOException
xmlString
- The xml stringjava.io.IOException
org.xml.sax.SAXException
protected void parseXMLDoc(org.w3c.dom.Document XMLDoc)
XMLDoc
- XML documentprotected void createStorePath(org.w3c.dom.NodeList pathNodeList) throws java.rmi.RemoteException, FinderException, javax.naming.NamingException, CreateException, ECException, ECApplicationException, java.sql.SQLException
pathNodeList
- Store relationship node listCreateException
ECApplicationException
- Raised with message
_ERR_RETRIEVE_MEMBER_GROUP_ID whenever the member group ID of the owner of the
related store can not be found (if the owner is a member group) Raised with
message _ERR_RETRIEVE_USER_ID whenever the user ID of the owner of the related
store can not be found (if the owner is an user) Raised with message
_ERR_RETRIEVE_ORG_ID whenever the organization ID of the owner of the related
store can not be found (if the owner is an organization) Raised with message
_ERR_RETRIEVE_STORE_ID whenever the related store can not be foundECException
FinderException.
NamingException.
RemoteException.
SQLException.
java.rmi.RemoteException
FinderException
javax.naming.NamingException
java.sql.SQLException
protected void createBussinessPolicies(org.w3c.dom.NodeList bps) throws ECException
createBussinessPolicy
method to add bussiness policies
bps
- Bussiness policy Node ListECException
protected void createBussinessPolicy(org.w3c.dom.Element e) throws ECException
PolicyAddCmd
to add bussiness policy.
e
- Bussiness policy element.ECException
PolicyAddCmdImpl
protected void createSupportedLang(org.w3c.dom.NodeList inlLang) throws java.rmi.RemoteException, FinderException, javax.naming.NamingException, CreateException, ECException, ECApplicationException
inlLang
- Store supported language node listCreateException.
ECApplicationException
- Raised with message
_ERR_RETRIEVE_LANGUAGE_ID whenever a corresponding language ID of a locale name
can not be foundECException.
FinderException.
NamingException.
RemoteException.
java.rmi.RemoteException
FinderException
javax.naming.NamingException
CreateException
ECException
protected void createSupportedCurrency(org.w3c.dom.NodeList inlCurrency) throws java.rmi.RemoteException, FinderException, javax.naming.NamingException, CreateException
inlCurrency
- Store supported currency node listCreateException.
FinderException.
NamingException.
RemoteException.
java.rmi.RemoteException
FinderException
javax.naming.NamingException
CreateException
protected void createProfile(org.w3c.dom.NodeList nl) throws java.rmi.RemoteException, FinderException, javax.naming.NamingException, CreateException, ECException, ECApplicationException
nl
- Store profile node listCreateException
ECApplicationException
- Raised with message
_ERR_RETRIEVE_TRANSPORT_ID if the corrseponding transport ID of a transport can
not be found Raised with message _ERR_RETRIEVE_MESSAGE_TYPE if the message type
ID cannot be retrivedECException
FinderException
javax.naming.NamingException
java.rmi.RemoteException
protected void createStoreAddressAndSetContactAndLocationAddress(java.lang.Long storeOrgMemberId, java.lang.Integer storeId, java.lang.String storeIdentifier, java.lang.Integer languageId, java.lang.String url) throws java.rmi.RemoteException, FinderException, javax.naming.NamingException, CreateException, ECApplicationException
storeOrgMemberId
- Store owner org's member IDstoreId
- Store IDstoreIdentifier
- Store identifierlanguageId
- Language IDurl
- Store URLCreateException.
ECApplicationException
- Raised with message
_ERR_RETRIEVE_LANGUAGE_ID if the language(s) specified in locale
attribute could not be retrivedFinderException.
NamingException.
RemoteException.
java.rmi.RemoteException
FinderException
javax.naming.NamingException
CreateException
protected void createShippingMode(org.w3c.dom.NodeList inlShippingMode) throws java.rmi.RemoteException, FinderException, javax.naming.NamingException, CreateException, ECException
inlShippingMode
- Shipping Mode Node ListCreateException
ECException
FinderException
javax.naming.NamingException
java.rmi.RemoteException
protected void createShippingArrangement(org.w3c.dom.NodeList inlSA) throws java.rmi.RemoteException, FinderException, javax.naming.NamingException, CreateException, ECException, ECApplicationException
inlSA
- Shipping Arrangement Node ListCreateException
ECException
ECApplicationException
- Raised with message
_ERR_RETRIEVE_MEMBER_GROUP_ID whenever the member group ID of the owner of the
fulfillment center can not be found (if the owner is a member group) Raised
with message _ERR_RETRIEVE_USER_ID whenever the user ID of the owner of the
fulfillment center can not be found (if the owner is an user) Raised with
message _ERR_RETRIEVE_ORG_ID whenever the organization ID of the owner of the
fulfillment center can not be found (if the owner is an organization)FinderException
javax.naming.NamingException
java.rmi.RemoteException
protected void createStorePathFromStore(org.w3c.dom.NodeList pathNodeList) throws java.rmi.RemoteException, FinderException, javax.naming.NamingException, CreateException, ECException, ECApplicationException, java.sql.SQLException
pathNodeList
- StoreRelationshipFromStore node listCreateException
ECApplicationException
- Raised with message
_ERR_RETRIEVE_MEMBER_GROUP_ID whenever the member group ID of the owner of the
related store can not be found (if the owner is a member group) Raised with
message _ERR_RETRIEVE_USER_ID whenever the user ID of the owner of the related
store can not be found (if the owner is an user) Raised with message
_ERR_RETRIEVE_ORG_ID whenever the organization ID of the owner of the related
store can not be found (if the owner is an organization) Raised with message
_ERR_RETRIEVE_STORE_ID whenever the related store can not be found Raised with
message _ERR_RETRIEVE_STORE_REL_TYPE whenever the store relationship ID can not
be foundECException
FinderException.
NamingException.
RemoteException.
SQLException.
java.rmi.RemoteException
FinderException
javax.naming.NamingException
java.sql.SQLException
protected void createInventoryAdjustmentCode(org.w3c.dom.NodeList nl) throws java.rmi.RemoteException, javax.naming.NamingException, FinderException, CreateException, ECApplicationException
nl
- Inventory Adjustment Code node listCreateException
FinderException
javax.naming.NamingException
java.rmi.RemoteException
ECApplicationException
- Raised with error message
_ERR_RETRIEVE_LANGUAGE_ID if the language Id of the locale in the Description
element cannot be foundprotected void createScheduledCommand(org.w3c.dom.Element ele) throws java.rmi.RemoteException, javax.naming.NamingException, FinderException, CreateException, ECApplicationException
ele
- Custom Extension Command elementCreateException,
FinderException,
NamingException,
RemoteException,
ECApplicationException
- Raised with error message _ERR_GENERIC if
the command could not be scheduledjava.rmi.RemoteException
javax.naming.NamingException
FinderException
CreateException