Added Javadoc
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry@131062 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
81357b035d
commit
27feec58ac
|
@ -33,6 +33,13 @@ public class Access {
|
||||||
protected EntityManagement entityManager = new EntityManagementImpl();
|
protected EntityManagement entityManager = new EntityManagementImpl();
|
||||||
protected SchemaManagement schemaManager = new SchemaManagementImpl();
|
protected SchemaManagement schemaManager = new SchemaManagementImpl();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* e.g. /resource-registry/access?query=SELECT FROM V
|
||||||
|
* @param query
|
||||||
|
* @param fetchPlan
|
||||||
|
* @return
|
||||||
|
* @throws InvalidQueryException
|
||||||
|
*/
|
||||||
@GET
|
@GET
|
||||||
public String query(@QueryParam(AccessRESTPath.QUERY_PARAM) String query,
|
public String query(@QueryParam(AccessRESTPath.QUERY_PARAM) String query,
|
||||||
@QueryParam(AccessRESTPath.FETCH_PLAN_PARAM) String fetchPlan)
|
@QueryParam(AccessRESTPath.FETCH_PLAN_PARAM) String fetchPlan)
|
||||||
|
@ -41,6 +48,13 @@ public class Access {
|
||||||
return queryManager.execute(query, fetchPlan);
|
return queryManager.execute(query, fetchPlan);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* e.g. /resource-registry/access/facetInstance/4d28077b-566d-4132-b073-f4edaf61dcb9
|
||||||
|
* @param facetId
|
||||||
|
* @return
|
||||||
|
* @throws FacetNotFoundException
|
||||||
|
* @throws ResourceRegistryException
|
||||||
|
*/
|
||||||
@GET @Path(AccessRESTPath.FACET_INSTANCE_PATH_PART + "/{" + AccessRESTPath.FACET_ID_PATH_PART + "}")
|
@GET @Path(AccessRESTPath.FACET_INSTANCE_PATH_PART + "/{" + AccessRESTPath.FACET_ID_PATH_PART + "}")
|
||||||
public String getFacet(@PathParam(AccessRESTPath.FACET_ID_PATH_PART) String facetId)
|
public String getFacet(@PathParam(AccessRESTPath.FACET_ID_PATH_PART) String facetId)
|
||||||
throws FacetNotFoundException, ResourceRegistryException {
|
throws FacetNotFoundException, ResourceRegistryException {
|
||||||
|
@ -48,6 +62,12 @@ public class Access {
|
||||||
return entityManager.readFacet(facetId);
|
return entityManager.readFacet(facetId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* e.g. /resource-registry/access/facetSchema/ContactFacet
|
||||||
|
* @param facetType
|
||||||
|
* @return
|
||||||
|
* @throws SchemaNotFoundException
|
||||||
|
*/
|
||||||
@GET @Path(AccessRESTPath.FACET_SCHEMA_PATH_PART + "/{" + AccessRESTPath.FACET_TYPE_PATH_PART + "}")
|
@GET @Path(AccessRESTPath.FACET_SCHEMA_PATH_PART + "/{" + AccessRESTPath.FACET_TYPE_PATH_PART + "}")
|
||||||
public String getFacetSchema(@PathParam(AccessRESTPath.FACET_TYPE_PATH_PART) String facetType)
|
public String getFacetSchema(@PathParam(AccessRESTPath.FACET_TYPE_PATH_PART) String facetType)
|
||||||
throws SchemaNotFoundException {
|
throws SchemaNotFoundException {
|
||||||
|
@ -55,6 +75,13 @@ public class Access {
|
||||||
return schemaManager.getFacetSchema(facetType);
|
return schemaManager.getFacetSchema(facetType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* e.g. /resource-registry/access/resourceInstance/cc132a2c-d0b0-45a8-92fa-7451f6a44b6d
|
||||||
|
* @param resourceId
|
||||||
|
* @return
|
||||||
|
* @throws ResourceNotFoundException
|
||||||
|
* @throws ResourceRegistryException
|
||||||
|
*/
|
||||||
@GET @Path(AccessRESTPath.RESOURCE_INSTANCE_PATH_PART + "/{" + AccessRESTPath.RESOURCE_ID_PATH_PART + "}")
|
@GET @Path(AccessRESTPath.RESOURCE_INSTANCE_PATH_PART + "/{" + AccessRESTPath.RESOURCE_ID_PATH_PART + "}")
|
||||||
public String getResource(@PathParam(AccessRESTPath.RESOURCE_ID_PATH_PART) String resourceId)
|
public String getResource(@PathParam(AccessRESTPath.RESOURCE_ID_PATH_PART) String resourceId)
|
||||||
throws ResourceNotFoundException, ResourceRegistryException {
|
throws ResourceNotFoundException, ResourceRegistryException {
|
||||||
|
@ -62,6 +89,12 @@ public class Access {
|
||||||
return entityManager.readResource(resourceId);
|
return entityManager.readResource(resourceId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* e.g. /resource-registry/access/resourceSchema/HostingNode
|
||||||
|
* @param resourceType
|
||||||
|
* @return
|
||||||
|
* @throws SchemaNotFoundException
|
||||||
|
*/
|
||||||
@GET @Path(AccessRESTPath.RESOURCE_SCHEMA_PATH_PART + "/{" + AccessRESTPath.RESOURCE_TYPE_PATH_PART + "}")
|
@GET @Path(AccessRESTPath.RESOURCE_SCHEMA_PATH_PART + "/{" + AccessRESTPath.RESOURCE_TYPE_PATH_PART + "}")
|
||||||
public String getResourceSchema(@PathParam(AccessRESTPath.RESOURCE_TYPE_PATH_PART) String resourceType)
|
public String getResourceSchema(@PathParam(AccessRESTPath.RESOURCE_TYPE_PATH_PART) String resourceType)
|
||||||
throws SchemaNotFoundException {
|
throws SchemaNotFoundException {
|
||||||
|
|
Loading…
Reference in New Issue