factoryLocator.getPackageManifestFactory().sort(types);
// REVIEW ME: instead of fire listMetadata call per type, maybe we can
// aggregate the calls into one - fchang
for (PackageTypeMembers typeStanza : types) {
// get component for display name purposes
Component component = null;
try {
if (factoryLocator.getComponentFactory().isRegisteredComponentType(typeStanza.getName())) {
component = factoryLocator.getComponentFactory().getComponentByComponentType(typeStanza.getName());
}
} catch (FactoryException e) {
logger.warn("Unable to get component for component type '" + typeStanza.getName() + "'", e);
}
// if display name not available, use type name
String name = null;
if (component == null) {
name = typeStanza.getName();
logger.warn("Unable to get display name for component type '" + name + "'");
} else {
name = component.getDisplayName();
}
// handle parents with children - placing children within the parent
// stanza except
// when subtype parent isn't explicit list in manifest. this this
// case we list component
// separately under it's component types
if (Utils.isNotEmpty(childComponentTypes) && childComponentTypes.contains(typeStanza.getName())) {
handleChildTypeSummary(summaries, packageManifest, typeStanza, name);
} else if (component != null && Constants.CUSTOM_OBJECT.equals(component.getComponentType())) {
generateObjectsSummary(summaries, packageManifestModel, packageManifest, typeStanza, component);
} else {
// resulting summary text
StringBuffer summary = new StringBuffer();