List contexts = loadDefinitionList(context, DEFAULT_CONTEXTS);
registry = new PortletApplicationDefinitionListImpl();
for (Iterator i = contexts.iterator(); i.hasNext();) {
String contextRoot = (String) i.next();
PortletApplicationDefinition portletApp = loadApplicationDefinition(context, contextRoot);
registry.add(portletApp);
}
definitions = new HashMap();
for (Iterator i = registry.iterator(); i.hasNext();) {
PortletApplicationDefinition application = (PortletApplicationDefinition) i.next();
for (Iterator j = application.getPortletDefinitionList().iterator(); j.hasNext();) {
PortletDefinition portlet = (PortletDefinition) j.next();
definitions.put(portlet.getId(), portlet);
}
}
}