Package org.jboss.dmr.client

Examples of org.jboss.dmr.client.ModelNode.keys()


            public void onSuccess(DMRResponse result) {
                ModelNode response = result.get();
                ModelNode model = response.get(RESULT);

                List<PropertyRecord> properties = new ArrayList<PropertyRecord>();
                for (String key : model.keys()) {
                    PropertyRecord property = factory.property().as();
                    property.setKey(key);
                    property.setValue(model.get(key).get("value").asString());
                    properties.add(property);
                }
View Full Code Here


            public void onSuccess(DMRResponse result) {
                ModelNode response = result.get();
                ModelNode model = response.get(RESULT);

                List<OSGiCapability> capabilities = new ArrayList<OSGiCapability>();
                for (String identifier : model.keys()) {
                    OSGiCapability pm = factory.osgiCapability().as();
                    pm.setIdentifier(identifier);

                    ModelNode val = model.get(identifier);
                    if (val.has(STARTLEVEL_ATTRIBUTE)) {
View Full Code Here

            public void onSuccess(DMRResponse result) {
                ModelNode response = result.get();
                ModelNode model = response.get(RESULT);

                List<ConfigAdminData> casDataList = new ArrayList<ConfigAdminData>();
                for (String pid : model.keys()) {
                    ConfigAdminData data = factory.configAdminData().as();
                    data.setPid(pid);

                    List<PropertyRecord> properties = new ArrayList<PropertyRecord>();
                    for(Property property : model.get(pid).get("entries").asPropertyList()) {
View Full Code Here

        // parse the child resources
        if(actualPayload.hasDefined(CHILDREN))
        {
            ModelNode childNodes = actualPayload.get(CHILDREN);
            Set<String> children = childNodes.keys();
            for(String child : children)
            {
                ResourceRef childAddress = new ResourceRef(ref.address+"/"+child+"=*");
                if(!references.contains(childAddress)) // might be parsed already
                {
View Full Code Here

            public void onSuccess(DMRResponse result) {
                ModelNode response = result.get();
                ModelNode model = response.get(RESULT);

                List<ConfigAdminData> casDataList = new ArrayList<ConfigAdminData>();
                for (String pid : model.keys()) {
                    ConfigAdminData data = factory.configAdminData().as();
                    data.setPid(pid);

                    List<PropertyRecord> properties = new ArrayList<PropertyRecord>();
                    for(Property property : model.get(pid).get("entries").asPropertyList()) {
View Full Code Here

            // visit child elements
            if (descriptionModel.hasDefined("children")) {
                //List<Property> children = descriptionModel.get("children").asPropertyList();
                ModelNode childrenModel = descriptionModel.get(CHILDREN);
                Set<String> children = childrenModel.keys();
                for(String child : children )
                {
                    ModelNode childDesc = childrenModel.get(child);
                    ModelNode desc = childDesc.get(MODEL_DESCRIPTION);
View Full Code Here

        // parse the child resources
        if(actualPayload.hasDefined(CHILDREN))
        {
            //List<Property> children = actualPayload.get(CHILDREN).asPropertyList();
            ModelNode childNodes = actualPayload.get(CHILDREN);
            Set<String> children = childNodes.keys();
            for(String child : children)
            {
                ResourceRef childAddress = new ResourceRef(ref.address+"/"+child+"=*");
                if(!references.contains(childAddress)) // might be parsed already
                {
View Full Code Here

        {

            // identify the target node, in some cases exceptions override the dfefault behaviour
            ModelNode model = null;
            ModelNode exceptionModel = accessControl.get(EXCEPTIONS);
            if(exceptionModel.keys().size()>0// TODO: fix the actual representation, should not be ModelType.Object
            {
                List<Property> exceptions = exceptionModel.asPropertyList();
                model = exceptions.get(0).getValue();
            }
            else
View Full Code Here

        // parse the child resources
        if(actualPayload.hasDefined(CHILDREN))
        {
            //List<Property> children = actualPayload.get(CHILDREN).asPropertyList();
            ModelNode childNodes = actualPayload.get(CHILDREN);
            Set<String> children = childNodes.keys();
            for(String child : children)
            {
                String childAddress = resourceAddress+"/"+child+"=*";
                if(!requiredResources.contains(childAddress)) // might be parsed already
                {
View Full Code Here

        {

            // identify the target node, in some cases exceptions override the dfefault behaviour
            ModelNode model = null;
            ModelNode exceptionModel = accessControl.get(EXCEPTIONS);
            if(exceptionModel.keys().size()>0// TODO: fix the actual representation, should not be ModelType.Object
            {
                List<Property> exceptions = exceptionModel.asPropertyList();
                model = exceptions.get(0).getValue();
            }
            else
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.