Introduce error codes for the delete context method. Query the RR to validate the delete request.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162342 82a268e6-3cf1-43bd-a215-b396298e98cfmaster
parent
f1e50d4d15
commit
865c2255f7
@ -0,0 +1,37 @@
|
||||
package org.gcube.resourcemanagement.manager.io.rs;
|
||||
|
||||
import org.gcube.resourcemanagement.manager.io.codeexceptions.ErrorCode;
|
||||
|
||||
/**
|
||||
* Error codes returned by the delete method of the context resource.
|
||||
*
|
||||
* @author Manuele Simi (ISTI CNR)
|
||||
*
|
||||
*/
|
||||
public enum RMDeleteContextCode implements ErrorCode {
|
||||
|
||||
CONTEXT_DOES_NOT_EXIST(1, "The context does not exist."),
|
||||
GENERIC_ERROR_FROM_RR(2, "The Resource Registry returned an error.");
|
||||
|
||||
private int id;
|
||||
private String msg;
|
||||
|
||||
private RMDeleteContextCode(int id, String msg) {
|
||||
this.id = id;
|
||||
this.msg = msg;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.gcube.resourcemanagement.manager.io.codeexceptions.ErrorCode#getId()
|
||||
*/
|
||||
public int getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.gcube.resourcemanagement.manager.io.codeexceptions.ErrorCode#getMessage()
|
||||
*/
|
||||
public String getMessage() {
|
||||
return this.msg;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue