Search in sources :

Example 1 with LayoutNodeType

use of org.apereo.portal.layout.node.IUserLayoutNodeDescription.LayoutNodeType in project uPortal by Jasig.

the class PortalUrlProviderImpl method getPortletWindowId.

private IPortletWindowId getPortletWindowId(HttpServletRequest request, String layoutNodeId) {
    if (layoutNodeId == null) {
        return null;
    }
    final LayoutNodeType layoutNodeType = this.getLayoutNodeType(request, layoutNodeId);
    if (layoutNodeType == null) {
        throw new IllegalArgumentException("No layout node exists for id: " + layoutNodeId);
    }
    if (layoutNodeType != LayoutNodeType.PORTLET) {
        return null;
    }
    final IPortletWindow portletWindow = this.portletWindowRegistry.getOrCreateDefaultPortletWindowByLayoutNodeId(request, layoutNodeId);
    if (portletWindow == null) {
        return null;
    }
    return portletWindow.getPortletWindowId();
}
Also used : LayoutNodeType(org.apereo.portal.layout.node.IUserLayoutNodeDescription.LayoutNodeType) IPortletWindow(org.apereo.portal.portlet.om.IPortletWindow)

Aggregations

LayoutNodeType (org.apereo.portal.layout.node.IUserLayoutNodeDescription.LayoutNodeType)1 IPortletWindow (org.apereo.portal.portlet.om.IPortletWindow)1