Package org.apache.jetspeed.portal

Examples of org.apache.jetspeed.portal.Portlet


        String portletName,
        String controlName)
    {

        ConcreteElement result = null;
        Portlet p = null;

        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);
            }
        }
        catch (Exception e)
        {
            logger.error("Exception", e);
View Full Code Here


    {
        // customization state info is in the page's session state
        SessionState customizationState = getPageSessionState();
        Stack stack = (Stack)customizationState.getAttribute("customize-stack");

        Portlet p = null;

        if ((stack!=null)&&(!stack.empty()))
        {
            p = (Portlet)stack.peek();
        }

        /**
         * Save the title of this currently selected portlet
         * --------------------------------------------------------------------------
         * last modified: 11/06/01
         * Andreas Kempf, Siemens ICM S CP PE, Munich
         */
        if ((p != null) && (stack.size() > 1))
          customizationState.setAttribute ("customize-paneName", (String)p.getTitle());
        else
          customizationState.setAttribute ("customize-paneName", "*");

        return (Portlet)p;
    }
View Full Code Here

        }
        else
        {
          if (stack.size () > 0)
          {
            Portlet last = (Portlet)stack.peek();


            if ((last!=null) && (p.getName().equals(last.getName())) && (p.getTitle().equals(last.getTitle())))
            {
                //System.out.println ("Portlet already used!!!");
            }
            else
              stack.push(p);
View Full Code Here

     *
     * @param rundata the RunData object for the current request
     */
    public boolean allowClose( RunData rundata )
    {
        Portlet p = getPortlet();

        if (p==null) return false;
       
        if ((p instanceof PortletSet)
            ||(JetspeedSecurity.checkPermission((JetspeedUser) rundata.getUser(),
View Full Code Here

    /**
     * Returns true if this portlet is currently closed
     */
    public boolean isClosed(RunData rundata)
    {
        Portlet p = getPortlet();
       
        if ( (p!=null) && (p instanceof PortletState) )
        {
            return ((PortletState)p).isClosed(rundata);
        }
View Full Code Here

     * @param minimized the new portlet state
     * @param data the RunData for this request
     */
    public void setClosed(boolean close, RunData rundata)
    {
        Portlet p = getPortlet();
       
        if ( (p!=null) && (p instanceof PortletState) )
        {
            ((PortletState)p).setClosed(close, rundata);
        }
View Full Code Here

     *
     * @param rundata the RunData object for the current request
     */
    public boolean allowInfo( RunData rundata )
    {
        Portlet p = getPortlet();
       
        if (p==null) return false;
       
        if ((p instanceof PortletSet)
            ||(JetspeedSecurity.checkPermission((JetspeedUser) rundata.getUser(),
View Full Code Here

     *
     * @param rundata the RunData object for the current request
     */
    public boolean allowCustomize( RunData rundata )
    {
        Portlet p = getPortlet();

        if (p==null) return false;
       
        if ((p instanceof PortletSet)
            ||(JetspeedSecurity.checkPermission((JetspeedUser) rundata.getUser(),
View Full Code Here

     *
     * @param rundata the RunData object for the current request
     */
    public boolean allowMaximize( RunData rundata )
    {
        Portlet p = getPortlet();

        if (p==null) return false;
       
        if ((p instanceof PortletSet)
            ||(JetspeedSecurity.checkPermission((JetspeedUser) rundata.getUser(),
View Full Code Here

     *
     * @param rundata the RunData object for the current request
     */
    public boolean allowMinimize( RunData rundata )
    {
        Portlet p = getPortlet();

        if (p==null) return false;
       
        if ((p instanceof PortletSet)
            ||(JetspeedSecurity.checkPermission((JetspeedUser) rundata.getUser(),
View Full Code Here

TOP

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

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.