protected PageManager pageManager;
public void init(PortletConfig config) throws PortletException
{
super.init(config);
PortletContext context = getPortletContext();
spacesService = (Spaces) context.getAttribute(CommonPortletServices.CPS_SPACES_SERVICE);
if (spacesService == null)
throw new PortletException(
"Could not get instance of portal spaces service component");
admin = (PortalAdministration) getPortletContext().getAttribute(
CommonPortletServices.CPS_PORTAL_ADMINISTRATION);
if (null == admin) { throw new PortletException(
"Failed to find the Portal Administration on portlet initialization"); }
pageManager = (PageManager)context.getAttribute(CommonPortletServices.CPS_PAGE_MANAGER_COMPONENT);
if (null == pageManager)
{
throw new PortletException("Failed to find the Page Manager on portlet initialization");
}
}