Discussion:
[mule-scm] [mule][24331] branches/mule-3.3.x/core/src: MEL
Pablo Kraan
2012-05-25 13:21:10 UTC
Permalink
Did not pay attention to this commit until it was merged into 3.x today.
Note that there are many tests in ServerContextTestCase that don't have the
@Test annotation. Please add them

Pablo
**
Revision 24331 <http://fisheye.codehaus.org/changelog/mule/?cs=24331>
Author dfeist Date 2012-04-23 07:52:16 -0500 (Mon, 23 Apr 2012) Log
Message
MEL Tweaks: Fix spelling error in ServerContext, flatten out ServerContent values, make methods static where possible, add missing doc
Modified Paths
-
branches/mule-3.3.x/core/src/main/java/org/mule/el/context/AppContext.java<#136df4896c3f9f3b_branchesmule33xcoresrcmainjavaorgmuleelcontextAppContextjava>
-
branches/mule-3.3.x/core/src/main/java/org/mule/el/context/MuleInstanceContext.java<#136df4896c3f9f3b_branchesmule33xcoresrcmainjavaorgmuleelcontextMuleInstanceContextjava>
-
branches/mule-3.3.x/core/src/main/java/org/mule/el/context/ServerContext.java<#136df4896c3f9f3b_branchesmule33xcoresrcmainjavaorgmuleelcontextServerContextjava>
-
branches/mule-3.3.x/core/src/test/java/org/mule/el/context/ServerContextTestCase.java<#136df4896c3f9f3b_branchesmule33xcoresrctestjavaorgmuleelcontextServerContextTestCasejava>
Diff
branches/mule-3.3.x/core/src/main/java/org/mule/el/context/AppContext.java
(24330 => 24331)
--- branches/mule-3.3.x/core/src/main/java/org/mule/el/context/AppContext.java 2012-04-23 12:50:48 UTC (rev 24330)
branches/mule-3.3.x/core/src/main/java/org/mule/el/context/MuleInstanceContext.java
(24330 => 24331)
--- branches/mule-3.3.x/core/src/main/java/org/mule/el/context/MuleInstanceContext.java 2012-04-23 12:50:48 UTC (rev 24330)
branches/mule-3.3.x/core/src/main/java/org/mule/el/context/ServerContext.java
(24330 => 24331)
--- branches/mule-3.3.x/core/src/main/java/org/mule/el/context/ServerContext.java 2012-04-23 12:50:48 UTC (rev 24330)
- * <li> <b>fileseperator</b> <i></i>
- * <li> <b>host</b> <i></i>
- * <li> <b>ip</b> <i></i>
- * <li> <b>locale</b> <i></i>
- * <li> <b>java.properties</b> <i>Map of Java system properties</i>
- * <li> <b>java.version</b> <i></i>
- * <li> <b>java.vendor</b> <i></i>
- * <li> <b>os.name</b> <i></i>
- * <li> <b>os.arch</b> <i></i>
- * <li> <b>os.version</b> <i></i>
- * <li> <b>timezone</b> <i></i>
- * <li> <b>tmpdir</b> <i></i>
- * <li> <b>user</b> <i></i>+ * <li> <b>env</b> <i>Map of Operating System environment variables </i>
+ * <li> <b>fileSeparator</b> <i>Character that separates components of a file path. This is "/" on UNIX and "\" on Windows.</i>
+ * <li> <b>host</b> <i>Fully qualified domain name for the server</i>
+ * <li> <b>ip</b> <i>The IP address of the server</i>
+ * <li> <b>locale</b> <i>The default locale (java.util.Locale) of the JRE. Can be used language (locale.language), country (locale.country) and </i>
+ * <li> <b>javaVersion</b> <i>JRE version</i>
+ * <li> <b>javaVendor</b> <i>JRE vendor name</i>
+ * <li> <b>osName</b> <i>Operating System name</i>
+ * <li> <b>osArch</b> <i>Operating System architecture</i>
+ * <li> <b>osVersion</b> <i>Operating System version</i>
+ * <li> <b>systemProperties</b> <i>Map of Java system properties</i>
+ * <li> <b>timeZone</b> <i>Default TimeZone (java.util.TimeZone) of the JRE.</i>
+ * <li> <b>tmpDir</b> <i>Temporary directory for use by the JRE</i>
+ * <li> <b>userName</b> <i>User name</i>
+ * <li> <b>userHome</b> <i>User home directory</i>
- {
- return new OperatingSystemContext();
- }
-
- public static JAVARuntimeContext getJava()
- {
- return new JAVARuntimeContext();
- }
- {
- return System.getProperty("os.name");
- }+ return System.getProperty("os.name");
+ } - public String getArch()
- {
- return System.getProperty("os.arch");
- }+ public static String getOsArch()
+ {
+ return System.getProperty("os.arch");
+ } - public String getVersion()
- {
- return System.getProperty("os.version");
- }+ public static String getOsVersion()
+ {
+ return System.getProperty("os.version");
+ } - public String toString()
- {
- return getName() + " (" + getVersion() + ", " + getArch() + ")";
- }+ public static String getJavaVersion()
+ {
+ return System.getProperty("java.version"); } - public static class JAVARuntimeContext+ public static String getJavaVendor() {- public String getVersion()
- {
- return System.getProperty("java.version");
- }+ return System.getProperty("java.vendor");
+ } - public String getVendor()
- {
- return System.getProperty("java.vendor");
- }+ public static String getUserName()
+ {
+ return System.getProperty("user.name");
+ } - public Properties getProperties()
- {
- return System.getProperties();
- }
-
- public String toString()
- {
- return getVersion() + " (" + getVendor() + ")";
- }+ public static String getUserHome()
+ {
+ return System.getProperty("user.home"); } + public static String getUserDir()
+ {
+ return System.getProperty("user.dir");
+ }
+ }
branches/mule-3.3.x/core/src/test/java/org/mule/el/context/ServerContextTestCase.java
(24330 => 24331)
--- branches/mule-3.3.x/core/src/test/java/org/mule/el/context/ServerContextTestCase.java 2012-04-23 12:50:48 UTC (rev 24330)
- {
- Assert.assertEquals(System.getProperty("user.name"), evaluate("server.user"));
- }
-
- public void assignValueUser()
- {
- assertImmutableVariable("server.user='1'");
- }
-
- public void os()
- {
- evaluate("server.os");
- }
-
- public void assignValueToOs()
- {
- assertImmutableVariable("server.os='1'");
- }
-
- {
- evaluate("server.java");
- }
-
- public void assignValueToJava()
- {
- assertImmutableVariable("server.java='1'");
- }
-
+ public void userName()
+ {
+ Assert.assertEquals(System.getProperty("user.name"), evaluate("server.userName"));
+ }
+
+ public void assignValueToUserName()
+ {
+ assertImmutableVariable("server.userName='1'");
+ }
+
+ public void userHome()
+ {
+ Assert.assertEquals(System.getProperty("user.home"), evaluate("server.userHome"));
+ }
+
+ public void assignValueToUserHome()
+ {
+ assertImmutableVariable("server.userHome='1'");
+ }
+
+ public void userDir()
+ {
+ Assert.assertEquals(System.getProperty("user.dir"), evaluate("server.userDir"));
+ }
+
+ public void assignValueToUseDir()
+ {
+ assertImmutableVariable("server.userDir='1'");
+ }
+ }
------------------------------
http://xircles.codehaus.org/manage_email
Loading...