org.ow2.jonas.launcher.jonas.util
Class JOnASUtils

java.lang.Object
  extended by org.ow2.jonas.launcher.jonas.util.JOnASUtils

public final class JOnASUtils
extends java.lang.Object

JOnAS utilities.

Author:
Guillaume Sauthier

Method Summary
static java.io.File getJOnASBase()
           
static java.io.File getJOnASRoot()
           
static java.lang.String getServerProperty(java.lang.String property, java.lang.String defaultValue)
          Returns the value associated to the given property in jonas.properties file.
static java.lang.String getVersion()
           
static java.io.File getWorkDirectory()
           
static boolean isDeveloperMode()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getJOnASBase

public static java.io.File getJOnASBase()
Returns:
the JOnAS Base to be used

getServerProperty

public static java.lang.String getServerProperty(java.lang.String property,
                                                 java.lang.String defaultValue)
                                          throws java.lang.Exception
Returns the value associated to the given property in jonas.properties file.

Parameters:
property - the property name
defaultValue - the default value
Returns:
The value associated to the given property.
Throws:
java.lang.Exception - If the property value cannot be retrieved

getJOnASRoot

public static java.io.File getJOnASRoot()
Returns:
the JOnAS Root to be used. May throw an IllegalStateException if jonas.root System property is not set.

getWorkDirectory

public static java.io.File getWorkDirectory()
Returns:
the work directory

getVersion

public static java.lang.String getVersion()
Returns:
the JOnAS version from the Implementation-Version Manifest entry.

isDeveloperMode

public static boolean isDeveloperMode()
Returns:
true if the jonas.developer system property has been set.


Copyright © 2012 OW2 Consortium. All Rights Reserved.