Gives a chance to each request to validate the response from the RR.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@160673 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
5ad360fbb2
commit
eb160612be
|
@ -43,7 +43,17 @@ public abstract class RequestToResourceRegistry {
|
|||
}
|
||||
if (Objects.isNull(this.resourceRegistryContextClient))
|
||||
this.resourceRegistryContextClient = ResourceRegistryContextClientFactory.create();
|
||||
return this.send();
|
||||
return this.validateResponse(this.send());
|
||||
}
|
||||
|
||||
/**
|
||||
* Gives a chance to sub-classes to validate the response.
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
protected ResponseFromResourceRegistry validateResponse(ResponseFromResourceRegistry response) {
|
||||
//by default, returns the response as it is
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue