From f3b05ef89775b193b732dd3a8926daf921dcb2e2 Mon Sep 17 00:00:00 2001 From: hns Date: Mon, 20 Aug 2001 14:40:30 +0000 Subject: [PATCH] small changes to reflect moving SystemProperties to the helma.util package and renaming helma.objectmodel.Node to helma.objectmodel.TransientNode. --- src/helma/framework/core/Application.java | 5 +- src/helma/framework/core/ESNode.java | 8 +- .../framework/core/RequestEvaluator.java | 190 +----------------- src/helma/framework/core/Skin.java | 2 +- src/helma/framework/core/User.java | 6 +- src/helma/framework/core/ZippedAppFile.java | 4 +- 6 files changed, 16 insertions(+), 199 deletions(-) diff --git a/src/helma/framework/core/Application.java b/src/helma/framework/core/Application.java index 9602d0bd..56a7ae27 100644 --- a/src/helma/framework/core/Application.java +++ b/src/helma/framework/core/Application.java @@ -9,8 +9,7 @@ import java.rmi.*; import java.rmi.server.*; import helma.framework.*; import helma.objectmodel.*; -import helma.objectmodel.db.NodeManager; -import helma.objectmodel.db.WrappedNodeManager; +import helma.objectmodel.db.*; import helma.xmlrpc.*; import helma.util.*; import FESI.Data.*; @@ -153,7 +152,7 @@ public class Application extends UnicastRemoteObject implements IRemoteApp, IRep dbMappings = new Hashtable (); dbSources = new Hashtable (); - appnode = new Node ("app"); + appnode = new TransientNode ("app"); xmlrpc = IServer.getXmlRpcServer (); xmlrpcAccess = new XmlRpcAccess (this); } diff --git a/src/helma/framework/core/ESNode.java b/src/helma/framework/core/ESNode.java index fb1ef031..7b5c11a9 100644 --- a/src/helma/framework/core/ESNode.java +++ b/src/helma/framework/core/ESNode.java @@ -5,7 +5,7 @@ package helma.framework.core; import helma.objectmodel.*; -import helma.objectmodel.db.NodeHandle; +import helma.objectmodel.db.*; import helma.util.*; import FESI.Interpreter.*; import FESI.Exceptions.*; @@ -52,13 +52,13 @@ public class ESNode extends ObjectPrototype { // eval.app.logEvent ("in ESNode constructor: "+o.getClass ()); this.eval = eval; if (obj == null) - node = new Node (null); + node = new TransientNode (null); else if (obj instanceof ESWrapper) node = (INode) ((ESWrapper) obj).getJavaObject (); else if (obj instanceof INode) node = (INode) obj; else - node = new Node (obj.toString ()); + node = new TransientNode (obj.toString ()); // set node handle to wrapped node if (node instanceof helma.objectmodel.db.Node) handle = ((helma.objectmodel.db.Node) node).getHandle (); @@ -384,7 +384,7 @@ public class ESNode extends ObjectPrototype { if ("__hash__".equals (propertyName)) return new ESString (""+node.hashCode ()); if ("__node__".equals (propertyName)) - return ESLoader.normalizeObject (node, evaluator); + return new ESWrapper (node, evaluator); return ESNull.theNull; } diff --git a/src/helma/framework/core/RequestEvaluator.java b/src/helma/framework/core/RequestEvaluator.java index a3573d4d..e1552968 100644 --- a/src/helma/framework/core/RequestEvaluator.java +++ b/src/helma/framework/core/RequestEvaluator.java @@ -9,7 +9,7 @@ import java.util.Enumeration; import java.util.StringTokenizer; import java.io.*; import helma.objectmodel.*; -import helma.objectmodel.db.Transactor; +import helma.objectmodel.db.*; import helma.framework.*; import helma.framework.extensions.*; import helma.xmlrpc.fesi.*; @@ -111,7 +111,7 @@ public class RequestEvaluator implements Runnable { dbx.setApplication (this.app); // fake a cache member like the one found in ESNodes - global.putHiddenProperty ("cache", new ESNode (new Node ("cache"), this)); + global.putHiddenProperty ("cache", new ESNode (new TransientNode ("cache"), this)); global.putHiddenProperty ("undefined", ESUndefined.theUndefined); appnode = new ESAppNode (app.appnode, this); global.putHiddenProperty ("app", appnode); @@ -529,6 +529,8 @@ public class RequestEvaluator implements Runnable { if (msg == null || msg.length () == 0) msg = wrong.toString (); app.logEvent ("Error executing "+funcdesc+": "+msg); + if (app.debug) + wrong.printStackTrace (); this.exception = new Exception (msg); } break; @@ -918,187 +920,3 @@ public class RequestEvaluator implements Runnable { } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/helma/framework/core/Skin.java b/src/helma/framework/core/Skin.java index 45288de5..b670fd7c 100644 --- a/src/helma/framework/core/Skin.java +++ b/src/helma/framework/core/Skin.java @@ -135,7 +135,7 @@ public class Skin { if (escape) b.append (cnt[i]); escape = !escape; - break;; + break; case '"': case '\'': if (!escape && state == PARAMVALUE) { diff --git a/src/helma/framework/core/User.java b/src/helma/framework/core/User.java index 44bdffa0..94911e2f 100644 --- a/src/helma/framework/core/User.java +++ b/src/helma/framework/core/User.java @@ -7,7 +7,7 @@ import java.io.*; import java.util.*; import java.net.URLEncoder; import helma.objectmodel.*; -import helma.objectmodel.db.NodeHandle; +import helma.objectmodel.db.*; /** * This represents a user who is currently using the Hop application. This does @@ -24,7 +24,7 @@ public class User implements Serializable { NodeHandle nhandle; DbMapping umap; long onSince, lastTouched; - Node cache; + TransientNode cache; String message; public User (String sid, Application app) { @@ -33,7 +33,7 @@ public class User implements Serializable { this.app = app; setNode (null); umap = app.getDbMapping ("user"); - cache = new Node ("[session cache]"); + cache = new TransientNode ("[session cache]"); cache.setPrototype ("user"); cache.setDbMapping (umap); sessionID = sid; diff --git a/src/helma/framework/core/ZippedAppFile.java b/src/helma/framework/core/ZippedAppFile.java index 2a78d43a..f68cadf0 100644 --- a/src/helma/framework/core/ZippedAppFile.java +++ b/src/helma/framework/core/ZippedAppFile.java @@ -8,8 +8,8 @@ import java.util.zip.*; import java.io.*; import helma.framework.*; import helma.util.Updatable; -import helma.objectmodel.SystemProperties; -import helma.objectmodel.DbMapping; +import helma.util.SystemProperties; +import helma.objectmodel.db.DbMapping; /** * This represents a Zip-File which may contain other Updatables for one or more prototypes.