1 package com.atlassian.plugins.rest.common.expand; 2 3 import com.atlassian.plugins.rest.common.expand.resolver.EntityExpanderResolver; 4 5 /** 6 * <p>Interface for expanding entities.</p> 7 * <p>For recursive expansion consider implementing {@link AbstractRecursiveEntityExpander}</p> 8 * @param <T> the type of entity to expand. 9 */ 10 public interface EntityExpander<T> 11 { 12 /** 13 * @param context the current entity context 14 * @param entityCrawler the entity crawler to be used for recursive expansion. 15 * @param expanderResolver the resolver for finding further expander when doing recursive expansion. 16 * @return the expanded entity. This can be a completely different object (of the same type). This MUST NOT be {@code null}. 17 */ 18 T expand(ExpandContext<T> context, EntityExpanderResolver expanderResolver, EntityCrawler entityCrawler); 19 }