public class ContractTCFactory
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASSNAME
The name of this command.
|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.Long |
createNewTC(java.lang.Long argTradingId,
org.w3c.dom.Element argTCElement)
Creates a new term and condition into the specified trading agreement.
|
static java.lang.String |
getTCAccessBeanClassName(org.w3c.dom.Element argTCElement)
Gets the AccessBean class name of a term and condition based on the given term condition Element object.
|
static java.lang.String |
getTCAccessBeanClassName(java.lang.String argTCSubType)
Gets the AccessBean class name of a term and condition on the given term condition sub-type.
|
static void |
processTC(java.lang.Long argTradingId,
org.w3c.dom.Element argTCElement,
java.sql.Timestamp currentTime)
Creates or updates a term and condition.
|
static java.lang.Long |
processTC(java.lang.Long argTradingId,
org.w3c.dom.Element argTCElement,
java.sql.Timestamp currentTime,
boolean isCreate)
Creates or updates a term and condition.
|
static void |
updateTC(java.lang.String argTCId,
org.w3c.dom.Element argTCElement)
Updates a term and condition.
|
public static final java.lang.String CLASSNAME
public static final java.lang.String COPYRIGHT
public static java.lang.Long createNewTC(java.lang.Long argTradingId, org.w3c.dom.Element argTCElement) throws com.ibm.commerce.exception.ECApplicationException, javax.naming.NamingException, java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.RemoveException, java.sql.SQLException, java.lang.Exception
argTradingId
- the trading agreement IDargTCElement
- the term and condtion Element objectjava.rmi.RemoteException.
javax.naming.NamingException.
javax.ejb.CreateException.
javax.ejb.FinderException.
javax.ejb.RemoveException.
java.sql.SQLException.
com.ibm.commerce.exception.ECApplicationException.
- Raised with message _ERR_RETRIEVE_STORE_ID if the store id cannot be retrived from
the information provided in StoreRef element in one of the terms and conditions.
Raised with message _ERR_RETRIEVE_POLICY_TYPE if the policy type cannot be retrived based on information
in policy reference element.
Raised with message _ERR_RETRIEVE_ORG_ID if an error occurred when retrieving the organization ID.
Raised with message _ERR_RETRIEVE_USER_ID if an error occurred when retrieving the user ID.
Raised with message _ERR_RETRIEVE_MEMBER_GROUP_ID if an error occurred when retrieving the member group ID.
Raised with message _ERR_RETRIEVE_OPERATOR_ID if an error occurred when retrieving opeartor_id.
The value of "operator" in "AttributeValue" element is incorrect.
Raised with message _ERR_RETRIEVE_PATTRIBUTE_ID if an error occurred when retrieving pattribute_id. The
value of "attributeName" in "AttributeDetail" element is incorrect.
Raised with message _ERR_RETRIEVE_CATENTRY_ID if an error occurred when retrieving catentry_id. The
information specified in "OrderTCOrderItemPAttribute" element is incorrect.
Raised with message _ERR_RETRIEVE_POLICY_ID if an error occurred when retrieving policy_id.
The information specified in the policy reference element is incorrect.
Raised with message _ERR_RETRIEVE_FFMCENTER_ID if an error occurred when
retrieving ffmcenter_id. The information specified in "FilfillmentCenterRef" element is incorrect.
Raised with message _ERR_COLUMN_ACCESSBEANNAME_IN_PATTRIBUTE_NOT_POPULATED if an error occurred when
retrieving personalization attribute value accessbean. Column accessbeanname in table pattribute is not
populated correctly.
Raised with message _ERR_PATTRIBUTE_NOT_REGISTERED_IN_TABLE_PATTRPROD_FOR_CATENTRY
if an error occurred when validating whether catentry has the corresponding personalization attribute
registered in table PattrProd. catentry_id and pattribute_id retrieved from OrderTCOrderItemPAttribute
element should be registered in table PattrProd.
Raised with message _ERR_TOO_MANY_FULFILLMENT_TC if a contract has more than three
fulfillment centers defined in a term and condition.
Raised with message _ERR_SAVE_TC_ATTR if an error occurred when saving the attribute of
the term and condition to tcattr table.
Raised with message _ERR_DUPLICATE_KEY_IN_PROCESSING_TC if a duplicate key error
occurred when processing a term and condition.java.lang.Exception
- any other exceptionscom.ibm.commerce.exception.ECApplicationException
javax.naming.NamingException
java.rmi.RemoteException
javax.ejb.CreateException
javax.ejb.RemoveException
java.sql.SQLException
public static java.lang.String getTCAccessBeanClassName(org.w3c.dom.Element argTCElement) throws javax.naming.NamingException, java.rmi.RemoteException, javax.ejb.CreateException, java.sql.SQLException
argTCElement
- the term and condition Element object which includes the term and condition informationjavax.naming.NamingException.
javax.ejb.CreateException.
javax.ejb.FinderException.
java.sql.SQLException.
javax.naming.NamingException
java.rmi.RemoteException
javax.ejb.CreateException
java.sql.SQLException
public static java.lang.String getTCAccessBeanClassName(java.lang.String argTCSubType) throws javax.naming.NamingException, java.sql.SQLException
argTCSubType
- the term and condition sub-typejavax.naming.NamingException.
javax.ejb.CreateException.
javax.ejb.FinderException.
java.sql.SQLException.
javax.naming.NamingException
java.sql.SQLException
public static void processTC(java.lang.Long argTradingId, org.w3c.dom.Element argTCElement, java.sql.Timestamp currentTime) throws javax.ejb.CreateException, javax.naming.NamingException, java.rmi.RemoteException, com.ibm.commerce.exception.ECException, javax.ejb.RemoveException, java.sql.SQLException
argTCElement
- the term and condition Element objectargTradingId
- the trading agreement ID which the term and condition will be added tocurrentTime
- the Timestamp object for current timejava.rmi.RemoteException.
javax.naming.NamingException.
javax.ejb.CreateException.
javax.ejb.FinderException.
javax.ejb.RemoveException.
java.sql.SQLException.
com.ibm.commerce.exception.ECException.
javax.ejb.CreateException
javax.naming.NamingException
java.rmi.RemoteException
com.ibm.commerce.exception.ECException
javax.ejb.RemoveException
java.sql.SQLException
createNewTC(Long argTradingId, org.w3c.dom.Element argTCElement)
,
updateTC(String argTCId, org.w3c.dom.Element argTCElement)
,
ContractCmdUtil.tcDescriptionSet(argTCElement, argTCId)
public static java.lang.Long processTC(java.lang.Long argTradingId, org.w3c.dom.Element argTCElement, java.sql.Timestamp currentTime, boolean isCreate) throws javax.ejb.CreateException, javax.naming.NamingException, java.rmi.RemoteException, com.ibm.commerce.exception.ECException, javax.ejb.RemoveException, java.sql.SQLException
argTCElement
- the term and condition Element objectargTradingId
- the trading agreement ID which the term and condition will be added tocurrentTime
- the Timestamp object for current timeisCreate
- the flag to indicate the action. true - create, false - updatejava.rmi.RemoteException.
javax.naming.NamingException.
javax.ejb.CreateException.
javax.ejb.FinderException.
javax.ejb.RemoveException.
java.sql.SQLException.
com.ibm.commerce.exception.ECException.
javax.ejb.CreateException
javax.naming.NamingException
java.rmi.RemoteException
com.ibm.commerce.exception.ECException
javax.ejb.RemoveException
java.sql.SQLException
createNewTC(Long argTradingId, org.w3c.dom.Element argTCElement)
,
updateTC(String argTCId, org.w3c.dom.Element argTCElement)
,
ContractCmdUtil.TermConditionDescriptionSet(tcDescElement, tcId, currentTime)
,
ContractCmdUtil.addParticipants(tcParticipants, null, tcId, currentTime)
public static void updateTC(java.lang.String argTCId, org.w3c.dom.Element argTCElement) throws javax.ejb.CreateException, javax.naming.NamingException, java.rmi.RemoteException, javax.ejb.RemoveException, com.ibm.commerce.exception.ECApplicationException
argTCId
- the ID of the term and conditionargTCElement
- the term and condition Element objectjava.rmi.RemoteException.
javax.ejb.CreateException.
javax.ejb.FinderException.
javax.naming.NamingException.
javax.ejb.RemoveException
com.ibm.commerce.exception.ECApplicationException.
- Raised with message _ERR_RETRIEVE_STORE_ID if the store id cannot be retrived from
the information provided in StoreRef element in one of the terms and conditions.
Raised with message _ERR_RETRIEVE_POLICY_TYPE if the policy type cannot be retrived based on information
in policy reference element.
Raised with message _ERR_RETRIEVE_ORG_ID if an error occurred when retrieving the organization ID.
Raised with message _ERR_RETRIEVE_USER_ID if an error occurred when retrieving the user ID.
Raised with message _ERR_RETRIEVE_MEMBER_GROUP_ID if an error occurred when retrieving the member group ID.
Raised with message _ERR_RETRIEVE_OPERATOR_ID if an error occurred when retrieving opeartor_id.
The value of "operator" in "AttributeValue" element is incorrect.
Raised with message _ERR_RETRIEVE_PATTRIBUTE_ID if an error occurred when retrieving pattribute_id. The
value of "attributeName" in "AttributeDetail" element is incorrect.
Raised with message _ERR_RETRIEVE_CATENTRY_ID if an error occurred when retrieving catentry_id. The
information specified in "OrderTCOrderItemPAttribute" element is incorrect.
Raised with message _ERR_RETRIEVE_POLICY_ID if an error occurred when retrieving policy_id.
The information specified in the policy reference element is incorrect.
Raised with message _ERR_RETRIEVE_FFMCENTER_ID if an error occurred when
retrieving ffmcenter_id. The information specified in "FilfillmentCenterRef" element is incorrect.
Raised with message _ERR_COLUMN_ACCESSBEANNAME_IN_PATTRIBUTE_NOT_POPULATED if an error occurred when
retrieving personalization attribute value accessbean. Column accessbeanname in table pattribute is not
populated correctly.
Raised with message _ERR_PATTRIBUTE_NOT_REGISTERED_IN_TABLE_PATTRPROD_FOR_CATENTRY
if an error occurred when validating whether catentry has the corresponding personalization attribute
registered in table PattrProd. catentry_id and pattribute_id retrieved from OrderTCOrderItemPAttribute
element should be registered in table PattrProd.
Raised with message _ERR_TOO_MANY_FULFILLMENT_TC if a contract has more than three
fulfillment centers defined in a term and condition.
Raised with message _ERR_SAVE_TC_ATTR if an error occurred when saving the attribute of
the term and condition to tcattr table.
Raised with message _ERR_DUPLICATE_KEY_IN_PROCESSING_TC if a duplicate key error
occurred when processing a term and condition.javax.ejb.CreateException
javax.naming.NamingException
java.rmi.RemoteException
com.ibm.commerce.exception.ECApplicationException