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 ta...@apache.org on 2002/09/27 21:54:27 UTC
cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/util JetspeedClearElement.java JetspeedNullFilter.java
taylor 2002/09/27 12:54:27
Modified: src/java/org/apache/jetspeed/portal
JetspeedPortletInstance.java
src/java/org/apache/jetspeed/portal/portlets
AbstractPortlet.java AggregatePortlet.java
BogusPortlet.java ClearPortlet.java
ContainerTestPortlet.java FileServerPortlet.java
JetspeedContent.java LinkPortlet.java
NewRSSPortlet.java PreviewPortlet.java
RSSPortlet.java VelocityPortlet.java
WMLFilePortlet.java WebPagePortlet.java
XSLPortlet.java
src/java/org/apache/jetspeed/portal/portlets/admin
DaemonAdminPortlet.java
src/java/org/apache/jetspeed/portal/security/portlets
PortletWrapper.java
Added: src/java/org/apache/jetspeed/util JetspeedClearElement.java
JetspeedNullFilter.java
Log:
Changes related to usage of reloadable webapp feature of tomcat.
Added the files JetspeedClearElement and JetspeedNullFilter, as org.apache.ecs.ClearElement was throwing a NotSeializableException due to its use of org.apache.ecs.NullFilter which was not Serializable. Hence wrapped the above said 2 classes for Jetspeed and made them Serializable. Replaced all the occurrences of ClearElement with JetspeedClearElement.
Revision Changes Path
1.6 +2 -2 jakarta-jetspeed/src/java/org/apache/jetspeed/portal/JetspeedPortletInstance.java
Index: JetspeedPortletInstance.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/JetspeedPortletInstance.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- JetspeedPortletInstance.java 27 Sep 2002 17:02:25 -0000 1.5
+++ JetspeedPortletInstance.java 27 Sep 2002 19:54:26 -0000 1.6
@@ -61,7 +61,7 @@
import org.apache.turbine.util.Log;
// ECS imports
-import org.apache.ecs.ClearElement;
+import org.apache.jetspeed.util.JetspeedClearElement;
import org.apache.ecs.ConcreteElement;
// Jetspeed imports
1.59 +6 -6 jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/AbstractPortlet.java
Index: AbstractPortlet.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/AbstractPortlet.java,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- AbstractPortlet.java 10 Sep 2002 15:12:08 -0000 1.58
+++ AbstractPortlet.java 27 Sep 2002 19:54:26 -0000 1.59
@@ -78,7 +78,7 @@
import org.apache.jetspeed.util.MimeType;
//ecs
-import org.apache.ecs.ClearElement;
+import org.apache.jetspeed.util.JetspeedClearElement;
import org.apache.ecs.ConcreteElement;
//turbine stuff
@@ -171,7 +171,7 @@
/**
*/
protected void setContent( String content ) {
- this.setContent( new ClearElement( content ),
+ this.setContent( new JetspeedClearElement( content ),
CapabilityMapFactory.getDefaultCapabilityMap() );
}
@@ -186,7 +186,7 @@
mymap = CapabilityMapFactory.getDefaultCapabilityMap();
}
- ConcreteElement buffer = new ClearElement( content.toString( ) );
+ ConcreteElement buffer = new JetspeedClearElement( content.toString( ) );
this.content.put( mymap.toString(), buffer );
}
@@ -451,7 +451,7 @@
this.setContent( element, mymap );
}
} catch (Exception e) {
- element = new ClearElement("Error when retrieving Portlet contents");
+ element = new JetspeedClearElement("Error when retrieving Portlet contents");
}
} else {
if( element == null ) {
@@ -459,7 +459,7 @@
mymap = CapabilityMapFactory.getDefaultCapabilityMap();
element = (ConcreteElement)content.get( mymap.toString() );
if( element == null ) {
- element = new ClearElement("Unknown Problem getting Contents");
+ element = new JetspeedClearElement("Unknown Problem getting Contents");
}
}
}
1.2 +4 -4 jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/AggregatePortlet.java
Index: AggregatePortlet.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/AggregatePortlet.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AggregatePortlet.java 4 Apr 2002 18:39:49 -0000 1.1
+++ AggregatePortlet.java 27 Sep 2002 19:54:26 -0000 1.2
@@ -72,7 +72,7 @@
import org.apache.turbine.services.cache.Refreshable;
import org.apache.jetspeed.services.portletcache.Cacheable;
-import org.apache.ecs.ClearElement;
+import org.apache.jetspeed.util.JetspeedClearElement;
import org.apache.ecs.ConcreteElement;
import org.apache.turbine.util.RunData;
@@ -109,7 +109,7 @@
if (null == path)
{
- return new ClearElement("Path parameter not set");
+ return new JetspeedClearElement("Path parameter not set");
}
ProfileLocator locator = new BaseProfileLocator();
@@ -131,7 +131,7 @@
catch (Exception e)
{
Log.error( e );
- return new ClearElement("Error in aggregation portlet: " + e.toString());
+ return new JetspeedClearElement("Error in aggregation portlet: " + e.toString());
}
}
1.3 +1 -1 jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/BogusPortlet.java
Index: BogusPortlet.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/BogusPortlet.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- BogusPortlet.java 1 Jul 2002 05:54:09 -0000 1.2
+++ BogusPortlet.java 27 Sep 2002 19:54:26 -0000 1.3
@@ -73,7 +73,7 @@
String s3 = ", Page ID: " + getPortletConfig().getPageId();
PortletInstance instance = PersistenceManager.getInstance(this,data);
String s4 = instance.getAttribute("country");
- return new org.apache.ecs.ClearElement( s1 + s2 + s3 + ", " + s4);
+ return new org.apache.jetspeed.util.JetspeedClearElement( s1 + s2 + s3 + ", " + s4);
}
}
1.3 +1 -1 jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/ClearPortlet.java
Index: ClearPortlet.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/ClearPortlet.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ClearPortlet.java 7 Mar 2001 06:47:03 -0000 1.2
+++ ClearPortlet.java 27 Sep 2002 19:54:26 -0000 1.3
@@ -67,6 +67,6 @@
* @param data org.apache.turbine.util.RunData
*/
public org.apache.ecs.ConcreteElement getContent(org.apache.turbine.util.RunData data) {
- return new org.apache.ecs.ClearElement( " " );
+ return new org.apache.jetspeed.util.JetspeedClearElement( " " );
}
}
1.4 +5 -5 jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/ContainerTestPortlet.java
Index: ContainerTestPortlet.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/ContainerTestPortlet.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ContainerTestPortlet.java 24 Jul 2002 03:21:18 -0000 1.3
+++ ContainerTestPortlet.java 27 Sep 2002 19:54:26 -0000 1.4
@@ -76,7 +76,7 @@
import org.apache.turbine.services.cache.Refreshable;
import org.apache.jetspeed.services.portletcache.Cacheable;
-import org.apache.ecs.ClearElement;
+import org.apache.jetspeed.util.JetspeedClearElement;
import org.apache.ecs.ConcreteElement;
import org.apache.turbine.util.RunData;
@@ -273,7 +273,7 @@
if (null == path)
{
- return new ClearElement("Path parameter not set");
+ return new JetspeedClearElement("Path parameter not set");
}
ProfileLocator locator = new BaseProfileLocator();
@@ -290,12 +290,12 @@
}
Portlets portlets = doc.getPortlets();
//PortletContainer.aggregate(portlets);
- return new ClearElement("XXX Under Construction :)");
+ return new JetspeedClearElement("XXX Under Construction :)");
}
catch (Exception e)
{
Log.error( e );
- return new ClearElement("Error in aggregation portlet: " + e.toString());
+ return new JetspeedClearElement("Error in aggregation portlet: " + e.toString());
}
}
1.25 +2 -2 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.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- FileServerPortlet.java 31 May 2001 17:11:04 -0000 1.24
+++ FileServerPortlet.java 27 Sep 2002 19:54:26 -0000 1.25
@@ -100,7 +100,7 @@
try {
- this.setContent( new ClearElement( this.getURL( this.getPortletConfig().getURL() ) ) );
+ this.setContent( new JetspeedClearElement( this.getURL( this.getPortletConfig().getURL() ) ) );
} catch (Exception e) {
throw new PortletException( e.getMessage() );
1.22 +2 -2 jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/JetspeedContent.java
Index: JetspeedContent.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/JetspeedContent.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- JetspeedContent.java 7 Mar 2001 06:47:07 -0000 1.21
+++ JetspeedContent.java 27 Sep 2002 19:54:26 -0000 1.22
@@ -186,7 +186,7 @@
try {
- return new ClearElement( SimpleTransform.transform( url, stylesheet ) );
+ return new JetspeedClearElement( SimpleTransform.transform( url, stylesheet ) );
} catch (SAXException e) {
Log.error( e );
1.3 +1 -1 jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/LinkPortlet.java
Index: LinkPortlet.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/LinkPortlet.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- LinkPortlet.java 11 Dec 2001 05:22:38 -0000 1.2
+++ LinkPortlet.java 27 Sep 2002 19:54:26 -0000 1.3
@@ -164,7 +164,7 @@
- return new org.apache.ecs.ClearElement( " " );
+ return new org.apache.jetspeed.util.JetspeedClearElement( " " );
}
}
1.16 +6 -6 jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/NewRSSPortlet.java
Index: NewRSSPortlet.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/NewRSSPortlet.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- NewRSSPortlet.java 9 Apr 2002 22:13:59 -0000 1.15
+++ NewRSSPortlet.java 27 Sep 2002 19:54:26 -0000 1.16
@@ -59,7 +59,7 @@
import java.util.*;
//Element Construction Set
-import org.apache.ecs.ClearElement;
+import org.apache.jetspeed.util.JetspeedClearElement;
import org.apache.ecs.ConcreteElement;
//standard Jetspeed stuff
@@ -153,7 +153,7 @@
String content = JetspeedDiskCache.getInstance().getEntry( url ).getData();
CapabilityMap xmap =
CapabilityMapFactory.getCapabilityMap(CapabilityMapFactory.AGENT_XML);
- setContent( new ClearElement(content), xmap );
+ setContent( new JetspeedClearElement(content), xmap );
InputSource isrc = new InputSource( this.cleanse( content ) );
isrc.setSystemId( url );
isrc.setEncoding("UTF-8");
@@ -213,21 +213,21 @@
public ConcreteElement getContent( RunData data ) {
CapabilityMap map = CapabilityMapFactory.getCapabilityMap( data );
String type = map.getPreferredType().toString();
- ConcreteElement content = new ClearElement(INVALID_TYPE);
+ ConcreteElement content = new JetspeedClearElement(INVALID_TYPE);
String stylesheet = (String)stylesheets.get(type);
if (stylesheet != null) {
content = getContent( data, map );
if ( content == null ) {
try {
- content = new ClearElement(
+ content = new JetspeedClearElement(
SimpleTransform.transform( this.document,
stylesheet,
this.params ) );
setContent( content, map );
} catch ( SAXException e ) {
Log.error( e );
- content = new ClearElement(e.getMessage());
+ content = new JetspeedClearElement(e.getMessage());
}
}
}
1.2 +8 -8 jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/PreviewPortlet.java
Index: PreviewPortlet.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/PreviewPortlet.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- PreviewPortlet.java 17 Sep 2002 20:11:54 -0000 1.1
+++ PreviewPortlet.java 27 Sep 2002 19:54:26 -0000 1.2
@@ -65,7 +65,7 @@
import org.apache.jetspeed.util.template.JetspeedLinkFactory;
// ecs
-import org.apache.ecs.ClearElement;
+import org.apache.jetspeed.util.JetspeedClearElement;
import org.apache.ecs.ConcreteElement;
// turbine
@@ -117,14 +117,14 @@
);
JetspeedLinkFactory.putInstance(jsLink);
jsLink = null;
- return new ClearElement("");
+ return new JetspeedClearElement("");
} catch (Exception e)
{
Log.error(e);
rundata.setScreenTemplate("Home");
- return new ClearElement("");
+ return new JetspeedClearElement("");
}
- //return new ClearElement("You must specify portlet to preview using [previewedPortletName] parameter");
+ //return new JetspeedClearElement("You must specify portlet to preview using [previewedPortletName] parameter");
}
Portlet portlet = null;
@@ -154,19 +154,19 @@
String currentURL = rundata.getRequest().getRequestURI();
Log.debug("PreviewPortlet: currentURL = " + currentURL + " reader value = " + html);
PreviewRewriter rewriter = new PreviewRewriter(currentURL, currentURL , currentURL, portletName);
- result = new ClearElement(rewriter.rewrite(new StringReader(html)));*/
+ result = new JetspeedClearElement(rewriter.rewrite(new StringReader(html)));*/
}
else
{
// The portlet already streamed its content - return a stub
- result = new ClearElement("");
+ result = new JetspeedClearElement("");
}
}
catch ( Exception e )
{
Log.error(e);
- result = new ClearElement("This resource is temporarily unavailable");
+ result = new JetspeedClearElement("This resource is temporarily unavailable");
}
rundata.setLayout("preview");
1.48 +5 -5 jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/RSSPortlet.java
Index: RSSPortlet.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/RSSPortlet.java,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- RSSPortlet.java 7 May 2002 14:03:23 -0000 1.47
+++ RSSPortlet.java 27 Sep 2002 19:54:26 -0000 1.48
@@ -60,7 +60,7 @@
//Element Construction Set
import org.apache.ecs.html.*;
-import org.apache.ecs.ClearElement;
+import org.apache.jetspeed.util.JetspeedClearElement;
import org.apache.ecs.StringElement;
//standard Jetspeed stuff
@@ -194,7 +194,7 @@
stylesheet,
this.getPortletConfig().getInitParameters() );
- this.setContent( new ClearElement( content ) );
+ this.setContent( new JetspeedClearElement( content ) );
} catch ( SAXException e ) {
1.20 +5 -5 jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/VelocityPortlet.java
Index: VelocityPortlet.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/VelocityPortlet.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- VelocityPortlet.java 19 Jul 2002 15:51:29 -0000 1.19
+++ VelocityPortlet.java 27 Sep 2002 19:54:26 -0000 1.20
@@ -74,7 +74,7 @@
// Ecs stuff
import org.apache.ecs.ConcreteElement;
-import org.apache.ecs.ClearElement;
+import org.apache.jetspeed.util.JetspeedClearElement;
// Velocity Stuff
import org.apache.velocity.context.Context;
@@ -205,7 +205,7 @@
}
// generate the content
- ClearElement element = null;
+ JetspeedClearElement element = null;
try
{
@@ -216,7 +216,7 @@
{
String s = TurbineVelocity.handleRequest(context, templatePath);
setExpirationMillis(cachePeriod + System.currentTimeMillis());
- element = new ClearElement( s );
+ element = new JetspeedClearElement( s );
clearContent(); // doing this because setContent() is not overwriting current content.
setContent(element);
} else {
@@ -225,12 +225,12 @@
}
catch( Exception e)
{
- element = new ClearElement( e.toString() );
+ element = new JetspeedClearElement( e.toString() );
}
TurbineVelocity.requestFinished(context);
- if (element == null) element = new ClearElement("");
+ if (element == null) element = new JetspeedClearElement("");
return element;
}
1.7 +3 -3 jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/WMLFilePortlet.java
Index: WMLFilePortlet.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/WMLFilePortlet.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- WMLFilePortlet.java 17 Dec 2001 15:32:27 -0000 1.6
+++ WMLFilePortlet.java 27 Sep 2002 19:54:26 -0000 1.7
@@ -112,9 +112,9 @@
WMLFilter myFilter = new WMLFilter(new PrintWriter(bos));
myFilter.filter(url);
- content = new ClearElement( bos.toString() );
+ content = new JetspeedClearElement( bos.toString() );
*/
- content = new ClearElement(
+ content = new JetspeedClearElement(
JetspeedDiskCache.getInstance().getEntry( config.getURL() ).getData() );
} catch (Exception e) {
throw new PortletException( e.getMessage() );
1.11 +3 -3 jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/WebPagePortlet.java
Index: WebPagePortlet.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/WebPagePortlet.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- WebPagePortlet.java 17 Sep 2002 20:05:53 -0000 1.10
+++ WebPagePortlet.java 27 Sep 2002 19:54:26 -0000 1.11
@@ -55,7 +55,7 @@
package org.apache.jetspeed.portal.portlets;
//Element Construction Set
-import org.apache.ecs.ClearElement;
+import org.apache.jetspeed.util.JetspeedClearElement;
import org.apache.ecs.ConcreteElement;
//Jetspeed stuff
@@ -252,7 +252,7 @@
{
String convertedString = null; // parsed and re-written HTML
- ClearElement element = null;
+ JetspeedClearElement element = null;
String url = selectUrl( data, config );
@@ -261,7 +261,7 @@
Reader htmlReader = getReader( url );
//FIXME: HTMLRewriter should take a Reader, and work
convertedString = rewriter.convertURLs(htmlReader, url);
- element = new ClearElement(convertedString);
+ element = new JetspeedClearElement(convertedString);
//FIXME: We should do a clearContent() for the media type, not ALL media types
this.clearContent(); // doing this because setContent() is not overwriting current content.
1.7 +5 -5 jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/XSLPortlet.java
Index: XSLPortlet.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/XSLPortlet.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- XSLPortlet.java 10 Sep 2001 22:41:01 -0000 1.6
+++ XSLPortlet.java 27 Sep 2002 19:54:26 -0000 1.7
@@ -59,7 +59,7 @@
import java.util.*;
//Element Construction Set
-import org.apache.ecs.ClearElement;
+import org.apache.jetspeed.util.JetspeedClearElement;
import org.apache.ecs.ConcreteElement;
//standard Jetspeed stuff
@@ -124,21 +124,21 @@
public ConcreteElement getContent( RunData data ) {
CapabilityMap map = CapabilityMapFactory.getCapabilityMap( data );
String type = map.getPreferredType().toString();
- ConcreteElement content = new ClearElement(INVALID_TYPE);
+ ConcreteElement content = new JetspeedClearElement(INVALID_TYPE);
String stylesheet = (String)stylesheets.get(type);
if (stylesheet != null) {
content = getContent( data, map );
if ( content == null ) {
try {
- content = new ClearElement(
+ content = new JetspeedClearElement(
SimpleTransform.transform( getPortletConfig().getURL(),
stylesheet,
getPortletConfig().getInitParameters() ) );
setContent( content, map );
} catch ( SAXException e ) {
Log.error( e );
- content = new ClearElement(e.getMessage());
+ content = new JetspeedClearElement(e.getMessage());
}
}
}
1.24 +2 -2 jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/admin/DaemonAdminPortlet.java
Index: DaemonAdminPortlet.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/admin/DaemonAdminPortlet.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- DaemonAdminPortlet.java 28 Jun 2002 05:37:32 -0000 1.23
+++ DaemonAdminPortlet.java 27 Sep 2002 19:54:27 -0000 1.24
@@ -101,7 +101,7 @@
this,
JetspeedSecurity.PERMISSION_VIEW))
{
- return new ClearElement("Sorry, you have no permission to see this portlet");
+ return new JetspeedClearElement("Sorry, you have no permission to see this portlet");
}
1.14 +3 -3 jakarta-jetspeed/src/java/org/apache/jetspeed/portal/security/portlets/PortletWrapper.java
Index: PortletWrapper.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/security/portlets/PortletWrapper.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- PortletWrapper.java 17 Sep 2002 15:44:00 -0000 1.13
+++ PortletWrapper.java 27 Sep 2002 19:54:27 -0000 1.14
@@ -75,7 +75,7 @@
// ECS
import org.apache.ecs.ConcreteElement;
-import org.apache.ecs.ClearElement;
+import org.apache.jetspeed.util.JetspeedClearElement;
@@ -152,7 +152,7 @@
{
PortletStats.logAccess(rundata, this, PortletStats.ACCESS_DENIED);
}
- return new ClearElement("Sorry, you have no permission to see this portlet");
+ return new JetspeedClearElement("Sorry, you have no permission to see this portlet");
}
}
1.1 jakarta-jetspeed/src/java/org/apache/jetspeed/util/JetspeedClearElement.java
Index: JetspeedClearElement.java
===================================================================
/* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Apache" and "Apache Software Foundation" and
* "Apache Jetspeed" must not be used to endorse or promote products
* derived from this software without prior written permission. For
* written permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache" or
* "Apache Jetspeed", nor may "Apache" appear in their name, without
* prior written permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
package org.apache.jetspeed.util;
import org.apache.jetspeed.util.JetspeedNullFilter;
import org.apache.ecs.StringElement;
/**
A basic ECS element that doesn't have a filter. This allows content developers
to use ECS with legacy applications that want to generate HTML but also be a
use raw HTML. Don't use this unless you have to do so for compatibilty reasons
*/
public class JetspeedClearElement extends StringElement {
public JetspeedClearElement(String string) {
super( string );
this.setFilter( new JetspeedNullFilter() );
}
}
1.1 jakarta-jetspeed/src/java/org/apache/jetspeed/util/JetspeedNullFilter.java
Index: JetspeedNullFilter.java
===================================================================
/* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Apache" and "Apache Software Foundation" and
* "Apache Jetspeed" must not be used to endorse or promote products
* derived from this software without prior written permission. For
* written permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache" or
* "Apache Jetspeed", nor may "Apache" appear in their name, without
* prior written permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
package org.apache.jetspeed.util;
import org.apache.ecs.Filter;
import java.io.Serializable;
/**
A filter for ECS that doesn't do anything.
*/
public class JetspeedNullFilter implements Filter, Serializable
{
public Filter addAttribute(String name, Object attribute) {
return this;
}
public Filter removeAttribute(String name) {
return this;
}
public boolean hasAttribute(String name) {
return false;
}
public String process(String to_process) {
return to_process;
}
public String getInfo() {
return "info";
}
}
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>