portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jf...@apache.org
Subject cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets FileServerPortlet.java
Date Wed, 01 Sep 2004 14:28:13 GMT
jford       2004/09/01 07:28:13

  Modified:    src/java/org/apache/jetspeed/portal/portlets
                        FileServerPortlet.java
  Log:
  Allow FileServerPortlet to be subclassed
  
  PR: JIRA #JS1-372
  Submitted by:	G Monroe
  
  Revision  Changes    Path
  1.28      +13 -12    jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/FileServerPortlet.java
  
  Index: FileServerPortlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/FileServerPortlet.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- FileServerPortlet.java	23 Feb 2004 04:03:33 -0000	1.27
  +++ FileServerPortlet.java	1 Sep 2004 14:28:13 -0000	1.28
  @@ -45,20 +45,24 @@
           
           //fetch the URL as a String...
   
  -        try {
  -
  -            this.setContent( new JetspeedClearElement( this.getURL(  this.getPortletConfig().getURL()
) ) );
  -
  -        } catch (Exception e) {
  +        initContent(config);
  +    }
  +    
  +    protected void initContent ( PortletConfig config ) throws PortletException 
  +    {
  +        try 
  +        {
  +            this.setContent( new JetspeedClearElement( this.getURL(  config.getURL() )
) );
  +        }
  +        catch (Exception e)
  +        {
               throw new PortletException( e.getMessage() );
           }
  -            
  -       
       }
   
       /**
       */
  -    private String getURL(String url) throws IOException {
  +    protected String getURL(String url) throws IOException {
   
           int CAPACITY = 1024;
   
  @@ -79,8 +83,5 @@
   
   
           return buffer.toString();
  -            
  -
       }
  -
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message