Langues backend début
This commit is contained in:
parent
68b60acd6d
commit
b2fbb6411f
|
@ -0,0 +1,50 @@
|
|||
package fyloz.trial.ColorRecipesExplorer.core;
|
||||
|
||||
public enum ResponseCodes {
|
||||
SUCCESS_USING_MATERIALS(100, ResponseCodeType.SUCCESS, false),
|
||||
SUCCESS_SAVING_RECIPE_INFORMATIONS(2, ResponseCodeType.SUCCESS, false),
|
||||
ERROR_SAVING(3, ResponseCodeType.ERROR, false),
|
||||
ERROR_SAVING_IMAGE(4, ResponseCodeType.ERROR, false),
|
||||
ERROR_SAVING_SIMDUT(5, ResponseCodeType.ERROR, false),
|
||||
AUTH_ERROR(6, ResponseCodeType.ERROR, false),
|
||||
RECIPE_NOT_FOUND(7, ResponseCodeType.ERROR, true),
|
||||
MIX_NOT_FOUND(8, ResponseCodeType.ERROR, true),
|
||||
MATERIAL_NOT_FOUND(9, ResponseCodeType.ERROR, true),
|
||||
MATERIAL_ALREADY_EXIST(10, ResponseCodeType.ERROR, true),
|
||||
MATERIAL_TYPE_ALREADY_EXIST(11, ResponseCodeType.ERROR, true),
|
||||
COMPANY_NOT_FOUND(12, ResponseCodeType.ERROR, true),
|
||||
COMPANY_ALREADY_EXIST(13, ResponseCodeType.ERROR, true),
|
||||
MATERIAL_LINKED(14, ResponseCodeType.ERROR, true),
|
||||
COMPANY_LINKED(15, ResponseCodeType.ERROR, true),
|
||||
MIX_NOT_ASSOCIATED_WITH_RECIPE(16, ResponseCodeType.ERROR, true),
|
||||
NOT_ENOUGH_MATERIAL(17, ResponseCodeType.ERROR, true),
|
||||
MIX_TYPE_ALREADY_USED(18, ResponseCodeType.ERROR, true);
|
||||
|
||||
private int code;
|
||||
private ResponseCodeType type;
|
||||
private boolean needAdditionalContent;
|
||||
|
||||
ResponseCodes(int code, ResponseCodeType type, boolean needAdditionalContent) {
|
||||
this.code = code;
|
||||
this.type = type;
|
||||
this.needAdditionalContent = needAdditionalContent;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public ResponseCodeType getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public boolean needAdditionalContent() {
|
||||
return needAdditionalContent;
|
||||
}
|
||||
|
||||
|
||||
public enum ResponseCodeType {
|
||||
ERROR,
|
||||
SUCCESS
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue