Extended BaseRequestInfo
This commit is contained in:
parent
0cb336ded4
commit
71b780eb2a
|
@ -4,8 +4,7 @@ import java.util.List;
|
||||||
|
|
||||||
import javax.ws.rs.core.UriInfo;
|
import javax.ws.rs.core.UriInfo;
|
||||||
|
|
||||||
import org.gcube.informationsystem.base.reference.IdentifiableElement;
|
import org.gcube.informationsystem.resourceregistry.api.request.BaseRequestInfo;
|
||||||
import org.gcube.informationsystem.model.reference.properties.Metadata;
|
|
||||||
import org.gcube.informationsystem.resourceregistry.api.request.RequestInfo;
|
import org.gcube.informationsystem.resourceregistry.api.request.RequestInfo;
|
||||||
import org.gcube.informationsystem.resourceregistry.api.rest.InstancePath;
|
import org.gcube.informationsystem.resourceregistry.api.rest.InstancePath;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
@ -14,39 +13,14 @@ import org.slf4j.LoggerFactory;
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR)
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*/
|
*/
|
||||||
public class ServerRequestInfo implements RequestInfo {
|
public class ServerRequestInfo extends BaseRequestInfo implements RequestInfo {
|
||||||
|
|
||||||
protected static Logger logger = LoggerFactory.getLogger(ServerRequestInfo.class);
|
protected static Logger logger = LoggerFactory.getLogger(ServerRequestInfo.class);
|
||||||
|
|
||||||
protected UriInfo uriInfo;
|
protected UriInfo uriInfo;
|
||||||
|
|
||||||
/**
|
|
||||||
* Track if the request requested to include {@link Metadata}
|
|
||||||
*/
|
|
||||||
protected boolean includeMeta;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Track if the request requested to include {@link Metadata} in all
|
|
||||||
* {@link IdentifiableElement} or just in the root instance
|
|
||||||
*/
|
|
||||||
protected boolean allMeta;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Track if hierarchicalMode has been requested
|
|
||||||
*/
|
|
||||||
protected boolean hierarchicalMode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Track if the request requested to include contexts
|
|
||||||
*/
|
|
||||||
protected boolean includeContexts;
|
|
||||||
|
|
||||||
public ServerRequestInfo() {
|
public ServerRequestInfo() {
|
||||||
this.includeMeta = false;
|
super();
|
||||||
this.allMeta = false;
|
|
||||||
this.hierarchicalMode = false;
|
|
||||||
this.includeContexts = false;
|
|
||||||
this.uriInfo = null;
|
this.uriInfo = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,44 +124,8 @@ public class ServerRequestInfo implements RequestInfo {
|
||||||
checkQueryParameter(InstancePath.INCLUDE_META_IN_ALL_INSTANCES_QUERY_PARAMETER);
|
checkQueryParameter(InstancePath.INCLUDE_META_IN_ALL_INSTANCES_QUERY_PARAMETER);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean includeMeta() {
|
|
||||||
return includeMeta;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setIncludeMeta(boolean includeMeta) {
|
|
||||||
this.includeMeta = includeMeta;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean allMeta() {
|
|
||||||
return allMeta;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setAllMeta(boolean allMeta) {
|
|
||||||
this.allMeta = allMeta;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isHierarchicalMode() {
|
|
||||||
return hierarchicalMode;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setHierarchicalMode(boolean hierarchicalMode) {
|
|
||||||
this.hierarchicalMode = hierarchicalMode;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean includeContexts() {
|
|
||||||
return includeContexts;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setIncludeContexts(boolean includeContexts) {
|
|
||||||
this.includeContexts = includeContexts;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue