### Eclipse Workspace Patch 1.0
#P jbt-as-org.jboss.ide.eclipse.as.ui
Index: plugin.properties
===================================================================
--- plugin.properties	(revision 38395)
+++ plugin.properties	(working copy)
@@ -22,6 +22,7 @@
 NavigatorContent_ServersViewDefaultContent=Servers View Default Content
 NavigatorContent_XMLConfiguration=XML Configuration
 NavigatorContent_JMX=JMX
+NavigatorContent_ServerContent=Server Content
 
 # NEW_SERVER_ADAPTER Add the new server and runtime ids to the constants below this line when applicable
 AllJBossRuntimeTypes=org.jboss.ide.eclipse.as.runtime.32,org.jboss.ide.eclipse.as.runtime.40,org.jboss.ide.eclipse.as.runtime.42,org.jboss.ide.eclipse.as.runtime.50,org.jboss.ide.eclipse.as.runtime.51,org.jboss.ide.eclipse.as.runtime.60,org.jboss.ide.eclipse.as.runtime.70,org.jboss.ide.eclipse.as.runtime.71,org.jboss.ide.eclipse.as.runtime.eap.43,org.jboss.ide.eclipse.as.runtime.eap.50,org.jboss.ide.eclipse.as.runtime.eap.60
Index: plugin.xml
===================================================================
--- plugin.xml	(revision 38395)
+++ plugin.xml	(working copy)
@@ -499,4 +499,129 @@
       </client>
    </extension>
 
+   <!-- AS v7+ specific server content -->
+	<extension
+      point="org.eclipse.ui.navigator.navigatorContent">
+    <navigatorContent
+          activeByDefault="true"
+          contentProvider="org.jboss.ide.eclipse.as.ui.views.server.content.ServerContentTreeContentProvider"
+          id="org.jboss.ide.eclipse.as.ui.extensions.content"
+          labelProvider="org.jboss.ide.eclipse.as.ui.views.server.content.ServerContentLabelProvider"
+          name="%NavigatorContent_ServerContent"
+          priority="normal">
+       <triggerPoints>
+          <and>
+             <instanceof
+                    value="org.eclipse.wst.server.core.IServer">
+             </instanceof>
+             <or>
+                 <test
+                       property="org.eclipse.wst.server.ui.serverType"
+                       value="org.jboss.ide.eclipse.as.70">
+                 </test>
+                 <test
+                       property="org.eclipse.wst.server.ui.serverType"
+                       value="org.jboss.ide.eclipse.as.71">
+                 </test>
+                 <test
+                       property="org.eclipse.wst.server.ui.serverType"
+                       value="org.jboss.ide.eclipse.as.eap.60">
+                 </test>
+             </or>
+          </and>
+       </triggerPoints>
+       <possibleChildren>
+          <instanceof
+                value="org.jboss.ide.eclipse.as.ui.views.server.content.IContentNode">
+          </instanceof>
+       </possibleChildren>
+    </navigatorContent>
+    <actionProvider
+          class="org.jboss.ide.eclipse.as.ui.views.server.content.RefreshActionProvider"
+          id="org.jboss.ide.eclipse.as.ui.extensions.content.container">
+       <enablement>
+          <instanceof
+                value="org.jboss.ide.eclipse.as.ui.views.server.content.IContainerNode">
+          </instanceof>
+       </enablement>
+    </actionProvider>
+    <commonFilter
+          activeByDefault="true"
+          id="org.jboss.ide.eclipse.as.ui.extensions.content.filter.extensions"
+          name="JBoss AS7 Extensions Details"
+          visibleInUI="true">
+       <filterExpression>
+          <and>
+             <instanceof
+                   value="org.jboss.ide.eclipse.as.ui.views.server.content.IContentNode">
+             </instanceof>
+             <test
+                   forcePluginActivation="true"
+                   property="org.jboss.ide.eclipse.as.ui.extensions.content.nodeAddress"
+                   value="/extension">
+             </test>
+          </and>
+       </filterExpression>
+    </commonFilter>
+    <commonFilter
+          activeByDefault="true"
+          id="org.jboss.ide.eclipse.as.ui.extensions.content.filter.deployment.artifact.details"
+          name="JBoss AS7 Deployment Artifact Details"
+          visibleInUI="true">
+       <filterExpression>
+          <and>
+             <instanceof
+                   value="org.jboss.ide.eclipse.as.ui.views.server.content.IContentNode">
+             </instanceof>
+             <test
+                   forcePluginActivation="true"
+                   property="org.jboss.ide.eclipse.as.ui.extensions.content.nodeAddress"
+                   value="/deployment=.+/(subsystem|subdeployment|attributes)">
+             </test>
+          </and>
+       </filterExpression>
+    </commonFilter>
+	</extension>
+
+	<extension
+	      point="org.eclipse.ui.navigator.viewer">
+	   <viewerContentBinding
+	         viewerId="org.eclipse.wst.server.ui.ServersView">
+	      <includes>
+             <contentExtension
+                isRoot="false"
+                pattern="org.jboss.ide.eclipse.as.ui.extensions.content">
+             </contentExtension>
+             <contentExtension
+                isRoot="false"
+                pattern="org.jboss.ide.eclipse.as.ui.extensions.content.filter.*">
+             </contentExtension>
+	      </includes>
+	   </viewerContentBinding>
+    <viewerActionBinding
+          viewerId="org.eclipse.wst.server.ui.ServersView">
+       <includes>
+          <actionExtension
+                pattern="org.jboss.ide.eclipse.as.ui.extensions.content.*"/>
+       </includes>
+    </viewerActionBinding>
+	</extension>
+
+ <extension
+       point="org.eclipse.core.expressions.propertyTesters">
+    <propertyTester
+          class="org.jboss.ide.eclipse.as.ui.views.server.content.ContentNodePropertyTester"
+          id="org.jboss.ide.eclipse.as.ui.extensions.content.propertyTester1"
+          namespace="org.jboss.ide.eclipse.as.ui.extensions.content"
+          properties="nodeName"
+          type="org.jboss.ide.eclipse.as.ui.views.server.content.IContentNode">
+    </propertyTester>
+    <propertyTester
+          class="org.jboss.ide.eclipse.as.ui.views.server.content.ContentNodePropertyTester"
+          id="org.jboss.ide.eclipse.as.ui.extensions.content.propertyTester2"
+          namespace="org.jboss.ide.eclipse.as.ui.extensions.content"
+          properties="nodeAddress"
+          type="org.jboss.ide.eclipse.as.ui.views.server.content.IContentNode">
+    </propertyTester>
+ </extension>
 </plugin>
Index: jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties
===================================================================
--- jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties	(revision 38395)
+++ jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties	(working copy)
@@ -243,4 +243,22 @@
 ServerAlreadyStartedDialog_Launch=Launch a new instance anyway
 
 ServerJavaArgsSyncText=Always update arguments related to the runtime.
-ServerJavaArgsSyncDesc=Some values on this tab refer to the server's runtime location. JBossTools may attempt to update some program and vm arguments.
\ No newline at end of file
+ServerJavaArgsSyncDesc=Some values on this tab refer to the server's runtime location. JBossTools may attempt to update some program and vm arguments.
+
+#Server content labels
+ServerContent_Type_root=Server Details
+ServerContent_Type_attributes=Attributes
+ServerContent_Type_core_service=Core Services
+ServerContent_Type_deployment=Deployments
+ServerContent_Type_extension=Extensions
+ServerContent_Type_interface=Interfaces
+ServerContent_Type_path=Paths
+ServerContent_Type_socket_binding_group=Socket Binding Groups
+ServerContent_Type_subsystem=Subsystems
+ServerContent_Type_system_property=System Properties
+ServerContent_Value_undefined=<undefined>
+ServerContent_Label_Attribute_Value={0} \: {1}
+ServerContent_Label_Loading=Loading...
+ServerContent_Label_Not_Connected=Not Connected
+ServerContent_Label_Retrieval_Error=Error retrieving children
+ServerContent_Job_Title=Retrieving information from the server
Index: jbossui/org/jboss/ide/eclipse/as/ui/Messages.java
===================================================================
--- jbossui/org/jboss/ide/eclipse/as/ui/Messages.java	(revision 38395)
+++ jbossui/org/jboss/ide/eclipse/as/ui/Messages.java	(working copy)
@@ -270,6 +270,23 @@
 	public static String ServerJavaArgsSyncText;
 	public static String ServerJavaArgsSyncDesc;
 	
+	public static String ServerContent_Type_root;
+	public static String ServerContent_Type_attributes;
+	public static String ServerContent_Type_core_service;
+	public static String ServerContent_Type_deployment;
+	public static String ServerContent_Type_extension;
+	public static String ServerContent_Type_interface;
+	public static String ServerContent_Type_path;
+	public static String ServerContent_Type_socket_binding_group;
+	public static String ServerContent_Type_subsystem;
+	public static String ServerContent_Type_system_property;
+	public static String ServerContent_Value_undefined;
+	public static String ServerContent_Label_Attribute_Value;
+    public static String ServerContent_Label_Loading;
+    public static String ServerContent_Label_Not_Connected;
+    public static String ServerContent_Label_Retrieval_Error;
+    public static String ServerContent_Job_Title;
+
 	static {
 		NLS.initializeMessages(BUNDLE_NAME,
 				Messages.class);
Index: jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/ResourceNode.java
===================================================================
--- jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/ResourceNode.java	(revision 0)
+++ jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/ResourceNode.java	(revision 0)
@@ -0,0 +1,127 @@
+/* 
+ * JBoss, Home of Professional Open Source 
+ * Copyright 2012 Red Hat Inc. and/or its affiliates and other contributors
+ * as indicated by the @author tags. All rights reserved. 
+ * See the copyright.txt in the distribution for a 
+ * full listing of individual contributors.
+ *
+ * This copyrighted material is made available to anyone wishing to use, 
+ * modify, copy, or redistribute it subject to the terms and conditions 
+ * of the GNU Lesser General Public License, v. 2.1. 
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details. 
+ * You should have received a copy of the GNU Lesser General Public License, 
+ * v.2.1 along with this distribution; if not, write to the Free Software 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ */
+package org.jboss.ide.eclipse.as.ui.views.server.content;
+
+import static org.jboss.ide.eclipse.as.management.core.ModelDescriptionConstants.ATTRIBUTES;
+import static org.jboss.ide.eclipse.as.management.core.ModelDescriptionConstants.CHILDREN;
+import static org.jboss.ide.eclipse.as.management.core.ModelDescriptionConstants.OP;
+import static org.jboss.ide.eclipse.as.management.core.ModelDescriptionConstants.OP_ADDR;
+import static org.jboss.ide.eclipse.as.management.core.ModelDescriptionConstants.READ_RESOURCE_DESCRIPTION_OPERATION;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.dmr.ModelNode;
+import org.jboss.ide.eclipse.as.core.server.v7.management.AS7ManagementDetails;
+import org.jboss.ide.eclipse.as.management.core.IJBoss7ManagerService;
+import org.jboss.ide.eclipse.as.management.core.JBoss7ManagerUtil;
+
+/**
+ * ResourceNode
+ * 
+ * <p/>
+ * Implementation of a resource node.
+ * 
+ * @author Rob Cernich
+ */
+public class ResourceNode extends ContainerNode<ITypeNode> implements IResourceNode {
+
+    private ArrayList<IContentNode<? extends IContainerNode<?>>> children;
+
+    protected ResourceNode(ITypeNode parent, String name) {
+        super(parent, name);
+    }
+
+    protected ResourceNode(IServer server, String name) {
+        super(server, name);
+    }
+
+    public String getAddress() {
+        if (getParent() == null) {
+            // special handling for root node
+            return ""; //$NON-NLS-1$
+        }
+        return getParent().getAddress() + PATH_SEPARATOR + getContainer().getName() + "=" + getName(); //$NON-NLS-1$
+    }
+
+    protected List<IContentNode<? extends IContainerNode<?>>> delegateGetChildren() {
+        return children;
+    }
+
+    protected void delegateClearChildren() {
+        if (children != null) {
+            for (IContentNode<? extends IContainerNode<?>> child : children) {
+                child.dispose();
+            }
+            children.clear();
+            children = null;
+        }
+    }
+
+    protected void delegateLoad() throws Exception {
+        String resultJSON = JBoss7ManagerUtil.executeWithService(new JBoss7ManagerUtil.IServiceAware<String>() {
+            public String execute(IJBoss7ManagerService service) throws Exception {
+                return service.execute(new AS7ManagementDetails(getServer()), createResourceDescriptionRequest());
+            }
+        }, getServer());
+        ModelNode result = ModelNode.fromJSONString(resultJSON);
+        children = new ArrayList<IContentNode<? extends IContainerNode<?>>>();
+        if (result.hasDefined(ATTRIBUTES)) {
+            populateAttributes(result.get(ATTRIBUTES).asObject());
+        }
+        if (result.hasDefined(CHILDREN)) {
+            populateTypes(result.get(CHILDREN).asObject());
+        }
+        if (children.size() == 1) {
+            IContentNode<? extends IContainerNode<?>> child = children.get(0);
+            if (child instanceof IAttributesContainer) {
+                // collapse the attributes container if it's the only child.
+                IAttributesContainer attributesContainer = (IAttributesContainer) child;
+                children.clear();
+                attributesContainer.load();
+                children.addAll(attributesContainer.getChildren());
+            }
+        }
+    }
+
+    private String createResourceDescriptionRequest() {
+        ModelNode request = new ModelNode();
+        request.get(OP).set(READ_RESOURCE_DESCRIPTION_OPERATION);
+        request.get(OP_ADDR).set(getManagementAddress(this));
+        return request.toJSONString(true);
+    }
+
+    private void populateAttributes(ModelNode result) {
+        Set<String> keys = result.keys();
+        if (keys.size() > 0) {
+            children.add(new AttributesContainer(this, new ArrayList<String>(keys)));
+        }
+    }
+
+    private void populateTypes(ModelNode result) {
+        Set<String> keys = result.keys();
+        children.ensureCapacity(children.size() + keys.size());
+        for (String key : keys) {
+            children.add(new TypeNode(this, key));
+        }
+    }
+
+}
Index: jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/TypeNode.java
===================================================================
--- jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/TypeNode.java	(revision 0)
+++ jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/TypeNode.java	(revision 0)
@@ -0,0 +1,88 @@
+/* 
+ * JBoss, Home of Professional Open Source 
+ * Copyright 2012 Red Hat Inc. and/or its affiliates and other contributors
+ * as indicated by the @author tags. All rights reserved. 
+ * See the copyright.txt in the distribution for a 
+ * full listing of individual contributors.
+ *
+ * This copyrighted material is made available to anyone wishing to use, 
+ * modify, copy, or redistribute it subject to the terms and conditions 
+ * of the GNU Lesser General Public License, v. 2.1. 
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details. 
+ * You should have received a copy of the GNU Lesser General Public License, 
+ * v.2.1 along with this distribution; if not, write to the Free Software 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ */
+package org.jboss.ide.eclipse.as.ui.views.server.content;
+
+import static org.jboss.ide.eclipse.as.management.core.ModelDescriptionConstants.CHILD_TYPE;
+import static org.jboss.ide.eclipse.as.management.core.ModelDescriptionConstants.OP;
+import static org.jboss.ide.eclipse.as.management.core.ModelDescriptionConstants.OP_ADDR;
+import static org.jboss.ide.eclipse.as.management.core.ModelDescriptionConstants.READ_CHILDREN_NAMES_OPERATION;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.dmr.ModelNode;
+import org.jboss.ide.eclipse.as.core.server.v7.management.AS7ManagementDetails;
+import org.jboss.ide.eclipse.as.management.core.IJBoss7ManagerService;
+import org.jboss.ide.eclipse.as.management.core.JBoss7ManagerUtil;
+
+/**
+ * TypeNode
+ * 
+ * <p/>
+ * Implementation of ITypeNode. Loads child names for a specific resource
+ * child-type.
+ * 
+ * @author Rob Cernich
+ */
+public class TypeNode extends ContainerNode<IResourceNode> implements ITypeNode {
+
+    private List<IResourceNode> resources;
+
+    protected TypeNode(IResourceNode container, String name) {
+        super(container, name);
+    }
+
+    protected List<IResourceNode> delegateGetChildren() {
+        return resources;
+    }
+
+    protected void delegateClearChildren() {
+        if (resources != null) {
+            for (IResourceNode resource : resources) {
+                resource.dispose();
+            }
+            resources.clear();
+            resources = null;
+        }
+    }
+
+    protected void delegateLoad() throws Exception {
+        String resultJSON = JBoss7ManagerUtil.executeWithService(new JBoss7ManagerUtil.IServiceAware<String>() {
+            public String execute(IJBoss7ManagerService service) throws Exception {
+                return service.execute(new AS7ManagementDetails(getServer()), createResourceNamesRequest());
+            }
+        }, getServer());
+        // process the results
+        ModelNode result = ModelNode.fromJSONString(resultJSON);
+        List<ModelNode> childResources = result.asList();
+        resources = new ArrayList<IResourceNode>(childResources.size());
+        for (ModelNode child : childResources) {
+            resources.add(new ResourceNode(this, child.asString()));
+        }
+    }
+
+    private String createResourceNamesRequest() {
+        ModelNode request = new ModelNode();
+        request.get(OP).set(READ_CHILDREN_NAMES_OPERATION);
+        request.get(CHILD_TYPE).set(getName());
+        request.get(OP_ADDR).set(getManagementAddress(getParent()));
+        return request.toJSONString(true);
+    }
+
+}
Index: jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/IContainerNode.java
===================================================================
--- jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/IContainerNode.java	(revision 0)
+++ jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/IContainerNode.java	(revision 0)
@@ -0,0 +1,51 @@
+/* 
+ * JBoss, Home of Professional Open Source 
+ * Copyright 2012 Red Hat Inc. and/or its affiliates and other contributors
+ * as indicated by the @author tags. All rights reserved. 
+ * See the copyright.txt in the distribution for a 
+ * full listing of individual contributors.
+ *
+ * This copyrighted material is made available to anyone wishing to use, 
+ * modify, copy, or redistribute it subject to the terms and conditions 
+ * of the GNU Lesser General Public License, v. 2.1. 
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details. 
+ * You should have received a copy of the GNU Lesser General Public License, 
+ * v.2.1 along with this distribution; if not, write to the Free Software 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ */
+package org.jboss.ide.eclipse.as.ui.views.server.content;
+
+import java.util.List;
+
+/**
+ * IContainerNode
+ * 
+ * <p/>
+ * Base interface for container (non-leaf) nodes.
+ * 
+ * @author Rob Cernich
+ */
+public interface IContainerNode<T extends IContainerNode<?>> extends IContentNode<T> {
+
+    /**
+     * @return the children of this container.
+     */
+    public List<? extends IContentNode<?>> getChildren();
+
+    /**
+     * Loads the content of this container. This method is invoked by the
+     * content provider if getChildren() returns null.
+     */
+    public void load();
+
+    /**
+     * Clears the children of this container. After this method has been
+     * invoked, getChildren() must return null. This method is called when a
+     * refresh is requested.
+     */
+    public void clearChildren();
+
+}
Index: jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/RefreshActionProvider.java
===================================================================
--- jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/RefreshActionProvider.java	(revision 0)
+++ jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/RefreshActionProvider.java	(revision 0)
@@ -0,0 +1,79 @@
+/* 
+ * JBoss, Home of Professional Open Source 
+ * Copyright 2012 Red Hat Inc. and/or its affiliates and other contributors
+ * as indicated by the @author tags. All rights reserved. 
+ * See the copyright.txt in the distribution for a 
+ * full listing of individual contributors.
+ *
+ * This copyrighted material is made available to anyone wishing to use, 
+ * modify, copy, or redistribute it subject to the terms and conditions 
+ * of the GNU Lesser General Public License, v. 2.1. 
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details. 
+ * You should have received a copy of the GNU Lesser General Public License, 
+ * v.2.1 along with this distribution; if not, write to the Free Software 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ */
+package org.jboss.ide.eclipse.as.ui.views.server.content;
+
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.actions.SelectionProviderAction;
+import org.eclipse.ui.internal.WorkbenchMessages;
+import org.eclipse.ui.navigator.CommonActionProvider;
+import org.eclipse.ui.navigator.ICommonActionExtensionSite;
+
+/**
+ * RefreshActionProvider
+ * 
+ * <p/>
+ * Provides a refresh action for IContainer nodes.
+ * 
+ * @author Rob Cernich
+ */
+@SuppressWarnings("restriction")
+public class RefreshActionProvider extends CommonActionProvider {
+
+    private RefreshAction refreshAction;
+
+    public RefreshActionProvider() {
+    }
+
+    public void init(ICommonActionExtensionSite aSite) {
+        super.init(aSite);
+        refreshAction = new RefreshAction(aSite.getStructuredViewer());
+    }
+
+    public void fillContextMenu(IMenuManager menu) {
+        menu.add(refreshAction);
+    }
+
+    public void dispose() {
+        if (refreshAction != null) {
+            refreshAction.dispose();
+            refreshAction = null;
+        }
+        super.dispose();
+    }
+
+    private class RefreshAction extends SelectionProviderAction {
+
+        public RefreshAction(ISelectionProvider selectionProvider) {
+            super(selectionProvider, WorkbenchMessages.Workbench_refresh);
+        }
+
+        public void run() {
+            IStructuredSelection selection = getStructuredSelection();
+            if (selection == null || selection.isEmpty()) {
+                return;
+            }
+            IContainerNode<?> container = (IContainerNode<?>) ((IStructuredSelection) selection).getFirstElement();
+            container.clearChildren();
+            RefreshActionProvider.this.getActionSite().getStructuredViewer().refresh(container);
+        }
+
+    }
+}
Index: jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/IResourceNode.java
===================================================================
--- jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/IResourceNode.java	(revision 0)
+++ jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/IResourceNode.java	(revision 0)
@@ -0,0 +1,35 @@
+/* 
+ * JBoss, Home of Professional Open Source 
+ * Copyright 2012 Red Hat Inc. and/or its affiliates and other contributors
+ * as indicated by the @author tags. All rights reserved. 
+ * See the copyright.txt in the distribution for a 
+ * full listing of individual contributors.
+ *
+ * This copyrighted material is made available to anyone wishing to use, 
+ * modify, copy, or redistribute it subject to the terms and conditions 
+ * of the GNU Lesser General Public License, v. 2.1. 
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details. 
+ * You should have received a copy of the GNU Lesser General Public License, 
+ * v.2.1 along with this distribution; if not, write to the Free Software 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ */
+package org.jboss.ide.eclipse.as.ui.views.server.content;
+
+/**
+ * IResourceNode
+ * 
+ * <p/>
+ * Represents a resource in the management tree. A resource may contain
+ * attributes, system metrics, as well as other types of resources.
+ * 
+ * @author Rob Cernich
+ */
+public interface IResourceNode extends IContainerNode<ITypeNode> {
+
+    /** Represents the root of the management tree. */
+    public static final String ROOT_TYPE = "root"; //$NON-NLS-1$
+
+}
Index: jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/AttributeNode.java
===================================================================
--- jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/AttributeNode.java	(revision 0)
+++ jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/AttributeNode.java	(revision 0)
@@ -0,0 +1,42 @@
+/* 
+ * JBoss, Home of Professional Open Source 
+ * Copyright 2012 Red Hat Inc. and/or its affiliates and other contributors
+ * as indicated by the @author tags. All rights reserved. 
+ * See the copyright.txt in the distribution for a 
+ * full listing of individual contributors.
+ *
+ * This copyrighted material is made available to anyone wishing to use, 
+ * modify, copy, or redistribute it subject to the terms and conditions 
+ * of the GNU Lesser General Public License, v. 2.1. 
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details. 
+ * You should have received a copy of the GNU Lesser General Public License, 
+ * v.2.1 along with this distribution; if not, write to the Free Software 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ */
+package org.jboss.ide.eclipse.as.ui.views.server.content;
+
+/**
+ * AttributeNode
+ * 
+ * <p/>
+ * Represents and attribute of a resource.
+ * 
+ * @author Rob Cernich
+ */
+public class AttributeNode extends ContentNode<IAttributesContainer> implements IAttributeNode {
+
+    private final String value;
+
+    protected AttributeNode(IAttributesContainer parent, String name, String value) {
+        super(parent, name);
+        this.value = value;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+}
Index: jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/ServerContentLabelProvider.java
===================================================================
--- jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/ServerContentLabelProvider.java	(revision 0)
+++ jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/ServerContentLabelProvider.java	(revision 0)
@@ -0,0 +1,103 @@
+/* 
+ * JBoss, Home of Professional Open Source 
+ * Copyright 2012 Red Hat Inc. and/or its affiliates and other contributors
+ * as indicated by the @author tags. All rights reserved. 
+ * See the copyright.txt in the distribution for a 
+ * full listing of individual contributors.
+ *
+ * This copyrighted material is made available to anyone wishing to use, 
+ * modify, copy, or redistribute it subject to the terms and conditions 
+ * of the GNU Lesser General Public License, v. 2.1. 
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details. 
+ * You should have received a copy of the GNU Lesser General Public License, 
+ * v.2.1 along with this distribution; if not, write to the Free Software 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ */
+package org.jboss.ide.eclipse.as.ui.views.server.content;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+import org.jboss.ide.eclipse.as.ui.Messages;
+
+import com.ibm.icu.text.MessageFormat;
+
+/**
+ * ServerContentLabelProvider
+ * 
+ * <p/>
+ * Label provider implementation for content nodes.
+ * 
+ * @author Rob Cernich
+ */
+public class ServerContentLabelProvider extends LabelProvider {
+
+    /**
+     * Maps node names to any label that should be used.
+     * <p/>
+     * TODO: this should probably be contributed by an extension,, which should
+     * provide icons as well.
+     */
+    private static Map<String, String> LABELS;
+
+    public String getText(Object element) {
+        if (element instanceof IAttributeNode) {
+            IAttributeNode attrNode = (IAttributeNode) element;
+            String value = attrNode.getValue();
+            if (value == null || IAttributeNode.UNDEFINED_VALUE.equals(value)) {
+                value = Messages.ServerContent_Value_undefined;
+            }
+            return MessageFormat.format(Messages.ServerContent_Label_Attribute_Value, attrNode.getName(), value);
+        } else if (element instanceof IErrorNode) {
+            return ((IErrorNode) element).getText();
+        } else if (element instanceof IContentNode) {
+            return getMappedName(((IContentNode<?>) element).getName());
+        } else if (element == ServerContentTreeContentProvider.PENDING) {
+            return Messages.ServerContent_Label_Loading;
+        }
+        return super.getText(element);
+    }
+
+    @Override
+    public Image getImage(Object element) {
+        if (element instanceof IContainerNode<?>) {
+            return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FOLDER);
+        } else if (element instanceof IErrorNode) {
+            return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_ERROR_TSK);
+        } else if (element instanceof IContentNode<?>) {
+            return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FILE);
+        }
+        return super.getImage(element);
+    }
+
+    private String getMappedName(String name) {
+        if (name == null) {
+            return Messages.ServerContent_Value_undefined;
+        }
+        if (LABELS.containsKey(name)) {
+            return LABELS.get(name);
+        }
+        return name;
+    }
+
+    static {
+        LABELS = new HashMap<String, String>();
+        LABELS.put(IAttributesContainer.ATTRIBUTES_TYPE, Messages.ServerContent_Type_attributes);
+        LABELS.put("core-service", Messages.ServerContent_Type_core_service); //$NON-NLS-1$
+        LABELS.put("deployment", Messages.ServerContent_Type_deployment); //$NON-NLS-1$
+        LABELS.put("extension", Messages.ServerContent_Type_extension); //$NON-NLS-1$
+        LABELS.put("interface", Messages.ServerContent_Type_interface); //$NON-NLS-1$
+        LABELS.put("path", Messages.ServerContent_Type_path); //$NON-NLS-1$
+        LABELS.put(IResourceNode.ROOT_TYPE, Messages.ServerContent_Type_root);
+        LABELS.put("socket-binding-group", Messages.ServerContent_Type_socket_binding_group); //$NON-NLS-1$
+        LABELS.put("subsystem", Messages.ServerContent_Type_subsystem); //$NON-NLS-1$
+        LABELS.put("system-property", Messages.ServerContent_Type_system_property); //$NON-NLS-1$
+    }
+}
Index: jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/ContentNode.java
===================================================================
--- jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/ContentNode.java	(revision 0)
+++ jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/ContentNode.java	(revision 0)
@@ -0,0 +1,107 @@
+/* 
+ * JBoss, Home of Professional Open Source 
+ * Copyright 2012 Red Hat Inc. and/or its affiliates and other contributors
+ * as indicated by the @author tags. All rights reserved. 
+ * See the copyright.txt in the distribution for a 
+ * full listing of individual contributors.
+ *
+ * This copyrighted material is made available to anyone wishing to use, 
+ * modify, copy, or redistribute it subject to the terms and conditions 
+ * of the GNU Lesser General Public License, v. 2.1. 
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details. 
+ * You should have received a copy of the GNU Lesser General Public License, 
+ * v.2.1 along with this distribution; if not, write to the Free Software 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ */
+package org.jboss.ide.eclipse.as.ui.views.server.content;
+
+import java.util.Deque;
+import java.util.LinkedList;
+
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.dmr.ModelNode;
+
+/**
+ * ContentNode
+ * 
+ * <p/>
+ * Base implementation of IContentNode.
+ * 
+ * @author Rob Cernich
+ */
+public class ContentNode<T extends IContainerNode<?>> implements IContentNode<T> {
+
+    /** The path separator for addresses. */
+    public static final String PATH_SEPARATOR = "/"; //$NON-NLS-1$
+
+    private final IServer server;
+    private IResourceNode parent;
+    private T container;
+    private final String name;
+
+    protected ContentNode(IServer server, String name) {
+        this.server = server;
+        this.parent = null;
+        this.container = null;
+        this.name = name;
+    }
+
+    protected ContentNode(T container, String name) {
+        this.server = container.getServer();
+        this.parent = container instanceof IResourceNode ? (IResourceNode) container : container.getParent();
+        this.container = container;
+        this.name = name;
+    }
+
+    public IResourceNode getParent() {
+        return parent;
+    }
+
+    public T getContainer() {
+        return container;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public String getAddress() {
+        return getParent().getAddress() + PATH_SEPARATOR + getName();
+    }
+
+    public IServer getServer() {
+        return server;
+    }
+
+    public void dispose() {
+        container = null;
+        parent = null;
+    }
+
+    /**
+     * Constructs an address list that can be used in an operation request.
+     * 
+     * @param resource the resource being addressed
+     * @return a model node containing the list of addresses to the resource.
+     */
+    protected static ModelNode getManagementAddress(IResourceNode resource) {
+        ModelNode address = new ModelNode();
+        Deque<IResourceNode> resources = new LinkedList<IResourceNode>();
+        resources.push(resource);
+        for (IResourceNode parent = resource.getParent(); parent != null; parent = parent.getParent()) {
+            resources.push(parent);
+        }
+        do {
+            resource = resources.pop();
+            ITypeNode type = resource.getContainer();
+            if (type != null) {
+                address.add(type.getName(), resource.getName());
+            }
+        } while (!resources.isEmpty());
+        return address;
+    }
+
+}
Index: jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/IErrorNode.java
===================================================================
--- jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/IErrorNode.java	(revision 0)
+++ jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/IErrorNode.java	(revision 0)
@@ -0,0 +1,36 @@
+/* 
+ * JBoss, Home of Professional Open Source 
+ * Copyright 2012 Red Hat Inc. and/or its affiliates and other contributors
+ * as indicated by the @author tags. All rights reserved. 
+ * See the copyright.txt in the distribution for a 
+ * full listing of individual contributors.
+ *
+ * This copyrighted material is made available to anyone wishing to use, 
+ * modify, copy, or redistribute it subject to the terms and conditions 
+ * of the GNU Lesser General Public License, v. 2.1. 
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details. 
+ * You should have received a copy of the GNU Lesser General Public License, 
+ * v.2.1 along with this distribution; if not, write to the Free Software 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ */
+package org.jboss.ide.eclipse.as.ui.views.server.content;
+
+/**
+ * IErrorNode
+ * 
+ * <p/>
+ * Represents an error that occurred while loading a container's contents.
+ * 
+ * @author Rob Cernich
+ */
+public interface IErrorNode extends IContentNode<IContainerNode<?>> {
+
+    /**
+     * @return the error text.
+     */
+    public String getText();
+
+}
\ No newline at end of file
Index: jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/ErrorNode.java
===================================================================
--- jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/ErrorNode.java	(revision 0)
+++ jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/ErrorNode.java	(revision 0)
@@ -0,0 +1,44 @@
+/* 
+ * JBoss, Home of Professional Open Source 
+ * Copyright 2012 Red Hat Inc. and/or its affiliates and other contributors
+ * as indicated by the @author tags. All rights reserved. 
+ * See the copyright.txt in the distribution for a 
+ * full listing of individual contributors.
+ *
+ * This copyrighted material is made available to anyone wishing to use, 
+ * modify, copy, or redistribute it subject to the terms and conditions 
+ * of the GNU Lesser General Public License, v. 2.1. 
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details. 
+ * You should have received a copy of the GNU Lesser General Public License, 
+ * v.2.1 along with this distribution; if not, write to the Free Software 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ */
+package org.jboss.ide.eclipse.as.ui.views.server.content;
+
+/**
+ * ErrorNode
+ * 
+ * <p/>
+ * Represents an error that occurred while attempting to retrieve a resource's
+ * children.
+ * 
+ * @author Rob Cernich
+ */
+public class ErrorNode extends ContentNode<IContainerNode<?>> implements IErrorNode {
+
+    public static final String ERROR_TYPE = "error"; //$NON-NLS-1$
+
+    private final String text;
+
+    protected ErrorNode(IContainerNode<?> container, String text) {
+        super(container, ERROR_TYPE);
+        this.text = text;
+    }
+
+    public String getText() {
+        return text;
+    }
+}
Index: jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/ITypeNode.java
===================================================================
--- jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/ITypeNode.java	(revision 0)
+++ jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/ITypeNode.java	(revision 0)
@@ -0,0 +1,31 @@
+/* 
+ * JBoss, Home of Professional Open Source 
+ * Copyright 2012 Red Hat Inc. and/or its affiliates and other contributors
+ * as indicated by the @author tags. All rights reserved. 
+ * See the copyright.txt in the distribution for a 
+ * full listing of individual contributors.
+ *
+ * This copyrighted material is made available to anyone wishing to use, 
+ * modify, copy, or redistribute it subject to the terms and conditions 
+ * of the GNU Lesser General Public License, v. 2.1. 
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details. 
+ * You should have received a copy of the GNU Lesser General Public License, 
+ * v.2.1 along with this distribution; if not, write to the Free Software 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ */
+package org.jboss.ide.eclipse.as.ui.views.server.content;
+
+/**
+ * ITypeNode
+ * 
+ * <p/>
+ * Represents a container for a specific type of child resources.
+ * 
+ * @author Rob Cernich
+ */
+public interface ITypeNode extends IContainerNode<IResourceNode> {
+
+}
Index: jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/AttributesContainer.java
===================================================================
--- jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/AttributesContainer.java	(revision 0)
+++ jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/AttributesContainer.java	(revision 0)
@@ -0,0 +1,100 @@
+/* 
+ * JBoss, Home of Professional Open Source 
+ * Copyright 2012 Red Hat Inc. and/or its affiliates and other contributors
+ * as indicated by the @author tags. All rights reserved. 
+ * See the copyright.txt in the distribution for a 
+ * full listing of individual contributors.
+ *
+ * This copyrighted material is made available to anyone wishing to use, 
+ * modify, copy, or redistribute it subject to the terms and conditions 
+ * of the GNU Lesser General Public License, v. 2.1. 
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details. 
+ * You should have received a copy of the GNU Lesser General Public License, 
+ * v.2.1 along with this distribution; if not, write to the Free Software 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ */
+package org.jboss.ide.eclipse.as.ui.views.server.content;
+
+import static org.jboss.ide.eclipse.as.management.core.ModelDescriptionConstants.OP;
+import static org.jboss.ide.eclipse.as.management.core.ModelDescriptionConstants.OP_ADDR;
+import static org.jboss.ide.eclipse.as.management.core.ModelDescriptionConstants.READ_RESOURCE_OPERATION;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.dmr.ModelNode;
+import org.jboss.ide.eclipse.as.core.server.v7.management.AS7ManagementDetails;
+import org.jboss.ide.eclipse.as.management.core.IJBoss7ManagerService;
+import org.jboss.ide.eclipse.as.management.core.JBoss7ManagerUtil;
+
+/**
+ * AttributesContainer
+ * 
+ * <p/>
+ * Container node for resource attributes.
+ * 
+ * @author Rob Cernich
+ */
+public class AttributesContainer extends ContainerNode<IResourceNode> implements IAttributesContainer {
+
+    private List<String> attributeNames;
+    private List<IAttributeNode> attributes;
+
+    /**
+     * Create a new AttributesContainer.
+     * 
+     * @param parent
+     * @param name
+     */
+    protected AttributesContainer(IResourceNode parent, List<String> attributeNames) {
+        super(parent, ATTRIBUTES_TYPE);
+        this.attributeNames = attributeNames;
+    }
+
+    protected List<IAttributeNode> delegateGetChildren() {
+        return attributes;
+    }
+
+    protected void delegateClearChildren() {
+        if (attributes != null) {
+            for (IAttributeNode attribute : attributes) {
+                attribute.dispose();
+            }
+            attributes.clear();
+            attributes = null;
+        }
+    }
+
+    public void dispose() {
+        attributeNames.clear();
+        super.dispose();
+    }
+
+    protected void delegateLoad() throws Exception {
+        String resultJSON = JBoss7ManagerUtil.executeWithService(new JBoss7ManagerUtil.IServiceAware<String>() {
+            public String execute(IJBoss7ManagerService service) throws Exception {
+                return service.execute(new AS7ManagementDetails(getServer()), createResourceRequest());
+            }
+        }, getServer());
+        ModelNode result = ModelNode.fromJSONString(resultJSON);
+        attributes = new ArrayList<IAttributeNode>(attributeNames.size());
+        for (String name : attributeNames) {
+            if (result.hasDefined(name)) {
+                attributes.add(new AttributeNode(this, name, result.get(name).asString()));
+            } else {
+                attributes.add(new AttributeNode(this, name, null));
+            }
+        }
+    }
+
+    private String createResourceRequest() {
+        ModelNode request = new ModelNode();
+        request.get(OP).set(READ_RESOURCE_OPERATION);
+        request.get(OP_ADDR).set(getManagementAddress(getParent()));
+        return request.toJSONString(true);
+    }
+
+}
Index: jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/IAttributeNode.java
===================================================================
--- jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/IAttributeNode.java	(revision 0)
+++ jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/IAttributeNode.java	(revision 0)
@@ -0,0 +1,38 @@
+/* 
+ * JBoss, Home of Professional Open Source 
+ * Copyright 2012 Red Hat Inc. and/or its affiliates and other contributors
+ * as indicated by the @author tags. All rights reserved. 
+ * See the copyright.txt in the distribution for a 
+ * full listing of individual contributors.
+ *
+ * This copyrighted material is made available to anyone wishing to use, 
+ * modify, copy, or redistribute it subject to the terms and conditions 
+ * of the GNU Lesser General Public License, v. 2.1. 
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details. 
+ * You should have received a copy of the GNU Lesser General Public License, 
+ * v.2.1 along with this distribution; if not, write to the Free Software 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ */
+package org.jboss.ide.eclipse.as.ui.views.server.content;
+
+/**
+ * IAttributeNode
+ * 
+ * <p/>
+ * Represents an attribute in the management tree.
+ * 
+ * @author Rob Cernich
+ */
+public interface IAttributeNode extends IContentNode<IAttributesContainer> {
+
+    /** Represents a value that is null. */
+    public static final String UNDEFINED_VALUE = "undefined"; //$NON-NLS-1$
+
+    /**
+     * @return the value of the attribute; may be null.
+     */
+    public String getValue();
+}
Index: jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/ServerContentTreeContentProvider.java
===================================================================
--- jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/ServerContentTreeContentProvider.java	(revision 0)
+++ jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/ServerContentTreeContentProvider.java	(revision 0)
@@ -0,0 +1,155 @@
+/* 
+ * JBoss, Home of Professional Open Source 
+ * Copyright 2012 Red Hat Inc. and/or its affiliates and other contributors
+ * as indicated by the @author tags. All rights reserved. 
+ * See the copyright.txt in the distribution for a 
+ * full listing of individual contributors.
+ *
+ * This copyrighted material is made available to anyone wishing to use, 
+ * modify, copy, or redistribute it subject to the terms and conditions 
+ * of the GNU Lesser General Public License, v. 2.1. 
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details. 
+ * You should have received a copy of the GNU Lesser General Public License, 
+ * v.2.1 along with this distribution; if not, write to the Free Software 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ */
+package org.jboss.ide.eclipse.as.ui.views.server.content;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.ui.Messages;
+
+/**
+ * ServerContentTreeContentProvider
+ * 
+ * <p/>
+ * Content provider implementation for server management details.
+ * 
+ * @author Rob Cernich
+ */
+public class ServerContentTreeContentProvider implements ITreeContentProvider {
+
+    /** Represents a pending request in the tree. */
+    static final Object PENDING = new Object();
+    private ConcurrentMap<IContainerNode<?>, Object> pendingUpdates = new ConcurrentHashMap<IContainerNode<?>, Object>();
+    private transient TreeViewer viewer;
+
+    /**
+     * Loads content for specified nodes, then refreshes the content in the
+     * tree.
+     */
+    private Job loadElementJob = new Job(Messages.ServerContent_Job_Title) {
+        public boolean shouldRun() {
+            return pendingUpdates.size() > 0;
+        }
+
+        protected IStatus run(final IProgressMonitor monitor) {
+            monitor.beginTask(Messages.ServerContent_Job_Title, IProgressMonitor.UNKNOWN);
+            try {
+                final List<IContainerNode<?>> updatedNodes = new ArrayList<IContainerNode<?>>(pendingUpdates.size());
+                for (IContainerNode<?> node : pendingUpdates.keySet()) {
+                    try {
+                        node.load();
+                        updatedNodes.add(node);
+                    } catch (Exception e) {
+                    }
+                    if (monitor.isCanceled()) {
+                        pendingUpdates.keySet().removeAll(updatedNodes);
+                        return Status.CANCEL_STATUS;
+                    }
+                }
+                final TreeViewer viewer = ServerContentTreeContentProvider.this.viewer;
+                if (viewer == null) {
+                    pendingUpdates.keySet().clear();
+                } else {
+                    viewer.getTree().getDisplay().asyncExec(new Runnable() {
+                        public void run() {
+                            if (viewer.getTree().isDisposed()) {
+                                return;
+                            }
+                            for (IContainerNode<?> node : updatedNodes) {
+                                pendingUpdates.remove(node);
+                                viewer.refresh(node);
+                            }
+                        }
+                    });
+                }
+            } finally {
+                monitor.done();
+            }
+            return Status.OK_STATUS;
+        }
+    };
+
+    public void dispose() {
+        viewer = null;
+        loadElementJob.cancel();
+        pendingUpdates.clear();
+    }
+
+    public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+        if (viewer instanceof TreeViewer) {
+            this.viewer = (TreeViewer) viewer;
+        } else {
+            viewer = null;
+        }
+    }
+
+    public Object[] getElements(Object inputElement) {
+        return getChildren(inputElement);
+    }
+
+    public Object[] getChildren(Object parentElement) {
+        if (parentElement instanceof IServer) {
+            return new Object[] {new ResourceNode((IServer) parentElement, IResourceNode.ROOT_TYPE) };
+        } else if (parentElement instanceof IContainerNode) {
+            IContainerNode<?> container = (IContainerNode<?>) parentElement;
+            if (pendingUpdates.containsKey(container)) {
+                return new Object[] {PENDING };
+            }
+            List<? extends IContentNode<?>> children = container.getChildren();
+            if (children == null) {
+                pendingUpdates.putIfAbsent(container, PENDING);
+                loadElementJob.schedule();
+                return new Object[] {PENDING };
+            }
+            return children.toArray();
+        }
+        return new Object[0];
+    }
+
+    public Object getParent(Object element) {
+        if (element instanceof IContentNode) {
+            Object parent = ((IContentNode<?>) element).getContainer();
+            if (parent == null) {
+                parent = ((IContentNode<?>) element).getServer();
+            }
+            return parent;
+        }
+        return null;
+    }
+
+    public boolean hasChildren(Object element) {
+        if (element instanceof IServer) {
+            return true;
+        } else if (element instanceof IContainerNode) {
+            return true;
+        }
+        return false;
+    }
+
+}
Index: jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/ContainerNode.java
===================================================================
--- jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/ContainerNode.java	(revision 0)
+++ jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/ContainerNode.java	(revision 0)
@@ -0,0 +1,96 @@
+/* 
+ * JBoss, Home of Professional Open Source 
+ * Copyright 2012 Red Hat Inc. and/or its affiliates and other contributors
+ * as indicated by the @author tags. All rights reserved. 
+ * See the copyright.txt in the distribution for a 
+ * full listing of individual contributors.
+ *
+ * This copyrighted material is made available to anyone wishing to use, 
+ * modify, copy, or redistribute it subject to the terms and conditions 
+ * of the GNU Lesser General Public License, v. 2.1. 
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details. 
+ * You should have received a copy of the GNU Lesser General Public License, 
+ * v.2.1 along with this distribution; if not, write to the Free Software 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ */
+package org.jboss.ide.eclipse.as.ui.views.server.content;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.ui.Messages;
+
+/**
+ * ContainerNode
+ * 
+ * <p>
+ * Abstract implementation of a container node. Delegates loading and takes care
+ * of error handling.
+ * 
+ * @author Rob Cernich
+ */
+public abstract class ContainerNode<T extends IContainerNode<?>> extends ContentNode<T> implements IContainerNode<T> {
+
+    private IErrorNode error;
+
+    protected ContainerNode(IServer server, String name) {
+        super(server, name);
+    }
+
+    protected ContainerNode(T container, String name) {
+        super(container, name);
+    }
+
+    public final List<? extends IContentNode<?>> getChildren() {
+        if (error != null) {
+            return Collections.singletonList(error);
+        }
+        return delegateGetChildren();
+    }
+
+    public final void clearChildren() {
+        clearError();
+        delegateClearChildren();
+    }
+
+    protected void setError(IErrorNode error) {
+        clearError();
+        this.error = error;
+    }
+
+    @Override
+    public void dispose() {
+        clearChildren();
+        super.dispose();
+    }
+
+    public final void load() {
+        if (getServer().getServerState() != IServer.STATE_STARTED) {
+            setError(new ErrorNode(this, Messages.ServerContent_Label_Not_Connected));
+            return;
+        }
+        try {
+            delegateLoad();
+            clearError();
+        } catch (Exception e) {
+            setError(new ErrorNode(this, Messages.ServerContent_Label_Retrieval_Error));
+        }
+    }
+
+    protected abstract List<? extends IContentNode<?>> delegateGetChildren();
+
+    protected abstract void delegateClearChildren();
+
+    protected abstract void delegateLoad() throws Exception;
+
+    private void clearError() {
+        if (error != null) {
+            error.dispose();
+            error = null;
+        }
+    }
+}
Index: jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/ContentNodePropertyTester.java
===================================================================
--- jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/ContentNodePropertyTester.java	(revision 0)
+++ jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/ContentNodePropertyTester.java	(revision 0)
@@ -0,0 +1,46 @@
+/* 
+ * JBoss, Home of Professional Open Source 
+ * Copyright 2012 Red Hat Inc. and/or its affiliates and other contributors
+ * as indicated by the @author tags. All rights reserved. 
+ * See the copyright.txt in the distribution for a 
+ * full listing of individual contributors.
+ *
+ * This copyrighted material is made available to anyone wishing to use, 
+ * modify, copy, or redistribute it subject to the terms and conditions 
+ * of the GNU Lesser General Public License, v. 2.1. 
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details. 
+ * You should have received a copy of the GNU Lesser General Public License, 
+ * v.2.1 along with this distribution; if not, write to the Free Software 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ */
+package org.jboss.ide.eclipse.as.ui.views.server.content;
+
+import org.eclipse.core.expressions.PropertyTester;
+
+/**
+ * ContentNodePropertyTester
+ * 
+ * <p/>
+ * A property tester for use with IContentNode.
+ * 
+ * @author Rob Cernich
+ */
+public class ContentNodePropertyTester extends PropertyTester {
+
+    public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+        if (!(receiver instanceof IContentNode<?>) || expectedValue == null) {
+            return false;
+        }
+        IContentNode<?> node = (IContentNode<?>)receiver;
+        if ("nodeName".equals(property)) { //$NON-NLS-1$
+            return node.getName().matches(expectedValue.toString());
+        } else if ("nodeAddress".equals(property)) { //$NON-NLS-1$
+            return node.getAddress().matches(expectedValue.toString());
+        }
+        return false;
+    }
+
+}
Index: jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/IContentNode.java
===================================================================
--- jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/IContentNode.java	(revision 0)
+++ jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/IContentNode.java	(revision 0)
@@ -0,0 +1,62 @@
+/* 
+ * JBoss, Home of Professional Open Source 
+ * Copyright 2012 Red Hat Inc. and/or its affiliates and other contributors
+ * as indicated by the @author tags. All rights reserved. 
+ * See the copyright.txt in the distribution for a 
+ * full listing of individual contributors.
+ *
+ * This copyrighted material is made available to anyone wishing to use, 
+ * modify, copy, or redistribute it subject to the terms and conditions 
+ * of the GNU Lesser General Public License, v. 2.1. 
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details. 
+ * You should have received a copy of the GNU Lesser General Public License, 
+ * v.2.1 along with this distribution; if not, write to the Free Software 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ */
+package org.jboss.ide.eclipse.as.ui.views.server.content;
+
+import org.eclipse.wst.server.core.IServer;
+
+/**
+ * IContentNode
+ * 
+ * <p/>
+ * Base type for server content.
+ * 
+ * @author Rob Cernich
+ */
+public interface IContentNode<T extends IContainerNode<?>> {
+
+    /**
+     * @return returns the server containing this node.
+     */
+    public IServer getServer();
+
+    /**
+     * @return the resource containing this node, if any.
+     */
+    public IResourceNode getParent();
+
+    /**
+     * @return the containing node.
+     */
+    public T getContainer();
+
+    /**
+     * @return the name of this node.
+     */
+    public String getName();
+
+    /**
+     * @return this node's addres, e.g. /subsystem=foo
+     */
+    public String getAddress();
+
+    /**
+     * Frees any resources held by this node.
+     */
+    public void dispose();
+}
Index: jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/IAttributesContainer.java
===================================================================
--- jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/IAttributesContainer.java	(revision 0)
+++ jbossui/org/jboss/ide/eclipse/as/ui/views/server/content/IAttributesContainer.java	(revision 0)
@@ -0,0 +1,37 @@
+/* 
+ * JBoss, Home of Professional Open Source 
+ * Copyright 2012 Red Hat Inc. and/or its affiliates and other contributors
+ * as indicated by the @author tags. All rights reserved. 
+ * See the copyright.txt in the distribution for a 
+ * full listing of individual contributors.
+ *
+ * This copyrighted material is made available to anyone wishing to use, 
+ * modify, copy, or redistribute it subject to the terms and conditions 
+ * of the GNU Lesser General Public License, v. 2.1. 
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details. 
+ * You should have received a copy of the GNU Lesser General Public License, 
+ * v.2.1 along with this distribution; if not, write to the Free Software 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ */
+package org.jboss.ide.eclipse.as.ui.views.server.content;
+
+/**
+ * IAttributesContainer
+ * 
+ * <p/>
+ * Simple intermediary for a resource's attributes.
+ * 
+ * @author Rob Cernich
+ */
+public interface IAttributesContainer extends IContainerNode<IResourceNode> {
+
+    /**
+     * Represents the type for the attributes container. Can be used in an
+     * address, e.g. /subsystem=foo/attributes.
+     */
+    public static final String ATTRIBUTES_TYPE = "attributes"; //$NON-NLS-1$
+
+}
#P jbt-as-org.jboss.ide.eclipse.as.management.core
Index: src/org/jboss/ide/eclipse/as/management/core/ModelDescriptionConstants.java
===================================================================
--- src/org/jboss/ide/eclipse/as/management/core/ModelDescriptionConstants.java	(revision 0)
+++ src/org/jboss/ide/eclipse/as/management/core/ModelDescriptionConstants.java	(revision 0)
@@ -0,0 +1,184 @@
+/******************************************************************************* 
+ * Copyright (c) 2011 Red Hat, Inc. 
+ * Distributed under license by Red Hat, Inc. All rights reserved. 
+ * This program is made available under the terms of the 
+ * Eclipse Public License v1.0 which accompanies this distribution, 
+ * and is available at http://www.eclipse.org/legal/epl-v10.html 
+ * 
+ * Contributors: 
+ * Red Hat, Inc. - initial API and implementation 
+ ******************************************************************************/ 
+package org.jboss.ide.eclipse.as.management.core;
+
+
+/**
+ * String constants frequently used in model descriptions.
+ *
+ * @author Brian Stansberry
+ */
+public class ModelDescriptionConstants {
+
+    // KEEP THESE IN ALPHABETICAL ORDER!
+
+    /** The key for {@link AttributeAccess.AccessType} fields. */
+    public static final String ACCESS_TYPE = "access-type";
+    public static final String ADD = "add";
+    public static final String ADD_OPERATION = "add-operation";
+    public static final String ADDRESS = "address";
+    public static final String ANY = "any";
+    public static final String ANY_ADDRESS = "any-address";
+    public static final String ANY_IPV4_ADDRESS = "any-ipv4-address";
+    public static final String ANY_IPV6_ADDRESS = "any-ipv6-address";
+    public static final String ATTRIBUTES = "attributes";
+    public static final String AUTO_START = "auto-start";
+    public static final String BYTES = "bytes";
+    public static final String CANCELLED = "cancelled";
+    public static final String CHILD_TYPE = "child-type";
+    public static final String CHILDREN = "children";
+    public static final String COMPOSITE = "composite";
+    public static final String CONCURRENT_GROUPS = "concurrent-groups";
+    public static final String CPU_AFFINITY = "cpu-affinity";
+    public static final String CRITERIA = "criteria";
+    public static final String COMPENSATING_OPERATION = "compensating-operation";
+    public static final String DEFAULT = "default";
+    public static final String DESCRIBE = "describe";
+    public static final String DEFAULT_INTERFACE = "default-interface";
+    public static final String DEPLOY = "deploy";
+    public static final String DEPLOYMENT = "deployment";
+    public static final String DEPLOYMENT_SCANNER = "deployment-scanner";
+    public static final String DESCRIPTION = "description";
+    public static final String DISABLE = "disable";
+    public static final String DOMAIN_CONTROLLER = "domain-controller";
+    public static final String DOMAIN_FAILURE_DESCRIPTION = "domain-failure-description";
+    public static final String DOMAIN_RESULTS = "domain-results";
+    public static final String ENABLE = "enable";
+    public static final String ENABLED = "enabled";
+    public static final String EXTENSION = "extension";
+    public static final String FAILED = "failed";
+    public static final String FAILURE_DESCRIPTION = "failure-description";
+    public static final String FIXED_PORT = "fixed-port";
+    public static final String FULL_REPLACE_DEPLOYMENT = "full-replace-deployment";
+    public static final String GRACEFUL_SHUTDOWN_TIMEOUT = "graceful-shutdown-timeout";
+    public static final String GROUP = "group";
+    public static final String HASH = "hash";
+    public static final String HEAD_COMMENT_ALLOWED = "head-comment-allowed";
+    public static final String HTTP_INTERFACE = "http-interface";
+    public static final String HOST = "host";
+    public static final String HOST_FAILURE_DESCRIPTION = "host-failure-description";
+    public static final String HOST_FAILURE_DESCRIPTIONS = "host-failure-descriptions";
+    public static final String IGNORED = "ignored";
+    public static final String INCLUDE = "include";
+    public static final String INCLUDES = "includes";
+    public static final String INCLUDE_RUNTIME = "include-runtime";
+    public static final String INET_ADDRESS = "inet-address";
+    public static final String INPUT_STREAM_INDEX = "input-stream-index";
+    public static final String INTERFACE = "interface";
+    public static final String IN_SERIES = "in-series";
+    public static final String JVM = "jvm";
+    public static final String JVM_TYPE = "type";
+    public static final String LOCAL = "local";
+    public static final String LOCALE = "locale";
+    public static final String MANAGEMENT_INTERFACES = "management-interfaces";
+    public static final String MASK = "mask";
+    public static final String MAX = "max";
+    public static final String MAX_FAILED_SERVERS = "max-failed-servers";
+    public static final String MAX_FAILURE_PERCENTAGE = "max-failure-percentage";
+    public static final String MAX_LENGTH = "max-length";
+    public static final String MAX_OCCURS = "max-occurs";
+    public static final String MAX_THREADS = "max-threads";
+    public static final String MIN = "min";
+    public static final String MIN_LENGTH = "min-length";
+    public static final String MIN_OCCURS = "min-occurs";
+    public static final String MIN_VALUE = "min-value";
+    public static final String MODEL_DESCRIPTION = "model-description";
+    public static final String MULTICAST_ADDRESS = "multicast-address";
+    public static final String MULTICAST_PORT = "multicast-port";
+    public static final String NAME = "name";
+    public static final String NAMESPACE = "namespace";
+    public static final String NAMESPACES = "namespaces";
+    public static final String NATIVE_INTERFACE = "native-interface";
+    public static final String NETWORK = "network";
+    public static final String NILLABLE = "nillable";
+    public static final String NOT = "not";
+    /** Use this as the standard operation name field in the operation *request* ModelNode */
+    public static final String OP = "operation";
+    /** Use this standard operation address field in the operation *request* ModelNode */
+    public static final String OP_ADDR = "address";
+    public static final String OPERATIONS = "operations";
+    public static final String OPERATION_HEADERS = "operation-headers";
+    /** Use this standard operation address field in the operation *description* ModelNode */
+    public static final String OPERATION_NAME = "operation-name";
+    public static final String OUTCOME = "outcome";
+    public static final String PATH = "path";
+    public static final String PORT = "port";
+    public static final String PORT_OFFSET = "port-offset";
+    public static final String PRIORITY = "priority";
+    public static final String PROFILE = "profile";
+    public static final String PROFILE_NAME = "profile-name";
+    public static final String READ_ATTRIBUTE_OPERATION = "read-attribute";
+    public static final String READ_CHILDREN_NAMES_OPERATION = "read-children-names";
+    public static final String READ_CHILDREN_TYPES_OPERATION = "read-children-types";
+    public static final String READ_CHILDREN_RESOURCES_OPERATION = "read-children-resources";
+    public static final String READ_CONFIG_AS_XML_OPERATION = "read-config-as-xml";
+    public static final String READ_OPERATION_DESCRIPTION_OPERATION = "read-operation-description";
+    public static final String READ_OPERATION_NAMES_OPERATION = "read-operation-names";
+    public static final String READ_RESOURCE_DESCRIPTION_OPERATION = "read-resource-description";
+    public static final String READ_RESOURCE_METRICS = "read-resource-metrics";
+    public static final String READ_RESOURCE_OPERATION = "read-resource";
+    public static final String REDEPLOY = "redeploy";
+    public static final String RELATIVE_TO = "relative-to";
+    public static final String REMOVE = "remove";
+    public static final String REMOTE = "remote";
+    public static final String REPLACE_DEPLOYMENT = "replace-deployment";
+    public static final String REPLY_PROPERTIES = "reply-properties";
+    public static final String REQUEST_PROPERTIES = "request-properties";
+    public static final String RECURSIVE = "recursive";
+    public static final String REQUIRED = "required";
+    public static final String RESPONSE = "response";
+    public static final String RESULT = "result";
+    public static final String ROLLBACK_ACROSS_GROUPS = "rollback-across-groups";
+    public static final String ROLLBACK_FAILURE_DESCRIPTION = "rollback-failure-description";
+    public static final String ROLLBACK_ON_RUNTIME_FAILURE = "rollback-on-runtime-failure";
+    public static final String ROLLED_BACK = "rolled-back";
+    public static final String ROLLING_TO_SERVERS = "rolling-to-servers";
+    public static final String ROLLOUT_PLAN = "rollout-plan";
+    public static final String RUNTIME_NAME = "runtime-name";
+    public static final String RUNNING_SERVER = "server";
+    public static final String SCANNER = "scanner";
+    public static final String SCAN_ENABLED = "scan-enabled";
+    public static final String SCAN_INTERVAL = "scan-interval";
+    public static final String SCHEMA_LOCATION = "schema-location";
+    public static final String SCHEMA_LOCATIONS = "schema-locations";
+    public static final String SERVER = "server";
+    public static final String SERVERS = "servers";
+    public static final String SERVER_CONFIG = "server-config";
+    public static final String SERVER_GROUP = "server-group";
+    public static final String SERVER_GROUPS = "server-groups";
+    public static final String SERVER_OPERATIONS = "server-operations";
+    public static final String SERVER_STATE = "server-state";
+    public static final String SHUTDOWN = "shutdown";
+    public static final String SOCKET_BINDING = "socket-binding";
+    public static final String SOCKET_BINDING_GROUP = "socket-binding-group";
+    public static final String SOCKET_BINDING_GROUP_NAME = "socket-binding-group-name";
+    public static final String SOCKET_BINDING_PORT_OFFSET = "socket-binding-port-offset";
+    public static final String START = "start";
+    public static final String STEPS = "steps";
+    /** The key for {@link AttributeAccess.Storage} fields. */
+    public static final String STORAGE = "storage";
+    public static final String SUBSYSTEM = "subsystem";
+    public static final String SUCCESS = "success";
+    public static final String SYSTEM_PROPERTY = "system-property";
+    public static final String SYSTEM_PROPERTIES = "system-properties";
+    public static final String TAIL_COMMENT_ALLOWED = "tail-comment-allowed";
+    public static final String TO_REPLACE = "to-replace";
+    public static final String TYPE = "type";
+    public static final String UNDEPLOY = "undeploy";
+    public static final String UPLOAD_DEPLOYMENT_BYTES = "upload-deployment-bytes";
+    public static final String UPLOAD_DEPLOYMENT_URL = "upload-deployment-url";
+    public static final String UPLOAD_DEPLOYMENT_STREAM = "upload-deployment-stream";
+    public static final String URL = "url";
+    public static final String VALUE = "value";
+    public static final String VALUE_TYPE = "value-type";
+    public static final String WRITE_ATTRIBUTE_OPERATION = "write-attribute";
+
+}
Index: src/org/jboss/ide/eclipse/as/management/core/IJBoss7ManagerService.java
===================================================================
--- src/org/jboss/ide/eclipse/as/management/core/IJBoss7ManagerService.java	(revision 38395)
+++ src/org/jboss/ide/eclipse/as/management/core/IJBoss7ManagerService.java	(working copy)
@@ -124,6 +124,17 @@
 	 * @throws Exception 
 	 */
 	public void stop(IAS7ManagementDetails details) throws Exception;
+	
+    /**
+     * Execute a management command. Note, this method returns the "result" node
+     * from the execution.
+     * 
+     * @param details connection details.
+     * @param request a JSON request to process.
+     * @return the JSON response from the server.
+     * @throws Exception
+     */
+	public String execute(IAS7ManagementDetails details, String request) throws Exception;
 
 	public void dispose();
 }
Index: src/org/jboss/ide/eclipse/as/management/core/JBoss7ManagerServiceProxy.java
===================================================================
--- src/org/jboss/ide/eclipse/as/management/core/JBoss7ManagerServiceProxy.java	(revision 38395)
+++ src/org/jboss/ide/eclipse/as/management/core/JBoss7ManagerServiceProxy.java	(working copy)
@@ -14,6 +14,7 @@
 import java.text.MessageFormat;
 
 import org.eclipse.core.runtime.IProgressMonitor;
+import org.jboss.dmr.ModelNode;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.InvalidSyntaxException;
 import org.osgi.util.tracker.ServiceTracker;
@@ -75,7 +76,11 @@
 		checkedGetService().stop(details);
 	}
 
-	private IJBoss7ManagerService checkedGetService() throws JBoss7ManangerException {
+    public String execute(IAS7ManagementDetails details, String request) throws Exception {
+        return checkedGetService().execute(details, request);
+    }
+
+    private IJBoss7ManagerService checkedGetService() throws JBoss7ManangerException {
 		IJBoss7ManagerService service = getService();
 		if (service == null) {
 			throw new JBoss7ManangerException("Could not acquire JBoss Management service"); //$NON-NLS-1$

Property changes on: jboss-dmr-1.1.0.Final.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: META-INF/MANIFEST.MF
===================================================================
--- META-INF/MANIFEST.MF	(revision 38395)
+++ META-INF/MANIFEST.MF	(working copy)
@@ -9,4 +9,7 @@
  org.eclipse.wst.server.core
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Export-Package: org.jboss.ide.eclipse.as.management.core
+Export-Package: org.jboss.dmr,
+ org.jboss.ide.eclipse.as.management.core
+Bundle-ClassPath: jboss-dmr-1.1.0.Final.jar,
+ .
#P jbt-as-org.jboss.ide.eclipse.as.management.as71
Index: src/org/jboss/ide/eclipse/as/internal/management/as71/JBoss71ManagerService.java
===================================================================
--- src/org/jboss/ide/eclipse/as/internal/management/as71/JBoss71ManagerService.java	(revision 38395)
+++ src/org/jboss/ide/eclipse/as/internal/management/as71/JBoss71ManagerService.java	(working copy)
@@ -13,6 +13,7 @@
 import java.io.File;
 
 import org.eclipse.core.runtime.IProgressMonitor;
+import org.jboss.dmr.ModelNode;
 import org.jboss.ide.eclipse.as.management.core.IAS7ManagementDetails;
 import org.jboss.ide.eclipse.as.management.core.IJBoss7DeploymentResult;
 import org.jboss.ide.eclipse.as.management.core.IJBoss7ManagerService;
@@ -110,7 +111,16 @@
 		}
 	}
 
-	@Override
+    public String execute(IAS7ManagementDetails details, String request) throws Exception {
+        AS71Manager manager = new AS71Manager(details);
+        try {
+            return manager.execute(ModelNode.fromJSONString(request)).toJSONString(true);
+        } finally {
+            manager.dispose();
+        }
+    }
+
+    @Override
 	public void dispose() {
 	}
 
Index: src/org/jboss/ide/eclipse/as/internal/management/as71/AS71Manager.java
===================================================================
--- src/org/jboss/ide/eclipse/as/internal/management/as71/AS71Manager.java	(revision 38395)
+++ src/org/jboss/ide/eclipse/as/internal/management/as71/AS71Manager.java	(working copy)
@@ -267,7 +267,7 @@
 		StreamUtils.safeClose(client);
 	}
 
-	private ModelNode execute(ModelNode node) throws JBoss7ManangerException {
+	/*package*/ ModelNode execute(ModelNode node) throws JBoss7ManangerException {
 		try {
 			ModelNode response = client.execute(node);
 			if (!AS7ManagerUtil.isSuccess(response)) {
