org.tolven.core.bean
Class TolvenProperties

java.lang.Object
  extended by org.tolven.core.bean.TolvenProperties
All Implemented Interfaces:
TolvenPropertiesLocal, TolvenPropertiesRemote

public class TolvenProperties
extends java.lang.Object
implements TolvenPropertiesLocal, TolvenPropertiesRemote

Manage all properties used by Tolven. TODO: This should be an MBEAN, not a stateless session bean.

Author:
John Churin

Constructor Summary
TolvenProperties()
           
 
Method Summary
 void clearProperties(java.util.List<Property> properties)
          Clear the supplied properties from the database as well as from the running properties of the system.
 java.util.List<Property> findProperties()
          Return the tolven persistent properties (from the database, not the running system
 java.lang.String getLog4Threshold()
          Retrieves Current Tolven Threshold.
 java.lang.String getProperty(java.lang.String name)
          Same as doing a System.getProperty but wrapped by our environment.
 void setAllProperties()
          Set all of the properties from the database into the running properties of the system.
 void updateLog4Threshold(java.lang.String threhold)
          Update threshold level of the Tolven Logging.
 void updateProperties(java.util.List<Property> properties)
          Update (persist or merge) the supplied properties into the database as well as the running properties of the system.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TolvenProperties

public TolvenProperties()
Method Detail

getProperty

public java.lang.String getProperty(java.lang.String name)
Description copied from interface: TolvenPropertiesLocal
Same as doing a System.getProperty but wrapped by our environment.

Specified by:
getProperty in interface TolvenPropertiesLocal
Parameters:
name - Name of the property
Returns:
The value of the property

findProperties

public java.util.List<Property> findProperties()
Return the tolven persistent properties (from the database, not the running system

Specified by:
findProperties in interface TolvenPropertiesLocal
Specified by:
findProperties in interface TolvenPropertiesRemote
Returns:
Properties collection

clearProperties

public void clearProperties(java.util.List<Property> properties)
Clear the supplied properties from the database as well as from the running properties of the system.

Specified by:
clearProperties in interface TolvenPropertiesLocal
Specified by:
clearProperties in interface TolvenPropertiesRemote

updateProperties

public void updateProperties(java.util.List<Property> properties)
Update (persist or merge) the supplied properties into the database as well as the running properties of the system.

Specified by:
updateProperties in interface TolvenPropertiesLocal
Specified by:
updateProperties in interface TolvenPropertiesRemote

updateLog4Threshold

public void updateLog4Threshold(java.lang.String threhold)
Update threshold level of the Tolven Logging.

Specified by:
updateLog4Threshold in interface TolvenPropertiesLocal
Specified by:
updateLog4Threshold in interface TolvenPropertiesRemote

getLog4Threshold

public java.lang.String getLog4Threshold()
Retrieves Current Tolven Threshold.

Specified by:
getLog4Threshold in interface TolvenPropertiesLocal
Specified by:
getLog4Threshold in interface TolvenPropertiesRemote

setAllProperties

public void setAllProperties()
Set all of the properties from the database into the running properties of the system.

Specified by:
setAllProperties in interface TolvenPropertiesLocal
Specified by:
setAllProperties in interface TolvenPropertiesRemote