com.plumtree.server
Interface IPTServerConfigSettings


public interface IPTServerConfigSettings

The IPTServerConfigSettings interface is used to set and retrieve global Plumtree Server settings. The settings are stored in the database, and thus accessible to all instances of Plumtree that share the same database (i.e. the settings are available to every instance of Plumtree within a single install.) Changes to settings generally do not take effect until the Plumtree process has been restarted- Plumtree does not have a facility to notice that global settings have been reset in the database, and that in-memory copies of those settings should be updated. Settings are identified by unique integers. The known setting IDs are enumerated in the PT_SERVER_CONFIG_SETTINGNAME class.

Version:
2.0
Author:
Michael Smedberg
See Also:
PT_SERVER_CONFIG_SETTINGNAME

Method Summary
 double GetSettingAsDouble(int iSettingID)
          Returns the specified global Plumtree setting as a double.
 int GetSettingAsInt(int iSettingID)
          Returns the specified global Plumtree setting as an int.
 java.lang.Object GetSettingAsObject(int iSettingID)
          Returns the specified global Plumtree setting as an Object.
 java.lang.String GetSettingAsString(int iSettingID)
          Returns the specified global Plumtree setting as a String.
 com.plumtree.openfoundation.util.XPDateTime GetSettingAsXPDateTime(int iSettingID)
          Returns the specified global Plumtree setting as a XPDateTime.
 java.lang.Object[][] GetSettings(int iSettingID)
          Deprecated.  
 java.lang.Object[][] GetSettings(int[] iaSettingIDs)
          Retrieves multiple global Plumtree settings in a single call.
 void SetSetting(int iSettingID, double dblValue)
          Sets the specified global Plumtree setting.
 void SetSetting(int iSettingID, int iValue)
          Sets the specified global Plumtree setting.
 void SetSetting(int iSettingID, java.lang.Object objValue)
          Sets the specified global Plumtree setting.
 void SetSetting(int iSettingID, java.lang.String sValue)
          Sets the specified global Plumtree setting.
 void SetSetting(int iSettingID, com.plumtree.openfoundation.util.XPDateTime dtValue)
          Sets the specified global Plumtree setting.
 

Method Detail

GetSettingAsInt

int GetSettingAsInt(int iSettingID)
Returns the specified global Plumtree setting as an int. If the setting is not recognized, will throw PT_RESULTCODES.PT_E_INVALIDARG. If the setting is recognized, but is not an integer, will throw a XPFormatException.

Parameters:
iSettingID - is the ID of the setting to return. See PT_SERVER_CONFIG_SETTINGNAME for allowed values.
Returns:
The value of the setting, as an int

GetSettingAsString

java.lang.String GetSettingAsString(int iSettingID)
Returns the specified global Plumtree setting as a String. If the setting is not recognized, will throw PT_RESULTCODES.PT_E_INVALIDARG. If the setting is recognized, but is not a string, will return a string representation of the setting.

Parameters:
iSettingID - is the ID of the setting to return. See PT_SERVER_CONFIG_SETTINGNAME for allowed values.
Returns:
The value of the setting, as an int

GetSettingAsXPDateTime

com.plumtree.openfoundation.util.XPDateTime GetSettingAsXPDateTime(int iSettingID)
Returns the specified global Plumtree setting as a XPDateTime. If the setting is not recognized, will throw PT_RESULTCODES.PT_E_INVALIDARG. If the setting is recognized, but is not a datetime, will throw a ClassCastException.

Parameters:
iSettingID - is the ID of the setting to return. See PT_SERVER_CONFIG_SETTINGNAME for allowed values.
Returns:
The value of the setting, as XPDateTime

GetSettingAsDouble

double GetSettingAsDouble(int iSettingID)
Returns the specified global Plumtree setting as a double. If the setting is not recognized, will throw PT_RESULTCODES.PT_E_INVALIDARG. If the setting is recognized, but is not a double, will throw a XPFormatException.

Parameters:
iSettingID - is the ID of the setting to return. See PT_SERVER_CONFIG_SETTINGNAME for allowed values.
Returns:
The value of the setting, as double

GetSettingAsObject

java.lang.Object GetSettingAsObject(int iSettingID)
Returns the specified global Plumtree setting as an Object. If the setting is not recognized, will throw PT_RESULTCODES.PT_E_INVALIDARG. NOTE: Generally, clients should call the "type safe" GetSetting calls (GetSettingAsInt, GetSettingAsString, GetSettingAsXPDateTime, GetSettingAsDouble.) The type safe calls assure that the caller gets the correct type of return value.

Parameters:
iSettingID - is the ID of the setting to return. See PT_SERVER_CONFIG_SETTINGNAME for allowed values.
Returns:
The value of the setting, as Object

SetSetting

void SetSetting(int iSettingID,
                int iValue)
Sets the specified global Plumtree setting. Note that setting changes generally do not take effect until the Plumtree process is restarted.

Parameters:
iSettingID - is the ID of the setting to set. See PT_SERVER_CONFIG_SETTINGNAME for allowed values.
iValue - is the value which the setting should have.

SetSetting

void SetSetting(int iSettingID,
                java.lang.String sValue)
Sets the specified global Plumtree setting. Note that setting changes generally do not take effect until the Plumtree process is restarted.

Parameters:
iSettingID - is the ID of the setting to set. See PT_SERVER_CONFIG_SETTINGNAME for allowed values.
sValue - is the value which the setting should have.

SetSetting

void SetSetting(int iSettingID,
                com.plumtree.openfoundation.util.XPDateTime dtValue)
Sets the specified global Plumtree setting. Note that setting changes generally do not take effect until the Plumtree process is restarted.

Parameters:
iSettingID - is the ID of the setting to set. See PT_SERVER_CONFIG_SETTINGNAME for allowed values.
dtValue - is the value which the setting should have.

SetSetting

void SetSetting(int iSettingID,
                double dblValue)
Sets the specified global Plumtree setting. Note that setting changes generally do not take effect until the Plumtree process is restarted.

Parameters:
iSettingID - is the ID of the setting to set. See PT_SERVER_CONFIG_SETTINGNAME for allowed values.
dblValue - is the value which the setting should have.

SetSetting

void SetSetting(int iSettingID,
                java.lang.Object objValue)
Sets the specified global Plumtree setting. Note that setting changes generally do not take effect until the Plumtree process is restarted. NOTE: Generally, clients should call the "type safe" SetSetting calls (which take in int, String, XPDateTime, or double variables.) The type safe calls assure that the Server properly interprets the type of the argument. This function does NOT support any datatypes that are not supported by a typesafe call. If the caller passes in a value that is not of type Integer, String, XPDateTime, or Double, and exception is thrown.

Parameters:
iSettingID - is the ID of the setting to set. See PT_SERVER_CONFIG_SETTINGNAME for allowed values.
objValue - is the value which the setting should have.

GetSettings

java.lang.Object[][] GetSettings(int iSettingID)
Deprecated. 

This function is deprecated. Callers should call GetSettings (int[] iaSettingIDs) instead.

Parameters:
iSettingID - is the ID of the setting to return. See PT_SERVER_CONFIG_SETTINGNAME for allowed values.
Returns:
A 2D Object Array containing 2 columns and one row for each successfully retrieved setting value. The 0th column contains the setting ID for the row (which will correspond to one of the values in PT_SERVER_CONFIG_SETTINGNAME, and the 1st column contains the value for that setting.

GetSettings

java.lang.Object[][] GetSettings(int[] iaSettingIDs)
Retrieves multiple global Plumtree settings in a single call.

Parameters:
iaSettingIDs - is a 1D int array of the setting to return. See PT_SERVER_CONFIG_SETTINGNAME for allowed values.
Returns:
A 2D Object Array containing 2 columns and one row for each successfully retrieved setting value. The 0th column contains the setting ID for the row (which will correspond to one of the values in PT_SERVER_CONFIG_SETTINGNAME, and the 1st column contains the value for that setting.


Copyright 2008 Plumtree Software Inc. All Rights Reserved.