private Map<String, String> getModuleLevelComponents(BundleDescriptor bundle,
String type, Map<String, String> subComponentsMap) {
Map<String, String> moduleSubComponentMap = new LinkedHashMap<String, String>();
if (bundle instanceof WebBundleDescriptor) {
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);