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

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

public final class JOnASUtils
extends Object

JOnAS utilities.

Author:
Guillaume Sauthier

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

Field Detail

JONAS_DEVELOPER_PROP

public static final String JONAS_DEVELOPER_PROP
JOnAS Development mode.

See Also:
Constant Field Values

JONAS_PROPERTIES

public static final String JONAS_PROPERTIES
JOnAS Development mode.

See Also:
Constant Field Values
Method Detail

getJOnASBase

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

getServerProperty

public static String getServerProperty(String property,
                                       String defaultValue)
                                throws 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:
Exception - If the property value cannot be retrieved

getJOnASRoot

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

getVersion

public static 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 © 2007 OW2 Consortium. All Rights Reserved.