com::pcbsys::nirvana::nAdminAPI::nConfigEntry Class Reference

This class contains all the information about a configuration parameter, including the name, the current value, a description of it and a warning or constraint string. More...

#include <nConfigEntry.h>

Inherits Observable.

Public Member Functions

virtual bool Equals (longlong aLong)
 Compares this object with the passed object. More...
 
virtual const std::string & getDescription ()
 Returns a string which contains the description for this parameter and typically what it is used for. More...
 
virtual longlong getMax ()
 Retrieves the maximum range value of the configuration parameter. More...
 
virtual longlong getMin ()
 Retrieves the minimum range value of the configuration parameter. More...
 
virtual const std::string & getName ()
 Retrieves the name of the configuration parameter. More...
 
virtual fConfigObject * getParent ()
 Retrieves the parent object of this entry. More...
 
virtual int getType ()
 Retrieves the type of the configuration parameter. More...
 
virtual const std::string & getValue ()
 Retrieves the current value of this parameter. More...
 
virtual const std::string & getWarning ()
 Returns a String which contains information about the limits/bounds of this parameter and what would be nominal values. More...
 
virtual bool isAdvanced ()
 Retrieves the isAdvanced value of the configuration parameter. More...
 
virtual bool isReadOnly ()
 Returns whether the specific entry is read only and therefore cannot be modifed. More...
 
virtual bool lessThan (nConfigEntry *pItem)
 Compares this object with the passed object. More...
 
virtual bool lessThan (longlong aLong)
 Compares this object with the passed object. More...
 
 nConfigEntry (fConfigObject *pCo, const std::string &key)
 Constructs a new nConfigEntry. More...
 
virtual void setValue (const std::string &)
 Sets the parameters value to the new value passed. More...
 
virtual void update (fConfigObject *pCo)
 Update this nConfigEntry based on the fConfigObject passed in. More...
 
virtual void validateNewValue (const std::string &value)
 Validates a proposed new value for the config entry. More...
 

Detailed Description

This class contains all the information about a configuration parameter, including the name, the current value, a description of it and a warning or constraint string.

This class extends Observable since the value can be changed asynchronously from the realm. When this happens any observer is notified of the changed value, passed as a String

Constructor & Destructor Documentation

com::pcbsys::nirvana::nAdminAPI::nConfigEntry::nConfigEntry ( fConfigObject *  pCo,
const std::string &  key 
)

Constructs a new nConfigEntry.

Parameters
*pCothe config object for this config entry
keythe unique key to use for this entry

Member Function Documentation

virtual bool com::pcbsys::nirvana::nAdminAPI::nConfigEntry::Equals ( longlong  aLong)
virtual

Compares this object with the passed object.

For internal use only

Parameters
aLonglong to compare against
Returns
True if this object is equal to the passed long
virtual const std::string& com::pcbsys::nirvana::nAdminAPI::nConfigEntry::getDescription ( )
virtual

Returns a string which contains the description for this parameter and typically what it is used for.

Returns
a description for this config entry as a String
virtual longlong com::pcbsys::nirvana::nAdminAPI::nConfigEntry::getMax ( )
virtual

Retrieves the maximum range value of the configuration parameter.

Returns
maximum range value of config object
virtual longlong com::pcbsys::nirvana::nAdminAPI::nConfigEntry::getMin ( )
virtual

Retrieves the minimum range value of the configuration parameter.

Returns
minimum range value of config object
virtual const std::string& com::pcbsys::nirvana::nAdminAPI::nConfigEntry::getName ( )
virtual

Retrieves the name of the configuration parameter.

Returns
the name of this configuration parameter as a String
virtual fConfigObject* com::pcbsys::nirvana::nAdminAPI::nConfigEntry::getParent ( )
virtual

Retrieves the parent object of this entry.

Returns
fConfigObject parent object
virtual int com::pcbsys::nirvana::nAdminAPI::nConfigEntry::getType ( )
virtual

Retrieves the type of the configuration parameter.

Returns
type of config object
virtual const std::string& com::pcbsys::nirvana::nAdminAPI::nConfigEntry::getValue ( )
virtual

Retrieves the current value of this parameter.

The parameter is always a string though it could represent longs/ints/booleans etc.

Returns
the current value of this configuration parameter as a String
virtual const std::string& com::pcbsys::nirvana::nAdminAPI::nConfigEntry::getWarning ( )
virtual

Returns a String which contains information about the limits/bounds of this parameter and what would be nominal values.

Returns
a warning for this config entry as a String
virtual bool com::pcbsys::nirvana::nAdminAPI::nConfigEntry::isAdvanced ( )
virtual

Retrieves the isAdvanced value of the configuration parameter.

Returns
minimum range value of config object
virtual bool com::pcbsys::nirvana::nAdminAPI::nConfigEntry::isReadOnly ( )
virtual

Returns whether the specific entry is read only and therefore cannot be modifed.

Returns
if the entry is read only
virtual bool com::pcbsys::nirvana::nAdminAPI::nConfigEntry::lessThan ( nConfigEntry pItem)
virtual

Compares this object with the passed object.

For internal use only

Parameters
itemObject to compare against
Returns
True if this object is less than the passed object
virtual bool com::pcbsys::nirvana::nAdminAPI::nConfigEntry::lessThan ( longlong  aLong)
virtual

Compares this object with the passed object.

For internal use only

Parameters
aLonglong to compare against
Returns
True if this object is less than the passed long
virtual void com::pcbsys::nirvana::nAdminAPI::nConfigEntry::setValue ( const std::string &  )
virtual

Sets the parameters value to the new value passed.

This value is nit committed to the realm until the nRealmNode.commitConfig(nConfigGroup) is called.

Parameters
valueThe new value to set this parameter to as a String
Exceptions
nAdminIllegalArgumentExceptionthrown if value is null, not the correct type, or not within a specific range
See Also
nRealmNode
nConfigGroup
virtual void com::pcbsys::nirvana::nAdminAPI::nConfigEntry::update ( fConfigObject *  pCo)
virtual

Update this nConfigEntry based on the fConfigObject passed in.

Parameters
thefConfigObject to update from.
virtual void com::pcbsys::nirvana::nAdminAPI::nConfigEntry::validateNewValue ( const std::string &  value)
virtual

Validates a proposed new value for the config entry.

Parameters
valuea string object specifying the value to be validated
Exceptions
nAdminIllegalArgumentExceptionthrown if not the correct type, or not within a specific range