KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > geronimo > system > configuration > condition > OsVariable


1 /**
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */

17 package org.apache.geronimo.system.configuration.condition;
18
19 /**
20  * Provides access to operating system details for use in condition expressions.
21  *
22  * @version $Rev: 476049 $ $Date: 2006-11-16 23:35:17 -0500 (Thu, 16 Nov 2006) $
23  */

24 public class OsVariable
25 {
26     public String JavaDoc getArch() {
27         return SystemUtils.OS_ARCH;
28     }
29
30     public String JavaDoc getName() {
31         return SystemUtils.OS_NAME;
32     }
33
34     public String JavaDoc getVersion() {
35         return SystemUtils.OS_VERSION;
36     }
37
38     public boolean getIsAIX() {
39         return SystemUtils.IS_OS_AIX;
40     }
41
42     public boolean getIsHPUX() {
43         return SystemUtils.IS_OS_HP_UX;
44     }
45
46     public boolean getIsIrix() {
47         return SystemUtils.IS_OS_IRIX;
48     }
49
50     public boolean getIsLinux() {
51         return SystemUtils.IS_OS_LINUX;
52     }
53
54     public boolean getIsMac() {
55         return SystemUtils.IS_OS_MAC;
56     }
57
58     public boolean getIsMacOSX() {
59         return SystemUtils.IS_OS_MAC_OSX;
60     }
61
62     public boolean getIsOS2() {
63         return SystemUtils.IS_OS_OS2;
64     }
65
66     public boolean getIsSolaris() {
67         return SystemUtils.IS_OS_SOLARIS;
68     }
69
70     public boolean getIsSunOS() {
71         return SystemUtils.IS_OS_SUN_OS;
72     }
73
74     public boolean getIsUnix() {
75         return SystemUtils.IS_OS_UNIX;
76     }
77
78     public boolean getIsWindows() {
79         return SystemUtils.IS_OS_WINDOWS;
80     }
81
82     public boolean getIsWindows2000() {
83         return SystemUtils.IS_OS_WINDOWS_2000;
84     }
85
86     public boolean getIsWindows95() {
87         return SystemUtils.IS_OS_WINDOWS_95;
88     }
89
90     public boolean getIsWindows98() {
91         return SystemUtils.IS_OS_WINDOWS_98;
92     }
93
94     public boolean getIsWindowsME() {
95         return SystemUtils.IS_OS_WINDOWS_ME;
96     }
97
98     public boolean getIsWindowsNT() {
99         return SystemUtils.IS_OS_WINDOWS_NT;
100     }
101
102     public boolean getIsWindowsXP() {
103         return SystemUtils.IS_OS_WINDOWS_XP;
104     }
105 }
106
Popular Tags