ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adorosz...@apache.org
Subject [38/46] ambari git commit: AMBARI-22325 Fix dependency injection for BlueprintV2Factory (benyoka)
Date Fri, 08 Dec 2017 19:26:38 GMT
AMBARI-22325 Fix dependency injection for BlueprintV2Factory (benyoka)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/73050fca
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/73050fca
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/73050fca

Branch: refs/heads/branch-feature-AMBARI-14714-blueprintv2
Commit: 73050fcac37cc8bac27c8e9b0597e1b1cb465607
Parents: f12e9c9
Author: Balazs Bence Sari <benyoka@apache.org>
Authored: Wed Dec 6 16:07:11 2017 +0100
Committer: Doroszlai, Attila <adoroszlai@hortonworks.com>
Committed: Fri Dec 8 20:24:25 2017 +0100

----------------------------------------------------------------------
 .../ambari/server/controller/AmbariServer.java  | 10 +++----
 .../server/controller/ControllerModule.java     |  4 ++-
 .../server/controller/StackV2Factory.java       | 29 +++++++++++--------
 .../AbstractControllerResourceProvider.java     |  1 +
 .../controller/internal/BaseClusterRequest.java | 10 +++----
 .../internal/BlueprintV2ResourceProvider.java   |  7 ++---
 .../server/topology/BlueprintFactory.java       |  5 ++--
 .../server/topology/BlueprintV2Factory.java     | 30 +++-----------------
 .../server/topology/BlueprintV2FactoryTest.java |  3 +-
 9 files changed, 42 insertions(+), 57 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/73050fca/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
index 5b3d79e..89d66b9 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
@@ -62,7 +62,6 @@ import org.apache.ambari.server.configuration.ComponentSSLConfiguration;
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.controller.internal.AbstractControllerResourceProvider;
 import org.apache.ambari.server.controller.internal.AmbariPrivilegeResourceProvider;
-import org.apache.ambari.server.controller.internal.BaseClusterRequest;
 import org.apache.ambari.server.controller.internal.BlueprintResourceProvider;
 import org.apache.ambari.server.controller.internal.BlueprintV2ResourceProvider;
 import org.apache.ambari.server.controller.internal.ClusterPrivilegeResourceProvider;
@@ -91,7 +90,6 @@ import org.apache.ambari.server.orm.dao.MetainfoDAO;
 import org.apache.ambari.server.orm.dao.PermissionDAO;
 import org.apache.ambari.server.orm.dao.PrincipalDAO;
 import org.apache.ambari.server.orm.dao.PrivilegeDAO;
-import org.apache.ambari.server.orm.dao.RepositoryVersionDAO;
 import org.apache.ambari.server.orm.dao.ResourceDAO;
 import org.apache.ambari.server.orm.dao.UserDAO;
 import org.apache.ambari.server.orm.dao.ViewInstanceDAO;
@@ -928,15 +926,15 @@ public class AmbariServer {
         injector.getInstance(BlueprintDAO.class), injector.getInstance(SecurityConfigurationFactory.class),
         injector.getInstance(Gson.class), ambariMetaInfo);
     BlueprintV2ResourceProvider.init(injector.getInstance(BlueprintV2DAO.class),
-      injector.getInstance(SecurityConfigurationFactory.class), ambariMetaInfo);
+        injector.getInstance(SecurityConfigurationFactory.class),
+        ambariMetaInfo,
+        injector.getInstance(BlueprintV2Factory.class));
     StackDependencyResourceProvider.init(ambariMetaInfo);
     ClusterResourceProvider.init(injector.getInstance(TopologyManager.class),
         injector.getInstance(TopologyRequestFactoryImpl.class), injector.getInstance(SecurityConfigurationFactory
             .class), injector.getInstance(Gson.class));
     HostResourceProvider.setTopologyManager(injector.getInstance(TopologyManager.class));
     BlueprintFactory.init(injector.getInstance(BlueprintDAO.class));
-    BlueprintV2Factory.init(injector.getInstance(BlueprintV2DAO.class), injector.getInstance(RepositoryVersionDAO.class));
-    BaseClusterRequest.init(injector.getInstance(AmbariManagementController.class));
     AmbariContext.init(injector.getInstance(HostRoleCommandFactory.class));
 
     PermissionResourceProvider.init(injector.getInstance(PermissionDAO.class));
@@ -1074,10 +1072,10 @@ public class AmbariServer {
 
   public static void main(String[] args) throws Exception {
     logStartup();
-    Injector injector = Guice.createInjector(new ControllerModule(), new AuditLoggerModule(),
new LdapModule());
 
     AmbariServer server = null;
     try {
+      Injector injector = Guice.createInjector(new ControllerModule(), new AuditLoggerModule(),
new LdapModule());
       LOG.info("Getting the controller");
 
       // check if this instance is the active instance

http://git-wip-us.apache.org/repos/asf/ambari/blob/73050fca/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
index f2ff181..6118e5c 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
@@ -166,6 +166,7 @@ import org.apache.ambari.server.state.scheduler.RequestExecutionImpl;
 import org.apache.ambari.server.state.stack.OsFamily;
 import org.apache.ambari.server.state.svccomphost.ServiceComponentHostImpl;
 import org.apache.ambari.server.topology.BlueprintFactory;
+import org.apache.ambari.server.topology.BlueprintV2Factory;
 import org.apache.ambari.server.topology.PersistedState;
 import org.apache.ambari.server.topology.PersistedStateImpl;
 import org.apache.ambari.server.topology.SecurityConfigurationFactory;
@@ -531,13 +532,14 @@ public class ControllerModule extends AbstractModule {
     bind(HostRoleCommandFactory.class).to(HostRoleCommandFactoryImpl.class);
     bind(SecurityHelper.class).toInstance(SecurityHelperImpl.getInstance());
     bind(BlueprintFactory.class);
+    bind(BlueprintV2Factory.class);
+    bind(StackV2Factory.class);
 
     install(new FactoryModuleBuilder().implement(AmbariEvent.class, Names.named("userCreated"),
UserCreatedEvent.class).build(AmbariEventFactory.class));
     install(new FactoryModuleBuilder().implement(HookContext.class, PostUserCreationHookContext.class).build(HookContextFactory.class));
     install(new FactoryModuleBuilder().implement(CollectionPersisterService.class, CsvFilePersisterService.class).build(CollectionPersisterServiceFactory.class));
 
     install(new FactoryModuleBuilder().build(ConfigureClusterTaskFactory.class));
-
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/73050fca/ambari-server/src/main/java/org/apache/ambari/server/controller/StackV2Factory.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/StackV2Factory.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/StackV2Factory.java
index 546c99a..0cd5ecd 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/StackV2Factory.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/StackV2Factory.java
@@ -37,15 +37,15 @@ import org.apache.ambari.server.state.StackId;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import com.google.inject.Inject;
+
 public class StackV2Factory {
   private final static Logger LOG = LoggerFactory.getLogger(StackV2Factory.class);
 
+  private RepositoryVersionDAO repositoryVersionDAO;
 
-  private final AmbariManagementController controller;
-  private final RepositoryVersionDAO repositoryVersionDAO;
-
-  public StackV2Factory(AmbariManagementController controller, RepositoryVersionDAO repositoryVersionDAO)
{
-    this.controller = controller;
+  @Inject
+  public StackV2Factory(RepositoryVersionDAO repositoryVersionDAO) {
     this.repositoryVersionDAO = repositoryVersionDAO;
   }
 
@@ -58,7 +58,7 @@ public class StackV2Factory {
   }
 
   public StackV2 create(String name, String version, String repositoryVersion) throws AmbariException
{
-    Set<StackServiceResponse> stackServices = controller.getStackServices(
+    Set<StackServiceResponse> stackServices = getController().getStackServices(
       Collections.singleton(new StackServiceRequest(name, version, null)));
 
     StackData stackData = new StackData(name, version);
@@ -97,7 +97,7 @@ public class StackV2Factory {
   private void getComponentInfos(StackData stackData) {
     stackData.componentService.forEach( (componentName, serviceName) -> {
       try {
-        ComponentInfo componentInfo = controller.getAmbariMetaInfo().getComponent(stackData.stackName,
stackData.stackVersion, serviceName, componentName);
+        ComponentInfo componentInfo = getController().getAmbariMetaInfo().getComponent(stackData.stackName,
stackData.stackVersion, serviceName, componentName);
         if (null != componentInfo) {
           stackData.componentInfos.put(componentName, componentInfo);
         } else {
@@ -127,9 +127,9 @@ public class StackV2Factory {
     stackData.serviceConfigurations.put(service, mapServiceConfig);
     stackData.requiredServiceConfigurations.put(service, mapRequiredServiceConfig);
 
-    Set<ReadOnlyConfigurationResponse> serviceConfigs = controller.getStackConfigurations(
+    Set<ReadOnlyConfigurationResponse> serviceConfigs = getController().getStackConfigurations(
       Collections.singleton(new StackConfigurationRequest(stackData.stackName, stackData.stackVersion,
service, null)));
-    Set<ReadOnlyConfigurationResponse> stackLevelConfigs = controller.getStackLevelConfigurations(
+    Set<ReadOnlyConfigurationResponse> stackLevelConfigs = getController().getStackLevelConfigurations(
       Collections.singleton(new StackLevelConfigurationRequest(stackData.stackName, stackData.stackVersion,
null)));
     serviceConfigs.addAll(stackLevelConfigs);
 
@@ -160,7 +160,7 @@ public class StackV2Factory {
   }
 
   private void parseStackConfigurations (StackData stackData) throws AmbariException {
-    Set<ReadOnlyConfigurationResponse> stackLevelConfigs = controller.getStackLevelConfigurations(
+    Set<ReadOnlyConfigurationResponse> stackLevelConfigs = getController().getStackLevelConfigurations(
       Collections.singleton(new StackLevelConfigurationRequest(stackData.stackName, stackData.stackVersion,
null)));
 
     for (ReadOnlyConfigurationResponse config : stackLevelConfigs) {
@@ -185,7 +185,7 @@ public class StackV2Factory {
   private void parseComponents(StackData stackData, String service) throws AmbariException{
     Collection<String> componentSet = new HashSet<>();
 
-    Set<StackServiceComponentResponse> components = controller.getStackComponents(
+    Set<StackServiceComponentResponse> components = getController().getStackComponents(
       Collections.singleton(new StackServiceComponentRequest(stackData.stackName, stackData.stackVersion,
service, null)));
 
     // stack service components
@@ -204,7 +204,7 @@ public class StackV2Factory {
 
       // populate component dependencies
       //todo: remove usage of AmbariMetaInfo
-      Collection<DependencyInfo> componentDependencies = controller.getAmbariMetaInfo().getComponentDependencies(
+      Collection<DependencyInfo> componentDependencies = getController().getAmbariMetaInfo().getComponentDependencies(
         stackData.stackName, stackData.stackVersion, service, componentName);
 
       if (componentDependencies != null && ! componentDependencies.isEmpty()) {
@@ -260,4 +260,9 @@ public class StackV2Factory {
     final Map<String, Map<String, StackV2.ConfigProperty>> stackConfigurations
= new HashMap<>();
     final Map<String, ComponentInfo> componentInfos = new HashMap<>();
   }
+
+  private AmbariManagementController getController() {
+    return AmbariServer.getController();
+  }
+
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/73050fca/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java
index 5104354..843d36b 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java
@@ -36,6 +36,7 @@ import org.apache.ambari.server.state.Cluster;
 public abstract class AbstractControllerResourceProvider extends AbstractAuthorizedResourceProvider
{
 
   private static ResourceProviderFactory resourceProviderFactory;
+
   /**
    * The management controller to delegate to.
    */

http://git-wip-us.apache.org/repos/asf/ambari/blob/73050fca/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BaseClusterRequest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BaseClusterRequest.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BaseClusterRequest.java
index ade7295..b575a92 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BaseClusterRequest.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BaseClusterRequest.java
@@ -26,10 +26,10 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.Set;
 
+import org.apache.ambari.server.StaticallyInject;
 import org.apache.ambari.server.api.predicate.InvalidQueryException;
 import org.apache.ambari.server.api.predicate.QueryLexer;
 import org.apache.ambari.server.api.predicate.Token;
-import org.apache.ambari.server.controller.AmbariManagementController;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.controller.spi.ResourceProvider;
 import org.apache.ambari.server.controller.utilities.ClusterControllerHelper;
@@ -41,9 +41,12 @@ import org.apache.ambari.server.topology.SecurityConfiguration;
 import org.apache.ambari.server.topology.Service;
 import org.apache.ambari.server.topology.TopologyRequest;
 
+import com.google.inject.Inject;
+
 /**
  * Provides common cluster request functionality.
  */
+@StaticallyInject
 public abstract class BaseClusterRequest implements TopologyRequest {
   /**
    * Support for controlling whether Install and Start tasks are created on
@@ -51,6 +54,7 @@ public abstract class BaseClusterRequest implements TopologyRequest {
    */
   public static final String PROVISION_ACTION_PROPERTY = "provision_action";
 
+  @Inject
   private static BlueprintV2Factory blueprintFactory;
 
   /**
@@ -70,10 +74,6 @@ public abstract class BaseClusterRequest implements TopologyRequest {
   protected SecurityConfiguration securityConfiguration;
   protected Collection<Service> serviceConfigs;
 
-  public static void init(AmbariManagementController controller) {
-    setBlueprintFactory(BlueprintV2Factory.create(controller));
-  }
-
   @Override
   public Long getClusterId() {
     return clusterId;

http://git-wip-us.apache.org/repos/asf/ambari/blob/73050fca/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintV2ResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintV2ResourceProvider.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintV2ResourceProvider.java
index 41de5b5..93c58e7 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintV2ResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintV2ResourceProvider.java
@@ -113,7 +113,7 @@ public class BlueprintV2ResourceProvider extends AbstractControllerResourceProvi
   /**
    * Used to create Blueprint instances
    */
-  private BlueprintV2Factory blueprintFactory;
+  private static BlueprintV2Factory blueprintFactory;
 
   /**
    * Used to create SecurityConfiguration instances
@@ -137,9 +137,7 @@ public class BlueprintV2ResourceProvider extends AbstractControllerResourceProvi
   BlueprintV2ResourceProvider(Set<String> propertyIds,
                               Map<Resource.Type, String> keyPropertyIds,
                               AmbariManagementController controller) {
-
     super(propertyIds, keyPropertyIds, controller);
-    blueprintFactory = BlueprintV2Factory.create(controller);
   }
 
   /**
@@ -150,10 +148,11 @@ public class BlueprintV2ResourceProvider extends AbstractControllerResourceProvi
    * @param metaInfo
    */
   public static void init(BlueprintV2DAO dao, SecurityConfigurationFactory
-    securityFactory, AmbariMetaInfo metaInfo) {
+    securityFactory, AmbariMetaInfo metaInfo, BlueprintV2Factory blueprintFactory) {
     blueprintDAO = dao;
     securityConfigurationFactory = securityFactory;
     ambariMetaInfo = metaInfo;
+    BlueprintV2ResourceProvider.blueprintFactory = blueprintFactory;
   }
 
   // ----- ResourceProvider ------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/73050fca/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintFactory.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintFactory.java
b/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintFactory.java
index 8d94803..a54385c 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintFactory.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintFactory.java
@@ -26,6 +26,8 @@ import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
 
+import javax.annotation.Nullable;
+
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.ObjectNotFoundException;
 import org.apache.ambari.server.controller.AmbariManagementController;
@@ -81,9 +83,8 @@ public class BlueprintFactory {
     this.stackFactory = stackFactory;
   }
 
-  public Blueprint getBlueprint(String blueprintName) throws NoSuchStackException {
+  public @Nullable Blueprint getBlueprint(String blueprintName) throws NoSuchStackException
{
     BlueprintEntity entity = blueprintDAO.findByName(blueprintName);
-    //todo: just return null?
     return entity == null ? null : new BlueprintImpl(entity);
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/73050fca/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintV2Factory.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintV2Factory.java
b/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintV2Factory.java
index 99fbd87..eea2771 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintV2Factory.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintV2Factory.java
@@ -25,12 +25,10 @@ import java.util.Optional;
 import java.util.stream.Collectors;
 
 import org.apache.ambari.server.AmbariException;
-import org.apache.ambari.server.controller.AmbariManagementController;
 import org.apache.ambari.server.controller.StackV2;
 import org.apache.ambari.server.controller.StackV2Factory;
 import org.apache.ambari.server.controller.utilities.PropertyHelper;
 import org.apache.ambari.server.orm.dao.BlueprintV2DAO;
-import org.apache.ambari.server.orm.dao.RepositoryVersionDAO;
 import org.apache.ambari.server.orm.entities.BlueprintV2Entity;
 import org.apache.ambari.server.stack.NoSuchStackException;
 import org.apache.ambari.server.state.StackId;
@@ -71,29 +69,19 @@ public class BlueprintV2Factory {
 
 //  protected static final String SETTINGS_PROPERTY_ID = "settings";
 
-  private static BlueprintV2DAO blueprintDAO;
-  private static RepositoryVersionDAO repositoryVersionDAO;
+  private BlueprintV2DAO blueprintDAO;
 
   private StackV2Factory stackFactory;
 
   private ObjectMapper objectMapper;
 
-  protected BlueprintV2Factory() {
-    createObjectMapper();
-  }
-
-  protected BlueprintV2Factory(StackV2Factory stackFactory) {
+  @Inject
+  public BlueprintV2Factory(StackV2Factory stackFactory, BlueprintV2DAO blueprintDAO) {
     this.stackFactory = stackFactory;
+    this.blueprintDAO = blueprintDAO;
     createObjectMapper();
   }
 
-  public static BlueprintV2Factory create(AmbariManagementController controller) {
-    return new BlueprintV2Factory(new StackV2Factory(controller, repositoryVersionDAO));
-  }
-
-  public static BlueprintV2Factory create(StackV2Factory factory) {
-    return new BlueprintV2Factory(factory);
-  }
 
   public BlueprintV2 getBlueprint(String blueprintName) throws NoSuchStackException, NoSuchBlueprintException,
IOException {
     BlueprintV2Entity entity =
@@ -202,14 +190,4 @@ public class BlueprintV2Factory {
     objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
   }
 
-  /**
-   * Static initialization.
-   *
-   * @param blueprintV2DAO  blueprint data access object
-   */
-  @Inject
-  public static void init(BlueprintV2DAO blueprintV2DAO, RepositoryVersionDAO repoVersionDAO)
{
-    blueprintDAO = blueprintV2DAO;
-    repositoryVersionDAO = repoVersionDAO;
-  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/73050fca/ambari-server/src/test/java/org/apache/ambari/server/topology/BlueprintV2FactoryTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/topology/BlueprintV2FactoryTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/topology/BlueprintV2FactoryTest.java
index ab9adea..341e1df 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/topology/BlueprintV2FactoryTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/topology/BlueprintV2FactoryTest.java
@@ -28,6 +28,7 @@ import java.util.Map;
 
 import org.apache.ambari.server.controller.StackV2;
 import org.apache.ambari.server.controller.StackV2Factory;
+import org.apache.ambari.server.orm.dao.BlueprintV2DAO;
 import org.apache.ambari.server.state.StackId;
 import org.junit.Before;
 import org.junit.BeforeClass;
@@ -63,7 +64,7 @@ public class BlueprintV2FactoryTest {
         new HashMap<>(), new HashMap<>(), new HashMap<>(),
         new HashMap<>(), new HashMap<>(), new HashMap<>());
     });
-    blueprintFactory = BlueprintV2Factory.create(stackFactory);
+    blueprintFactory = new BlueprintV2Factory(stackFactory, mock(BlueprintV2DAO.class));
     blueprintFactory.setPrettyPrintJson(true);
   }
 


Mime
View raw message