jvanzyl 01/07/14 07:42:42
Modified: src/java/org/apache/turbine/services/rundata
DefaultTurbineRunData.java
Log:
- removing ECS
Revision Changes Path
1.20 +16 -126
jakarta-turbine/src/java/org/apache/turbine/services/rundata/DefaultTurbineRunData.java
Index: DefaultTurbineRunData.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine/src/java/org/apache/turbine/services/rundata/DefaultTurbineRunData.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- DefaultTurbineRunData.java 2001/07/14 05:02:29 1.19
+++ DefaultTurbineRunData.java 2001/07/14 14:42:42 1.20
@@ -77,11 +77,6 @@
import org.apache.turbine.services.template.TurbineTemplate;
import org.apache.turbine.services.mimetype.TurbineMimeTypes;
-//!! These have to go ECS Classes
-import org.apache.ecs.Document;
-import org.apache.ecs.Element;
-import org.apache.ecs.StringElement;
-
/**
* DefaultTurbineRunData is the default implementation of the
* TurbineRunData interface, which is distributed by the Turbine
@@ -101,7 +96,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Jon S. Stevens</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Bernie Hoeneisen</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Daniel Rall</a>
- * @version $Id: DefaultTurbineRunData.java,v 1.19 2001/07/14 05:02:29 jvanzyl Exp $
+ * @version $Id: DefaultTurbineRunData.java,v 1.20 2001/07/14 14:42:42 jvanzyl Exp $
*/
public class DefaultTurbineRunData
extends RecyclableSupport
@@ -176,11 +171,6 @@
private boolean pageSet;
/**
- * This creates an ECS Document.
- */
- private Document page;
-
- /**
* Cached action name to execute for this request.
*/
private String action;
@@ -207,11 +197,6 @@
private TemplateInfo templateInfo;
/**
- * This is where output messages from actions should go.
- */
- private StringElement message;
-
- /**
* The user object.
*/
private User user;
@@ -302,7 +287,9 @@
//!! NEW
private String target;
-
+
+ private String message;
+
public void setTarget(String target)
{
this.target = target;
@@ -450,13 +437,11 @@
servletContext = null;
acl = null;
pageSet = false;
- page = null;
action = null;
layout = null;
screen = null;
templateEncoding = null;
templateInfo = null;
- message = null;
user = null;
title = null;
outSet = false;
@@ -474,7 +459,8 @@
stackTrace = null;
stackTraceException = null;
varDebug.clear();
-
+ message = null;
+
super.dispose();
}
@@ -595,19 +581,6 @@
}
/**
- * Gets the page.
- *
- * @return a document.
- */
- public Document getPage()
- {
- pageSet = true;
- if ( this.page == null )
- this.page = new Document();
- return this.page;
- }
-
- /**
* Whether or not an action has been defined.
*
* @return true if an action has been defined.
@@ -802,99 +775,6 @@
}
/**
- * Whether or not a message has been defined.
- *
- * @return true if a message has been defined.
- */
- public boolean hasMessage()
- {
- return ( this.message != null &&
- this.message.toString().length() > 0 );
- }
-
- /**
- * Gets the results of an action or another message
- * to be displayed as a string.
- *
- * @return a string.
- */
- public String getMessage()
- {
- return (this.message == null ? null : this.message.toString());
- }
-
- /**
- * Sets the message for the request as a string.
- *
- * @param msg a string.
- */
- public void setMessage (String msg )
- {
- this.message = new StringElement(msg);
- }
-
- /**
- * Adds the string to message. If message has prior messages from
- * other actions or screens, this method can be used to chain them.
- *
- * @param msg a string.
- */
- public void addMessage(String msg)
- {
- addMessage(new StringElement(msg));
- }
-
- /**
- * Gets the results of an action or another message
- * to be displayed as an ECS string element.
- *
- * @return a string element.
- */
- public StringElement getMessageAsHTML()
- {
- return this.message;
- }
-
- /**
- * Sets the message for the request as an ECS element.
- *
- * @param msg an element.
- */
- public void setMessage (Element msg )
- {
- this.message = new StringElement(msg);
- }
-
- /**
- * Adds the ECS element to message. If message has prior messages from
- * other actions or screens, this method can be used to chain them.
- *
- * @param msg an element.
- */
- public void addMessage(Element msg)
- {
- if (msg != null)
- {
- if ( message != null )
- {
- message.addElement(msg);
- }
- else
- {
- message = new StringElement(msg);
- }
- }
- }
-
- /**
- * Unsets the message for the request.
- */
- public void unsetMessage ( )
- {
- this.message = null;
- }
-
- /**
* Gets the title of the page.
*
* @return a string.
@@ -1497,4 +1377,14 @@
{
getServerData().setScriptName(sn);
}
+
+ public void setMessage(String message)
+ {
+ this.message = message;
+ }
+
+ public String getMessage()
+ {
+ return message;
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]