Added renew for TypesKnowledge

This commit is contained in:
luca.frosini 2023-10-31 15:51:06 +01:00
parent 660f0ea4a5
commit 30eac775f6
1 changed files with 18 additions and 0 deletions

View File

@ -127,6 +127,18 @@ public class ResourceRegistryClientImpl extends BaseRequestInfo implements Resou
}
}
private void addOffset(Map<String,String> queryParams) throws UnsupportedEncodingException{
if(offset!=null) {
queryParams.put(AccessPath.OFFSET_QUERY_PARAMETER, offset.toString());
}
}
private void addLimit(Map<String,String> queryParams) throws UnsupportedEncodingException{
if(limit!=null) {
queryParams.put(AccessPath.LIMIT_QUERY_PARAMETER, limit.toString());
}
}
protected ContextCacheRenewal contextCacheRenewal = new ContextCacheRenewal() {
@Override
@ -191,6 +203,8 @@ public class ResourceRegistryClientImpl extends BaseRequestInfo implements Resou
Map<String,String> parameters = new HashMap<>();
addIncludeMeta(parameters);
addOffset(parameters);
addLimit(parameters);
gxHTTPStringRequest.queryParams(parameters);
HttpURLConnection httpURLConnection = gxHTTPStringRequest.get();
@ -225,6 +239,10 @@ public class ResourceRegistryClientImpl extends BaseRequestInfo implements Resou
public ModelKnowledge<Type, TypeInformation> getModelKnowledge() {
return typesKnowledge.getModelKnowledge();
}
public void renewModelKnowledge() {
typesKnowledge.renew();
}
/**
* It reads the context from server.