WebBundleDescriptor wbd = (WebBundleDescriptor)bundle;
// look at ejb in war case
Collection<EjbBundleDescriptor> ejbBundleDescs =
wbd.getExtensionsDescriptors(EjbBundleDescriptor.class);
if (ejbBundleDescs.size() > 0) {
EjbBundleDescriptor ejbBundle =
ejbBundleDescs.iterator().next();
moduleSubComponentMap.putAll(getModuleLevelComponents(
ejbBundle, type, subComponentsMap));
}
if (type != null && type.equals("ejbs")) {
return moduleSubComponentMap;
}
for (WebComponentDescriptor wcd :
wbd.getWebComponentDescriptors()) {
StringBuffer sb = new StringBuffer();
String canonicalName = wcd.getCanonicalName();
sb.append("<");
String wcdType = (wcd.isServlet() ? "Servlet" : "JSP");
sb.append(wcdType);
sb.append(">");
moduleSubComponentMap.put(canonicalName, sb.toString());
subComponentsMap.put(wcd.getCanonicalName(), wcdType);
}
} else if (bundle instanceof EjbBundleDescriptor) {
if (type != null && type.equals("servlets")) {
return moduleSubComponentMap;
}
EjbBundleDescriptor ebd = (EjbBundleDescriptor)bundle;
for (EjbDescriptor ejbDesc : ebd.getEjbs()) {
StringBuffer sb = new StringBuffer();
String ejbName = ejbDesc.getName();
sb.append("<");
String ejbType = ejbDesc.getEjbTypeForDisplay();
sb.append(ejbType);