rsanchez
2017-03-10 2762277c60db7df5ad3214b10a0dd93d4f2f1128
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package net.curisit.securis.services.exception;
import net.curisit.integrity.exception.CurisException;
public class SeCurisServiceException extends CurisException {
    private int errorCode = 0;
    public SeCurisServiceException(int errorCode, String msg) {
        super(msg);
        this.errorCode = errorCode;
    }
    public SeCurisServiceException(String msg) {
        super(msg);
        this.errorCode = ErrorCodes.UNEXPECTED_ERROR;
    }
    public int getStatus() {
        return errorCode;
    }
    /**
    * 
    */
    private static final long serialVersionUID = 1L;
    public static class ErrorCodes {
        public static int UNEXPECTED_ERROR = 1000;
        public static int INVALID_CREDENTIALS = 1001;
        public static int UNAUTHORIZED_ACCESS = 1002;
        public static int NOT_FOUND = 1003;
        public static int INVALID_FORMAT = 1004;
        public static int WRONG_STATUS = 1005;
        public static int INVALID_LICENSE_REQUEST_DATA = 1100;
        public static int LICENSE_NOT_READY_FOR_RENEW = 1101;
        public static int LICENSE_DATA_IS_NOT_VALID = 1102;
        public static int LICENSE_IS_EXPIRED = 1103;
        public static int INVALID_REQUEST_DATA = 1201;
        public static int INVALID_REQUEST_DATA_FORMAT = 1202;
        public static int BLOCKED_REQUEST_DATA = 1203;
        public static int DUPLICATED_REQUEST_DATA = 1204;
        public static int NO_AVAILABLE_LICENSES = 1205;
        public static int INVALID_DATA = 1301;
    }
}