Package org.apache.jetspeed.om.common.portlet

Examples of org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite


                if (count > 0)
                {
                    Iterator portlets = searchEngine.search(searchString.toString()).getResults().iterator();
                    while (portlets.hasNext())
                    {
                        PortletDefinitionComposite portlet =
                            getPortletFromParsedObject((ParsedObject)portlets.next());
                        PortletInfo portletInfo = filterPortlet(portlet, locale);
                        if (portletInfo != null)
                        {
                            cat.addPortlet(portletInfo);
View Full Code Here


        else
            portlets = searchEngine.search(filter).getResults().iterator();
       
        while (portlets.hasNext())
        {
            PortletDefinitionComposite portlet = null;
            if (filter == null)
                portlet = (PortletDefinitionComposite)portlets.next();
            else
                portlet = getPortletFromParsedObject((ParsedObject)portlets.next());
           
View Full Code Here

            String rows = request.getParameter("Rows");
            String cats = request.getParameter("jsCats");
            String page = request.getParameter(JSPAGE);
            MutablePortletApplication pa = registry.getPortletApplication("j2-admin");
            String portletName = this.getPortletName();
            PortletDefinitionComposite portlet = (PortletDefinitionComposite) pa.getPortletDefinitionByName(portletName);
            boolean updated = updateNumericPref("Columns", columns, 10, portlet);
            updated = updated | updateNumericPref("Rows", rows, 100, portlet);
                       
            // process removes first
            if (!isEmpty(removes))
View Full Code Here

            Locale locale = request.getLocale();
            List list = new ArrayList();
           
            while (portlets.hasNext())
            {
                PortletDefinitionComposite portlet = null;
                if (filter == null)
                    portlet = (PortletDefinitionComposite)portlets.next();
                else
                    portlet = this.getPortletFromParsedObject((ParsedObject)portlets.next());
               
                if (portlet == null)
                    continue;
               
                // Do not display Jetspeed Layout Applications
                MutablePortletApplication pa = (MutablePortletApplication)portlet.getPortletApplicationDefinition();
                if (pa.isLayoutApplication())
                    continue;
                        
                // SECURITY filtering
                String uniqueName = pa.getName() + "::" + portlet.getName();
                if (securityAccessController.checkPortletAccess(portlet, JetspeedActions.MASK_VIEW))
                {
                    String name = portlet.getDisplayNameText(locale);
                    if (name == null)
                    {
                        name = portlet.getName();
                    }
                    list.add(new PortletInfo(uniqueName, name, portlet.getDescriptionText(locale)));
                }
            }           
            BrowserIterator iterator = new PortletIterator(
                    list, resultSetTitleList, resultSetTypeList,
                    windowSize);
View Full Code Here

        if (null != pa)
        {
            request.setAttribute(VIEW_PA, new PortletApplicationBean(pa));
           
            String pdefName = (String) request.getPortletSession().getAttribute(PortletApplicationResources.REQUEST_SELECT_PORTLET, PortletSession.APPLICATION_SCOPE);
            PortletDefinitionComposite pdef = (PortletDefinitionComposite) pa.getPortletDefinitionByName(pdefName);
           
            request.setAttribute(VIEW_PD, pdef);
           
            request.setAttribute("tabs", paTabMap.values());
            request.setAttribute("portlet_tabs", pdTabMap.values());
View Full Code Here

                action = getAction(PORTLET_ACTION_PREFIX, action);
                String pdefName = (String) actionRequest.getPortletSession().getAttribute(PortletApplicationResources.REQUEST_SELECT_PORTLET, PortletSession.APPLICATION_SCOPE);
               
                try
                {
                    PortletDefinitionComposite pdef = (PortletDefinitionComposite) pa.getPortletDefinitionByName(pdefName);
                    if(action.endsWith("metadata"))
                    {
                        processMetadataAction(actionRequest, actionResponse, null, pdef, action);
                    }
                    else if(action.endsWith("portlet"))
View Full Code Here

        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))
            {
                log.info("Taking portlet out of service: " + portletDefinition.getUniqueName() + " for window " + fragment.getId());
                fragment.overrideRenderedContent(OUT_OF_SERVICE_MESSAGE);
                return;
            }
            long timeoutMetadata = this.getTimeoutOnJob(portletDefinition);
            portletTracking.setExpiration(portletWindow, timeoutMetadata);           
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);           
           
View Full Code Here

    {
        List list = new LinkedList();
        Iterator portlets = registry.getAllPortletDefinitions().iterator();
        while ( portlets.hasNext() )
        {
            PortletDefinitionComposite portlet = (PortletDefinitionComposite)portlets.next();
            MutablePortletApplication muta = (MutablePortletApplication)portlet.getPortletApplicationDefinition();
            String appName = muta.getName();
            if ( appName == null )
                continue;
            if ( ! appName.equals( "jetspeed-layouts" ) )
                continue;

            String uniqueName = appName + "::" + portlet.getName();
            list.add( new LayoutInfoImpl( uniqueName,
                      portlet.getDisplayNameText( request.getLocale() ),
                      portlet.getDescriptionText( request.getLocale() ) ) );

        }
        return list;
    }
View Full Code Here

                                             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);

            Object action;
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite

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.