|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.konakartadmin.bl.AdminBaseMgr
com.konakartadmin.bl.AdminCustomerTagMgr
public class AdminCustomerTagMgr
The AdminCustomerTagMgr - for managing customer tags
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.konakartadmin.bl.AdminBaseMgr |
|---|
AdminBaseMgr.StaticData |
| Field Summary | |
|---|---|
protected static org.apache.commons.logging.Log |
log
the log |
| Fields inherited from class com.konakartadmin.bl.AdminBaseMgr |
|---|
adminEng, baseMgrMutex, baseStaticDataHM, cDataEnd, cDataStart, kkConf, kkInstanceId, mgrFactory, STORE_ID, templateBaseDir |
| Constructor Summary | |
|---|---|
AdminCustomerTagMgr(KKAdminIf eng)
Constructor |
|
| Method Summary | |
|---|---|
protected void |
addCustomerTagOrderBy(com.konakart.bl.KKCriteria c,
AdminCustomerTagSearch search)
Add order by constraints for customer tags |
protected int |
addCustomerTagSearchCriteria(com.konakart.bl.KKCriteria c,
AdminCustomerTagSearch search)
Add search criteria for customer tags |
protected void |
addExpressionOrderBy(com.konakart.bl.KKCriteria c,
AdminExpressionSearch search)
|
protected int |
addExpressionSearchCriteria(com.konakart.bl.KKCriteria c,
AdminExpressionSearch search)
|
int |
deleteCustomerTag(int id)
Delete a Customer tag |
void |
deleteCustomerTagForCustomer(int customerId,
java.lang.String tagName)
Deletes the value of the customer tag referenced by tagName for the customer
referenced by customerId. |
int |
deleteExpression(int id)
Deletes the Expression object referenced by id. |
int |
deleteExpressionVariable(int id)
Deletes the ExpressionVariable object referenced by id. |
void |
deleteExpressionVariablesForExpression(int expressionId)
Deletes all of the AdminExpressionVariable objects belonging to the AdminExpression referenced by expressionId. |
boolean |
evaluateExpression(int customerId,
int expressionId,
java.lang.String expressionName)
An expression object is retrieved from the database and evaluated for the customer referenced by the customerId. |
AdminCustomerTag |
getCustomerTag(int id)
Returns the customer tag object for the id parameter, or Null if the customer
tag doesn't exist in the DB. |
protected int |
getCustomerTagCount(AdminCustomerTagSearch search)
Returns a count of the number of CustomerTags |
AdminCustomerTag |
getCustomerTagForCustomer(int customerId,
java.lang.String tagName)
Returns the customer tag object for the tagName parameter, or Null if the
customer tag doesn't exist in the DB. |
AdminCustomerTag |
getCustomerTagForName(java.lang.String tagName)
Returns the customer tag object for the tagName parameter, or Null if the
customer tag doesn't exist in the DB. |
AdminCustomerTagSearchResult |
getCustomerTags(AdminCustomerTagSearch search,
int offset,
int size)
This returns an AdminCustomerTagSearchResult object. |
AdminCustomerTag[] |
getCustomerTagsForCustomer(int customerId)
This method fetches all of the customer tags for the customer referenced by the customerId parameter. |
AdminExpression |
getExpression(int id)
Returns the AdminExpression object for the id parameter, or Null if the
AdminExpression doesn't exist in the DB. |
protected int |
getExpressionCount(AdminExpressionSearch search)
|
protected AdminExpression |
getExpressionForCustomer(int custId,
int expressionId,
java.lang.String expressionName)
An AdminExpression object, fully populated with an array of Expression Variables is returned. |
AdminExpression |
getExpressionForName(java.lang.String expName)
Returns the AdminExpression object for the expName parameter, or Null if the
AdminExpression doesn't exist in the DB. |
AdminExpressionSearchResult |
getExpressions(AdminExpressionSearch search,
int offset,
int size)
This returns an AdminExpressionSearchResult object. |
AdminExpression[] |
getExpressionsPerPromotion(int promotionId)
Fetch an array of Expression objects linked to the promotion referenced by promotionId |
AdminExpressionVariable |
getExpressionVariable(int id)
Returns the AdminExpressionVariable object for the id parameter, or Null if the
AdminExpressionVariable doesn't exist in the DB. |
protected int |
getExpressionVariableCount(int expressionId)
|
AdminExpressionVariable[] |
getExpressionVariablesForExpression(int expressionId)
Returns an array of AdminExpressionVariable objects for the AdminExpression identified by the id parameter. |
int |
insertCustomerTag(AdminCustomerTag tag)
An AdminCustomerTag object is inserted into the database. |
void |
insertCustomerTagForCustomer(int customerId,
AdminCustomerTag tag)
Assigns a customer tag to the customer referenced by the customerId. |
int |
insertExpression(AdminExpression exp)
Inserts an AdminExpression object. |
int |
insertExpressionVariables(AdminExpressionVariable[] expVarArray)
Inserts an array of ExpressionVariable objects that should all belong to the same expression. |
protected void |
setExpressionCriteriaWithStandardAttributes(com.konakart.bl.KKCriteria c)
Common code to avoid duplication which sets up the standard attributes for Expressions on the criteria object. |
protected void |
setExpressionVariableCriteriaWithStandardAttributes(com.konakart.bl.KKCriteria c,
int customerId)
Common code to avoid duplication which sets up the standard attributes for Expression Variables on the criteria object |
protected void |
setTagCriteriaWithStandardAttributes(com.konakart.bl.KKCriteria c,
int customerId)
Common code to avoid duplication |
int |
updateCustomerTag(AdminCustomerTag tag)
Update an AdminCustomerTag object. |
int |
updateExpression(AdminExpression exp)
Updates the expression. |
int |
updateExpressionVariable(AdminExpressionVariable expVar)
Updates the ExpressionVariable object passed in as a parameter. |
protected int |
updateExpressionVariableCount(int expressionId)
Returns the number of expression variable objects for the expression |
protected void |
updateNumVariables(int ExpressionId,
int numVariables)
Update the number of variables attribute for the Expression |
protected void |
validateExpressionVariable(AdminExpressionVariable expVar,
java.util.HashMap<java.lang.Integer,java.lang.String> custHM,
java.util.HashMap<java.lang.Integer,java.lang.String> expHM,
com.konakart.bl.KKCriteria c)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static org.apache.commons.logging.Log log
| Constructor Detail |
|---|
public AdminCustomerTagMgr(KKAdminIf eng)
throws java.lang.Exception
eng -
java.lang.Exception| Method Detail |
|---|
public boolean evaluateExpression(int customerId,
int expressionId,
java.lang.String expressionName)
throws java.lang.Exception
customerId. If the expressionName parameter is not set to
null, then the Expression is searched for by name. Otherwise it is searched for by the id
contained in the expressionId parameter.
evaluateExpression in interface AdminCustomerTagMgrIfcustomerId - expressionId - expressionName -
java.lang.Exception
public int insertCustomerTag(AdminCustomerTag tag)
throws KKAdminException,
org.apache.torque.TorqueException
insertCustomerTag in interface AdminCustomerTagMgrIftag -
KKAdminException
org.apache.torque.TorqueException
public void insertCustomerTagForCustomer(int customerId,
AdminCustomerTag tag)
throws KKAdminException,
org.apache.torque.TorqueException,
java.text.ParseException,
com.workingdogs.village.DataSetException
customerId. If a tag
already exists with this name, then the value is replaced with the new value. The compulsory
tag fields are:
Note that a customer tag with name tag.getName() must exist in the database
since it is used to validate tag.getValue().
insertCustomerTagForCustomer in interface AdminCustomerTagMgrIfcustomerId - tag -
KKAdminException
org.apache.torque.TorqueException
java.text.ParseException
com.workingdogs.village.DataSetException
public int updateCustomerTag(AdminCustomerTag tag)
throws KKAdminException,
org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException
updateCustomerTag in interface AdminCustomerTagMgrIftag - An AdminCustomerTag object
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
public int deleteCustomerTag(int id)
throws KKAdminException,
org.apache.torque.TorqueException
deleteCustomerTag in interface AdminCustomerTagMgrIfid - The id of the deleted customer tag
KKAdminException
org.apache.torque.TorqueException
public void deleteCustomerTagForCustomer(int customerId,
java.lang.String tagName)
throws KKAdminException,
org.apache.torque.TorqueException
tagName for the customer
referenced by customerId.
deleteCustomerTagForCustomer in interface AdminCustomerTagMgrIfcustomerId - tagName -
KKAdminException
org.apache.torque.TorqueException
public AdminCustomerTag getCustomerTag(int id)
throws KKAdminException,
org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException
id parameter, or Null if the customer
tag doesn't exist in the DB.
getCustomerTag in interface AdminCustomerTagMgrIfid -
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
public AdminCustomerTag getCustomerTagForName(java.lang.String tagName)
throws KKAdminException,
org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException
tagName parameter, or Null if the
customer tag doesn't exist in the DB.
getCustomerTagForName in interface AdminCustomerTagMgrIftagName -
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
public AdminCustomerTag getCustomerTagForCustomer(int customerId,
java.lang.String tagName)
throws KKAdminException,
org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException
tagName parameter, or Null if the
customer tag doesn't exist in the DB. The value attribute of the customer tag
contains the value for the customer referenced by customerId.
getCustomerTagForCustomer in interface AdminCustomerTagMgrIfcustomerId - tagName -
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
public AdminCustomerTag[] getCustomerTagsForCustomer(int customerId)
throws org.apache.torque.TorqueException,
KKAdminException,
com.workingdogs.village.DataSetException
customerId parameter. The value attribute of the customer tag
contains the value for the customer referenced by customerId.
An empty array is returned if no tags exist.
getCustomerTagsForCustomer in interface AdminCustomerTagMgrIfcustomerId -
org.apache.torque.TorqueException
KKAdminException
com.workingdogs.village.DataSetException
public AdminCustomerTagSearchResult getCustomerTags(AdminCustomerTagSearch search,
int offset,
int size)
throws org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException,
KKAdminException
getCustomerTags in interface AdminCustomerTagMgrIfsearch - offset - the offset in the dbsize - the number of records from the specified offset
com.workingdogs.village.DataSetException
org.apache.torque.TorqueException
KKAdminException
protected void addCustomerTagOrderBy(com.konakart.bl.KKCriteria c,
AdminCustomerTagSearch search)
c - search -
protected int getCustomerTagCount(AdminCustomerTagSearch search)
throws org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException,
KKAdminException
search - Search criteria
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException
protected int addCustomerTagSearchCriteria(com.konakart.bl.KKCriteria c,
AdminCustomerTagSearch search)
c - search -
protected void setTagCriteriaWithStandardAttributes(com.konakart.bl.KKCriteria c,
int customerId)
c - customerId -
public int insertExpression(AdminExpression exp)
throws KKAdminException,
org.apache.torque.TorqueException
name attribute of the
AdminExpression is required.
insertExpression in interface AdminCustomerTagMgrIfexp - The AdminExpression object to be inserted
KKAdminException
org.apache.torque.TorqueException
public int updateExpression(AdminExpression exp)
throws KKAdminException,
org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException
updateExpression in interface AdminCustomerTagMgrIfexp - The AdminExpression object to be updated
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
protected int updateExpressionVariableCount(int expressionId)
throws KKAdminException,
org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException
expressionId -
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
public int deleteExpression(int id)
throws java.lang.Exception
id.
deleteExpression in interface AdminCustomerTagMgrIfid - The id of the AdminExpression object to be deleted
java.lang.Exception
public AdminExpression getExpression(int id)
throws KKAdminException,
org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException
id parameter, or Null if the
AdminExpression doesn't exist in the DB.
getExpression in interface AdminCustomerTagMgrIfid - The id of the AdminExpression object
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
protected AdminExpression getExpressionForCustomer(int custId,
int expressionId,
java.lang.String expressionName)
throws java.lang.Exception
expressionName parameter is not set to null, then the Expression is
searched for by name. Otherwise it is searched for by the id contained in the
expressionId parameter. The expression variables will be populated with the
customer tag values for the customer referenced by custId. other
custId - expressionId - expressionName -
java.lang.Exception
protected void updateNumVariables(int ExpressionId,
int numVariables)
throws org.apache.torque.TorqueException,
KKAdminException
ExpressionId - numVariables -
org.apache.torque.TorqueException
KKAdminException
public AdminExpressionVariable getExpressionVariable(int id)
throws KKAdminException,
org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException
id parameter, or Null if the
AdminExpressionVariable doesn't exist in the DB.
getExpressionVariable in interface AdminCustomerTagMgrIfid - The id of the AdminExpressionVariable object
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
public AdminExpressionVariable[] getExpressionVariablesForExpression(int expressionId)
throws KKAdminException,
org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException
id parameter. An empty array is returned if no objects are found.
getExpressionVariablesForExpression in interface AdminCustomerTagMgrIfexpressionId - The AdminExpression id for the AdminExpressionVariable objects
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
public AdminExpression getExpressionForName(java.lang.String expName)
throws KKAdminException,
org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException
expName parameter, or Null if the
AdminExpression doesn't exist in the DB.
getExpressionForName in interface AdminCustomerTagMgrIfexpName - The name of the AdminExpression object
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
public AdminExpression[] getExpressionsPerPromotion(int promotionId)
throws com.workingdogs.village.DataSetException,
org.apache.torque.TorqueException,
KKAdminException
promotionId
getExpressionsPerPromotion in interface AdminCustomerTagMgrIfpromotionId -
com.workingdogs.village.DataSetException
org.apache.torque.TorqueException
KKAdminException
public AdminExpressionSearchResult getExpressions(AdminExpressionSearch search,
int offset,
int size)
throws org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException,
KKAdminException
getExpressions in interface AdminCustomerTagMgrIfsearch - The search object that defines the search parameters and sort orderoffset - The offset in the dbsize - The number of records from the specified offset
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException
protected int getExpressionCount(AdminExpressionSearch search)
throws org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException,
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException
protected int getExpressionVariableCount(int expressionId)
throws org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException,
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException
protected int addExpressionSearchCriteria(com.konakart.bl.KKCriteria c,
AdminExpressionSearch search)
protected void addExpressionOrderBy(com.konakart.bl.KKCriteria c,
AdminExpressionSearch search)
public int insertExpressionVariables(AdminExpressionVariable[] expVarArray)
throws KKAdminException,
org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException
insertExpressionVariables in interface AdminCustomerTagMgrIfexpVarArray - The AdminExpressionVariable array of objects to be inserted
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
public int updateExpressionVariable(AdminExpressionVariable expVar)
throws KKAdminException,
org.apache.torque.TorqueException
updateExpressionVariable in interface AdminCustomerTagMgrIfexpVar - The AdminExpressionVariable object to be updated
KKAdminException
org.apache.torque.TorqueException
protected void validateExpressionVariable(AdminExpressionVariable expVar,
java.util.HashMap<java.lang.Integer,java.lang.String> custHM,
java.util.HashMap<java.lang.Integer,java.lang.String> expHM,
com.konakart.bl.KKCriteria c)
throws KKAdminException,
org.apache.torque.TorqueException
KKAdminException
org.apache.torque.TorqueException
public int deleteExpressionVariable(int id)
throws org.apache.torque.TorqueException,
KKAdminException,
com.workingdogs.village.DataSetException
id.
deleteExpressionVariable in interface AdminCustomerTagMgrIfid - The id of the AdminExpressionVariable object to be deleted
com.workingdogs.village.DataSetException
KKAdminException
org.apache.torque.TorqueException
KKAdminException
public void deleteExpressionVariablesForExpression(int expressionId)
throws org.apache.torque.TorqueException,
KKAdminException,
com.workingdogs.village.DataSetException
expressionId.
deleteExpressionVariablesForExpression in interface AdminCustomerTagMgrIfexpressionId - The id of the AdminExpression object
com.workingdogs.village.DataSetException
KKAdminException
org.apache.torque.TorqueExceptionprotected void setExpressionCriteriaWithStandardAttributes(com.konakart.bl.KKCriteria c)
c - criteria object
protected void setExpressionVariableCriteriaWithStandardAttributes(com.konakart.bl.KKCriteria c,
int customerId)
c - criteria objectcustomerId - customer Id
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||