@Override public StandardResourceDescriptionResolver getChildResolver(String key) { return new NonResolvingResourceDescriptionResolver(); } }
private ModelNode getAttributeDescription(String attributeName, ImmutableManagementResourceRegistration registration, Map<String, AttributeAccess> attributes) { AttributeAccess aa = attributes.get(attributeName); AttributeDefinition ad = aa.getAttributeDefinition(); ModelNode desc; if (ad != null) { if (!COMPLEX_TYPES.contains(ad.getType())) { desc = ad.getNoTextDescription(false); } else { // the simple no-text description is not enough to get value-type; ask for the full desc ModelNode wrapped = new ModelNode(); ad.addResourceAttributeDescription(wrapped, NonResolvingResourceDescriptionResolver.INSTANCE, null, NonResolvingResourceDescriptionResolver.INSTANCE.getResourceBundle(null)); desc = wrapped.get(ATTRIBUTES, attributeName); } } else { // We shouldn't be getting here any more, but just in case desc = registration.getModelDescription(PathAddress.EMPTY_ADDRESS).getModelDescription(null).get(ATTRIBUTES, attributeName); } return desc; }
@Override public StandardResourceDescriptionResolver getChildResolver(String key) { return new NonResolvingResourceDescriptionResolver(); } }
private BlockerSubsystemResourceDefinition(boolean forHost) { super(PathElement.pathElement(SUBSYSTEM, SUBSYSTEM_NAME), new NonResolvingResourceDescriptionResolver(), new AbstractAddStepHandler(), ModelOnlyRemoveStepHandler.INSTANCE); this.forHost = forHost; }
private BlockerSubsystemResourceDefinition(boolean forHost) { super(PathElement.pathElement(SUBSYSTEM, SUBSYSTEM_NAME), new NonResolvingResourceDescriptionResolver(), new AbstractAddStepHandler(), ErrorRemovingBlockingSubsystemStepHandler.REMOVE_SUBSYSTEM_INSTANCE); this.forHost = forHost; }
private boolean bootEmptyConfig(final BootContext context) throws OperationFailedException, ConfigurationPersistenceException { HostControllerLogger.ROOT_LOGGER.debug("Invoking initial empty config host controller boot"); boolean ok = boot(Collections.singletonList(registerModelControllerServiceInitializationBootStep(context)), true, true); // until a host is added with the host add op, there is no root description provider delegate. We just install a non-resolving one for now, so the // CLI doesn't get a lot of NPEs from :read-resource-description etc. SimpleResourceDefinition def = new SimpleResourceDefinition(new SimpleResourceDefinition.Parameters(null, new NonResolvingResourceDescriptionResolver())); rootResourceDefinition.setFakeDelegate(def); // just initialize the persister and return, we have to wait for /host=foo:add() hostControllerConfigurationPersister.initializeDomainConfigurationPersister(false); return ok; }
private boolean bootEmptyConfig(final BootContext context) throws OperationFailedException, ConfigurationPersistenceException { HostControllerLogger.ROOT_LOGGER.debug("Invoking initial empty config host controller boot"); boolean ok = boot(Collections.singletonList(registerModelControllerServiceInitializationBootStep(context)), true, true); // until a host is added with the host add op, there is no root description provider delegate. We just install a non-resolving one for now, so the // CLI doesn't get a lot of NPEs from :read-resource-description etc. SimpleResourceDefinition def = new SimpleResourceDefinition(new SimpleResourceDefinition.Parameters(null, new NonResolvingResourceDescriptionResolver())); rootResourceDefinition.setFakeDelegate(def); // just initialize the persister and return, we have to wait for /host=foo:add() hostControllerConfigurationPersister.initializeDomainConfigurationPersister(false); return ok; }
private CustomContextSubsystemResourceDefinition() { super(new Parameters(PathElement.pathElement(SUBSYSTEM, SUBSYSTEM_NAME), new NonResolvingResourceDescriptionResolver()) .setAddHandler(ADD_HANDLER) .setRemoveHandler(REMOVE_HANDLER) .setCapabilities(CAP) ); } }
private RootResourceDefinition() { super(new SimpleResourceDefinition.Parameters(PathElement.pathElement(SUBSYSTEM, DependentExtension.SUBSYSTEM_NAME), new NonResolvingResourceDescriptionResolver()) .setAddHandler(AddSubsystemHandler.INSTANCE) .setRemoveHandler(new ServiceRemoveStepHandler(AddSubsystemHandler.INSTANCE, RUNTIME_CAPABILITY)) .setCapabilities(RUNTIME_CAPABILITY)); }
private LogStreamSubsystemResourceDefinition() { super(PathElement.pathElement(SUBSYSTEM, SUBSYSTEM_NAME), new NonResolvingResourceDescriptionResolver(), new AbstractAddStepHandler(), ModelOnlyRemoveStepHandler.INSTANCE); this.handler = new LogStreamHandler(); }
private OperationTypesSubsystemResourceDefinition(ProcessType processType) { super(new Parameters(PathElement.pathElement(SUBSYSTEM, SUBSYSTEM_NAME), new NonResolvingResourceDescriptionResolver()) .setAddHandler(new ModelOnlyAddStepHandler()) .setRemoveHandler(new ModelOnlyRemoveStepHandler()) ); this.processType = processType; }