cgl.narada.service
Class ServiceProperties

java.lang.Object
  extended by cgl.narada.service.ServiceProperties

public class ServiceProperties
extends Object


Constructor Summary
protected ServiceProperties()
           
 
Method Summary
 String getConfigFileLocation()
          Get the configuration file location.
 int getEntityId()
          Retrieve the entity identifier
 String getProperty(String propertyName)
          Retrieve a certain property.
 String getProperty(String propertyName, String defaultValue)
          Searches for the property with the specified key in this property list.
 boolean hasProperty(String propertyName)
          Check to see if a certain property exists.
protected  boolean initialize(int entityId, String configFileLocation)
          Initialize the service properties based on the specified configFileLocation and the specified entityId.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceProperties

protected ServiceProperties()
Method Detail

getEntityId

public int getEntityId()
Retrieve the entity identifier

Returns:
The entity id.

getConfigFileLocation

public String getConfigFileLocation()
Get the configuration file location.

Returns:
the configuration file location.

hasProperty

public boolean hasProperty(String propertyName)
Check to see if a certain property exists.

Parameters:
propertyName - The property to check for.

getProperty

public String getProperty(String propertyName)
Retrieve a certain property. This will return a NULL if the property is not found.

Parameters:
propertyName - The property to retrieve.

getProperty

public String getProperty(String propertyName,
                          String defaultValue)
Searches for the property with the specified key in this property list. If the key is not found in this property list, the default property list, and its defaults, recursively, are then checked. The method returns the default value argument if the property is not found.

Parameters:
propertyName - Checks the specified property
defaultValue - Default value for this property.
Returns:

initialize

protected boolean initialize(int entityId,
                             String configFileLocation)
Initialize the service properties based on the specified configFileLocation and the specified entityId.

Parameters:
entityId - Idenetifier for the entity.
configFileLocation - Location of the configuration file
Returns:
true if the intialization was successful and false if NOT.


For comments and suggestions please send e-mail to The NaradaBrokering Project