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:
Manuele Simi 2017-12-19 04:02:42 +00:00
parent 5ad360fbb2
commit eb160612be
1 changed files with 11 additions and 1 deletions

View File

@ -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;
}
/**