@Override
 protected void initModel(Resource rootResource, ManagementResourceRegistration rootRegistration) {
   HostModelUtil.createRootRegistry(
       rootRegistration, environment, ignoredRegistry, this, processType);
   VersionModelInitializer.registerRootResource(
       rootResource, environment != null ? environment.getProductConfig() : null);
   this.modelNodeRegistration = rootRegistration;
 }
    @Override
    public void initCoreModel(
        Resource rootResource,
        ManagementResourceRegistration rootRegistration,
        Resource modelControllerResource) {
      VersionModelInitializer.registerRootResource(rootResource, null);
      final HostControllerEnvironment env = createHostControllerEnvironment();
      final LocalHostControllerInfoImpl info = createLocalHostControllerInfo(env);
      final IgnoredDomainResourceRegistry ignoredRegistry = new IgnoredDomainResourceRegistry(info);
      final ExtensibleConfigurationPersister persister = new NullConfigurationPersister();
      final HostFileRepository hostFileRepository = createHostFileRepository();
      final DomainController domainController = new MockDomainController();

      DomainRootDefinition domainDefinition =
          new DomainRootDefinition(
              domainController,
              env,
              persister,
              injectedContentRepository.getValue(),
              hostFileRepository,
              true,
              info,
              extensionRegistry,
              null,
              pathManagerService,
              null,
              authorizer,
              null,
              getMutableRootResourceRegistrationProvider());
      domainDefinition.initialize(rootRegistration);
      rootResourceDefinition.setDelegate(domainDefinition);

      HostModelUtil.createRootRegistry(
          rootRegistration,
          env,
          ignoredRegistry,
          new HostModelRegistrar() {

            @Override
            public void registerHostModel(String hostName, ManagementResourceRegistration root) {}
          },
          processType,
          authorizer,
          modelControllerResource);

      CoreManagementResourceDefinition.registerDomainResource(rootResource, null);
    }
    @Override
    public void initCoreModel(
        Resource rootResource,
        ManagementResourceRegistration rootRegistration,
        Resource modelControllerResource) {
      HostModelUtil.createRootRegistry(
          rootRegistration,
          env,
          ignoredRegistry,
          new HostModelRegistrar() {
            @Override
            public void registerHostModel(
                String hostName, ManagementResourceRegistration rootRegistration) {}
          },
          ProcessType.HOST_CONTROLLER,
          authorizer,
          modelControllerResource);

      HostModelUtil.createHostRegistry(
          hostName,
          rootRegistration,
          persister,
          env,
          (HostRunningModeControl) runningModeControl,
          hostFileRepository,
          info,
          null /*serverInventory*/,
          null /*remoteFileRepository*/,
          injectedContentRepository.getValue(),
          domainController,
          extensionRegistry,
          null /*vaultReader*/,
          ignoredRegistry,
          processState,
          pathManagerService,
          authorizer,
          AuditLogger.NO_OP_LOGGER,
          getBootErrorCollector());
    }