java.lang.Object
org.gcube.informationsystem.resourceregistry.api.request.BaseRequestInfo
org.gcube.informationsystem.resourceregistry.rest.requests.ServerRequestInfo
All Implemented Interfaces:
org.gcube.informationsystem.resourceregistry.api.request.RequestInfo

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

    Fields
    Modifier and Type
    Field
    Description
    protected static org.slf4j.Logger
     
    protected jakarta.ws.rs.core.UriInfo
     

    Fields inherited from class org.gcube.informationsystem.resourceregistry.api.request.BaseRequestInfo

    allMeta, hierarchicalMode, includeContexts, includeMeta, limit, offset

    Fields inherited from interface org.gcube.informationsystem.resourceregistry.api.request.RequestInfo

    DEFAULT_LIMIT, DEFAULT_OFFSET, UNBOUNDED_LIMIT
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    ServerRequestInfo(int offset, int limit)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
     
    void
     
    void
     
    void
     
    void
    checkIntegerQueryParameter(String queryParameterKey, Integer defaultValue)
     
    void
     
    void
    checkLimitOffset(int offset, int limit)
     
    jakarta.ws.rs.core.UriInfo
     
    boolean
    isAllowed(String queryParameterKey)
    -check if the user is allowed to set such a request
    boolean
    setIfAllowed(String queryParameterKey, boolean bool)
    Set the parameter if the user is allowed otherwise the default is maintained
    boolean
    setIfAllowed(String queryParameterKey, boolean bool, boolean forceAllowed)
    Set the parameter if the user is allowed otherwise the default is maintained
    int
    setIfAllowed(String queryParameterKey, int integer)
    Set the parameter if the user is allowed otherwise the default is maintained
    int
    setIfAllowed(String queryParameterKey, int integer, boolean forceAllowed)
    Set the parameter if the user is allowed otherwise the default is maintained
    void
    setUriInfo(jakarta.ws.rs.core.UriInfo uriInfo)
     

    Methods inherited from class org.gcube.informationsystem.resourceregistry.api.request.BaseRequestInfo

    allMeta, getLimit, getOffset, includeContexts, includeMeta, isHierarchicalMode, setAllMeta, setHierarchicalMode, setIncludeContexts, setIncludeMeta, setLimit, setOffset

    Methods inherited from class java.lang.Object

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

    • logger

      protected static org.slf4j.Logger logger
    • uriInfo

      protected jakarta.ws.rs.core.UriInfo uriInfo
  • Constructor Details

    • ServerRequestInfo

      public ServerRequestInfo()
    • ServerRequestInfo

      public ServerRequestInfo(int offset, int limit)
  • Method Details

    • getUriInfo

      public jakarta.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(jakarta.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()