Class ServerRequestInfo

  • All Implemented Interfaces:
    org.gcube.informationsystem.resourceregistry.api.request.RequestInfo

    public class ServerRequestInfo
    extends org.gcube.informationsystem.resourceregistry.api.request.BaseRequestInfo
    implements org.gcube.informationsystem.resourceregistry.api.request.RequestInfo
    Author:
    Luca Frosini (ISTI - CNR)
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static org.slf4j.Logger logger  
      protected javax.ws.rs.core.UriInfo uriInfo  
      • Fields inherited from class org.gcube.informationsystem.resourceregistry.api.request.BaseRequestInfo

        allMeta, DEFAULT_LIMIT, DEFAULT_OFFSET, hierarchicalMode, includeContexts, includeMeta, limit, offset, UNBOUNDED_LIMIT
    • Field Detail

      • logger

        protected static org.slf4j.Logger logger
      • uriInfo

        protected javax.ws.rs.core.UriInfo uriInfo
    • Constructor Detail

      • ServerRequestInfo

        public ServerRequestInfo()
      • ServerRequestInfo

        public ServerRequestInfo​(int offset,
                                 int limit)
    • Method Detail

      • getUriInfo

        public javax.ws.rs.core.UriInfo getUriInfo()
      • isAllowed

        public boolean isAllowed​(String queryParameterKey)
        -check if the user is allowed to set such a request
        Parameters:
        queryParameterKey - requested query parameter
        Returns:
        true is the user is allowed to set such a request
      • setIfAllowed

        public boolean setIfAllowed​(String queryParameterKey,
                                    boolean bool,
                                    boolean forceAllowed)
        Set the parameter if the user is allowed otherwise the default is maintained
        Parameters:
        queryParameterKey - requested query parameter
        bool - the value to set
        forceAllowed - force the value and skip the isAllowed check
        Returns:
        the value of variable corresponding the request parameter independently if the value has been set.
      • setIfAllowed

        public boolean setIfAllowed​(String queryParameterKey,
                                    boolean bool)
        Set the parameter if the user is allowed otherwise the default is maintained
        Parameters:
        queryParameterKey - requested query parameter
        bool - the value to set
        Returns:
        the value of variable corresponding the request parameter independently if the value has been set.
      • setIfAllowed

        public int setIfAllowed​(String queryParameterKey,
                                int integer,
                                boolean forceAllowed)
        Set the parameter if the user is allowed otherwise the default is maintained
        Parameters:
        queryParameterKey - requested query parameter
        integer - the int value to set
        forceAllowed - force the value and skip the isAllowed check
        Returns:
        the value of variable corresponding the request parameter independently if the value has been set.
      • setIfAllowed

        public int setIfAllowed​(String queryParameterKey,
                                int integer)
        Set the parameter if the user is allowed otherwise the default is maintained
        Parameters:
        queryParameterKey - requested query parameter
        integer - the int value to set
        Returns:
        the value of variable corresponding the request parameter independently if the value has been set.
      • checkBooleanQueryParameter

        public void checkBooleanQueryParameter​(String queryParameterKey)
      • checkIntegerQueryParameter

        public void checkIntegerQueryParameter​(String queryParameterKey)
      • checkIntegerQueryParameter

        public void checkIntegerQueryParameter​(String queryParameterKey,
                                               Integer defaultValue)
      • setUriInfo

        public void setUriInfo​(javax.ws.rs.core.UriInfo uriInfo)
      • checkAllBooleanQueryParameters

        public void checkAllBooleanQueryParameters()
      • checkAllIncludeQueryParameters

        public void checkAllIncludeQueryParameters()
      • checkIncludeAllMetaQueryParameters

        public void checkIncludeAllMetaQueryParameters()
      • checkLimitOffset

        public void checkLimitOffset​(int offset,
                                     int limit)
      • checkLimitOffset

        public void checkLimitOffset()