Package org.apache.jetspeed.portal

Examples of org.apache.jetspeed.portal.PortletControl


                    if (p != null)
                    {
                        Map constraints = getParameters(psmlEntry.getLayout());
                        int position = getPosition(psmlEntry.getLayout());

                        PortletControl control = getControl(psmlEntry.getControl(), entry);

                        set.addPortlet(
                            initControl(control, p),
                            controller.getConstraints(constraints),
                            position);
                    }
                }
                else
                {
                    logger.error(
                        " The portlet "
                            + psmlEntry.getParent()
                            + " does not exist in the Registry ");
                    continue;
                }
            }
            catch (JetspeedException e)
            {
                logger.error("Exception", e);
                continue;
            }

        }

        // Decorate with a control if required and return
        if (portlets.getControl() != null)
        {
            PortletControl control = getControl(portlets.getControl());
            return initControl(control, set);
        }

        set.sortPortletSet();
        // Or return the set
View Full Code Here


            try
            {
                customizer = PortletFactory.getPortlet(name, p.getID()+"customize");
                customizer.getPortletConfig()
                          .setPortletSkin(p.getPortletConfig().getPortletSkin());
                PortletControl control = PortalToolkit.getControl((String)null);
                if (control!=null)
                {
                    control.setPortlet(customizer);
                    control.init();
                    return control;
                }
            }
            catch (Exception e)
            {
View Full Code Here

                 Portlet source = findPortlet(data);
                 if (source != null) {
                     jdata.setPortlet(source.getName());
                     info = PortletFactory.getPortlet(name, "PortletInfoPortlet");
                     info.getPortletConfig().setPortletSkin(source.getPortletConfig().getPortletSkin());
                     PortletControl control = PortalToolkit.getControl((String)null);
                     if (control != null)
                     {
                         control.setPortlet(info);
                         control.init();
                         return control;
                     }
                 }
             }
         } catch (Exception e) {
View Full Code Here

            if (canAccess)
            {
                // Always set portlet id to "preview" so each preview request gets it from the cache.
                // At least, I think that's how it works.
                p = PortletFactory.getPortlet(portletName, "preview");
                PortletControl control = controlName == null ? PortalToolkit.getControl((String) null)
                                                             : PortalToolkit.getControl(controlName);
                if (control != null)
                {
                    JetspeedRunData jdata = (JetspeedRunData) rundata;
                    // Use the profile's skin
                    p.getPortletConfig().setPortletSkin(PortalToolkit.getSkin(jdata.getProfile().getDocument().getPortlets().getSkin()));
                    control.setPortlet(p);
                    control.init();
                    result = control.getContent(rundata);
                }
                else if (p != null)
                {
                    result = p.getContent(rundata);
                }
View Full Code Here

        try
        {
            // Always set portlet id to "preview" so each preview request gets it from the cache.
            // At least, I think that's how it works.
            p = PortletFactory.getPortlet(portletName, "preview");
            PortletControl control = controlName == null ? PortalToolkit.getControl((String) null)
                                                         : PortalToolkit.getControl(controlName);
            if (control != null)
            {
                JetspeedRunData jdata = (JetspeedRunData) rundata;
                // Use the profile's skin
                p.getPortletConfig().setPortletSkin(PortalToolkit.getSkin(jdata.getProfile().getDocument().getPortlets().getSkin()));
                control.setPortlet(p);
                control.init();
                result = control.getContent(rundata);
            }
            else if (p != null)
            {
                result = p.getContent(rundata);
            }
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.portal.PortletControl

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.