public interface AdminCustomerTagMgrIf
Modifier and Type | Method and Description |
---|---|
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. |
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. |
AdminCustomerTag[] |
getCustomerTagsForCustomer(int customerId,
java.lang.String[] tagNames)
Returns the customer tag objects for the
tagNames parameter, or Null if none of
the specified customer tags exist in the DB for the customer. |
AdminExpression |
getExpression(int id)
Returns the AdminExpression object for the
id parameter, or Null if the
AdminExpression doesn't exist in the DB. |
int |
getExpressionCount(AdminExpressionSearch search)
Returns the number of expressions available for the given search
|
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. |
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.
|
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.
|
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.customerId
- the customerIdexpressionId
- the expressionIdexpressionName
- the expressionNamejava.lang.Exception
- an unexpected exceptionint insertCustomerTag(AdminCustomerTag tag) throws KKAdminException, org.apache.torque.TorqueException
tag
- the tagKKAdminException
- an unexpected exception in the KonaKart Admin engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)AdminCustomerTagSearchResult getCustomerTags(AdminCustomerTagSearch search, int offset, int size) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
search
- The search object that defines the search parameters and sort orderoffset
- The offset in the dbsize
- The number of records from the specified offsetcom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)org.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin engineint updateCustomerTag(AdminCustomerTag tag) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
tag
- An AdminCustomerTag objectKKAdminException
- an unexpected exception in the KonaKart Admin engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)int deleteCustomerTag(int id) throws KKAdminException, org.apache.torque.TorqueException
id
- The id of the deleted customer tagKKAdminException
- an unexpected exception in the KonaKart Admin engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)void deleteCustomerTagForCustomer(int customerId, java.lang.String tagName) throws KKAdminException, org.apache.torque.TorqueException
tagName
for the customer
referenced by customerId
.customerId
- The id of the customertagName
- The name of the customer tagKKAdminException
- an unexpected exception in the KonaKart Admin engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)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.id
- The id of the customer tagKKAdminException
- an unexpected exception in the KonaKart Admin engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)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
.customerId
- The id of the customertagName
- The name of the customer tagKKAdminException
- an unexpected exception in the KonaKart Admin engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)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.tagName
- The name of the customer tagKKAdminException
- an unexpected exception in the KonaKart Admin engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)AdminCustomerTag[] getCustomerTagsForCustomer(int customerId, java.lang.String[] tagNames) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
tagNames
parameter, or Null if none of
the specified customer tags exist in the DB for the customer. The value
attribute of the customer tag contains the value for the customer referenced by
customerId
.customerId
- the customerIdtagNames
- the tagNames to retrieveKKAdminException
- an unexpected exception in the KonaKart Admin engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)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.
customerId
- The id of the customerorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin enginecom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)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()
.
customerId
- The id of the customertag
- The customer tag objectKKAdminException
- an unexpected exception in the KonaKart Admin engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)java.text.ParseException
- an unexpected ParseException exceptioncom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)int insertExpression(AdminExpression exp) throws KKAdminException, org.apache.torque.TorqueException
name
attribute of the
AdminExpression is required.exp
- The AdminExpression object to be insertedKKAdminException
- an unexpected exception in the KonaKart Admin engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)int updateExpression(AdminExpression exp) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
exp
- The AdminExpression object to be updatedKKAdminException
- an unexpected exception in the KonaKart Admin engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)int deleteExpression(int id) throws java.lang.Exception
id
.id
- The id of the AdminExpression object to be deletedjava.lang.Exception
- an unexpected exceptionAdminExpression 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.id
- The id of the AdminExpression objectKKAdminException
- an unexpected exception in the KonaKart Admin engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)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.id
- The id of the AdminExpressionVariable objectKKAdminException
- an unexpected exception in the KonaKart Admin engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)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.expressionId
- The AdminExpression id for the AdminExpressionVariable objectsKKAdminException
- an unexpected exception in the KonaKart Admin engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)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.expName
- The name of the AdminExpression objectKKAdminException
- an unexpected exception in the KonaKart Admin engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)AdminExpressionSearchResult getExpressions(AdminExpressionSearch search, int offset, int size) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
search
- The search object that defines the search parameters and sort orderoffset
- The offset in the dbsize
- The number of records from the specified offsetorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin engineint insertExpressionVariables(AdminExpressionVariable[] expVarArray) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
expVarArray
- The AdminExpressionVariable array of objects to be insertedKKAdminException
- an unexpected exception in the KonaKart Admin engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)int updateExpressionVariable(AdminExpressionVariable expVar) throws KKAdminException, org.apache.torque.TorqueException
expVar
- The AdminExpressionVariable object to be updatedKKAdminException
- an unexpected exception in the KonaKart Admin engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)int deleteExpressionVariable(int id) throws org.apache.torque.TorqueException, KKAdminException, com.workingdogs.village.DataSetException
id
.id
- The id of the AdminExpressionVariable object to be deletedorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin enginecom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)void deleteExpressionVariablesForExpression(int expressionId) throws org.apache.torque.TorqueException, KKAdminException, com.workingdogs.village.DataSetException
expressionId
.expressionId
- The id of the AdminExpression objectcom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)AdminExpression[] getExpressionsPerPromotion(int promotionId) throws com.workingdogs.village.DataSetException, org.apache.torque.TorqueException, KKAdminException
promotionId
promotionId
- the promotionIdcom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)org.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin engineint getExpressionCount(AdminExpressionSearch search) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
search
- the searchorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin engineCopyright © 2018 DS Data Systems UK Ltd.