View Javadoc

1   package com.atlassian.plugins.rest.test;
2   
3   import com.atlassian.plugins.rest.common.expand.AbstractRecursiveEntityExpander;
4   
5   public class FavouriteDrinkExpander extends AbstractRecursiveEntityExpander<FavouriteDrink>
6   {
7       protected FavouriteDrink expandInternal(FavouriteDrink drink)
8       {
9           if (drink.getName().equals("coffee"))
10          {
11              drink.setDescription("Coffee is a brewed beverage prepared from roasted seeds, commonly called coffee beans, of the coffee plant." +
12                      " Due to its caffeine content, coffee has a stimulating effect in humans. Today, coffee is one of the most popular beverages worldwide (wikipedia)");
13          }
14          return drink;
15      }
16  }