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 implements org.gcube.informationsystem.resourceregistry.api.request.RequestInfo- Author:
- Luca Frosini (ISTI - CNR)
-
-
Constructor Summary
Constructors Constructor Description ServerRequestInfo()ServerRequestInfo(int offset, int limit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckAllBooleanQueryParameters()voidcheckAllIncludeQueryParameters()voidcheckBooleanQueryParameter(String queryParameterKey)voidcheckIncludeAllMetaQueryParameters()voidcheckIntegerQueryParameter(String queryParameterKey)voidcheckIntegerQueryParameter(String queryParameterKey, Integer defaultValue)voidcheckLimitOffset()voidcheckLimitOffset(int offset, int limit)javax.ws.rs.core.UriInfogetUriInfo()booleanisAllowed(String queryParameterKey)-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(javax.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
-
-
-
-
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 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
public boolean setIfAllowed(String queryParameterKey, boolean bool)
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
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 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
public int setIfAllowed(String queryParameterKey, int integer)
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
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()
-
-