summaryrefslogtreecommitdiff
path: root/projects/net.wotonomy.web/src/main/java/net/wotonomy/web/WOElement.java
diff options
context:
space:
mode:
authorBenjamin Culkin <scorpress@gmail.com>2024-05-19 17:56:33 -0400
committerBenjamin Culkin <scorpress@gmail.com>2024-05-19 17:56:33 -0400
commitaedc34d55462a75e329bbf342251ff6504cd117e (patch)
treebcc8f1f2352582717b484df302aeea6696b8f000 /projects/net.wotonomy.web/src/main/java/net/wotonomy/web/WOElement.java
Initial import from SVN
Diffstat (limited to 'projects/net.wotonomy.web/src/main/java/net/wotonomy/web/WOElement.java')
-rw-r--r--projects/net.wotonomy.web/src/main/java/net/wotonomy/web/WOElement.java97
1 files changed, 97 insertions, 0 deletions
diff --git a/projects/net.wotonomy.web/src/main/java/net/wotonomy/web/WOElement.java b/projects/net.wotonomy.web/src/main/java/net/wotonomy/web/WOElement.java
new file mode 100644
index 0000000..11944d3
--- /dev/null
+++ b/projects/net.wotonomy.web/src/main/java/net/wotonomy/web/WOElement.java
@@ -0,0 +1,97 @@
+/*
+Wotonomy: OpenStep design patterns for pure Java applications.
+Copyright (C) 2000 Blacksmith, Inc.
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, see http://www.gnu.org
+*/
+
+package net.wotonomy.web;
+
+import java.io.Serializable;
+
+import net.wotonomy.foundation.NSDictionary;
+
+/**
+* This class represents a static or dynamic portion of the
+* content returned to a request. Each request walks a tree
+* of WOElements to generate a response.
+*
+* @author michael@mpowers.net
+* @author $Author: cgruber $
+* @version $Revision: 905 $
+*/
+public abstract class WOElement implements WOActionResults, Serializable
+{
+ NSDictionary associations;
+
+ /**
+ * Default constructor. Performs necessary initialization.
+ */
+ public WOElement()
+ {
+ }
+
+ /**
+ * This method is called to retrieve user-entered data from
+ * the request. WOElements should retrieve data from the
+ * request based on their elementID and set values in the
+ * context's current WOComponent, typically those values that
+ * are associated with the element in the binding. This
+ * implementation does nothing.
+ */
+ public void takeValuesFromRequest (WORequest aRequest, WOContext aContext)
+ {
+ // does nothing
+ }
+
+ /**
+ * This method is called on all objects and elements of the
+ * application until a non-null value is returned.
+ * WOElements should first check to see if they are the
+ * target of an action by checking the WOContext's senderID
+ * to see if it matches this element's elementID.
+ * If this element is the target, it should perform an
+ * appropriate action on the context's current WOComponent,
+ * usually the action specified in the binding, and return
+ * the result of that action. This implementation returns null.
+ */
+ public WOActionResults invokeAction (WORequest aRequest, WOContext aContext)
+ {
+ return null;
+ }
+
+ /**
+ * This method is called on all elements of the content tree
+ * to build a response to a user request. The message should
+ * be forwarded to any child elements so that the entire tree
+ * is traversed. This implementation does nothing.
+ */
+ public void appendToResponse (WOResponse aResponse, WOContext aContext)
+ {
+ // does nothing
+ }
+
+ /**
+ * Package access only. Called to initialize the component with
+ * the proper context before the start of the request-response cycle.
+ * If the context has a current component, that component becomes
+ * this component's parent.
+ */
+ void ensureAwakeInContext (WOContext aContext)
+ {
+ // does nothing
+ }
+
+
+}