Class ServerRequestInfo
- java.lang.Object
-
- org.gcube.informationsystem.resourceregistry.requests.ServerRequestInfo
-
- All Implemented Interfaces:
org.gcube.informationsystem.resourceregistry.api.request.RequestInfo
public class ServerRequestInfo extends Object implements org.gcube.informationsystem.resourceregistry.api.request.RequestInfo
- Author:
- Luca Frosini (ISTI - CNR)
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanallMetaTrack if the request requested to includeMetadatain allIdentifiableElementor just in the root instanceprotected booleanhierarchicalModeTrack if hierarchicalMode has been requestedprotected booleanincludeContextsTrack if the request requested to include contextsprotected booleanincludeMetaTrack if the request requested to includeMetadataprotected static org.slf4j.Loggerloggerprotected javax.ws.rs.core.UriInfouriInfo
-
Constructor Summary
Constructors Constructor Description ServerRequestInfo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallMeta()voidcheckAllQueryParameters()voidcheckIncludeAllMetaQueryParameters()voidcheckIncludeQueryParameters()voidcheckQueryParameter(String queryParameterKey)javax.ws.rs.core.UriInfogetUriInfo()booleanincludeContexts()booleanincludeMeta()booleanisAllowed(String queryParameterKey)-check if the user is allowed to set such a requestbooleanisHierarchicalMode()voidsetAllMeta(boolean allMeta)voidsetHierarchicalMode(boolean hierarchicalMode)booleansetIfAllowed(String queryParameterKey, boolean bool)Set the parameter if the user is allowed otherwise the default is maintainedvoidsetIncludeContexts(boolean includeContexts)voidsetIncludeMeta(boolean includeMeta)voidsetUriInfo(javax.ws.rs.core.UriInfo uriInfo)
-
-
-
Field Detail
-
logger
protected static org.slf4j.Logger logger
-
uriInfo
protected javax.ws.rs.core.UriInfo uriInfo
-
includeMeta
protected boolean includeMeta
Track if the request requested to includeMetadata
-
allMeta
protected boolean allMeta
Track if the request requested to includeMetadatain allIdentifiableElementor just in the root instance
-
hierarchicalMode
protected boolean hierarchicalMode
Track if hierarchicalMode has been requested
-
includeContexts
protected boolean includeContexts
Track if the request requested to include contexts
-
-
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)
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 independetly if the value has been set.
-
checkQueryParameter
public void checkQueryParameter(String queryParameterKey)
-
setUriInfo
public void setUriInfo(javax.ws.rs.core.UriInfo uriInfo)
-
checkAllQueryParameters
public void checkAllQueryParameters()
-
checkIncludeQueryParameters
public void checkIncludeQueryParameters()
-
checkIncludeAllMetaQueryParameters
public void checkIncludeAllMetaQueryParameters()
-
includeMeta
public boolean includeMeta()
- Specified by:
includeMetain interfaceorg.gcube.informationsystem.resourceregistry.api.request.RequestInfo
-
setIncludeMeta
public void setIncludeMeta(boolean includeMeta)
- Specified by:
setIncludeMetain interfaceorg.gcube.informationsystem.resourceregistry.api.request.RequestInfo
-
allMeta
public boolean allMeta()
- Specified by:
allMetain interfaceorg.gcube.informationsystem.resourceregistry.api.request.RequestInfo
-
setAllMeta
public void setAllMeta(boolean allMeta)
- Specified by:
setAllMetain interfaceorg.gcube.informationsystem.resourceregistry.api.request.RequestInfo
-
isHierarchicalMode
public boolean isHierarchicalMode()
- Specified by:
isHierarchicalModein interfaceorg.gcube.informationsystem.resourceregistry.api.request.RequestInfo
-
setHierarchicalMode
public void setHierarchicalMode(boolean hierarchicalMode)
- Specified by:
setHierarchicalModein interfaceorg.gcube.informationsystem.resourceregistry.api.request.RequestInfo
-
includeContexts
public boolean includeContexts()
- Specified by:
includeContextsin interfaceorg.gcube.informationsystem.resourceregistry.api.request.RequestInfo
-
setIncludeContexts
public void setIncludeContexts(boolean includeContexts)
- Specified by:
setIncludeContextsin interfaceorg.gcube.informationsystem.resourceregistry.api.request.RequestInfo
-
-