Package org.jboss.as.controller

Examples of org.jboss.as.controller.SimpleAttributeDefinition


        String initializersList = reader.getElementText();
        if (initializersList != null) {
            String[] initializers = initializersList.split(",");
            // read each configured initializer and set the appropriate values in the model node.
            for (String initializer : initializers) {
                SimpleAttributeDefinition definition = JacORBSubsystemDefinitions.valueOf(initializer);
                if (definition != null && JacORBSubsystemDefinitions.ORB_INIT_ATTRIBUTES.contains(definition))
                    node.get(definition.getName()).set("on");
                else
                    throw new XMLStreamException(
                            "Unexpected element value. Should be one of " + JacORBSubsystemDefinitions.ORB_INIT_ATTRIBUTES);
            }
        }
View Full Code Here


        String initializersList = reader.getElementText();
        if (initializersList != null) {
            String[] initializers = initializersList.split(",");
            // read each configured initializer and set the appropriate values in the model node.
            for (String initializer : initializers) {
                SimpleAttributeDefinition definition = (SimpleAttributeDefinition)JacORBSubsystemDefinitions.valueOf(initializer);
                if (definition != null && JacORBSubsystemDefinitions.ORB_INIT_ATTRIBUTES.contains(definition))
                    node.get(definition.getName()).set("on");
                else
                    throw JacORBMessages.MESSAGES.invalidInitializerConfig(initializer, reader.getLocation());
            }
        }
    }
View Full Code Here

                    SSLConfigValue value = SSLConfigValue.fromValue(attrValue);
                    if (value == null)
                        throw JacORBMessages.MESSAGES.invalidSSLConfig(attrValue, reader.getLocation());
                    attrValue = value.toString();
                default:
                    SimpleAttributeDefinition definition = ((SimpleAttributeDefinition) JacORBSubsystemDefinitions.
                        valueOf(attribute.getLocalName()));
                    // a null definition represents an attribute that has been deprecated and is no longer used.
                    if (definition != null)
                        definition.parseAndSetParameter(attrValue, node, reader);
            }
        }

        // the security element doesn't have child elements.
        requireNoContent(reader);
View Full Code Here

    }

    public void registerAttributes(ManagementResourceRegistration resourceRegistration) {
        resourceRegistration.registerReadOnlyAttribute(NAME, null);
        resourceRegistration.registerReadWriteAttribute(RELATIVE_TO, null, new PathWriteAttributeHandler(pathManager, RELATIVE_TO, services));
        SimpleAttributeDefinition pathAttr = specified ? PATH_SPECIFIED : PATH_NAMED;
        resourceRegistration.registerReadWriteAttribute(pathAttr, null, new PathWriteAttributeHandler(pathManager, pathAttr, services));
        resourceRegistration.registerReadOnlyAttribute(READ_ONLY, null);
    }
View Full Code Here

        address = PathAddress.pathAddress(modelDescription.get(ModelDescriptionConstants.ADDRESS));

        if (attributes.isDefined()) {
            for (Property property : attributes.asPropertyList()) {
                String name = property.getName();
                SimpleAttributeDefinition def = SimpleAttributeDefinitionBuilder.create(name, property.getValue()).build();
                this.attributes.put(name, new AttributeAccess(
                        AttributeAccess.AccessType.READ_ONLY, AttributeAccess.Storage.CONFIGURATION, null, null, def, null)
                );
            }
        }
View Full Code Here

    }

    public void registerAttributes(ManagementResourceRegistration resourceRegistration) {
        resourceRegistration.registerReadOnlyAttribute(NAME, ReadResourceNameOperationStepHandler.INSTANCE);
        resourceRegistration.registerReadWriteAttribute(RELATIVE_TO, null, new PathWriteAttributeHandler(pathManager, RELATIVE_TO, services));
        SimpleAttributeDefinition pathAttr = specified ? PATH_SPECIFIED : PATH_NAMED;
        resourceRegistration.registerReadWriteAttribute(pathAttr, null, new PathWriteAttributeHandler(pathManager, pathAttr, services));
        resourceRegistration.registerReadOnlyAttribute(READ_ONLY, null);
    }
View Full Code Here

        address = PathAddress.pathAddress(modelDescription.get(ModelDescriptionConstants.ADDRESS));

        if (attributes.isDefined()) {
            for (Property property : attributes.asPropertyList()) {
                String name = property.getName();
                SimpleAttributeDefinition def = SimpleAttributeDefinitionBuilder.create(name, property.getValue()).build();
                this.attributes.put(name, new AttributeAccess(
                        AttributeAccess.AccessType.READ_ONLY, AttributeAccess.Storage.CONFIGURATION, null, null, def, null)
                );
            }
        }
View Full Code Here

        String initializersList = reader.getElementText();
        if (initializersList != null) {
            String[] initializers = initializersList.split(",");
            // read each configured initializer and set the appropriate values in the model node.
            for (String initializer : initializers) {
                SimpleAttributeDefinition definition = (SimpleAttributeDefinition)JacORBSubsystemDefinitions.valueOf(initializer);
                if (definition != null && JacORBSubsystemDefinitions.ORB_INIT_ATTRIBUTES.contains(definition))
                    node.get(definition.getName()).set("on");
                else
                    throw JacORBLogger.ROOT_LOGGER.invalidInitializerConfig(initializer, reader.getLocation());
            }
        }
    }
View Full Code Here

                    SSLConfigValue value = SSLConfigValue.fromValue(attrValue);
                    if (value == null)
                        throw JacORBLogger.ROOT_LOGGER.invalidSSLConfig(attrValue, reader.getLocation());
                    attrValue = value.toString();
                default:
                    SimpleAttributeDefinition definition = ((SimpleAttributeDefinition) JacORBSubsystemDefinitions.
                        valueOf(attribute.getLocalName()));
                    // a null definition represents an attribute that has been deprecated and is no longer used.
                    if (definition != null)
                        definition.parseAndSetParameter(attrValue, node, reader);
            }
        }

        // the security element doesn't have child elements.
        requireNoContent(reader);
View Full Code Here

            final String value = reader.getElementText();
            final String tag = reader.getLocalName();
            final Element element = Element.forName(tag);
            required.remove(element);

            SimpleAttributeDefinition attribute = HiLoKeyGeneratorResourceDefinition.getAttributeDefinition(tag);
            if(attribute == null) {
                throw unexpectedElement(reader);
            }
            attribute.parseAndSetParameter(value, op, reader);
        }
        if(!required.isEmpty()) {
            throw missingRequiredElement(reader, required);
        }
        return op;
View Full Code Here

TOP

Related Classes of org.jboss.as.controller.SimpleAttributeDefinition

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.