Class ServerRequestInfo
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
FieldsModifier and TypeFieldDescriptionprotected static org.slf4j.Loggerprotected jakarta.ws.rs.core.UriInfoFields inherited from class org.gcube.informationsystem.resourceregistry.api.request.BaseRequestInfo
allMeta, hierarchicalMode, includeContexts, includeMeta, limit, offsetFields inherited from interface org.gcube.informationsystem.resourceregistry.api.request.RequestInfo
DEFAULT_LIMIT, DEFAULT_OFFSET, UNBOUNDED_LIMIT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidcheckBooleanQueryParameter(String queryParameterKey) voidvoidcheckIntegerQueryParameter(String queryParameterKey) voidcheckIntegerQueryParameter(String queryParameterKey, Integer defaultValue) voidvoidcheckLimitOffset(int offset, int limit) jakarta.ws.rs.core.UriInfoboolean-check if the user is allowed to set such a requestbooleansetIfAllowed(String queryParameterKey, boolean bool) Set the parameter if the user is allowed otherwise the default is maintainedbooleansetIfAllowed(String queryParameterKey, boolean bool, boolean forceAllowed) Set the parameter if the user is allowed otherwise the default is maintainedintsetIfAllowed(String queryParameterKey, int integer) Set the parameter if the user is allowed otherwise the default is maintainedintsetIfAllowed(String queryParameterKey, int integer, boolean forceAllowed) Set the parameter if the user is allowed otherwise the default is maintainedvoidsetUriInfo(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
-
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
-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
Set the parameter if the user is allowed otherwise the default is maintained- Parameters:
queryParameterKey- requested query parameterbool- the value to setforceAllowed- 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
Set the parameter if the user is allowed otherwise the default is maintained- Parameters:
queryParameterKey- requested query parameterbool- the value to set- Returns:
- the value of variable corresponding the request parameter independently if the value has been set.
-
setIfAllowed
Set the parameter if the user is allowed otherwise the default is maintained- Parameters:
queryParameterKey- requested query parameterinteger- the int value to setforceAllowed- 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
Set the parameter if the user is allowed otherwise the default is maintained- Parameters:
queryParameterKey- requested query parameterinteger- the int value to set- Returns:
- the value of variable corresponding the request parameter independently if the value has been set.
-
checkBooleanQueryParameter
-
checkIntegerQueryParameter
-
checkIntegerQueryParameter
-
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()
-