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
 String getSetting(String name)
          Retrieve the value of the setting with the given name.
 Map getSettings()
          Returns the settings of this node as an immutable Map.
 boolean isEnabled()
          Returns true if node-specific settings are enabled, false otherwise.
 String removeSetting(String name)
          Remove the given setting from the node settings.
 void setSetting(String name, String value)
          Set the value of the setting with the given name.
 

Method Detail

getSetting

String getSetting(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(String name,
                String value)
Set the value of the setting with the given name. Has no effect if node settings are not enabled.


removeSetting

String removeSetting(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

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.