portletIds.add(portletId);
String status = portlet.attributeValue("status");
portlets.add(new KeyValuePair(portletId, status));
}
if (portlets.size() > 0) {
categories.put(name, portlets);
}
}
// Portlets that do not belong to any categories should default to the
// Undefined category
List undefinedPortlets = new ArrayList();
itr1 = _getPortletsPool().values().iterator();
while (itr1.hasNext()) {
Portlet portlet = (Portlet)itr1.next();
String portletId = portlet.getPortletId();
if ((servletContextName != null) && (portlet.isWARFile()) &&
(portletId.startsWith(servletContextName) &&
(!portletIds.contains(portletId)))) {
undefinedPortlets.add(new KeyValuePair(portletId, null));
}
else if ((servletContextName == null) && (!portlet.isWARFile()) &&
(!portletIds.contains(portletId))) {
undefinedPortlets.add(new KeyValuePair(portletId, null));
}
}
if (undefinedPortlets.size() > 0) {
categories.put("category.undefined", undefinedPortlets);