Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 3 commits
  • 4 files changed
  • 0 comments
  • 1 contributor
13  cli/pom.xml
@@ -103,19 +103,6 @@
103 103
 
104 104
    <profiles>
105 105
       <profile>
106  
-         <id>as7</id>
107  
-         <dependencies>
108  
-            <dependency>
109  
-               <groupId>org.slf4j</groupId>
110  
-               <artifactId>slf4j-api</artifactId>
111  
-            </dependency>
112  
-            <dependency>
113  
-               <groupId>org.slf4j</groupId>
114  
-               <artifactId>slf4j-log4j12</artifactId>
115  
-            </dependency>
116  
-         </dependencies>
117  
-      </profile>
118  
-      <profile>
119 106
          <id>jetty</id>
120 107
          <dependencies>
121 108
             <dependency>
1  cli/src/main/java/org/gatein/management/cli/crash/plugins/JaasAuthenticationPlugin.java
@@ -109,6 +109,7 @@ else if (c instanceof PasswordCallback)
109 109
          }
110 110
          catch (Exception e)
111 111
          {
  112
+            if (log.isDebugEnabled()) log.error("Exception authenticating to JAAS domain " + domain, e);
112 113
             return false;
113 114
          }
114 115
       }
15  cli/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
... ...
@@ -0,0 +1,15 @@
  1
+<jboss-deployment-structure>
  2
+
  3
+   <deployment>
  4
+      <dependencies>
  5
+         <module name="org.gatein.lib" />
  6
+         <module name="org.gatein.common" />
  7
+         <module name="org.gatein.wci" />
  8
+         <module name="javax.jcr.api"/>
  9
+      </dependencies>
  10
+      <resources>
  11
+         <resource-root path="WEB-INF/lib/bcprov-jdk16-1.46.jar" use-physical-code-source="true"/>
  12
+      </resources>
  13
+   </deployment>
  14
+
  15
+</jboss-deployment-structure>
47  core/src/main/java/org/gatein/management/core/api/controller/SimpleManagementController.java
@@ -42,6 +42,7 @@
42 42
 import org.gatein.management.core.api.operation.OperationContextImpl;
43 43
 
44 44
 import java.util.Map;
  45
+import java.util.Set;
45 46
 
46 47
 /**
47 48
  * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
@@ -112,20 +113,7 @@ public ManagedResponse execute(ManagedRequest request) throws ResourceNotFoundEx
112 113
                ReadResourceModel readResource = (ReadResourceModel) result;
113 114
                if (!readResource.isChildDescriptionsSet())
114 115
                {
115  
-                  ManagedResource currentResource = root.getSubResource(address);
116  
-                  // Set children descriptions
117  
-                  for (String subResourceName : currentResource.getSubResourceNames(PathAddress.empty()))
118  
-                  {
119  
-                     ManagedResource subResource = currentResource.getSubResource(subResourceName);
120  
-                     for (String childName : readResource.getChildren())
121  
-                     {
122  
-                        ManagedResource mr = root.getSubResource(address.append(childName));
123  
-                        if (mr == subResource)
124  
-                        {
125  
-                           readResource.setChildDescription(childName, mr.getResourceDescription(PathAddress.empty()).getDescription());
126  
-                        }
127  
-                     }
128  
-                  }
  116
+                  populateChildDescriptions(root, address, readResource);
129 117
                }
130 118
 
131 119
                if (readResource.getOperations().isEmpty())
@@ -147,6 +135,37 @@ public ManagedResponse execute(ManagedRequest request) throws ResourceNotFoundEx
147 135
          throw new OperationException(operationName, "Operation '" + operationName  + "' not found for address '" + address + "'");
148 136
       }
149 137
    }
  138
+   
  139
+   private void populateChildDescriptions(ManagedResource root, PathAddress address, ReadResourceModel readResource)
  140
+   {
  141
+      ManagedResource currentResource = root.getSubResource(address);
  142
+      Set<String> subResourceNames = currentResource.getSubResourceNames(PathAddress.empty());
  143
+      
  144
+      // We have children but no sub resources which typically means that the same resource serves multiple paths like a navigation URI.
  145
+      if (!readResource.getChildren().isEmpty() && subResourceNames.isEmpty())
  146
+      {
  147
+         for (String childName : readResource.getChildren())
  148
+         {
  149
+            readResource.setChildDescription(childName, currentResource.getResourceDescription(PathAddress.empty()).getDescription());
  150
+         }
  151
+      }
  152
+      else
  153
+      {
  154
+         // Set children descriptions
  155
+         for (String subResourceName : subResourceNames)
  156
+         {
  157
+            ManagedResource subResource = currentResource.getSubResource(subResourceName);
  158
+            for (String childName : readResource.getChildren())
  159
+            {
  160
+               ManagedResource mr = root.getSubResource(address.append(childName));
  161
+               if (mr == subResource || mr == currentResource)
  162
+               {
  163
+                  readResource.setChildDescription(childName, mr.getResourceDescription(PathAddress.empty()).getDescription());
  164
+               }
  165
+            }
  166
+         }
  167
+      }
  168
+   }
150 169
 
151 170
    private ManagedResource getRootResource()
152 171
    {

No commit comments for this range

Something went wrong with that request. Please try again.