Package org.jboss.as.controller

Examples of org.jboss.as.controller.AttributeMarshaller


* @author Paul Ferraro
*/
public class AttributeMarshallerFactory {

    public static AttributeMarshaller createSimpleListAttributeMarshaller() {
        return new AttributeMarshaller() {
            @Override
            public void marshallAsElement(AttributeDefinition attribute, ModelNode resourceModel, boolean marshallDefault, XMLStreamWriter writer) throws XMLStreamException {
                // Hack to workaround the fact that SimpleListAttributeDefinition lacks a marshallAsAttribute(...) method!
                this.marshallAsAttribute(attribute, resourceModel, marshallDefault, writer);
            }
View Full Code Here


            }
        };
    }

    public static AttributeMarshaller createPropertyListAttributeMarshaller() {
        return new AttributeMarshaller() {
            @Override
            public void marshallAsElement(AttributeDefinition attribute, ModelNode resourceModel, boolean marshallDefault, XMLStreamWriter writer) throws XMLStreamException {
                ModelNode properties = resourceModel.get(attribute.getName());
                if (properties.isDefined()) {
                    for (Property property : properties.asPropertyList()) {
View Full Code Here

TOP

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

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.