1 /*============LICENSE_START=======================================================
2 * oom-truststore-merger
3 * ================================================================================
4 * Copyright (C) 2020 Nokia. All rights reserved.
5 * ================================================================================
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 * ============LICENSE_END=========================================================
20 package org.onap.oom.truststoremerger.api;
22 public enum ExitStatus {
24 SUCCESS(0, "Success"),
25 TRUSTSTORES_PATHS_PROVIDER_EXCEPTION(1, "Invalid paths in environment variables"),
26 MERGER_CONFIGURATION_EXCEPTION(2, "Invalid merger configuration"),
27 TRUSTSTORE_FILE_FACTORY_EXCEPTION(3, "Invalid truststore file-password pair"),
28 PASSWORD_READER_EXCEPTION(4, "Cannot read password from file"),
29 CREATE_BACKUP_EXCEPTION(5, "Cannot create backup file"),
30 KEYSTORE_INSTANCE_EXCEPTION(6, "Cannot initialize keystore instance"),
31 TRUSTSTORE_LOAD_FILE_EXCEPTION(7, "Cannot load truststore file"),
32 TRUSTSTORE_DATA_OPERATION_EXCEPTION(8, "Cannot operate on truststore data"),
33 MISSING_TRUSTSTORE_EXCEPTION(9, "Missing truststore certificates in provided file"),
34 ALIAS_CONFLICT_EXCEPTION(10, "Alias conflict detected"),
35 WRITE_TRUSTSTORE_FILE_EXCEPTION(11, "Cannot save truststore file"),
36 KEYSTORE_FILE_COPY_EXCEPTION(12, "Cannot copy keystore file"),
37 KEYSTORE_NOT_EXIST_EXCEPTION(13, "Keystore file does not exist"),
38 UNEXPECTED_EXCEPTION(99, "Application exited abnormally");
41 private final int value;
42 private final String message;
44 ExitStatus(int value, String message) {
46 this.message = message;
49 public int getExitCodeValue() {
53 public String getMessage() {