PortletApplication pa = portletRegistry.getPortletApplication(appName);
if (pa != null)
{
paBeanList.add(new PortletApplicationBean(pa));
}
}
}
else
{
if (StringUtils.isBlank(applicationName))
{
Collection<PortletApplication> pas = portletRegistry.getPortletApplications();
paBeans.setTotalSize(pas.size());
for (PortletApplication pa : (Collection<PortletApplication>) PaginationUtils.subCollection(pas, beginIndex, maxResults))
{
paBeanList.add(new PortletApplicationBean(pa));
}
}
else
{
PortletApplication pa = portletRegistry.getPortletApplication(applicationName, true);
if (pa != null)
{
paBeans.setTotalSize(1);
paBeanList.add(new PortletApplicationBean(pa));
}
}
}
paBeans.setApplications(paBeanList);