From 5ac1e8648e03877d72e145ba59d2c6f9cca78ad2 Mon Sep 17 00:00:00 2001 From: "beili.zhou" Date: Fri, 11 Aug 2017 21:48:22 -0400 Subject: OAM operations 1 - miscellaneous OAM operations changes are large, need to break down to multiple submissions based on size and compilability. This is the first set which covers: feature installation, audit log message, listener instantiation and etc. Includes these user stories: APPC-39/41/43/44/45/46/52/77. Issue Id: APPC-38 Change-Id: Ifc0f5bd2468732d04ae462be09a6ad720aefba2b Signed-off-by: beili.zhou --- .../appc/configuration/ConfigurationFactory.java | 8 ++-- .../src/main/java/org/openecomp/appc/i18n/Msg.java | 46 ++++++++++++++++++---- 2 files changed, 44 insertions(+), 10 deletions(-) (limited to 'appc-common/src/main/java/org/openecomp') diff --git a/appc-common/src/main/java/org/openecomp/appc/configuration/ConfigurationFactory.java b/appc-common/src/main/java/org/openecomp/appc/configuration/ConfigurationFactory.java index a2dd55702..fa8b5ee0b 100644 --- a/appc-common/src/main/java/org/openecomp/appc/configuration/ConfigurationFactory.java +++ b/appc-common/src/main/java/org/openecomp/appc/configuration/ConfigurationFactory.java @@ -116,14 +116,14 @@ public final class ConfigurationFactory { /** * The default properties resource to be loaded */ - private static final String DEFAULT_PROPERTIES = "/opt/openecomp/appc/data/properties/appc.properties"; + private static final String DEFAULT_PROPERTIES = "org/openecomp/appc/default.properties"; /** * This collection allows for special configurations to be created and maintained, organized by some identification * (such as an object reference to the StackBuilder to which they apply), and then obtained from the configuration * factory when needed. */ - private static HashMap localConfigs = new HashMap(); + private static HashMap localConfigs = new HashMap<>(); /** * The reentrant shared lock used to serialize access to the properties. @@ -355,7 +355,9 @@ public final class ConfigurationFactory { logger.error(EELFResourceManager.format(e)); } finally { try { - stream.close(); + if (stream != null) { + stream.close(); + } } catch (IOException e) { // not much we can do since logger may not be configured // yet diff --git a/appc-common/src/main/java/org/openecomp/appc/i18n/Msg.java b/appc-common/src/main/java/org/openecomp/appc/i18n/Msg.java index 7306b4c5d..5f0aa3258 100644 --- a/appc-common/src/main/java/org/openecomp/appc/i18n/Msg.java +++ b/appc-common/src/main/java/org/openecomp/appc/i18n/Msg.java @@ -756,28 +756,60 @@ public enum Msg implements EELFResolvableErrorEnum { OAM_OPERATION_EXCEPTION, /** - * Application {0} is stopping... Waiting for {1} LCM request to complete + * Application {0} is {1} + */ + OAM_OPERATION_ENTERING_MAINTENANCE_MODE, + + /** + * Application {0} is in {1} + */ + OAM_OPERATION_MAINTENANCE_MODE, + + /** + * Application {0} is {1} + */ + OAM_OPERATION_STARTING, + + /** + * Application {0} is {1} + */ + OAM_OPERATION_STARTED, + + /** + * Application {0} is {1} */ OAM_OPERATION_STOPPING, /** - * Application {0} is stopped + * Application {0} is {1} */ OAM_OPERATION_STOPPED, + /** + * A {1} API is not allowed when {0} is in the {2} state + */ + INVALID_STATE_TRANSITION, + /** + * Application {0} was unable to find the Request Handler service + */ + REQUEST_HANDLER_UNAVAILABLE, /** - * Application {0} is started + * Application {0} is {1} */ - OAM_OPERATION_STARTING, + OAM_OPERATION_RESTARTING, /** - * Application {0} is started + * Application {0} is {1} for restart */ - OAM_OPERATION_STARTED, + OAM_OPERATION_RESTARTED, - ; /** + * {0} + */ + OAM_OPERATION_INVALID_INPUT + ; + /* * Static initializer to ensure the resource bundles for this class are loaded... */ static { -- cgit 1.2.3-korg