View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *  http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  
20  package org.apache.geronimo.system.configuration.condition;
21  
22  /**
23   * Provides access to operating system details for use in condition expressions.
24   *
25   * @version $Rev: 454011 $ $Date: 2006-10-07 13:28:45 -0700 (Sat, 07 Oct 2006) $
26   */
27  public class OsVariable
28  {
29      public String getArch() {
30          return SystemUtils.OS_ARCH;
31      }
32  
33      public String getName() {
34          return SystemUtils.OS_NAME;
35      }
36  
37      public String getVersion() {
38          return SystemUtils.OS_VERSION;
39      }
40  
41      public boolean getIsAIX() {
42          return SystemUtils.IS_OS_AIX;
43      }
44  
45      public boolean getIsHPUX() {
46          return SystemUtils.IS_OS_HP_UX;
47      }
48  
49      public boolean getIsIrix() {
50          return SystemUtils.IS_OS_IRIX;
51      }
52  
53      public boolean getIsLinux() {
54          return SystemUtils.IS_OS_LINUX;
55      }
56  
57      public boolean getIsMac() {
58          return SystemUtils.IS_OS_MAC;
59      }
60  
61      public boolean getIsMacOSX() {
62          return SystemUtils.IS_OS_MAC_OSX;
63      }
64  
65      public boolean getIsOS2() {
66          return SystemUtils.IS_OS_OS2;
67      }
68  
69      public boolean getIsSolaris() {
70          return SystemUtils.IS_OS_SOLARIS;
71      }
72  
73      public boolean getIsSunOS() {
74          return SystemUtils.IS_OS_SUN_OS;
75      }
76  
77      public boolean getIsUnix() {
78          return SystemUtils.IS_OS_UNIX;
79      }
80  
81      public boolean getIsWindows() {
82          return SystemUtils.IS_OS_WINDOWS;
83      }
84  
85      public boolean getIsWindows2000() {
86          return SystemUtils.IS_OS_WINDOWS_2000;
87      }
88  
89      public boolean getIsWindows95() {
90          return SystemUtils.IS_OS_WINDOWS_95;
91      }
92  
93      public boolean getIsWindows98() {
94          return SystemUtils.IS_OS_WINDOWS_98;
95      }
96  
97      public boolean getIsWindowsME() {
98          return SystemUtils.IS_OS_WINDOWS_ME;
99      }
100 
101     public boolean getIsWindowsNT() {
102         return SystemUtils.IS_OS_WINDOWS_NT;
103     }
104 
105     public boolean getIsWindowsXP() {
106         return SystemUtils.IS_OS_WINDOWS_XP;
107     }
108 }