Porting code to redesigned E/R format
This commit is contained in:
parent
fdf9e71068
commit
ac164abb46
|
@ -32,9 +32,9 @@ public interface ResourceRegistryClient {
|
|||
|
||||
public void setHierarchicalMode(boolean hierarchicalMode);
|
||||
|
||||
public boolean isIncludeContextsInHeader();
|
||||
public boolean isIncludeContexts();
|
||||
|
||||
public void setIncludeContextsInHeader(boolean includeContextsInHeader);
|
||||
public void setIncludeContexts(boolean includeContexts);
|
||||
|
||||
public void addHeader(String name, String value);
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
|
|||
protected Map<String, String> headers;
|
||||
|
||||
protected boolean hierarchicalMode;
|
||||
protected boolean includeContextsInHeader;
|
||||
protected boolean includeContexts;
|
||||
|
||||
protected ContextCache contextCache;
|
||||
|
||||
|
@ -77,13 +77,13 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isIncludeContextsInHeader() {
|
||||
return includeContextsInHeader;
|
||||
public boolean isIncludeContexts() {
|
||||
return includeContexts;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setIncludeContextsInHeader(boolean includeContextsInHeader) {
|
||||
this.includeContextsInHeader = includeContextsInHeader;
|
||||
public void setIncludeContexts(boolean includeContexts) {
|
||||
this.includeContexts = includeContexts;
|
||||
}
|
||||
|
||||
private GXHTTPStringRequest includeAdditionalQueryParameters(GXHTTPStringRequest gxHTTPStringRequest) throws UnsupportedEncodingException{
|
||||
|
@ -92,7 +92,7 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
|
|||
|
||||
private GXHTTPStringRequest includeAdditionalQueryParameters(GXHTTPStringRequest gxHTTPStringRequest, Map<String,String> queryParams) throws UnsupportedEncodingException{
|
||||
gxHTTPStringRequest = checkHierarchicalMode(gxHTTPStringRequest, queryParams);
|
||||
return checkIncludeContextsInInstanceHeader(gxHTTPStringRequest, queryParams);
|
||||
return checkIncludeContextsInInstance(gxHTTPStringRequest, queryParams);
|
||||
}
|
||||
|
||||
private GXHTTPStringRequest checkHierarchicalMode(GXHTTPStringRequest gxHTTPStringRequest, Map<String,String> queryParams) throws UnsupportedEncodingException{
|
||||
|
@ -105,12 +105,12 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
|
|||
return gxHTTPStringRequest.queryParams(queryParams);
|
||||
}
|
||||
|
||||
private GXHTTPStringRequest checkIncludeContextsInInstanceHeader(GXHTTPStringRequest gxHTTPStringRequest, Map<String,String> queryParams) throws UnsupportedEncodingException{
|
||||
if(includeContextsInHeader) {
|
||||
private GXHTTPStringRequest checkIncludeContextsInInstance(GXHTTPStringRequest gxHTTPStringRequest, Map<String,String> queryParams) throws UnsupportedEncodingException{
|
||||
if(includeContexts) {
|
||||
if(queryParams==null) {
|
||||
queryParams = new HashMap<>();
|
||||
}
|
||||
queryParams.put(AccessPath.INCLUDE_CONTEXTS_IN_HEADER_QUERY_PARAMETER, Boolean.toString(includeContextsInHeader));
|
||||
queryParams.put(AccessPath.INCLUDE_CONTEXTS_QUERY_PARAMETER, Boolean.toString(includeContexts));
|
||||
}
|
||||
return gxHTTPStringRequest.queryParams(queryParams);
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
|
|||
public ResourceRegistryClientImpl(String address, boolean sharedContextCache) {
|
||||
this.address = address;
|
||||
this.hierarchicalMode = false;
|
||||
this.includeContextsInHeader = false;
|
||||
this.includeContexts = false;
|
||||
this.headers = new HashMap<>();
|
||||
if(sharedContextCache) {
|
||||
contextCache = ContextCache.getInstance();
|
||||
|
|
Loading…
Reference in New Issue