Package org.apache.pluto.om.window

Examples of org.apache.pluto.om.window.PortletWindow


        List result = new ArrayList();
        Iterator outOfService = trackingManager.getOutOfServiceList().iterator();
        Map portlets = new HashMap();
        while (outOfService.hasNext())
        {
            PortletWindow window = (PortletWindow)outOfService.next();
            String id = window.getId().toString();
            PortletDefinitionComposite pd = (PortletDefinitionComposite)window.getPortletEntity().getPortletDefinition();
            String uniqueName = pd.getUniqueName();
            if (!portlets.containsKey(uniqueName))
            {
                portlets.put(uniqueName, id);
                result.add(pd);             
View Full Code Here


        {               
            if (!layout.equals(fragment.getName()))
            {
                fragment.setName(layout);
                ContentFragment contentFragment = new ContentFragmentImpl(fragment, new HashMap());                   
                PortletWindow window = windowAccess.getPortletWindow(contentFragment);
                if (window != null)
                {
                    entityAccess.updatePortletEntity(window.getPortletEntity(), contentFragment);
                    entityAccess.storePortletEntity(window.getPortletEntity());
                    windowAccess.createPortletWindow(window.getPortletEntity(), contentFragment.getId());
                    count++;
                    if ( isBlank(sizes) )
                    {
                        fragment.setLayoutSizes(null);
                    }
View Full Code Here

        HttpServletResponse servletResponse = null;
        ContentDispatcherCtrl dispatcher = null;   
        boolean contentIsCached = false;
        try
        {
            PortletWindow portletWindow = getPortletWindow(fragment);
            PortletDefinitionComposite portletDefinition =
                (PortletDefinitionComposite) portletWindow.getPortletEntity().getPortletDefinition();          
            if (checkSecurityConstraints && !checkSecurityConstraint(portletDefinition, fragment))
            {
                throw new PortletAccessDeniedException("Access Denied.");
            }
            if (portletTracking.isOutOfService(portletWindow))
View Full Code Here

    {
        RenderingJob job = null;
        boolean contentIsCached = false;      
        try
        {
            PortletWindow portletWindow = getPortletWindow(fragment);
            PortletDefinitionComposite portletDefinition =
                (PortletDefinitionComposite) portletWindow.getPortletEntity().getPortletDefinition();    

            long timeoutMetadata = this.getTimeoutOnJob(portletDefinition);
            portletTracking.setExpiration(portletWindow, timeoutMetadata);           
           
            if (checkSecurityConstraints && !checkSecurityConstraint(portletDefinition, fragment))
View Full Code Here


    protected PortletWindow getPortletWindow( ContentFragment fragment ) throws FailedToRetrievePortletWindow, PortletEntityNotStoredException
    {
        // ObjectID oid = JetspeedObjectID.createFromString(fragment.getId());
        PortletWindow portletWindow = windowAccessor.getPortletWindow(fragment);

        if (portletWindow == null)
        {
            throw new FailedToRetrievePortletWindow("Portlet Window creation failed for fragment: "
                                                    + fragment.getId() + ", " + fragment.getName());
        }

        PortletEntity portletEntity = portletWindow.getPortletEntity();
        ((MutablePortletEntity)portletEntity).setFragment(fragment);

        return portletWindow;
    }
View Full Code Here

        windowListMock.expects(new InvokeCountMatcher(4)).method("add").withAnyArguments().will(
                new ListAppendStub(windows));
       

        PortletWindow window = windowAccess.getPortletWindow(f1);
        assertNotNull(window);
        assertEquals("frag1", window.getId().toString());

        // Make sure the portlet entity's window list got updated
        assertEquals(1, windows.size());

        PortletWindow windowInList = (PortletWindow) windows.get(0);

        // The window in the entities list should be the same as the one
        // returned by getPortletWindow(f1)
        assertEquals(windowInList, window);
View Full Code Here

        {
            throw new JetspeedException("No root ContentFragment found in ContentPage");
        }
        // handle maximized state
        NavigationalState nav = context.getPortalURL().getNavigationalState();
        PortletWindow window = nav.getMaximizedWindow();
        if (null != window)
        {
            renderMaximizedWindow(context, page, root, window);
        }
        else
View Full Code Here

    }

    protected boolean isSoloMode(RequestContext requestContext)
    {
        boolean solo = false;
        PortletWindow window = requestContext.getPortalURL().getNavigationalState().getMaximizedWindow();
        boolean maximized = (window != null);
        if (maximized)
        {
            solo = JetspeedActions.SOLO_STATE.equals(requestContext.getPortalURL().getNavigationalState().getMappedState(window));
        }
View Full Code Here

                                             PageActionAccess pageActionAccess,
                                             Decoration decoration,
                                             boolean isAjaxRequest) throws FailedToRetrievePortletWindow, PortletEntityNotStoredException
    {
        boolean fragmentSupportsActions = false;
        PortletWindow window = windowAccessor.getPortletWindow(fragment);
        PortletDefinitionComposite portlet = (PortletDefinitionComposite) window.getPortletEntity().getPortletDefinition();
       
        if (null == portlet)
        {
            return fragmentSupportsActions; // allow nothing
        }

        List actions = Collections.EMPTY_LIST;
       
        PortletMode currentMode = requestContext.getPortalURL().getNavigationalState().getMode(window);
        WindowState currentState = requestContext.getPortalURL().getNavigationalState().getState(window);
        ContentTypeSet content = portlet.getContentTypeSet();
       
        if ( fragment.equals(requestContext.getPage().getRootFragment()) )
        {
            fragmentSupportsActions = true;
            actions = getPageModes(requestContext, window, content, currentMode, currentState, pageActionAccess, decoration, isAjaxRequest);
        }
        else if ( !Fragment.LAYOUT.equals(fragment.getType()) )
        {
            fragmentSupportsActions = true;
            String fragmentId = fragment.getId();
            PortletApplication pa = (PortletApplication)window.getPortletEntity().getPortletDefinition().getPortletApplicationDefinition();

            String portletName = portlet.getUniqueName();

            PortletMode currentMappedMode = pa.getMappedPortletMode(currentMode);
            WindowState currentMappedState = pa.getMappedWindowState(currentState);
View Full Code Here

    public void invoke(RequestContext request, ValveContext context) throws PipelineException
    {    
        boolean responseCommitted = false;
        try
        {           
            PortletWindow actionWindow = request.getActionWindow();
            if (actionWindow != null)
            {
                // If portlet entity is null, try to refresh the actionWindow.
                // Under some clustered environments, a cached portlet window could have null entity.
                if (null == actionWindow.getPortletEntity())
                {
                    try
                    {
                        Fragment fragment = request.getPage().getFragmentById(actionWindow.getId().toString());
                        ContentFragment contentFragment = new ContentFragmentImpl(fragment, new HashMap());
                        actionWindow = this.windowAccessor.getPortletWindow(contentFragment);
                    }
                    catch (Exception e)
                    {
View Full Code Here

TOP

Related Classes of org.apache.pluto.om.window.PortletWindow

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.