for (CustomPortletModeMetaData customPortletModeMD : portletApplicationMD.getCustomPortletModes().values())
{
Mode mode = Mode.create(customPortletModeMD.getPortletMode());
//
LocalizedString description = customPortletModeMD.getDescription();
//
ContainerModeInfo modeInfo;
if (customPortletModeMD.isPortalManaged())
{
if (description != null)
{
modeInfo = new ContainerModeInfo(mode, description);
}
else
{
modeInfo = new ContainerModeInfo(mode);
}
}
else
{
ResourceBundleManager bundleMgr = context.getBundleManager();
//
LocalizedString displayName = bundleMgr.getLocalizedValue(
"javax.portlet.app.custom-portlet-mode." + mode + ".decoration-name",
"" + mode);
//
if (description != null)
{
modeInfo = new ContainerPortletManagedModeInfo(mode, description, displayName);
}
else
{
modeInfo = new ContainerPortletManagedModeInfo(mode, displayName);
}
}
//
customModes.put(mode, modeInfo);
}
// Build custom window state infos for reuse in portlet info
for (CustomWindowStateMetaData customPortletModeMD : portletApplicationMD.getCustomWindowStates().values())
{
WindowState windowState = WindowState.create(customPortletModeMD.getWindowState());
//
LocalizedString description = customPortletModeMD.getDescription();
//
ContainerWindowStateInfo windowStateInfo;
if (description != null)
{