Search in sources :

Example 46 with IPortletWindowId

use of org.apereo.portal.portlet.om.IPortletWindowId in project uPortal by Jasig.

the class PropertyToAttributePropertiesManager method getAttributeName.

protected String getAttributeName(IPortletWindow portletWindow, String property) {
    final String mappedAttributeName = this.propertyToAttributeMappings.get(property);
    final String attributeName;
    if (mappedAttributeName == null) {
        attributeName = property;
    } else {
        attributeName = mappedAttributeName;
    }
    if (this.nonNamespacedProperties.contains(property)) {
        return attributeName;
    }
    final IPortletWindowId portletWindowId = portletWindow.getPortletWindowId();
    return portletWindowId.getStringId() + attributeName;
}
Also used : IPortletWindowId(org.apereo.portal.portlet.om.IPortletWindowId)

Example 47 with IPortletWindowId

use of org.apereo.portal.portlet.om.IPortletWindowId in project uPortal by Jasig.

the class PortletMimeResponseContextImpl method getPortletURLProvider.

/* (non-Javadoc)
     * @see org.apache.pluto.container.PortletMimeResponseContext#getPortletURLProvider(org.apache.pluto.container.PortletURLProvider.TYPE)
     */
@Override
public PortletURLProvider getPortletURLProvider(TYPE type) {
    final IPortletWindowId portletWindowId = this.portletWindow.getPortletWindowId();
    final UrlType urlType = UrlType.fromPortletUrlType(type);
    final IPortalUrlBuilder portalUrlBuilder = this.portalUrlProvider.getPortalUrlBuilderByPortletWindow(containerRequest, portletWindowId, urlType);
    final IPortletUrlBuilder portletUrlBuilder = portalUrlBuilder.getPortletUrlBuilder(portletWindowId);
    return new PortletURLProviderImpl(portletUrlBuilder);
}
Also used : IPortletUrlBuilder(org.apereo.portal.url.IPortletUrlBuilder) PortletURLProviderImpl(org.apereo.portal.portlet.url.PortletURLProviderImpl) IPortalUrlBuilder(org.apereo.portal.url.IPortalUrlBuilder) UrlType(org.apereo.portal.url.UrlType) IPortletWindowId(org.apereo.portal.portlet.om.IPortletWindowId)

Example 48 with IPortletWindowId

use of org.apereo.portal.portlet.om.IPortletWindowId in project uPortal by Jasig.

the class PortletExecutionManager method postExecution.

@Override
public void postExecution(HttpServletRequest request, HttpServletResponse response, IPortletExecutionContext context, Exception e) {
    final IPortletWindowId portletWindowId = context.getPortletWindowId();
    final IPortletWindow portletWindow = this.portletWindowRegistry.getPortletWindow(request, portletWindowId);
    final IPortletEntity portletEntity = portletWindow.getPortletEntity();
    final IPortletDefinition portletDefinition = portletEntity.getPortletDefinition();
    final IPortletDescriptorKey portletDescriptorKey = portletDefinition.getPortletDescriptorKey();
    final AtomicInteger counter = this.executionCount.get(portletDescriptorKey);
    counter.incrementAndGet();
}
Also used : IPortletEntity(org.apereo.portal.portlet.om.IPortletEntity) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) IPortletDescriptorKey(org.apereo.portal.portlet.om.IPortletDescriptorKey) IPortletWindowId(org.apereo.portal.portlet.om.IPortletWindowId) IPortletWindow(org.apereo.portal.portlet.om.IPortletWindow) IPortletDefinition(org.apereo.portal.portlet.om.IPortletDefinition)

Example 49 with IPortletWindowId

use of org.apereo.portal.portlet.om.IPortletWindowId in project uPortal by Jasig.

the class PortletExecutionManager method getRenderedPortletBodyWorker.

protected IPortletRenderExecutionWorker getRenderedPortletBodyWorker(IPortletWindowId portletWindowId, HttpServletRequest request, HttpServletResponse response) {
    final Map<IPortletWindowId, IPortletRenderExecutionWorker> portletRenderingMap = this.getPortletRenderingMap(request);
    IPortletRenderExecutionWorker tracker = portletRenderingMap.get(portletWindowId);
    if (tracker == null) {
        tracker = this.startPortletRenderInternal(portletWindowId, request, response);
    }
    return tracker;
}
Also used : IPortletRenderExecutionWorker(org.apereo.portal.portlet.rendering.worker.IPortletRenderExecutionWorker) IPortletWindowId(org.apereo.portal.portlet.om.IPortletWindowId)

Example 50 with IPortletWindowId

use of org.apereo.portal.portlet.om.IPortletWindowId in project uPortal by Jasig.

the class PortletExecutionManager method isPortletRenderHeaderRequested.

/* (non-Javadoc)
     * @see org.apereo.portal.portlet.rendering.IPortletExecutionManager#isPortletHeaderRenderRequested(org.apereo.portal.portlet.om.IPortletWindowId, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
     */
@Override
public boolean isPortletRenderHeaderRequested(IPortletWindowId portletWindowId, HttpServletRequest request, HttpServletResponse response) {
    final Map<IPortletWindowId, IPortletRenderExecutionWorker> portletRenderingMap = this.getPortletHeaderRenderingMap(request);
    final IPortletRenderExecutionWorker tracker = portletRenderingMap.get(portletWindowId);
    return tracker != null;
}
Also used : IPortletRenderExecutionWorker(org.apereo.portal.portlet.rendering.worker.IPortletRenderExecutionWorker) IPortletWindowId(org.apereo.portal.portlet.om.IPortletWindowId)

Aggregations

IPortletWindowId (org.apereo.portal.portlet.om.IPortletWindowId)85 IPortletWindow (org.apereo.portal.portlet.om.IPortletWindow)31 Test (org.junit.Test)19 MockHttpServletRequest (org.springframework.mock.web.MockHttpServletRequest)19 MockPortletWindowId (org.apereo.portal.mock.portlet.om.MockPortletWindowId)15 WindowState (javax.portlet.WindowState)10 HttpServletRequest (javax.servlet.http.HttpServletRequest)9 IPortletEntity (org.apereo.portal.portlet.om.IPortletEntity)9 PortletMode (javax.portlet.PortletMode)8 IPortletDefinition (org.apereo.portal.portlet.om.IPortletDefinition)8 IPortalRequestInfo (org.apereo.portal.url.IPortalRequestInfo)8 IPortletRenderExecutionWorker (org.apereo.portal.portlet.rendering.worker.IPortletRenderExecutionWorker)7 IPerson (org.apereo.portal.security.IPerson)7 IPortletUrlBuilder (org.apereo.portal.url.IPortletUrlBuilder)7 LinkedHashMap (java.util.LinkedHashMap)6 IPortalUrlBuilder (org.apereo.portal.url.IPortalUrlBuilder)6 IUserInstance (org.apereo.portal.user.IUserInstance)6 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)6 IOException (java.io.IOException)5 List (java.util.List)5