org.gwl.tz.enums.AppEnums Maven / Gradle / Ivy
package org.gwl.tz.enums;
/**
* This class used enums value of application
* @author GWL
*
*/
public class AppEnums {
private static final String INTERNAL_ERROR_MSG = "Encountered some error while processing request";
private static final String FORMATTER_ERROR_MSG = "Invalid pattern specification";
public static final String TZ_SUCCESS_MSG = "Datetime converted successfully";
public static final String TZ_ERROR_MSG = "Encountered some error while processing convert in timezone";
public static final String AVAILABLE_TIMEZONE_ID_ERROR_MSG = "The datetime zone id {0} is not recognised.";
public enum Success {
TZ_SUCCESS(200, TZ_SUCCESS_MSG);
public final Integer statusCode;
public final String statusMessage;
private Success(Integer statusCode, String statusMessage) {
this.statusCode = statusCode;
this.statusMessage = statusMessage;
}
}
public enum TimeZoneError {
TZ_ERROR(1000, TZ_ERROR_MSG),AVAILABLE_TIMEZONE_ID_ERROR(1001, AVAILABLE_TIMEZONE_ID_ERROR_MSG);
public final Integer errorCode;
public final String errorMessage;
private TimeZoneError(Integer errorCode, String errorMessage) {
this.errorCode = errorCode;
this.errorMessage = errorMessage;
}
}
public enum InternalError {
INTERNAL_ERROR(500, INTERNAL_ERROR_MSG);
public final Integer errorCode;
public final String errorMessage;
private InternalError(Integer errorCode, String errorMessage) {
this.errorCode = errorCode;
this.errorMessage = errorMessage;
}
}
public enum FormatterError {
FORMATTER_ERROR(2000, FORMATTER_ERROR_MSG);
public final Integer errorCode;
public final String errorMessage;
private FormatterError(Integer errorCode, String errorMessage) {
this.errorCode = errorCode;
this.errorMessage = errorMessage;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy