exposed api to get the list of contexts

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry@160114 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2017-12-06 14:23:47 +00:00
parent 263bcf07c9
commit 12af8197c2
1 changed files with 8 additions and 0 deletions

View File

@ -103,4 +103,12 @@ public class ContextManager {
return contextManagement.delete();
}
@GET
@Path("{" + ContextPath.ALL_PATH_PART + "}")
@Produces(ResourceInitializer.APPLICATION_JSON_CHARSET_UTF_8)
public String all() throws ResourceRegistryException {
logger.info("Requested to get the list of all {}s", Context.NAME);
ContextManagement contextManagement = new ContextManagement();
return contextManagement.all(false);
}
}