Package org.apache.jetspeed.container

Examples of org.apache.jetspeed.container.PortletWindow


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


        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();
            PortletDefinition pd = window.getPortletDefinition();
            String uniqueName = pd.getUniqueName();
            if (!portlets.containsKey(uniqueName))
            {
                portlets.put(uniqueName, id);
                result.add(pd);             
View Full Code Here

    throws PortletAccessDeniedException
    {
        RenderingJob job = null;
        try
        {
            PortletWindow portletWindow = requestContext.getPortletWindow(fragment);
            if (!portletWindow.isValid())
            {
                return null;
            }
            PortletDefinition portletDefinition = portletWindow.getPortletDefinition();    

            long timeoutMetadata = this.getTimeoutOnJob(portletDefinition);
            portletTracking.setExpiration(portletWindow, timeoutMetadata);           
           
            if (checkSecurityConstraints && !checkSecurityConstraint(portletDefinition, fragment))
            {
                throw new PortletAccessDeniedException("Access Denied.");
            }
            if (portletTracking.isOutOfService(portletWindow))
            {
                log.info("Taking portlet out of service: " + portletDefinition.getUniqueName() + " for window " + portletWindow.getId());
                fragment.overrideRenderedContent(outOfServiceMessage);
                return null;
            }
            int expirationCache = getExpirationCache(portletDefinition);
            if (expirationCache != 0)
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)
    {
        boolean fragmentSupportsActions = false;
        PortletWindow window = requestContext.getPortletWindow(fragment);
        if (!window.isValid())
        {
            return fragmentSupportsActions; // allow nothing
        }
        PortletDefinition portlet = window.getPortletDefinition();

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

            String portletName = portlet.getUniqueName();

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

     */
    public WindowState getWindowState() throws Exception
    {
        try
        {
            PortletWindow window = getPortletWindow(getCurrentFragment());
            if (!window.isValid())
            {
                // return a sensible default value to allow a mimimum level of processing to continue
                return WindowState.NORMAL;
            }
            return getRequestContext().getPortalURL().getNavigationalState().getState(window);
View Full Code Here

     */
    public WindowState getMappedWindowState() throws Exception
    {
        try
        {
            PortletWindow window = getPortletWindow(getCurrentFragment());
            if (!window.isValid())
            {
                // return a sensible default value to allow a mimimum level of processing to continue
                return WindowState.NORMAL;
            }
            return getRequestContext().getPortalURL().getNavigationalState().getMappedState(window);
View Full Code Here

     */
    public PortletMode getPortletMode() throws Exception
    {
        try
        {
            PortletWindow window = getPortletWindow(getCurrentFragment());
            if (!window.isValid())
            {
                // return a sensible default value to allow a mimimum level of processing to continue
                return PortletMode.VIEW;
            }
            return getRequestContext().getPortalURL().getNavigationalState().getMode(window);
View Full Code Here

     */
    public PortletMode getMappedPortletMode() throws Exception
    {
        try
        {
            PortletWindow window = getPortletWindow(getCurrentFragment());
            if (!window.isValid())
            {
                // return a sensible default value to allow a mimimum level of processing to continue
                return PortletMode.VIEW;
            }
            return getRequestContext().getPortalURL().getNavigationalState().getMappedMode(window);
View Full Code Here

                title = f.getPortletContent().getTitle();
            }
           
            if (title == null)
            {
                PortletWindow portletWindow = requestContext.getPortletWindow(f);
           
                if (portletWindow != null)
                {
                    title = requestContext.getPreferedLanguage(portletWindow.getPortletDefinition()).getTitle();
                   
                    if (title == null)
                    {
                        title = portletWindow.getPortletDefinition().getPortletName();
                    }
                }
                else
                {
                    title = f.getName();
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.container.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.