001 /** 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017 package org.apache.geronimo.system.configuration.condition; 018 019 /** 020 * Provides access to operating system details for use in condition expressions. 021 * 022 * @version $Rev: 476049 $ $Date: 2006-11-16 23:35:17 -0500 (Thu, 16 Nov 2006) $ 023 */ 024 public class OsVariable 025 { 026 public String getArch() { 027 return SystemUtils.OS_ARCH; 028 } 029 030 public String getName() { 031 return SystemUtils.OS_NAME; 032 } 033 034 public String getVersion() { 035 return SystemUtils.OS_VERSION; 036 } 037 038 public boolean getIsAIX() { 039 return SystemUtils.IS_OS_AIX; 040 } 041 042 public boolean getIsHPUX() { 043 return SystemUtils.IS_OS_HP_UX; 044 } 045 046 public boolean getIsIrix() { 047 return SystemUtils.IS_OS_IRIX; 048 } 049 050 public boolean getIsLinux() { 051 return SystemUtils.IS_OS_LINUX; 052 } 053 054 public boolean getIsMac() { 055 return SystemUtils.IS_OS_MAC; 056 } 057 058 public boolean getIsMacOSX() { 059 return SystemUtils.IS_OS_MAC_OSX; 060 } 061 062 public boolean getIsOS2() { 063 return SystemUtils.IS_OS_OS2; 064 } 065 066 public boolean getIsSolaris() { 067 return SystemUtils.IS_OS_SOLARIS; 068 } 069 070 public boolean getIsSunOS() { 071 return SystemUtils.IS_OS_SUN_OS; 072 } 073 074 public boolean getIsUnix() { 075 return SystemUtils.IS_OS_UNIX; 076 } 077 078 public boolean getIsWindows() { 079 return SystemUtils.IS_OS_WINDOWS; 080 } 081 082 public boolean getIsWindows2000() { 083 return SystemUtils.IS_OS_WINDOWS_2000; 084 } 085 086 public boolean getIsWindows95() { 087 return SystemUtils.IS_OS_WINDOWS_95; 088 } 089 090 public boolean getIsWindows98() { 091 return SystemUtils.IS_OS_WINDOWS_98; 092 } 093 094 public boolean getIsWindowsME() { 095 return SystemUtils.IS_OS_WINDOWS_ME; 096 } 097 098 public boolean getIsWindowsNT() { 099 return SystemUtils.IS_OS_WINDOWS_NT; 100 } 101 102 public boolean getIsWindowsXP() { 103 return SystemUtils.IS_OS_WINDOWS_XP; 104 } 105 }