public NameAndGroup(AttributeDefinition ad) { this(ad.getName(), ad.getAttributeGroup()); }
public NameAndGroup(AttributeDefinition ad) { this(ad.getName(), ad.getAttributeGroup()); }
@Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { ModelNode result = context.getResult().setEmptyList(); final ImmutableManagementResourceRegistration registry = context.getResourceRegistration(); final Set<String> attributeNames = registry != null ? registry.getAttributeNames(PathAddress.EMPTY_ADDRESS) : Collections.<String>emptySet(); TreeSet<String> groupNames = new TreeSet<String>(); for (final String attributeName : attributeNames) { final AttributeAccess attribute = registry.getAttributeAccess(PathAddress.EMPTY_ADDRESS, attributeName); if (attribute.getAttributeDefinition().getAttributeGroup() != null) { groupNames.add(attribute.getAttributeDefinition().getAttributeGroup()); } } for (String groupName : groupNames) { result.add(groupName); } } }
@Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { ModelNode result = context.getResult().setEmptyList(); final ImmutableManagementResourceRegistration registry = context.getResourceRegistration(); final Set<String> attributeNames = registry != null ? registry.getAttributeNames(PathAddress.EMPTY_ADDRESS) : Collections.<String>emptySet(); TreeSet<String> groupNames = new TreeSet<String>(); for (final String attributeName : attributeNames) { final AttributeAccess attribute = registry.getAttributeAccess(PathAddress.EMPTY_ADDRESS, attributeName); if (attribute.getAttributeDefinition().getAttributeGroup() != null) { groupNames.add(attribute.getAttributeDefinition().getAttributeGroup()); } } for (String groupName : groupNames) { result.add(groupName); } } }
String adGroup = ad.getAttributeGroup(); LinkedHashMap<String, AttributeDefinition> forGroup = this.attributesByGroup.get(adGroup); if (forGroup == null) {
String adGroup = ad.getAttributeGroup(); LinkedHashMap<String, AttributeDefinition> forGroup = this.attributesByGroup.get(adGroup); if (forGroup == null) {
if ((aliases || !access.getFlags().contains(AttributeAccess.Flag.ALIAS)) && (includeRutime || access.getStorageType() == AttributeAccess.Storage.CONFIGURATION) && (groupName == null || groupName.equals(ad.getAttributeGroup()))) { Map<AttributeDefinition.NameAndGroup, GlobalOperationHandlers.AvailableResponse> responseMap = access.getAccessType() == AttributeAccess.AccessType.METRIC ? metrics : otherAttributes; AttributeDefinition.NameAndGroup nag = ad == null ? new AttributeDefinition.NameAndGroup(attributeName) : new AttributeDefinition.NameAndGroup(ad);
if ((aliases || !access.getFlags().contains(AttributeAccess.Flag.ALIAS)) && (includeRutime || access.getStorageType() == AttributeAccess.Storage.CONFIGURATION) && (groupName == null || groupName.equals(ad.getAttributeGroup()))) { Map<AttributeDefinition.NameAndGroup, GlobalOperationHandlers.AvailableResponse> responseMap = access.getAccessType() == AttributeAccess.AccessType.METRIC ? metrics : otherAttributes; AttributeDefinition.NameAndGroup nag = ad == null ? new AttributeDefinition.NameAndGroup(attributeName) : new AttributeDefinition.NameAndGroup(ad);
this.allowedValues = basisAllowedValues.toArray(new ModelNode[basisAllowedValues.size()]); this.attributeGroup = basis.getAttributeGroup(); if(!basis.getArbitraryDescriptors().isEmpty()) { this.arbitraryDescriptors = new HashMap<>(basis.getArbitraryDescriptors());
this.allowedValues = basisAllowedValues.toArray(new ModelNode[basisAllowedValues.size()]); this.attributeGroup = basis.getAttributeGroup(); if(!basis.getArbitraryDescriptors().isEmpty()) { this.arbitraryDescriptors = new HashMap<>(basis.getArbitraryDescriptors());