@Override public Set<String> getChildNames(PathAddress address) { return delegate.getChildNames(address); }
@Override public Set<String> getChildNames(PathAddress address) { return delegate.getChildNames(address); }
@Override public Set<String> getChildNames(PathAddress address) { return delegate.getChildNames(address); }
@Override public Set<String> getChildNames(PathAddress address) { return delegate.getChildNames(address); }
@Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { final ImmutableManagementResourceRegistration registry = context.getResourceRegistration(); Set<String> childTypes = new TreeSet<String>(registry.getChildNames(PathAddress.EMPTY_ADDRESS)); final ModelNode result = context.getResult(); result.setEmptyList(); for (final String key : childTypes) { result.add(key); } context.stepCompleted(); } }
@Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { final ImmutableManagementResourceRegistration registry = context.getResourceRegistration(); if (registry == null) { throw new OperationFailedException(ControllerMessages.MESSAGES.noSuchResourceType(PathAddress.pathAddress(operation.get(OP_ADDR)))); } Set<String> childTypes = new TreeSet<String>(registry.getChildNames(PathAddress.EMPTY_ADDRESS)); final ModelNode result = context.getResult(); result.setEmptyList(); for (final String key : childTypes) { result.add(key); } context.stepCompleted(); } }
static ExpressionResolver create(final OperationContext context, final TransformationTarget.TransformationTargetType type) { switch (type) { // TODO differentiate between the different types case DOMAIN: case HOST: case SERVER: } final Map<String, String> environment = Collections.emptyMap(); final Map<String, String> properties = new HashMap<String, String>(); final PathElement systemProperty = PathElement.pathElement(SYSTEM_PROPERTY); final PathAddress address = PathAddress.EMPTY_ADDRESS.append(systemProperty); if(context.getRootResourceRegistration().getChildNames(address).contains(SYSTEM_PROPERTY)) { final Resource resource = context.readResourceFromRoot(PathAddress.pathAddress(systemProperty)); for(Resource.ResourceEntry entry : resource.getChildren(SYSTEM_PROPERTY)) { final ModelNode model = entry.getModel(); properties.put(entry.getPathElement().getValue(), model.get(VALUE).asString()); } } return new TransformerExpressionResolver(properties, environment); }
static ExpressionResolver create(final OperationContext context, final TransformationTarget.TransformationTargetType type) { switch (type) { // TODO differentiate between the different types case DOMAIN: case HOST: case SERVER: } final Map<String, String> environment = Collections.emptyMap(); final Map<String, String> properties = new HashMap<String, String>(); final PathElement systemProperty = PathElement.pathElement(SYSTEM_PROPERTY); final PathAddress address = PathAddress.EMPTY_ADDRESS.append(systemProperty); if(context.getRootResourceRegistration().getChildNames(address).contains(SYSTEM_PROPERTY)) { final Resource resource = context.readResourceFromRoot(PathAddress.pathAddress(systemProperty)); for(Resource.ResourceEntry entry : resource.getChildren(SYSTEM_PROPERTY)) { final ModelNode model = entry.getModel(); properties.put(entry.getPathElement().getValue(), model.get(VALUE).asString()); } } return new TransformerExpressionResolver(properties, environment); }
for (String type : registry.getChildNames(PathAddress.EMPTY_ADDRESS)) { if ((validChildType == null || validChildType.equals(validChildType)) && !result.containsKey(type)) {
final Set<String> children = context.getResourceRegistration().getChildNames(PathAddress.EMPTY_ADDRESS); if (children.contains(attributeName)) { throw new OperationFailedException(new ModelNode().set(MESSAGES.attributeRegisteredOnResource(attributeName, operation.get(OP_ADDR))));
for (String childType : registry.getChildNames(PathAddress.EMPTY_ADDRESS)) { if (validChildTypeFilter.test(childType)) { List<String> list = new ArrayList<>();
for (String childType : registry.getChildNames(PathAddress.EMPTY_ADDRESS)) { if (validChildTypeFilter.test(childType)) { List<String> list = new ArrayList<>();
final Set<String> children = context.getResourceRegistration().getChildNames(PathAddress.EMPTY_ADDRESS); if (children.contains(attributeName)) { throw new OperationFailedException(new ModelNode().set(MESSAGES.attributeRegisteredOnResource(attributeName, operation.get(OP_ADDR))));
private OpenMBeanAttributeInfo getAttribute(String name) { final String escapedName = NameConverter.convertToCamelCase(name); ModelNode attribute = providedDescription.require(ATTRIBUTES).require(name); AttributeAccess access = resourceRegistration.getAttributeAccess(PathAddress.EMPTY_ADDRESS, name); if (access == null) { // Check for a bogus attribute in the description that's really a child Set<String> childTypes = resourceRegistration.getChildNames(PathAddress.EMPTY_ADDRESS); if (childTypes.contains(name)) { return null; } } final boolean writable = standalone && (access != null && access.getAccessType() == AccessType.READ_WRITE); return new OpenMBeanAttributeInfoSupport( escapedName, getDescription(attribute), converters.convertToMBeanType(attribute), true, writable, false, createAttributeDescriptor(attribute)); }
private OpenMBeanAttributeInfo getAttribute(String name) { final String escapedName = NameConverter.convertToCamelCase(name); ModelNode attribute = providedDescription.require(ATTRIBUTES).require(name); AttributeAccess access = resourceRegistration.getAttributeAccess(PathAddress.EMPTY_ADDRESS, name); if (access == null) { // Check for a bogus attribute in the description that's really a child Set<String> childTypes = resourceRegistration.getChildNames(PathAddress.EMPTY_ADDRESS); if (childTypes.contains(name)) { return null; } } final boolean writable = mutabilityChecker.mutable(pathAddress) && (access != null && access.getAccessType() == AccessType.READ_WRITE); return new OpenMBeanAttributeInfoSupport( escapedName, getDescription(attribute), converters.convertToMBeanType(attribute), true, writable, false, createAttributeDescriptor(attribute)); }
ImmutableManagementResourceRegistration wildCardChildRegistration = registry.getSubModel(PathAddress.pathAddress(PathElement.pathElement(key))); boolean isAlias = wildCardChildRegistration.isAlias(); Set<String> registredNames = registry.getChildNames(PathAddress.pathAddress(PathElement.pathElement(key))); if (registredNames != null && !registredNames.isEmpty() && isAlias) { for (String value : registredNames) {
ImmutableManagementResourceRegistration wildCardChildRegistration = registry.getSubModel(PathAddress.pathAddress(PathElement.pathElement(key))); boolean isAlias = wildCardChildRegistration.isAlias(); Set<String> registredNames = registry.getChildNames(PathAddress.pathAddress(PathElement.pathElement(key))); if (registredNames != null && !registredNames.isEmpty() && isAlias) { for (String value : registredNames) {