diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/rest/Access.java b/src/main/java/org/gcube/informationsystem/resourceregistry/rest/Access.java index a4f8874..7c9a0d4 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/rest/Access.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/rest/Access.java @@ -11,9 +11,8 @@ import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException; -import org.gcube.informationsystem.resourceregistry.api.exceptions.entity.facet.FacetNotFoundException; +import org.gcube.informationsystem.resourceregistry.api.exceptions.er.ERNotFoundException; import org.gcube.informationsystem.resourceregistry.api.exceptions.query.InvalidQueryException; -import org.gcube.informationsystem.resourceregistry.api.exceptions.schema.SchemaException; import org.gcube.informationsystem.resourceregistry.api.exceptions.schema.SchemaNotFoundException; import org.gcube.informationsystem.resourceregistry.api.rest.AccessPath; import org.gcube.informationsystem.resourceregistry.er.ERManagement; @@ -88,7 +87,7 @@ public class Access { @Produces(MediaType.APPLICATION_JSON) public String getInstance(@PathParam(TYPE_PATH_PARAM) String type, @PathParam(ID_PATH_PARAM) String id) - throws ResourceRegistryException { + throws ERNotFoundException, ResourceRegistryException { logger.info("Requested {} with id {}", type, id); @SuppressWarnings("rawtypes") @@ -116,7 +115,7 @@ public class Access { @QueryParam(AccessPath.POLYMORPHIC_PARAM) Boolean polymorphic, @QueryParam(AccessPath.REFERENCE) String reference, @QueryParam(AccessPath.DIRECTION) String direction) - throws FacetNotFoundException, ResourceRegistryException { + throws ResourceRegistryException { logger.info("Requested {} ({}={}) instances", type, AccessPath.POLYMORPHIC_PARAM, polymorphic); @@ -174,8 +173,7 @@ public class Access { @Produces(MediaType.APPLICATION_JSON) public String getSchema(@PathParam(TYPE_PATH_PARAM) String type, @QueryParam(AccessPath.POLYMORPHIC_PARAM) Boolean polymorphic) - throws SchemaNotFoundException, SchemaException, - ResourceRegistryException { + throws SchemaNotFoundException, ResourceRegistryException { logger.info("Requested Schema for type {}", type); SchemaManagement schemaManagement = new SchemaManagementImpl();