diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/requests/ServerRequestInfo.java b/src/main/java/org/gcube/informationsystem/resourceregistry/requests/ServerRequestInfo.java index 901a0ee..e9d1c71 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/requests/ServerRequestInfo.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/requests/ServerRequestInfo.java @@ -4,8 +4,7 @@ import java.util.List; import javax.ws.rs.core.UriInfo; -import org.gcube.informationsystem.base.reference.IdentifiableElement; -import org.gcube.informationsystem.model.reference.properties.Metadata; +import org.gcube.informationsystem.resourceregistry.api.request.BaseRequestInfo; import org.gcube.informationsystem.resourceregistry.api.request.RequestInfo; import org.gcube.informationsystem.resourceregistry.api.rest.InstancePath; import org.slf4j.Logger; @@ -14,39 +13,14 @@ import org.slf4j.LoggerFactory; /** * @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 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() { - this.includeMeta = false; - this.allMeta = false; - this.hierarchicalMode = false; - this.includeContexts = false; + super(); this.uriInfo = null; } @@ -150,44 +124,8 @@ public class ServerRequestInfo implements RequestInfo { 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; - } }