OpenPetra
Free Administration Software for Non-Profits
Ict.Petra.Server.App.Core.TSystemDefaults Class Reference

Manager for the System Defaults of the OpenPetra Site. It can be accessed from the client through the Ict.Petra.Server.MSysMan.Common.WebConnectors TSystemDefaultsConnector. More...

Public Member Functions

 TSystemDefaults (TDataBase ADataBase=null)
 constructor More...
 
SSystemDefaultsTable GetSystemDefaultsTable ()
 Returns the System Defaults as a Typed DataTable. More...
 
bool IsSystemDefaultDefined (String ASystemDefaultName)
 Call this Method to find out whether a System Default is defined, that is, if it exists in the System Defaults table. More...
 
String GetSystemDefault (String ASystemDefaultName)
 Returns the value of the specified System Default. More...
 
String GetSystemDefault (String ASystemDefaultName, String ADefault)
 Returns the value of the specified System Default. More...
 
bool GetBooleanDefault (String ASystemDefaultName, bool ADefault)
 Gets the value of a System Default as a bool. More...
 
bool GetBooleanDefault (String ASystemDefaultName)
 Gets the value of a System Default as a bool. More...
 
System.Char GetCharDefault (String ASystemDefaultName, System.Char ADefault)
 Gets the value of a System Default as a char. More...
 
System.Char GetCharDefault (String ASystemDefaultName)
 Gets the value of a System Default as a char. More...
 
double GetDoubleDefault (String ASystemDefaultName, double ADefault)
 Gets the value of a System Default as a double. More...
 
double GetDoubleDefault (String ASystemDefaultName)
 Gets the value of a System Default as a double. More...
 
System.Int16 GetInt16Default (String ASystemDefaultName, System.Int16 ADefault)
 Gets the value of a System Default as an Int16. More...
 
System.Int16 GetInt16Default (String ASystemDefaultName)
 Gets the value of a System Default as an Int16. More...
 
System.Int32 GetInt32Default (String ASystemDefaultName, System.Int32 ADefault)
 Gets the value of a System Default as an Int32. More...
 
System.Int32 GetInt32Default (String ASystemDefaultName)
 Gets the value of a System Default as an Int32. More...
 
System.Int64 GetInt64Default (String ASystemDefaultName, System.Int64 ADefault)
 Gets the value of a System Default as an Int64. More...
 
System.Int64 GetInt64Default (String ASystemDefaultName)
 Gets the value of a System Default as an Int64. More...
 
String GetStringDefault (String ASystemDefaultName, String ADefault)
 Gets the value of a System Default as a string. More...
 
String GetStringDefault (String ASystemDefaultName)
 Gets the value of a System Default as a string. More...
 
System.Int64 GetSiteKeyDefault ()
 Gets the SiteKey Sytem Default. More...
 
bool SetSystemDefault (String AKey, String AValue, TDataBase ADataBase=null)
 Sets the value of a System Default. If the System Default doesn't exist yet it will be created by that call. More...
 
bool SetSystemDefault (String AKey, String AValue, out bool AAdded, TDataBase ADataBase=null)
 Stores a System Default in the DB. If it was already there it gets updated, if it wasn't there it gets added. More...
 

Static Public Attributes

const String PARTNER_GIFTRECEIPTINGDEFAULTS = "GiftReceiptingDefaults"
 Find Screen Options More...
 

Detailed Description

Manager for the System Defaults of the OpenPetra Site. It can be accessed from the client through the Ict.Petra.Server.MSysMan.Common.WebConnectors TSystemDefaultsConnector.

The System Defaults are retrieved from the s_system_defaults table and are put into a Typed DataTable that has the structure of this table.

Constructor & Destructor Documentation

◆ TSystemDefaults()

Ict.Petra.Server.App.Core.TSystemDefaults.TSystemDefaults ( TDataBase  ADataBase = null)
inline

constructor

Member Function Documentation

◆ GetBooleanDefault() [1/2]

bool Ict.Petra.Server.App.Core.TSystemDefaults.GetBooleanDefault ( String  ASystemDefaultName)
inline

Gets the value of a System Default as a bool.

Parameters
ASystemDefaultNameThe System Default for which the value should be returned.
Returns
The value of the System Default as a bool, or true if the specified System Default was not found.

◆ GetBooleanDefault() [2/2]

bool Ict.Petra.Server.App.Core.TSystemDefaults.GetBooleanDefault ( String  ASystemDefaultName,
bool  ADefault 
)
inline

Gets the value of a System Default as a bool.

Parameters
ASystemDefaultNameThe System Default for which the value should be returned.
ADefaultThe value that should be returned if the System Default was not found.
Returns
The value of the System Default as a bool, or the value of ADefault if the specified System Default was not found.

◆ GetCharDefault() [1/2]

System.Char Ict.Petra.Server.App.Core.TSystemDefaults.GetCharDefault ( String  ASystemDefaultName)
inline

Gets the value of a System Default as a char.

Parameters
ASystemDefaultNameThe System Default for which the value should be returned.
Returns
The value of the System Default as a char, or the space character if the specified System Default was not found.

◆ GetCharDefault() [2/2]

System.Char Ict.Petra.Server.App.Core.TSystemDefaults.GetCharDefault ( String  ASystemDefaultName,
System.Char  ADefault 
)
inline

Gets the value of a System Default as a char.

Parameters
ASystemDefaultNameThe System Default for which the value should be returned.
ADefaultThe value that should be returned if the System Default was not found.
Returns
The value of the System Default as a char, or the value of ADefault if the specified System Default was not found.

◆ GetDoubleDefault() [1/2]

double Ict.Petra.Server.App.Core.TSystemDefaults.GetDoubleDefault ( String  ASystemDefaultName)
inline

Gets the value of a System Default as a double.

Parameters
ASystemDefaultNameThe System Default for which the value should be returned.
Returns
The value of the System Default as a double, or 0.0 if the specified System Default was not found.

◆ GetDoubleDefault() [2/2]

double Ict.Petra.Server.App.Core.TSystemDefaults.GetDoubleDefault ( String  ASystemDefaultName,
double  ADefault 
)
inline

Gets the value of a System Default as a double.

Parameters
ASystemDefaultNameThe System Default for which the value should be returned.
ADefaultThe value that should be returned if the System Default was not found.
Returns
The value of the System Default as a double, or the value of ADefault if the specified System Default was not found.

◆ GetInt16Default() [1/2]

System.Int16 Ict.Petra.Server.App.Core.TSystemDefaults.GetInt16Default ( String  ASystemDefaultName)
inline

Gets the value of a System Default as an Int16.

Parameters
ASystemDefaultNameThe System Default for which the value should be returned.
Returns
The value of the System Default as an Int16, or 0 if the specified System Default was not found.

◆ GetInt16Default() [2/2]

System.Int16 Ict.Petra.Server.App.Core.TSystemDefaults.GetInt16Default ( String  ASystemDefaultName,
System.Int16  ADefault 
)
inline

Gets the value of a System Default as an Int16.

Parameters
ASystemDefaultNameThe System Default for which the value should be returned.
ADefaultThe value that should be returned if the System Default was not found.
Returns
The value of the System Default as an Int16, or the value of ADefault if the specified System Default was not found.

◆ GetInt32Default() [1/2]

System.Int32 Ict.Petra.Server.App.Core.TSystemDefaults.GetInt32Default ( String  ASystemDefaultName)
inline

Gets the value of a System Default as an Int32.

Parameters
ASystemDefaultNameThe System Default for which the value should be returned.
Returns
The value of the System Default as an Int32, or 0 if the specified System Default was not found.

◆ GetInt32Default() [2/2]

System.Int32 Ict.Petra.Server.App.Core.TSystemDefaults.GetInt32Default ( String  ASystemDefaultName,
System.Int32  ADefault 
)
inline

Gets the value of a System Default as an Int32.

Parameters
ASystemDefaultNameThe System Default for which the value should be returned.
ADefaultThe value that should be returned if the System Default was not found.
Returns
The value of the System Default as an Int32, or the value of ADefault if the specified System Default was not found.

◆ GetInt64Default() [1/2]

System.Int64 Ict.Petra.Server.App.Core.TSystemDefaults.GetInt64Default ( String  ASystemDefaultName)
inline

Gets the value of a System Default as an Int64.

Parameters
ASystemDefaultNameThe System Default for which the value should be returned.

Do not inquire the 'SiteKey' System Default with this Method! Rather, always use the GetSiteKeyDefault Method!

Returns
The value of the System Default as an Int64, or 0 if the specified System Default was not found.

◆ GetInt64Default() [2/2]

System.Int64 Ict.Petra.Server.App.Core.TSystemDefaults.GetInt64Default ( String  ASystemDefaultName,
System.Int64  ADefault 
)
inline

Gets the value of a System Default as an Int64.

Parameters
ASystemDefaultNameThe System Default for which the value should be returned.
ADefaultThe value that should be returned if the System Default was not found.

Do not inquire the 'SiteKey' System Default with this Method! Rather, always use the GetSiteKeyDefault Method!

Returns
The value of the System Default as an Int64, or the value of ADefault if the specified System Default was not found.

◆ GetSiteKeyDefault()

System.Int64 Ict.Petra.Server.App.Core.TSystemDefaults.GetSiteKeyDefault ( )
inline

Gets the SiteKey Sytem Default.

Note: The SiteKey can get changed by a user with the necessary priviledges while being logged in to OpenPetra and this gets reflected when this Method gets called.

Returns
The SiteKey of the Site.

◆ GetStringDefault() [1/2]

String Ict.Petra.Server.App.Core.TSystemDefaults.GetStringDefault ( String  ASystemDefaultName)
inline

Gets the value of a System Default as a string.

Parameters
ASystemDefaultNameThe System Default for which the value should be returned.
Returns
The value of the System Default as a string, or string.Empty if the specified System Default was not found.

◆ GetStringDefault() [2/2]

String Ict.Petra.Server.App.Core.TSystemDefaults.GetStringDefault ( String  ASystemDefaultName,
String  ADefault 
)
inline

Gets the value of a System Default as a string.

Parameters
ASystemDefaultNameThe System Default for which the value should be returned.
ADefaultThe value that should be returned if the System Default was not found.
Returns
The value of the System Default as a string, or the value of ADefault if the specified System Default was not found.

◆ GetSystemDefault() [1/2]

String Ict.Petra.Server.App.Core.TSystemDefaults.GetSystemDefault ( String  ASystemDefaultName)
inline

Returns the value of the specified System Default.

The caller doesn't need to know whether the Cache is already populated - if this should be necessary, this function will make a request to populate the cache.

SystemDefault Names are not case sensitive.

Parameters
ASystemDefaultNameThe System Default for which the value should be returned.
Returns
The value of the System Default, or SharedConstants.SYSDEFAULT_NOT_FOUND if the specified System Default doesn't exist.

◆ GetSystemDefault() [2/2]

String Ict.Petra.Server.App.Core.TSystemDefaults.GetSystemDefault ( String  ASystemDefaultName,
String  ADefault 
)
inline

Returns the value of the specified System Default.

The caller doesn't need to know whether the Cache is already populated - if this should be necessary, this function will make a request to populate the cache.

Parameters
ASystemDefaultNameThe System Default for which the value should be returned.
ADefaultThe value that should be returned if the System Default was not found.

SystemDefault Names are not case sensitive.

Returns
The value of the System Default, or the value of ADefault if the specified System Default was not found.

◆ GetSystemDefaultsTable()

SSystemDefaultsTable Ict.Petra.Server.App.Core.TSystemDefaults.GetSystemDefaultsTable ( )
inline

Returns the System Defaults as a Typed DataTable.

The caller doesn't need to know whether the Cache is already populated - if this should be necessary, this function will make a request to populate the cache.

Returns
System Defaults as a Typed DataTable.

◆ IsSystemDefaultDefined()

bool Ict.Petra.Server.App.Core.TSystemDefaults.IsSystemDefaultDefined ( String  ASystemDefaultName)
inline

Call this Method to find out whether a System Default is defined, that is, if it exists in the System Defaults table.

SystemDefault Names are not case sensitive.

Parameters
ASystemDefaultNameThe System Default that should be checked.
Returns
True if the System Default is defined, false if it isn't.

◆ SetSystemDefault() [1/2]

bool Ict.Petra.Server.App.Core.TSystemDefaults.SetSystemDefault ( String  AKey,
String  AValue,
out bool  AAdded,
TDataBase  ADataBase = null 
)
inline

Stores a System Default in the DB. If it was already there it gets updated, if it wasn't there it gets added.

The change gets reflected in the System Defaults Cache the next time the System Defaults Cache gets accessed.

Parameters
AKeyName of the System Default.
AValueValue of the System Default.
AAddedTrue if the System Default got added, false if it already existed.
ADataBase

SystemDefault Names are not case sensitive.

◆ SetSystemDefault() [2/2]

bool Ict.Petra.Server.App.Core.TSystemDefaults.SetSystemDefault ( String  AKey,
String  AValue,
TDataBase  ADataBase = null 
)
inline

Sets the value of a System Default. If the System Default doesn't exist yet it will be created by that call.

Parameters
AKeyName of new or existing System Default.
AValueString Value.
ADataBase

Member Data Documentation

◆ PARTNER_GIFTRECEIPTINGDEFAULTS

const String Ict.Petra.Server.App.Core.TSystemDefaults.PARTNER_GIFTRECEIPTINGDEFAULTS = "GiftReceiptingDefaults"
static

Find Screen Options


The documentation for this class was generated from the following file: