cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ovi...@apache.org
Subject cvs commit: xml-cocoon2/src/java/org/apache/cocoon/components/flow/javascript JSCocoon.java
Date Tue, 24 Sep 2002 08:14:47 GMT
ovidiu      2002/09/24 01:14:47

  Modified:    src/java/org/apache/cocoon/components/flow/javascript
                        JSCocoon.java
  Log:
  Renamed the interpreter instance variable. Moved the implementation
  for the JavaScript createSession() and removeSession() in
  JavaScriptInterpreter instead.
  
  Revision  Changes    Path
  1.8       +9 -17     xml-cocoon2/src/java/org/apache/cocoon/components/flow/javascript/JSCocoon.java
  
  Index: JSCocoon.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/flow/javascript/JSCocoon.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- JSCocoon.java	6 Sep 2002 00:14:06 -0000	1.7
  +++ JSCocoon.java	24 Sep 2002 08:14:47 -0000	1.8
  @@ -87,7 +87,7 @@
   public class JSCocoon extends ScriptableObject
   {
     protected static String OBJECT_SOURCE_RESOLVER = "source-resolver";
  -  protected JavaScriptInterpreter interp;
  +  protected JavaScriptInterpreter interpreter;
     protected Scriptable scope;
     protected NativeArray parameters;
     protected Environment environment;
  @@ -115,9 +115,9 @@
       this.parameters = parameters;
     }
   
  -  public void setInterpreter(JavaScriptInterpreter interp)
  +  public void setInterpreter(JavaScriptInterpreter interpreter)
     {
  -    this.interp = interp;
  +    this.interpreter = interpreter;
     }
   
     public void setContext(ComponentManager manager, Environment environment)
  @@ -139,7 +139,7 @@
   
     public JavaScriptInterpreter jsGet_interpreter()
     {
  -    return interp;
  +    return interpreter;
     }
   
     public Environment jsGet_environment()
  @@ -183,8 +183,8 @@
       throws Exception
     {
       try {
  -      interp.register(filename);
  -      interp.checkForModifiedScripts(environment);
  +      interpreter.register(filename);
  +      interpreter.checkForModifiedScripts(environment);
       }
       catch (Exception ex) {
         ex.printStackTrace();
  @@ -211,7 +211,7 @@
       if (cont != null)
         kont = ((JSWebContinuation)cont).getWebContinuation();
   
  -    interp.forwardTo(uri, bizData, kont, environment);
  +    interpreter.forwardTo(uri, bizData, kont, environment);
     }
   
     /**
  @@ -223,11 +223,7 @@
     */
     public void jsFunction_createSession()
     {
  -    Map objectModel = environment.getObjectModel();
  -    Request request = ObjectModelHelper.getRequest(objectModel);
  -    Session session = request.getSession(true);
  -
  -    session.setAttribute(JavaScriptInterpreter.USER_GLOBAL_SCOPE, scope);
  +    interpreter.setSessionScope(environment, scope);
     }
   
     /**
  @@ -236,11 +232,7 @@
     */
     public void jsFunction_removeSession()
     {
  -    Map objectModel = environment.getObjectModel();
  -    Request request = ObjectModelHelper.getRequest(objectModel);
  -    Session session = request.getSession(true);
  -
  -    session.removeAttribute(JavaScriptInterpreter.USER_GLOBAL_SCOPE);
  +    interpreter.removeSessionScope(environment);
     }
   
     public void jsFunction_diplayAllContinuations()
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message