r9778 - in helma-ng/trunk: modules/helma src/org/helma/javascript
[email protected] Thu, 14 May 2009 23:43:12 +0200 (CEST)
| Newsgroups | gmane.comp.java.helma.cvs |
|---|---|
| Message-ID | <20090514214312.C89533D0D6@mia> |
Author: hannes
Date: 2009-05-14 23:43:12 +0200 (Thu, 14 May 2009)
New Revision: 9778
Modified:
helma-ng/trunk/modules/helma/system.js
helma-ng/trunk/src/org/helma/javascript/RhinoEngine.java
Log:
Add properties and version to helma/system
Details at http://dev.helma.org/trac/helma/changeset/9778
Modified: helma-ng/trunk/modules/helma/system.js
===================================================================
--- helma-ng/trunk/modules/helma/system.js 2009-05-14 21:43:10 UTC (rev 9777)
+++ helma-ng/trunk/modules/helma/system.js 2009-05-14 21:43:12 UTC (rev 9778)
@@ -6,6 +6,7 @@
export('args',
'env',
+ 'properties',
'addHostObject',
'addRepository',
'asJavaObject',
@@ -18,7 +19,8 @@
'getOptimizationLevel',
'setOptimizationLevel',
'serialize',
- 'deserialize');
+ 'deserialize',
+ 'version');
var rhino = org.mozilla.javascript;
@@ -184,3 +186,11 @@
Object.defineProperty(this, "env", {
value: new ScriptableMap(java.lang.System.getenv())
});
+
+Object.defineProperty(this, "properties", {
+ value: new ScriptableMap(java.lang.System.getProperties())
+});
+
+Object.defineProperty(this, "version", {
+ value: new ScriptableList(org.helma.javascript.RhinoEngine.VERSION)
+})
\ No newline at end of file
Modified: helma-ng/trunk/src/org/helma/javascript/RhinoEngine.java
===================================================================
--- helma-ng/trunk/src/org/helma/javascript/RhinoEngine.java 2009-05-14 21:43:10 UTC (rev 9777)
+++ helma-ng/trunk/src/org/helma/javascript/RhinoEngine.java 2009-05-14 21:43:12 UTC (rev 9778)
@@ -54,6 +54,7 @@
ModuleScope mainScope = null;
public static final Object[] EMPTY_ARGS = new Object[0];
+ public static final List<Integer> VERSION = Collections.unmodifiableList(Arrays.asList(0, 3));
private Logger log = Logger.getLogger("org.helma.javascript.RhinoEngine");