Interface TargetRecommendationsAPIClient
- 
@ProviderType public interface TargetRecommendationsAPIClientProvides support for the Target Recommendations APIs 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcheckConnection(java.lang.String clientCode, java.lang.String email, java.lang.String password)Checks the connection to Target Recommendations using the given credentialsvoiddeleteAlgorithm(int id, Configuration ttConfig)Deletes an algorithm from Target RecommendationsvoiddeleteFeed(int id, Configuration ttConfig)Removes a product feed from Target RecommendationsvoiddeleteRecommendation(int id, Configuration ttConfig)Removes a recommendation from Target RecommendationsvoiddeleteTemplate(int id, Configuration ttConfig)Deletes a template from the Target Recommendations backendRecommendationAlgorithmgetAlgorithm(int id, Configuration ttConfig)Get a single algorithm from a given idjava.util.List<RecommendationAlgorithm>getAlgorithms(Configuration ttConfig)Get a list of available algorithms for the given TesT&TargetConfigurationProductFeedgetFeed(int id, Configuration ttConfig)Get a single product feed based on a given idjava.util.List<ProductFeed>getFeeds(Configuration ttConfig)Get all defined product feeds in Target Recommendations related to a given TesT&Target configurationjava.util.List<RecommendationMbox>getMBoxes(Configuration ttConfig)Get the list of available MBoxes for a given T&T configurationTargetRecommendationgetRecommendation(int id, Configuration ttConfig)Get a single recommendation from a given idjava.util.List<TargetRecommendation>getRecommendations(Configuration ttConfig)Get all recommendations related to the given TesT&TargetConfigurationRecommendationTemplategetTemplate(int id, Configuration ttConfig)Get a single template having a given idjava.util.List<RecommendationTemplate>getTemplates(Configuration ttConfig)Get the list of available templates associated with a given TesT&TargetConfigurationvoidremoveProducts(java.util.List<java.lang.String> productList, Configuration ttConfig)Removes a list of products from the Target Recommendations indexRecommendationAlgorithmsaveAlgorithm(RecommendationAlgorithm algorithm, Configuration ttConfig)Saves an algorithm in Target Recommendations using the given cloud configurationProductFeedsaveFeed(ProductFeed feed, Configuration ttConfig)Saves the givenProductFeedin Target Recommendations using the given cloud configurationTargetRecommendationsaveRecommendation(TargetRecommendation recommendation, Configuration ttConfig)Saves a givenTargetRecommendationin Target Recommendations system using the given cloud configurationRecommendationTemplatesaveTemplate(RecommendationTemplate template, Configuration ttConfig)Saves a template in Target Recommendations backend using the given T&T cloud configuration 
 - 
 
- 
- 
Method Detail
- 
getTemplates
java.util.List<RecommendationTemplate> getTemplates(Configuration ttConfig) throws TargetRecommendationsException
Get the list of available templates associated with a given TesT&TargetConfiguration- Parameters:
 ttConfig- - theConfigurationthat identifies the Target cloud configuration- Returns:
 - a 
Listcontaining theRecommendationTemplateobjects available for the given T&T client - Throws:
 TargetRecommendationsException-TargetRecommendationsException
 
- 
getTemplate
RecommendationTemplate getTemplate(int id, Configuration ttConfig) throws TargetRecommendationsException
Get a single template having a given id- Parameters:
 id- - aIntegervalue identifying a recommendation templatettConfig- - theConfigurationthat identifies the Target config- Returns:
 - a 
RecommendationTemplateif a valid template is found for the given id and configuration ornullif none is found - Throws:
 TargetRecommendationsException-TargetRecommendationsException$
 
- 
saveTemplate
RecommendationTemplate saveTemplate(RecommendationTemplate template, Configuration ttConfig) throws TargetRecommendationsException
Saves a template in Target Recommendations backend using the given T&T cloud configuration- Parameters:
 template- - theRecommendationTemplatethat needs to be persisted in the Recommendations backendttConfig- - the TargetConfiguration- Returns:
 - the saved 
RecommendationTemplate - Throws:
 TargetRecommendationsException-TargetRecommendationsExceptionon any issues encountered during template update operation
 
- 
deleteTemplate
void deleteTemplate(int id, Configuration ttConfig) throws TargetRecommendationsExceptionDeletes a template from the Target Recommendations backend- Parameters:
 id- - theIntegerid of the template that needs to be deletedttConfig- - the TargetConfiguration- Throws:
 TargetRecommendationsException-TargetRecommendationsExceptionon any issues encountered during template deletion
 
- 
getMBoxes
java.util.List<RecommendationMbox> getMBoxes(Configuration ttConfig) throws TargetRecommendationsException
Get the list of available MBoxes for a given T&T configuration- Parameters:
 ttConfig- - the TargetConfiguration- Returns:
 - a 
Listcontaining the MBoxes available for the given T&T client - Throws:
 TargetRecommendationsException-TargetRecommendationsException
 
- 
getAlgorithms
java.util.List<RecommendationAlgorithm> getAlgorithms(Configuration ttConfig) throws TargetRecommendationsException
Get a list of available algorithms for the given TesT&TargetConfiguration- Parameters:
 ttConfig- - theConfigurationthat identifies the Target cloud configuration- Returns:
 - a 
Listcontaining theRecommendationAlgorithmobjects available for the given T&T client - Throws:
 TargetRecommendationsException-TargetRecommendationsException
 
- 
getAlgorithm
RecommendationAlgorithm getAlgorithm(int id, Configuration ttConfig) throws TargetRecommendationsException
Get a single algorithm from a given id- Parameters:
 id- - the Target Recommendations id of the needed algorithmttConfig- - theConfigurationthat identifies the Target cloud configuration- Returns:
 - a 
RecommendationAlgorithmobject if a valid algorithm with the given id is found in Target Recommendations ornullif none is found - Throws:
 TargetRecommendationsException-TargetRecommendationsException
 
- 
saveAlgorithm
RecommendationAlgorithm saveAlgorithm(RecommendationAlgorithm algorithm, Configuration ttConfig) throws TargetRecommendationsException
Saves an algorithm in Target Recommendations using the given cloud configuration- Parameters:
 algorithm- - theRecommendationAlgorithmto be updated in Target RecommendationsttConfig- - theConfigurationthat identifies the Target cloud configuration- Returns:
 - the saved 
RecommendationAlgorithm - Throws:
 TargetRecommendationsException-TargetRecommendationsException
 
- 
deleteAlgorithm
void deleteAlgorithm(int id, Configuration ttConfig) throws TargetRecommendationsExceptionDeletes an algorithm from Target Recommendations- Parameters:
 id- - the Target Recommendations id of the algorithm to be deletedttConfig- - theConfigurationthat identifies the Target cloud configuration- Throws:
 TargetRecommendationsException-TargetRecommendationsException
 
- 
getRecommendations
java.util.List<TargetRecommendation> getRecommendations(Configuration ttConfig) throws TargetRecommendationsException
Get all recommendations related to the given TesT&TargetConfiguration- Parameters:
 ttConfig- - theConfigurationthat identifies the Target cloud configuration- Returns:
 - a 
Listcontaining all theTargetRecommendationobjects available to the given T&T client - Throws:
 TargetRecommendationsException-TargetRecommendationsException
 
- 
getRecommendation
TargetRecommendation getRecommendation(int id, Configuration ttConfig) throws TargetRecommendationsException
Get a single recommendation from a given id- Parameters:
 id- - the Target Recommendations id of the required recommendationttConfig- - theConfigurationthat identifies the Target cloud configuration- Returns:
 - a 
TargetRecommendationobject if a valid recommendation with the given id is found in Target Recommendations ornullif none is found - Throws:
 TargetRecommendationsException-TargetRecommendationsException
 
- 
saveRecommendation
TargetRecommendation saveRecommendation(TargetRecommendation recommendation, Configuration ttConfig) throws TargetRecommendationsException
Saves a givenTargetRecommendationin Target Recommendations system using the given cloud configuration- Parameters:
 recommendation- - theTargetRecommendationrecommendation object to be persisted in Target RecommendationsttConfig- - theConfigurationthat identifies the Target cloud configuration- Returns:
 - the saved 
TargetRecommendation - Throws:
 TargetRecommendationsException-TargetRecommendationsException
 
- 
deleteRecommendation
void deleteRecommendation(int id, Configuration ttConfig) throws TargetRecommendationsExceptionRemoves a recommendation from Target Recommendations- Parameters:
 id- - the recommendation idttConfig- - theConfigurationthat identifies the Target cloud configuration- Throws:
 TargetRecommendationsException-TargetRecommendationsException
 
- 
getFeeds
java.util.List<ProductFeed> getFeeds(Configuration ttConfig) throws TargetRecommendationsException
Get all defined product feeds in Target Recommendations related to a given TesT&Target configuration- Parameters:
 ttConfig- - theConfigurationthat identifies the Target cloud configuration- Returns:
 - a 
Listcontaining all theProductFeedfeeds defined for the given T&T account - Throws:
 TargetRecommendationsException-TargetRecommendationsException
 
- 
getFeed
ProductFeed getFeed(int id, Configuration ttConfig) throws TargetRecommendationsException
Get a single product feed based on a given id- Parameters:
 id- - the Target Recommendations id of the required product feedttConfig- - theConfigurationthat identifies the Target cloud configuration- Returns:
 - a 
ProductFeedabstraction of the recommendations product feed if one with the given id is found in Target Recommendations backend ornullif none is found - Throws:
 TargetRecommendationsException-TargetRecommendationsException
 
- 
saveFeed
ProductFeed saveFeed(ProductFeed feed, Configuration ttConfig) throws TargetRecommendationsException
Saves the givenProductFeedin Target Recommendations using the given cloud configuration- Parameters:
 feed- - theProductFeedto be updated in Target RecsttConfig- - theConfigurationthat identifies the Target cloud configuration- Returns:
 - the updated 
ProductFeed - Throws:
 TargetRecommendationsException-TargetRecommendationsException
 
- 
deleteFeed
void deleteFeed(int id, Configuration ttConfig) throws TargetRecommendationsExceptionRemoves a product feed from Target Recommendations- Parameters:
 id- - the product feed idttConfig- - theConfigurationthat identifies the Target cloud configuration- Throws:
 TargetRecommendationsException-TargetRecommendationsException
 
- 
removeProducts
void removeProducts(java.util.List<java.lang.String> productList, Configuration ttConfig) throws TargetRecommendationsExceptionRemoves a list of products from the Target Recommendations index- Parameters:
 productList- - the list of product ids to be removed from the Recommendations indexttConfig- - theConfigurationthat identifies the Target cloud configuration- Throws:
 TargetRecommendationsException-TargetRecommendationsException
 
- 
checkConnection
void checkConnection(java.lang.String clientCode, java.lang.String email, java.lang.String password) throws TargetRecommendationsExceptionChecks the connection to Target Recommendations using the given credentials- Parameters:
 clientCode- clientCodeemail- emailpassword- password- Throws:
 TargetRecommendationsException-TargetRecommendationsExceptionon any connection error
 
 - 
 
 -