This commit is contained in:
Lucio Lelii 2018-09-20 12:52:17 +00:00
parent a45326114f
commit d729d4ee6f
7 changed files with 207 additions and 0 deletions

View File

@ -0,0 +1,30 @@
package org.gcube.common.storagehub.model.exceptions;
public class BackendGenericError extends StorageHubException{
/**
*
*/
private static final long serialVersionUID = 1L;
public BackendGenericError() {
super();
// TODO Auto-generated constructor stub
}
public BackendGenericError(String message, Throwable cause) {
super(message, cause);
// TODO Auto-generated constructor stub
}
public BackendGenericError(String message) {
super(message);
// TODO Auto-generated constructor stub
}
public BackendGenericError(Throwable cause) {
super(cause);
// TODO Auto-generated constructor stub
}
}

View File

@ -0,0 +1,22 @@
package org.gcube.common.storagehub.model.exceptions;
public class IdNotFoundException extends StorageHubException {
/**
*
*/
private static final long serialVersionUID = 1L;
public IdNotFoundException(String id, Throwable cause) {
super(String.format("Item with id %s not found", id), cause);
// TODO Auto-generated constructor stub
}
public IdNotFoundException(String id) {
super(String.format("Item with id %s not found", id));
// TODO Auto-generated constructor stub
}
}

View File

@ -0,0 +1,30 @@
package org.gcube.common.storagehub.model.exceptions;
public class InvalidCallParameters extends StorageHubException {
/**
*
*/
private static final long serialVersionUID = 1L;
public InvalidCallParameters() {
super();
// TODO Auto-generated constructor stub
}
public InvalidCallParameters(String message, Throwable cause) {
super(message, cause);
// TODO Auto-generated constructor stub
}
public InvalidCallParameters(String message) {
super(message);
// TODO Auto-generated constructor stub
}
public InvalidCallParameters(Throwable cause) {
super(cause);
// TODO Auto-generated constructor stub
}
}

View File

@ -0,0 +1,32 @@
package org.gcube.common.storagehub.model.exceptions;
public class InvalidItemException extends StorageHubException {
/**
*
*/
private static final long serialVersionUID = 1L;
public InvalidItemException() {
super();
// TODO Auto-generated constructor stub
}
public InvalidItemException(String message, Throwable cause) {
super(message, cause);
// TODO Auto-generated constructor stub
}
public InvalidItemException(String message) {
super(message);
// TODO Auto-generated constructor stub
}
public InvalidItemException(Throwable cause) {
super(cause);
// TODO Auto-generated constructor stub
}
}

View File

@ -0,0 +1,30 @@
package org.gcube.common.storagehub.model.exceptions;
public class ItemAlreadyExistsException extends StorageHubException {
/**
*
*/
private static final long serialVersionUID = 1L;
public ItemAlreadyExistsException() {
super();
// TODO Auto-generated constructor stub
}
public ItemAlreadyExistsException(String message, Throwable cause) {
super(message, cause);
// TODO Auto-generated constructor stub
}
public ItemAlreadyExistsException(String message) {
super(message);
// TODO Auto-generated constructor stub
}
public ItemAlreadyExistsException(Throwable cause) {
super(cause);
// TODO Auto-generated constructor stub
}
}

View File

@ -0,0 +1,32 @@
package org.gcube.common.storagehub.model.exceptions;
public abstract class StorageHubException extends Exception {
/**
*
*/
private static final long serialVersionUID = 1L;
public StorageHubException() {
super();
// TODO Auto-generated constructor stub
}
public StorageHubException(String message, Throwable cause) {
super(message, cause);
// TODO Auto-generated constructor stub
}
public StorageHubException(String message) {
super(message);
// TODO Auto-generated constructor stub
}
public StorageHubException(Throwable cause) {
super(cause);
// TODO Auto-generated constructor stub
}
}

View File

@ -0,0 +1,31 @@
package org.gcube.common.storagehub.model.exceptions;
public class UserNotAuthorizedException extends StorageHubException {
/**
*
*/
private static final long serialVersionUID = 1L;
public UserNotAuthorizedException() {
super();
// TODO Auto-generated constructor stub
}
public UserNotAuthorizedException(String message, Throwable cause) {
super(message, cause);
// TODO Auto-generated constructor stub
}
public UserNotAuthorizedException(String message) {
super(message);
// TODO Auto-generated constructor stub
}
public UserNotAuthorizedException(Throwable cause) {
super(cause);
// TODO Auto-generated constructor stub
}
}