org.kuali.rice.core.config
Interface NodeSettings

All Known Implementing Classes:
SimpleNodeSettingsStore

public interface NodeSettings

A local store for node-specific settings. The use of the word "Node" here describes an instance of KEW (running standalone or embedded). In a clustered environment, it is sometimes useful for individual nodes within the cluster to have their own settings. Depending on system configuration this configuration store may or may not be available for use. If the node settings store is not availabe then calls to query or modify the settings should be no-ops. The availablily can be queried using the isEnabled method.

Since Node Settings are runtime-mutable, it is important that implementations of this class be thread-safe.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Method Summary
 java.lang.String getSetting(java.lang.String name)
          Retrieve the value of the setting with the given name.
 java.util.Map getSettings()
          Returns the settings of this node as an immutable Map.
 boolean isEnabled()
          Returns true if node-specific settings are enabled, false otherwise.
 java.lang.String removeSetting(java.lang.String name)
          Remove the given setting from the node settings.
 void setSetting(java.lang.String name, java.lang.String value)
          Set the value of the setting with the given name.
 

Method Detail

getSetting

java.lang.String getSetting(java.lang.String name)
Retrieve the value of the setting with the given name. Will return null if the setting with the given name does not exist or node settings are not enabled.

Returns:
the value of the setting, null if the setting does not exis or node settings are not enabled

setSetting

void setSetting(java.lang.String name,
                java.lang.String value)
Set the value of the setting with the given name. Has no effect if node settings are not enabled.


removeSetting

java.lang.String removeSetting(java.lang.String name)
Remove the given setting from the node settings. If the setting with the given name does not exist or node settings are not enabled, then null will be returned.

Returns:
return the value of the removed setting, null if the setting does not exist or node settings are not enabled

getSettings

java.util.Map getSettings()
Returns the settings of this node as an immutable Map. If the node settings store is not enabled, then an empty Map will be returned. The Map returned by the getSettings method is thread-safe.

Returns:

isEnabled

boolean isEnabled()
Returns true if node-specific settings are enabled, false otherwise. In the case that node settings are not enabled, the various accessor methods will effectively behave as no-ops.

Returns:
true if node settings are enabled, false otherwise


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.