Database Reference
In-Depth Information
Filtering Consumption for Messaging
Another practical use of the consumption model would be to create a personalized message for users, as displayed in
Figure 12-15 . In this case, a filter allows the “Consumption Console” to drill down to a very specific group of users who
visited a product that was also tagged with a keyword (Listing 12-39).
Figure 12-15. Consumption console shows products connected to users via tags
Listing 12-39. The consumption console Route and Methods to Get Connected Products and Users via Tags
// displays products that are connected to users via a tag relationship
@Action(value = "consumption/console", results = {
@Result(name = "success", type = "mustache", location =
"/mustache/html/graphs/consumption/console.html")
})
public String console() {
setTitle("Consumption Console");
graphStory.setUsersWithMatchingTags(graphStoryDAO.getProductDAO()
.getProductsHasATagAndUserUsesAMatchingTag());
return SUCCESS;
}
//tags that match products and users
public List<MappedProductUserTag> getProductsHasATagAndUserUsesAMatchingTag() {
 
Search WWH ::




Custom Search