public abstract class AbstractEntityProcessor extends java.lang.Object implements EntityProcessor
entity processor supposed to be used as a base class for custom implementations. Provides
convenient methods for adding entity-filtering scopes to entity graph as well as a common implementation
of process(org.glassfish.jersey.message.filtering.spi.EntityProcessorContext).EntityProcessor.Result| Constructor and Description |
|---|
AbstractEntityProcessor() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addFilteringScopes(java.lang.String field,
java.lang.Class<?> fieldClass,
java.util.Set<java.lang.String> filteringScopes,
EntityGraph graph)
Add entity-filtering scopes of a field to an entity-graph.
|
protected void |
addGlobalScopes(java.util.Set<java.lang.String> filteringScopes,
EntityGraph graph)
Add entity-filtering scopes into given graph.
|
private java.lang.annotation.Annotation[] |
getAnnotations(java.lang.reflect.AccessibleObject accessibleObject) |
EntityProcessor.Result |
process(EntityProcessorContext context)
Process given (class/property/accessor)
context by modifying provided EntityGraph. |
protected EntityProcessor.Result |
process(java.lang.String fieldName,
java.lang.Class<?> fieldClass,
java.lang.annotation.Annotation[] fieldAnnotations,
java.lang.annotation.Annotation[] annotations,
EntityGraph graph)
Method is called from the default implementation of
process(org.glassfish.jersey.message.filtering.spi.EntityProcessorContext) and is supposed to be overridden by
custom implementations of this class. |
public EntityProcessor.Result process(EntityProcessorContext context)
EntityProcessorcontext by modifying provided EntityGraph.process in interface EntityProcessorcontext - context to be processed.private java.lang.annotation.Annotation[] getAnnotations(java.lang.reflect.AccessibleObject accessibleObject)
protected EntityProcessor.Result process(java.lang.String fieldName, java.lang.Class<?> fieldClass, java.lang.annotation.Annotation[] fieldAnnotations, java.lang.annotation.Annotation[] annotations, EntityGraph graph)
process(org.glassfish.jersey.message.filtering.spi.EntityProcessorContext) and is supposed to be overridden by
custom implementations of this class.fieldName - name of the field (can be null).fieldClass - class of the field (can be null).fieldAnnotations - annotations associated with the field (cannot be null).annotations - annotations associated with class/accessor (cannot be null).graph - entity graph to be processed.Result#SKIP).protected final void addFilteringScopes(java.lang.String field,
java.lang.Class<?> fieldClass,
java.util.Set<java.lang.String> filteringScopes,
EntityGraph graph)
field - name of a field to be added to the graph.fieldClass - class of the field.filteringScopes - entity-filtering scopes the field will be associated with in the graph.graph - entity graph the field will be added to.protected final void addGlobalScopes(java.util.Set<java.lang.String> filteringScopes,
EntityGraph graph)
filteringScopes - entity-filtering scopes to be added to graph.graph - entity graph to be enhanced by new scopes.