summaryrefslogtreecommitdiffstats
path: root/appc-oam/appc-oam-bundle/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'appc-oam/appc-oam-bundle/src/main')
-rw-r--r--appc-oam/appc-oam-bundle/src/main/java/org/onap/appc/oam/util/BundleHelper.java8
-rw-r--r--appc-oam/appc-oam-bundle/src/main/java/org/onap/appc/oam/util/StateHelper.java7
2 files changed, 13 insertions, 2 deletions
diff --git a/appc-oam/appc-oam-bundle/src/main/java/org/onap/appc/oam/util/BundleHelper.java b/appc-oam/appc-oam-bundle/src/main/java/org/onap/appc/oam/util/BundleHelper.java
index b862ed3a7..7639c4075 100644
--- a/appc-oam/appc-oam-bundle/src/main/java/org/onap/appc/oam/util/BundleHelper.java
+++ b/appc-oam/appc-oam-bundle/src/main/java/org/onap/appc/oam/util/BundleHelper.java
@@ -5,6 +5,8 @@
* Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Copyright (C) 2017 Amdocs
+ * ================================================================================
+ * Modifications (C) 2018 Ericsson
* =============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -166,7 +168,7 @@ public class BundleHelper {
String[] bundlesToStop = readPropsFromPropListName(PROP_BUNDLE_TO_STOP);
String[] regExBundleNotStop = readPropsFromPropListName(PROP_BUNDLES_TO_NOT_STOP);
- BundleFilter bundleList = new BundleFilter(bundlesToStop, regExBundleNotStop, getBundleList());
+ BundleFilter bundleList = getBundleFilter(bundlesToStop, regExBundleNotStop, getBundleList());
logger.info(String.format("(%d) APPC bundles to Stop/Start: %s.", bundleList.getBundlesToStop().size(),
bundleList.getBundlesToStop().toString()));
@@ -220,6 +222,10 @@ public class BundleHelper {
}
}
+ protected BundleFilter getBundleFilter(String[] stopRegexes, String[] exceptRegexes, Bundle[] bundles) {
+ return new BundleFilter(stopRegexes, exceptRegexes, bundles);
+ }
+
/**
* Runnable to execute bundle operations: start or stop
*/
diff --git a/appc-oam/appc-oam-bundle/src/main/java/org/onap/appc/oam/util/StateHelper.java b/appc-oam/appc-oam-bundle/src/main/java/org/onap/appc/oam/util/StateHelper.java
index 0d24b5e8a..6ed50dbe6 100644
--- a/appc-oam/appc-oam-bundle/src/main/java/org/onap/appc/oam/util/StateHelper.java
+++ b/appc-oam/appc-oam-bundle/src/main/java/org/onap/appc/oam/util/StateHelper.java
@@ -5,6 +5,8 @@
* Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Copyright (C) 2017 Amdocs
+ * ================================================================================
+ * Modifications (C) 2018 Ericsson
* =============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -122,7 +124,7 @@ public class StateHelper {
* @return AppcOamStates
*/
public AppcOamStates getBundlesState() {
- BundleHelper bundleHelper = new BundleHelper(logger, configurationHelper, this);
+ BundleHelper bundleHelper = getBundleHelper(logger, configurationHelper);
Map<String, Bundle> lcmBundleMap = bundleHelper.getAppcLcmBundles();
if (lcmBundleMap == null || lcmBundleMap.isEmpty()) {
return AppcOamStates.Unknown;
@@ -140,4 +142,7 @@ public class StateHelper {
return AppcOamStates.getOamStateFromBundleState(currentState);
}
+ protected BundleHelper getBundleHelper(EELFLogger logger, ConfigurationHelper configurationHelper) {
+ return new BundleHelper(logger, configurationHelper, this);
+ }
}