Package org.jboss.dmr

Examples of org.jboss.dmr.ModelNode.asType()


            }
        }

        if (valueTypeNode != null) {
            try {
                valueTypeNode.asType();
            } catch (Exception e) {
                //Complex type

                Set<String> keys;
                try {
View Full Code Here


                    // Deal with complex types specially
                    if (COMPLEX_TYPES.contains(attrType)) {
                        ModelNode valueType = attrDesc.get(VALUE_TYPE);
                        if (valueType.getType() == ModelType.TYPE) {
                            // Simple collection whose elements support expressions
                            handleSimpleCollection(address, attrName, attrValue, valueType.asType(), expressionAttrs,
                                    otherAttrs, expectedAttrs);
                        } else if (valueType.isDefined()) {
                            handleComplexCollection(address, attrName, attrValue, attrType, valueType, expressionAttrs, otherAttrs,
                                    expectedAttrs);
                        } else {
View Full Code Here

            }
        }

        if (valueTypeNode != null) {
            try {
                valueTypeNode.asType();
            } catch (Exception e) {
                //Complex type

                Set<String> keys;
                try {
View Full Code Here

            }
        }

        if (valueTypeNode != null) {
            try {
                valueTypeNode.asType();
            } catch (Exception e) {
                //Complex type

                Set<String> keys;
                try {
View Full Code Here

                    CommandLineCompleter propCompleter = null;
                    if(factory != null) {
                        propCompleter = factory.createCompleter(address);
                    } else {
                        final ModelNode typeNode = prop.getValue().get(Util.TYPE);
                        if(typeNode.isDefined() && typeNode.asType().equals(ModelType.BOOLEAN)) {
                            propCompleter = SimpleTabCompleter.BOOLEAN;
                        } else {
                            if(prop.getValue().has(Util.VALUE_TYPE)) {
                                final ModelNode valueTypeNode = prop.getValue().get(Util.VALUE_TYPE);
                                try {
View Full Code Here

                                try {
                                    // the logic is: if value-type is set to a specific type
                                    // (i.e. doesn't describe a custom structure)
                                    // then if allowed is specified, use it.
                                    // it might be broken but so far this is not looking clear to me
                                    valueTypeNode.asType();
                                    if(prop.getValue().has(Util.ALLOWED)) {
                                        propCompleter = getAllowedCompleter(prop);
                                    }
                                } catch(IllegalArgumentException e) {
                                    // TODO this means value-type describes a custom structure
View Full Code Here

                if(!propDescr.isDefined()) {
                    return Collections.emptyList();
                }

                final ModelNode typeNode = propDescr.get(Util.TYPE);
                if(typeNode.isDefined() && typeNode.asType().equals(ModelType.BOOLEAN)) {
                    return BOOLEAN;
                } else if(propDescr.has(Util.ALLOWED)) {
                    final ModelNode allowedNode = propDescr.get(Util.ALLOWED);
                    if(allowedNode.isDefined()) {
                        final List<ModelNode> nodeList = allowedNode.asList();
View Full Code Here

            }
        }

        if (valueTypeNode != null) {
            try {
                valueTypeNode.asType();
            } catch (Exception e) {
                //Complex type

                Set<String> keys;
                try {
View Full Code Here

                    final CommandLineCompleter completer;
                    if(factory != null) {
                        completer = factory.createCompleter(address);
                    } else {
                        final ModelNode typeNode = prop.getValue().get(Util.TYPE);
                        if(typeNode.isDefined() && typeNode.asType().equals(ModelType.BOOLEAN)) {
                            completer = SimpleTabCompleter.BOOLEAN;
                        } else if(prop.getValue().has(Util.ALLOWED)) {
                            final ModelNode allowedNode = prop.getValue().get(Util.ALLOWED);
                            if(allowedNode.isDefined()) {
                                final List<ModelNode> nodeList = allowedNode.asList();
View Full Code Here

                if(!propDescr.isDefined()) {
                    return Collections.emptyList();
                }

                final ModelNode typeNode = propDescr.get(Util.TYPE);
                if(typeNode.isDefined() && typeNode.asType().equals(ModelType.BOOLEAN)) {
                    return BOOLEAN;
                } else if(propDescr.has(Util.ALLOWED)) {
                    final ModelNode allowedNode = propDescr.get(Util.ALLOWED);
                    if(allowedNode.isDefined()) {
                        final List<ModelNode> nodeList = allowedNode.asList();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.