Class SelectableScopeResolver

  • All Implemented Interfaces:
    ScopeResolver

    @Singleton
    public class SelectableScopeResolver
    extends java.lang.Object
    implements ScopeResolver
    • Field Summary

      Fields 
      Modifier and Type Field 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  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • PREFIX

        public static final java.lang.String PREFIX
        Prefix for all selectable scopes
      • DEFAULT_SCOPE

        public static final java.lang.String DEFAULT_SCOPE
        Scope used for selecting all fields, i.e.: when no filter is applied
      • SELECTABLE_PARAM_NAME

        private static java.lang.String SELECTABLE_PARAM_NAME
        Query parameter name for selectable feature, set to default value
      • configuration

        @Context
        private javax.ws.rs.core.Configuration configuration
      • uriInfo

        @Context
        private javax.ws.rs.core.UriInfo uriInfo
    • Constructor Detail

      • SelectableScopeResolver

        public SelectableScopeResolver()
    • Method Detail

      • init

        @PostConstruct
        private void init()
      • resolve

        public java.util.Set<java.lang.String> resolve​(java.lang.annotation.Annotation[] annotations)
        Description copied from interface: ScopeResolver
        Resolve entity-filtering scopes for given annotations.
        Specified by:
        resolve in interface ScopeResolver
        Parameters:
        annotations - list of arbitrary annotations.
        Returns:
        non-null set of entity-filtering scopes.
      • getScopesForField

        private java.util.Set<java.lang.String> getScopesForField​(java.lang.String fieldName)