Remove hardcoded message id inside code
| | |
| | | } |
| | | } |
| | | else |
| | | if (msgID != -1) |
| | | if (msgID != MSGID_ADMIN_NO_MESSAGE) |
| | | { |
| | | message = getMessage(MSGID_ADMIN_ERROR); |
| | | message = message + getMessage(msgID); |
| | |
| | | /** |
| | | * Unable to initialze arguments. |
| | | */ |
| | | CANNOT_INITIALIZE_ARGS(1, -1), |
| | | CANNOT_INITIALIZE_ARGS(1, MSGID_ADMIN_NO_MESSAGE), |
| | | |
| | | /** |
| | | * Cannot parse argument. |
| | | */ |
| | | ERROR_PARSING_ARGS(2, -1), |
| | | ERROR_PARSING_ARGS(2, MSGID_ADMIN_NO_MESSAGE), |
| | | /** |
| | | * Return code: Cannot get the connection to the ADS. |
| | | */ |
| | | CANNOT_CONNECT_TO_ADS(3, -1), |
| | | CANNOT_CONNECT_TO_ADS(3, MSGID_ADMIN_NO_MESSAGE), |
| | | |
| | | /** |
| | | * The host name is missing. |
| | |
| | | public static final int MSGID_ADMIN_SUCCESSFUL_NOP= |
| | | CATEGORY_MASK_ADMIN | SEVERITY_MASK_INFORMATIONAL | 51; |
| | | |
| | | /** |
| | | * The message ID which indicate that no message is required. |
| | | */ |
| | | public static final int MSGID_ADMIN_NO_MESSAGE = |
| | | CATEGORY_MASK_ADMIN | SEVERITY_MASK_SEVERE_ERROR | 52; |
| | | |
| | | |
| | | |
| | | // Prevent instantiation. |
| | | private AdminMessages() { |
| | |
| | | registerMessage(MSGID_ADMIN_SUCCESSFUL_NOP, |
| | | "The operation has been successfully completed, "+ |
| | | "but no action was required"); |
| | | registerMessage(MSGID_ADMIN_NO_MESSAGE,""); |
| | | } |
| | | } |