ibilling.client
Class ClientProperties

java.lang.Object
  extended by ibilling.client.ClientProperties

public class ClientProperties
extends java.lang.Object

Helper class built around Properties object that can replace configuration Map required at login

Since:
1.0

Field Summary
private static java.util.Properties ibillingClientProperties
          Stores property values.
private static java.lang.String PROPERTIES_PATH
          Path to the properties file.
 
Constructor Summary
ClientProperties()
           
 
Method Summary
static java.util.Properties getJNDIProperties(java.util.Map<java.lang.String,java.lang.Object> config)
          Returns JNDI configuration for RMI communication.
static java.lang.String getProperty(java.lang.String name)
          Returns value of the defined property; null if not defined.
static java.lang.String getProperty(java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> config)
          Queries provided map for the property's value; if nothing found, searches in loaded properties; if not found, returns null;.
static SessionConnection getSessionConnection(java.util.Map<java.lang.String,java.lang.Object> config)
          Returns instance of SessionConnection based on the values defined in configuration map/properties.
private static void init()
          Loads properties defined within properties file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ibillingClientProperties

private static java.util.Properties ibillingClientProperties
Stores property values.


PROPERTIES_PATH

private static final java.lang.String PROPERTIES_PATH
Path to the properties file.

See Also:
Constant Field Values
Constructor Detail

ClientProperties

public ClientProperties()
Method Detail

init

private static void init()
Loads properties defined within properties file.


getProperty

public static java.lang.String getProperty(java.lang.String name)
Returns value of the defined property; null if not defined.

Parameters:
name - êëþ÷
Returns:
property

getProperty

public static java.lang.String getProperty(java.lang.String name,
                                           java.util.Map<java.lang.String,java.lang.Object> config)
Queries provided map for the property's value; if nothing found, searches in loaded properties; if not found, returns null;.

Parameters:
name - the name
config - the config
Returns:
the property

getJNDIProperties

public static java.util.Properties getJNDIProperties(java.util.Map<java.lang.String,java.lang.Object> config)
Returns JNDI configuration for RMI communication.

Parameters:
config - the config
Returns:
the jNDI properties

getSessionConnection

public static SessionConnection getSessionConnection(java.util.Map<java.lang.String,java.lang.Object> config)
                                              throws java.lang.InstantiationException,
                                                     java.lang.IllegalAccessException,
                                                     java.lang.ClassNotFoundException
Returns instance of SessionConnection based on the values defined in configuration map/properties.

Parameters:
config - Map
Returns:
sessionConnection SessionConnection
Throws:
java.lang.InstantiationException - the instantiation exception
java.lang.IllegalAccessException - the illegal access exception
java.lang.ClassNotFoundException - the class not found exception