@Singleton public class SelectableScopeResolver extends java.lang.Object implements ScopeResolver
Modifier and Type | Field and Description |
---|---|
private javax.ws.rs.core.Configuration |
configuration |
static java.lang.String |
DEFAULT_SCOPE
Scope used for selecting all fields, i.e.: when no filter is applied
|
static java.lang.String |
PREFIX
Prefix for all selectable scopes
|
private static java.lang.String |
SELECTABLE_PARAM_NAME
Query parameter name for selectable feature, set to default value
|
private javax.ws.rs.core.UriInfo |
uriInfo |
Constructor and Description |
---|
SelectableScopeResolver() |
Modifier and Type | Method and Description |
---|---|
private java.util.Set<java.lang.String> |
getScopesForField(java.lang.String fieldName) |
private void |
init() |
java.util.Set<java.lang.String> |
resolve(java.lang.annotation.Annotation[] annotations)
Resolve entity-filtering scopes for given annotations.
|
public static final java.lang.String PREFIX
public static final java.lang.String DEFAULT_SCOPE
private static java.lang.String SELECTABLE_PARAM_NAME
@Context private javax.ws.rs.core.Configuration configuration
@Context private javax.ws.rs.core.UriInfo uriInfo
@PostConstruct private void init()
public java.util.Set<java.lang.String> resolve(java.lang.annotation.Annotation[] annotations)
ScopeResolver
resolve
in interface ScopeResolver
annotations
- list of arbitrary annotations.private java.util.Set<java.lang.String> getScopesForField(java.lang.String fieldName)