Reorganizing exceptions

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry-api@141247 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2016-12-19 13:57:46 +00:00
parent 21e0fe9c6e
commit 558a1fd6e7
13 changed files with 57 additions and 43 deletions

View File

@ -5,7 +5,7 @@ package org.gcube.informationsystem.resourceregistry.api;
import java.util.UUID;
import org.gcube.informationsystem.resourceregistry.api.exceptions.InternalException;
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
import org.gcube.informationsystem.resourceregistry.api.exceptions.context.ContextCreationException;
import org.gcube.informationsystem.resourceregistry.api.exceptions.context.ContextException;
import org.gcube.informationsystem.resourceregistry.api.exceptions.context.ContextNotFoundException;
@ -15,7 +15,7 @@ import org.gcube.informationsystem.resourceregistry.api.exceptions.context.Conte
*/
public interface ContextManagement {
public String create(UUID parentContext, String name) throws ContextCreationException, InternalException;
public String create(UUID parentContext, String name) throws ContextCreationException, ResourceRegistryException;
public String read(UUID context) throws ContextNotFoundException, ContextException;

View File

@ -1,30 +0,0 @@
package org.gcube.informationsystem.resourceregistry.api.exceptions;
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
/**
* @author Luca Frosini (ISTI - CNR)
*
*/
public class InternalException extends ResourceRegistryException {
/**
* Generated Serial Version UID
*/
private static final long serialVersionUID = 1785473902200354712L;
public InternalException(String message) {
super(message);
}
public InternalException(Throwable cause) {
super(cause);
}
public InternalException(String message, Throwable cause) {
super(message, cause);
}
}

View File

@ -1,9 +0,0 @@
package org.gcube.informationsystem.resourceregistry.api.exceptions;
/**
* @author Luca Frosini (ISTI - CNR)
*
*/
public interface NotAllowedException {
}

View File

@ -16,5 +16,13 @@ public class EntityAlreadyPresentException extends EntityException implements El
public EntityAlreadyPresentException(String message) {
super(message);
}
public EntityAlreadyPresentException(Throwable cause) {
super(cause);
}
public EntityAlreadyPresentException(String message, Throwable cause) {
super(message, cause);
}
}

View File

@ -17,4 +17,11 @@ public class EntityNotFoundException extends EntityException implements ElementN
super(message);
}
public EntityNotFoundException(Throwable cause) {
super(cause);
}
public EntityNotFoundException(String message, Throwable cause) {
super(message, cause);
}
}

View File

@ -18,4 +18,12 @@ public class FacetNotFoundException extends EntityNotFoundException {
super(message);
}
public FacetNotFoundException(Throwable cause) {
super(cause);
}
public FacetNotFoundException(String message, Throwable cause) {
super(message, cause);
}
}

View File

@ -18,4 +18,11 @@ public class ResourceAlreadyPresentException extends EntityAlreadyPresentExcepti
super(message);
}
public ResourceAlreadyPresentException(Throwable cause) {
super(cause);
}
public ResourceAlreadyPresentException(String message, Throwable cause) {
super(message, cause);
}
}

View File

@ -18,4 +18,12 @@ public class ResourceNotFoundException extends EntityNotFoundException {
super(message);
}
public ResourceNotFoundException(Throwable cause) {
super(cause);
}
public ResourceNotFoundException(String message, Throwable cause) {
super(message, cause);
}
}

View File

@ -17,4 +17,12 @@ public class RelationAlreadyPresentException extends RelationException implement
super(message);
}
public RelationAlreadyPresentException(Throwable cause) {
super(cause);
}
public RelationAlreadyPresentException(String message, Throwable cause) {
super(message, cause);
}
}

View File

@ -25,5 +25,4 @@ public class RelationException extends ResourceRegistryException {
super(message, cause);
}
}

View File

@ -18,4 +18,12 @@ public class RelationNotFoundException extends RelationException implements Elem
super(message);
}
public RelationNotFoundException(Throwable cause) {
super(cause);
}
public RelationNotFoundException(String message, Throwable cause) {
super(message, cause);
}
}

View File

@ -25,5 +25,4 @@ public class SchemaException extends ResourceRegistryException {
super(message, cause);
}
}

View File

@ -24,4 +24,5 @@ public class SchemaNotFoundException extends SchemaException implements ElementN
public SchemaNotFoundException(String message, Throwable cause) {
super(message, cause);
}
}