summaryrefslogtreecommitdiffstats
path: root/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main
diff options
context:
space:
mode:
authorandre.schmid <andre.schmid@est.tech>2019-10-18 14:58:21 +0100
committerandre.schmid <andre.schmid@est.tech>2019-10-21 15:53:58 +0100
commit105ce0729d5333cc095ef5bd8104a6c5b90cc9f0 (patch)
treef85c45d12fcc2595ad02516ad182ff5f71c9bf0d /openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main
parentd289108897f3baf5bc51092c4f55309bdd90f8d9 (diff)
Fix factory instance creation instability
Refactor the factory registry and instance creation. Remove unnecessary static code in Factory creation. Centralize the responsibility to read the factory registry configuration and cache the factory instances in a Singleton called FactoryRegistryManager. Clean the base abstract factory that was sharing non factory code, it had all the factory registry code statically, never used by the concrete factory classes. Change-Id: Ie2e9c29013acd36ddaf15383dd6b06432fbdbb66 Issue-ID: SDC-1905 Signed-off-by: andre.schmid <andre.schmid@est.tech>
Diffstat (limited to 'openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main')
-rw-r--r--openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/ComponentDependencyModelManagerFactory.java3
-rw-r--r--openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/ComponentManagerFactory.java3
-rw-r--r--openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/CompositionEntityDataManagerFactory.java3
-rw-r--r--openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/ComputeManagerFactory.java3
-rw-r--r--openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/DeploymentFlavorManagerFactory.java3
-rw-r--r--openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/ImageManagerFactory.java3
-rw-r--r--openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/MonitoringUploadsManagerFactory.java3
-rw-r--r--openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/NetworkManagerFactory.java3
-rw-r--r--openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/NicManagerFactory.java3
-rw-r--r--openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/OrchestrationTemplateCandidateManagerFactory.java3
-rw-r--r--openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/ProcessManagerFactory.java3
-rw-r--r--openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/VspManagerFactory.java3
12 files changed, 12 insertions, 24 deletions
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/ComponentDependencyModelManagerFactory.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/ComponentDependencyModelManagerFactory.java
index cbf311fcff..bd5cd45561 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/ComponentDependencyModelManagerFactory.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/ComponentDependencyModelManagerFactory.java
@@ -22,12 +22,11 @@ package org.openecomp.sdc.vendorsoftwareproduct;
import org.openecomp.core.factory.api.AbstractComponentFactory;
-import org.openecomp.core.factory.api.AbstractFactory;
public abstract class ComponentDependencyModelManagerFactory extends
AbstractComponentFactory<ComponentDependencyModelManager> {
public static ComponentDependencyModelManagerFactory getInstance() {
- return AbstractFactory.getInstance(ComponentDependencyModelManagerFactory.class);
+ return getInstance(ComponentDependencyModelManagerFactory.class);
}
}
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/ComponentManagerFactory.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/ComponentManagerFactory.java
index 21a77b3c97..9af238e4e3 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/ComponentManagerFactory.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/ComponentManagerFactory.java
@@ -21,11 +21,10 @@
package org.openecomp.sdc.vendorsoftwareproduct;
import org.openecomp.core.factory.api.AbstractComponentFactory;
-import org.openecomp.core.factory.api.AbstractFactory;
public abstract class ComponentManagerFactory extends AbstractComponentFactory<ComponentManager> {
public static ComponentManagerFactory getInstance() {
- return AbstractFactory.getInstance(ComponentManagerFactory.class);
+ return getInstance(ComponentManagerFactory.class);
}
}
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/CompositionEntityDataManagerFactory.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/CompositionEntityDataManagerFactory.java
index b8e2fd7b0c..be4f187c15 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/CompositionEntityDataManagerFactory.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/CompositionEntityDataManagerFactory.java
@@ -21,12 +21,11 @@
package org.openecomp.sdc.vendorsoftwareproduct;
import org.openecomp.core.factory.api.AbstractComponentFactory;
-import org.openecomp.core.factory.api.AbstractFactory;
public abstract class CompositionEntityDataManagerFactory extends
AbstractComponentFactory<CompositionEntityDataManager> {
public static CompositionEntityDataManagerFactory getInstance() {
- return AbstractFactory.getInstance(CompositionEntityDataManagerFactory.class);
+ return getInstance(CompositionEntityDataManagerFactory.class);
}
}
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/ComputeManagerFactory.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/ComputeManagerFactory.java
index e888c4fb24..063bae1237 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/ComputeManagerFactory.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/ComputeManagerFactory.java
@@ -21,11 +21,10 @@
package org.openecomp.sdc.vendorsoftwareproduct;
import org.openecomp.core.factory.api.AbstractComponentFactory;
-import org.openecomp.core.factory.api.AbstractFactory;
public abstract class ComputeManagerFactory extends AbstractComponentFactory<ComputeManager> {
public static ComputeManagerFactory getInstance() {
- return AbstractFactory.getInstance(ComputeManagerFactory.class);
+ return getInstance(ComputeManagerFactory.class);
}
}
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/DeploymentFlavorManagerFactory.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/DeploymentFlavorManagerFactory.java
index 50a257f62c..97ae62978d 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/DeploymentFlavorManagerFactory.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/DeploymentFlavorManagerFactory.java
@@ -22,12 +22,11 @@ package org.openecomp.sdc.vendorsoftwareproduct;
import org.openecomp.core.factory.api.AbstractComponentFactory;
-import org.openecomp.core.factory.api.AbstractFactory;
public abstract class DeploymentFlavorManagerFactory extends
AbstractComponentFactory<DeploymentFlavorManager> {
public static DeploymentFlavorManagerFactory getInstance() {
- return AbstractFactory.getInstance(DeploymentFlavorManagerFactory.class);
+ return getInstance(DeploymentFlavorManagerFactory.class);
}
}
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/ImageManagerFactory.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/ImageManagerFactory.java
index 82b782a4fd..2ee014bb28 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/ImageManagerFactory.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/ImageManagerFactory.java
@@ -21,12 +21,11 @@
package org.openecomp.sdc.vendorsoftwareproduct;
import org.openecomp.core.factory.api.AbstractComponentFactory;
-import org.openecomp.core.factory.api.AbstractFactory;
public abstract class ImageManagerFactory extends AbstractComponentFactory<ImageManager> {
public static ImageManagerFactory getInstance() {
- return AbstractFactory.getInstance(ImageManagerFactory.class);
+ return getInstance(ImageManagerFactory.class);
}
}
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/MonitoringUploadsManagerFactory.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/MonitoringUploadsManagerFactory.java
index eb4271be16..9850b2e19b 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/MonitoringUploadsManagerFactory.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/MonitoringUploadsManagerFactory.java
@@ -21,12 +21,11 @@
package org.openecomp.sdc.vendorsoftwareproduct;
import org.openecomp.core.factory.api.AbstractComponentFactory;
-import org.openecomp.core.factory.api.AbstractFactory;
public abstract class MonitoringUploadsManagerFactory
extends AbstractComponentFactory<MonitoringUploadsManager> {
public static MonitoringUploadsManagerFactory getInstance() {
- return AbstractFactory.getInstance(MonitoringUploadsManagerFactory.class);
+ return getInstance(MonitoringUploadsManagerFactory.class);
}
}
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/NetworkManagerFactory.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/NetworkManagerFactory.java
index 943e676727..a0b7465235 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/NetworkManagerFactory.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/NetworkManagerFactory.java
@@ -21,11 +21,10 @@
package org.openecomp.sdc.vendorsoftwareproduct;
import org.openecomp.core.factory.api.AbstractComponentFactory;
-import org.openecomp.core.factory.api.AbstractFactory;
public abstract class NetworkManagerFactory extends AbstractComponentFactory<NetworkManager> {
public static NetworkManagerFactory getInstance() {
- return AbstractFactory.getInstance(NetworkManagerFactory.class);
+ return getInstance(NetworkManagerFactory.class);
}
}
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/NicManagerFactory.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/NicManagerFactory.java
index 73f7f79996..212619ce87 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/NicManagerFactory.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/NicManagerFactory.java
@@ -21,11 +21,10 @@
package org.openecomp.sdc.vendorsoftwareproduct;
import org.openecomp.core.factory.api.AbstractComponentFactory;
-import org.openecomp.core.factory.api.AbstractFactory;
public abstract class NicManagerFactory extends AbstractComponentFactory<NicManager> {
public static NicManagerFactory getInstance() {
- return AbstractFactory.getInstance(NicManagerFactory.class);
+ return getInstance(NicManagerFactory.class);
}
}
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/OrchestrationTemplateCandidateManagerFactory.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/OrchestrationTemplateCandidateManagerFactory.java
index ddc24adeb6..b38355b8e9 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/OrchestrationTemplateCandidateManagerFactory.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/OrchestrationTemplateCandidateManagerFactory.java
@@ -21,12 +21,11 @@
package org.openecomp.sdc.vendorsoftwareproduct;
import org.openecomp.core.factory.api.AbstractComponentFactory;
-import org.openecomp.core.factory.api.AbstractFactory;
public abstract class OrchestrationTemplateCandidateManagerFactory
extends AbstractComponentFactory<OrchestrationTemplateCandidateManager> {
public static OrchestrationTemplateCandidateManagerFactory getInstance() {
- return AbstractFactory.getInstance(OrchestrationTemplateCandidateManagerFactory.class);
+ return getInstance(OrchestrationTemplateCandidateManagerFactory.class);
}
}
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/ProcessManagerFactory.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/ProcessManagerFactory.java
index 7da0bef128..f8d1038ca2 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/ProcessManagerFactory.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/ProcessManagerFactory.java
@@ -21,11 +21,10 @@
package org.openecomp.sdc.vendorsoftwareproduct;
import org.openecomp.core.factory.api.AbstractComponentFactory;
-import org.openecomp.core.factory.api.AbstractFactory;
public abstract class ProcessManagerFactory extends AbstractComponentFactory<ProcessManager> {
public static ProcessManagerFactory getInstance() {
- return AbstractFactory.getInstance(ProcessManagerFactory.class);
+ return getInstance(ProcessManagerFactory.class);
}
}
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/VspManagerFactory.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/VspManagerFactory.java
index 99d6988b61..a2f186428a 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/VspManagerFactory.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/VspManagerFactory.java
@@ -21,12 +21,11 @@
package org.openecomp.sdc.vendorsoftwareproduct;
import org.openecomp.core.factory.api.AbstractComponentFactory;
-import org.openecomp.core.factory.api.AbstractFactory;
public abstract class VspManagerFactory
extends AbstractComponentFactory<VendorSoftwareProductManager> {
public static VspManagerFactory getInstance() {
- return AbstractFactory.getInstance(VspManagerFactory.class);
+ return getInstance(VspManagerFactory.class);
}
}