Fixed query parameters
This commit is contained in:
parent
adc1827da1
commit
ef5b530800
|
@ -21,7 +21,6 @@ import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegis
|
||||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextAlreadyPresentException;
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextAlreadyPresentException;
|
||||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException;
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException;
|
||||||
import org.gcube.informationsystem.resourceregistry.api.request.BaseRequestInfo;
|
import org.gcube.informationsystem.resourceregistry.api.request.BaseRequestInfo;
|
||||||
import org.gcube.informationsystem.resourceregistry.api.rest.AccessPath;
|
|
||||||
import org.gcube.informationsystem.resourceregistry.api.rest.ContextPath;
|
import org.gcube.informationsystem.resourceregistry.api.rest.ContextPath;
|
||||||
import org.gcube.informationsystem.resourceregistry.api.rest.httputils.HTTPUtility;
|
import org.gcube.informationsystem.resourceregistry.api.rest.httputils.HTTPUtility;
|
||||||
import org.gcube.informationsystem.serialization.ElementMapper;
|
import org.gcube.informationsystem.serialization.ElementMapper;
|
||||||
|
@ -68,7 +67,7 @@ public class ResourceRegistryContextClientImpl extends BaseRequestInfo implement
|
||||||
|
|
||||||
private void addIncludeMeta(Map<String,String> queryParams, boolean includeMeta) throws UnsupportedEncodingException{
|
private void addIncludeMeta(Map<String,String> queryParams, boolean includeMeta) throws UnsupportedEncodingException{
|
||||||
if(includeMeta) {
|
if(includeMeta) {
|
||||||
queryParams.put(AccessPath.INCLUDE_META_QUERY_PARAMETER, Boolean.toString(includeMeta));
|
queryParams.put(ContextPath.INCLUDE_META_QUERY_PARAMETER, Boolean.toString(includeMeta));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,7 +79,7 @@ public class ResourceRegistryContextClientImpl extends BaseRequestInfo implement
|
||||||
|
|
||||||
private void addOffset(Map<String,String> queryParams, Integer offset) throws UnsupportedEncodingException{
|
private void addOffset(Map<String,String> queryParams, Integer offset) throws UnsupportedEncodingException{
|
||||||
if(offset!=null) {
|
if(offset!=null) {
|
||||||
queryParams.put(AccessPath.OFFSET_QUERY_PARAMETER, offset.toString());
|
queryParams.put(ContextPath.OFFSET_QUERY_PARAMETER, offset.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,7 +91,7 @@ public class ResourceRegistryContextClientImpl extends BaseRequestInfo implement
|
||||||
|
|
||||||
private void addLimit(Map<String,String> queryParams, Integer limit) throws UnsupportedEncodingException{
|
private void addLimit(Map<String,String> queryParams, Integer limit) throws UnsupportedEncodingException{
|
||||||
if(limit!=null) {
|
if(limit!=null) {
|
||||||
queryParams.put(AccessPath.LIMIT_QUERY_PARAMETER, limit.toString());
|
queryParams.put(ContextPath.LIMIT_QUERY_PARAMETER, limit.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue