Package org.apache.jetspeed.portal

Examples of org.apache.jetspeed.portal.PortletConfig


        // first make sure we propagate init
        super.init();

        try
        {
            PortletConfig config = this.getPortletConfig();
            String param = null;

            param = config.getInitParameter(PARAM_SOURCE);
            if (param != null)
            {
                setSource(param);
            }

            param = config.getInitParameter(PARAM_WIDTH);
            if (param != null)
            {
                setWidth(param);
            }

            param = config.getInitParameter(PARAM_HEIGHT);
            if (param != null)
            {
                setHeight(param);
            }

            param = config.getInitParameter(PARAM_SCROLLING);
            if (param != null)
            {
                setScrolling(param);
            }

            param = config.getInitParameter(PARAM_FRAMEBORDER);
            if (param != null)
            {
                setFrameBorder(param);
            }

            param = config.getInitParameter(PARAM_STYLE);
            if (param != null)
            {
                setStyle(param);
            }

            param = config.getInitParameter(PARAM_NAME);
            if (param != null)
            {
                setFrameName(param);
            }

            param = config.getInitParameter(PARAM_REFRESH);
            if (param != null)
            {
                setRefresh(param);
            }

            param = config.getInitParameter(PARAM_MARGINWIDTH);
            if (param != null)
            {
                setMarginWidth(param);
            }

            param = config.getInitParameter(PARAM_MARGINHEIGHT);
            if (param != null)
            {
                setMarginHeight(param);
            }

            param = config.getInitParameter(PARAM_ALIGN);
            if (param != null)
            {
                setAlign(param);
            }
View Full Code Here


    public void init() throws PortletException {
 
        if (initDone) // Why is init called more than once per portlet?
            return;

        PortletConfig config = this.getPortletConfig();
       
        try
        {
            rewriter = new HTMLRewriter();

            // fetch username and password for HTTP Basic Autentication
            username = config.getInitParameter("username");
            password = config.getInitParameter("password");
           
            contentStale = true;
            initDone = true;
        } catch (Exception e) {
            logger.info("Exception occurred:" + e.toString(), e);
View Full Code Here

    @param data the RunData object for the request
    @return the content to be displayed to the user-agent
    */
    public ConcreteElement getContent( RunData data )
    {
        PortletConfig config = this.getPortletConfig();
       
        if (contentStale == true)
            return getWebPageContent(data, config);
       
        if (null == getExpirationMillis())
View Full Code Here

  @param data the RunData object for the request
  @return the content to be displayed to the user-agent
  */
  public ConcreteElement getContent(RunData data)
  {
    PortletConfig config = this.getPortletConfig();

    if (contentStale == true)
      return getWebClippedContent(data, config);

    if (null == getExpirationMillis())
View Full Code Here

    @param data the RunData object for the request
    @return the content to be displayed to the user-agent
    */
    public ConcreteElement getContent( RunData data )
    {
        PortletConfig config = this.getPortletConfig();
       
        if (contentStale == true)
            return getWebPageContent(data, config);
       
        if (null == getExpirationMillis())
View Full Code Here

    */
    public static Object getHandle(Object config)
    {
        //this implementation expects a PortletConfig object as its
        // configuration
        PortletConfig pc = null;

        if (!(config instanceof PortletConfig))
        {
            return null;           
        }

        // form the key from the current request's portal page profile
        // and the portlet id in the config
        pc = (PortletConfig)config;

        StringBuffer handle = new StringBuffer(256);
        handle.append(pc.getPageId());
        handle.append('/');
        handle.append(pc.getPortletId());

        return handle.toString();  

    }   // getHandle
View Full Code Here

     */
    public static Object getHandle(Object config)
    {
        //this implementation expects a PortletConfig object as its
        // configuration
        PortletConfig pc = null;

        if (!(config instanceof PortletConfig))
        {
            return null;

        }

        // By default, only take into account the init parameters
        pc = (PortletConfig)config;
        StringBuffer handle = new StringBuffer(256);

        if (pc.getURL()!=null && pc.isCachedOnURL())
        {
            handle.append(String.valueOf(pc.getURL().hashCode()));
        }

        Iterator i = pc.getInitParameterNames();
        while(i.hasNext())
        {
            String name = (String)i.next();
            String value = pc.getInitParameter(name);

            if (value!=null)
            {
                handle.append("|").append(name).append("-").append(value);
            }
View Full Code Here

    }

    /**
     */
    public void setDescription( String description ) {
        PortletConfig pc = getPortletConfig();
        if (pc==null) {
            pc = new BasePortletConfig();
            setPortletConfig(pc);
        }

        MetaData meta = pc.getMetainfo();
        if (meta==null) {
            meta = new MetaData();
            pc.setMetainfo(meta);
        }

        meta.setDescription(description);
    }
View Full Code Here

    /**
     * Set the title for this Portlet.
     * @param title Portlet title.
     */
    public void setTitle( String title ) {
        PortletConfig pc = getPortletConfig();
        if (pc==null) {
            pc = new BasePortletConfig();
            setPortletConfig(pc);
        }

        MetaData meta = pc.getMetainfo();
        if (meta==null) {
            meta = new MetaData();
            pc.setMetainfo(meta);
        }

        meta.setTitle(title);
    }
View Full Code Here

      return getImage();
    }

    public void setImage( String image )
    {
        PortletConfig pc = getPortletConfig();
        if (pc==null) {
            pc = new BasePortletConfig();
            setPortletConfig(pc);
        }

        MetaData meta = pc.getMetainfo();
        if (meta==null) {
            meta = new MetaData();
            pc.setMetainfo(meta);
        }

        meta.setImage(image);
    }
View Full Code Here

TOP

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

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.