コード例 #1
0
  @Override
  public void registerChildren(ManagementResourceRegistration resourceRegistration) {
    super.registerChildren(resourceRegistration);
    resourceRegistration.registerSubModel(
        SystemPropertyResourceDefinition.createForDomainOrHost(Location.DOMAIN));
    resourceRegistration.registerSubModel(
        new InterfaceDefinition(
            InterfaceAddHandler.NAMED_INSTANCE, InterfaceRemoveHandler.INSTANCE, false));
    resourceRegistration.registerSubModel(new ProfileResourceDefinition(extensionRegistry));
    resourceRegistration.registerSubModel(PathResourceDefinition.createNamed(pathManager));
    resourceRegistration.registerSubModel(
        DomainDeploymentResourceDescription.createForDomainRoot(
            isMaster, contentRepo, fileRepository));
    resourceRegistration.registerSubModel(
        new DeploymentOverlayDefinition(null, contentRepo, fileRepository));
    resourceRegistration.registerSubModel(
        new ServerGroupResourceDefinition(contentRepo, fileRepository));

    // TODO socket-binding-group currently lives in controller and the child RDs live in domain so
    // they currently need passing in from here
    resourceRegistration.registerSubModel(
        new SocketBindingGroupResourceDefinition(
            SocketBindingGroupAddHandler.INSTANCE,
            DomainSocketBindingGroupRemoveHandler.INSTANCE,
            true,
            SocketBindingResourceDefinition.INSTANCE,
            RemoteDestinationOutboundSocketBindingResourceDefinition.INSTANCE,
            LocalDestinationOutboundSocketBindingResourceDefinition.INSTANCE));

    // TODO perhaps all these desriptions and the validator log messages should be moved into
    // management-client-content?
    resourceRegistration.registerSubModel(
        new ManagedDMRContentTypeResourceDefinition(
            contentRepo,
            ROLLOUT_PLAN,
            PathElement.pathElement(MANAGEMENT_CLIENT_CONTENT, ROLLOUT_PLANS),
            new RolloutPlanValidator(),
            DomainResolver.getResolver(ROLLOUT_PLANS),
            DomainResolver.getResolver(ROLLOUT_PLAN)));

    // Extensions
    resourceRegistration.registerSubModel(
        new ExtensionResourceDefinition(extensionRegistry, true, !isMaster));

    // Initialize the domain transformers
    DomainTransformers.initializeDomainRegistry(extensionRegistry.getTransformerRegistry());
  }
コード例 #2
0
 public DomainRootDefinition(
     final HostControllerEnvironment environment,
     final ExtensibleConfigurationPersister configurationPersister,
     final ContentRepository contentRepo,
     final HostFileRepository fileRepository,
     final boolean isMaster,
     final LocalHostControllerInfo hostControllerInfo,
     final ExtensionRegistry extensionRegistry,
     final IgnoredDomainResourceRegistry ignoredDomainResourceRegistry,
     final PathManagerService pathManager) {
   super(
       PathElement.pathElement("this-will-be-ignored-since-we-are-root"),
       DomainResolver.getResolver(DOMAIN, false));
   this.isMaster = isMaster;
   this.environment = environment;
   this.hostControllerInfo = hostControllerInfo;
   this.configurationPersister = configurationPersister;
   this.contentRepo = contentRepo;
   this.fileRepository = fileRepository;
   this.extensionRegistry = extensionRegistry;
   this.ignoredDomainResourceRegistry = ignoredDomainResourceRegistry;
   this.pathManager = pathManager;
 }