You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by jf...@apache.org on 2004/09/01 16:28:13 UTC
cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets FileServerPortlet.java
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