org.ow2.jonas.properties
Interface ServerProperties


public interface ServerProperties

Interface used to retrieve the configuration of the Server.

Author:
durieuxp

Method Summary
 Properties getConfigFileEnv()
          Returns JOnAS environment as configured with files properties only.
 String getDomainName()
          Retrieve the Domain Name.
 String getPropFileName()
          Retrieve the configuration file name.
 String getServerName()
          Retrieve the Server Name.
 String getValue(String key)
          Get value of a property.
 String getValue(String key, String defaultVal)
          Returns the value of the related property.
 String[] getValueAsArray(String key)
          Returns the value of the related property as String [].
 boolean getValueAsBoolean(String key, boolean def)
          Returns the value of the related property as boolean.
 String getVersionsFile()
           
 String getWorkDirectory()
           
 boolean isDevelopment()
          Needed to determine if the current server is in development mode.
 boolean isMaster()
          Needed to determine if the current server is a master.
 

Method Detail

getValue

String getValue(String key)
Get value of a property.

Parameters:
key - property name
Returns:
value as a String

getValue

String getValue(String key,
                String defaultVal)
Returns the value of the related property. With default values.

Parameters:
key - the search key
defaultVal - if the key is not found return this default value
Returns:
property value

getValueAsBoolean

boolean getValueAsBoolean(String key,
                          boolean def)
Returns the value of the related property as boolean.

Parameters:
key - the wanted key
def - default run if not found
Returns:
property value, true or false.

getValueAsArray

String[] getValueAsArray(String key)
Returns the value of the related property as String []. The method returns null if the property is not found.

Parameters:
key - the wanted key
Returns:
property value, null if not exist

getDomainName

String getDomainName()
Retrieve the Domain Name.

Returns:
Domain Name

getServerName

String getServerName()
Retrieve the Server Name.

Returns:
Server Name

getPropFileName

String getPropFileName()
Retrieve the configuration file name.

Returns:
configuration file name

getConfigFileEnv

Properties getConfigFileEnv()
Returns JOnAS environment as configured with files properties only.

Returns:
JOnAS properties

getVersionsFile

String getVersionsFile()
Returns:
the VERSIONS file content as a String.

isMaster

boolean isMaster()
Needed to determine if the current server is a master.

Returns:
true of this server is a master, false otherwise

isDevelopment

boolean isDevelopment()
Needed to determine if the current server is in development mode.

Returns:
true of this server is in development mode, false otherwise

getWorkDirectory

String getWorkDirectory()
Returns:
the work directory.


Copyright © 2012 OW2 Consortium. All Rights Reserved.