Refactoring service due to exception reoganization in resource-registry-api

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry@135001 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2016-11-28 16:18:07 +00:00
parent 1399e48456
commit a576d3d8fa
1 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ import javax.ws.rs.ext.Provider;
import org.gcube.informationsystem.resourceregistry.api.exceptions.InternalException;
import org.gcube.informationsystem.resourceregistry.api.exceptions.NotAllowedException;
import org.gcube.informationsystem.resourceregistry.api.exceptions.ObjectNotFound;
import org.gcube.informationsystem.resourceregistry.api.exceptions.ElementNotFound;
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
/**
@ -23,7 +23,7 @@ public class ResourceRegistryExceptionMapper implements ExceptionMapper<Resource
String entity = exception.getMessage();
MediaType mediaType = MediaType.TEXT_PLAIN_TYPE;
if(ObjectNotFound.class.isAssignableFrom(exception.getClass())){
if(ElementNotFound.class.isAssignableFrom(exception.getClass())){
status = Status.NOT_FOUND;
}else if(NotAllowedException.class.isAssignableFrom(exception.getClass())){
status = Status.FORBIDDEN;