Namespace: Consultingwerk.Framework
Class 
ConfigurationProvider Copy to Clipboard
Parent classes:
Inherits: Progress.Lang.Object
Implements: Consultingwerk.Framework.IConfigurationProvider

File:ConfigurationProvider
Purpose:Configuration provider based on a JSON file or document
Author(s):Mike Fechner / Consultingwerk Ltd.
Created:Sun Jan 20 16:22:28 CET 2013
Notes:Supported from OpenEdge 11.x only
Contents of the JSON file/document can be overridden using
the -param Startup parameter for the OpenEdge session.
The -param parameter is expected to contain value in the form of
-param @setting1=value1,@setting2=value2
The -param parameter may contain other settings as well. Settings not
starting with the @ sign will be ignored by the ConfigurationProvider
class. So a startup settings of -param @authenticationDb=sports2000
will override the setting from the JSON file



Top Method Summary
Options Name Purpose
+ CHARACTER GetNames () Returns a Character Array with all the configuration data names
+ CHARACTER GetValue (character) Returns a configuration setting
+ CHARACTER GetValue (character, character) Returns a configuration setting or the default value when the setting is not available
# Initialize (JsonObject) Initializes the Configuration Provider from a JsonObject
# OverrideFromStartupParameter (ListNameValuePair, character) Overrides the settings from the -param Parameter

Top Constructor Summary
Options Name Purpose
+ ConfigurationProvider (character) Constructor for the ConfigurationProvider class
+ ConfigurationProvider (JsonObject) Constructor for the ConfigurationProvider class


Method Detail
Top

PUBLIC CHARACTER GetNames ()

Purpose: Returns a Character Array with all the configuration data names
Notes:

Returns CHARACTER
The ABL Character Array
Top

PUBLIC CHARACTER GetValue (character)

Purpose: Returns a configuration setting
Notes:

Parameters:
pcName CHARACTER
The configuration property name
Returns CHARACTER
The value for the configuration property or ? when not set
Top

PUBLIC CHARACTER GetValue (character, character)

Purpose: Returns a configuration setting or the default value when the setting
is not available
Notes:

Parameters:
pcName CHARACTER
The configuration property name
pcDefault CHARACTER
The default value to return when the setting is not availalbe
Returns CHARACTER
The value for the configuration property
Top

PROTECTED Initialize (JsonObject)

Purpose: Initializes the Configuration Provider from a JsonObject
Notes:

Parameters:
poConfiguration Progress.Json.ObjectModel.JsonObject
The JSON Object with configuration values
Top

PROTECTED OverrideFromStartupParameter (ListNameValuePair, character)

Purpose: Overrides the settings from the -param Parameter
Notes: The -param parameter is expected to contain value in the form of
-param @setting1=value1,@setting2=value2
The -param parameter may contain other settings as well. Settings not
starting with the @ sign will be ignored by the ConfigurationProvider
class

Parameters:
poSettings Consultingwerk.ListNameValuePair
The ListNameValuePair with the current settings
pcParam CHARACTER
The SESSION:PARAMETER (-param) value


Constructor Detail
Top

PUBLIC ConfigurationProvider (character)

Purpose: Constructor for the ConfigurationProvider class
Notes:

Parameters:
pcFileName CHARACTER
The file name to read configuration data from
Top

PUBLIC ConfigurationProvider (JsonObject)

Purpose: Constructor for the ConfigurationProvider class
Notes:

Parameters:
poConfiguration Progress.Json.ObjectModel.JsonObject
The JSON Object with configuration values


©2006-2019 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       08.08.2019 23:26:35