Namespace: Consultingwerk.Util
Class 
SessionHelper Copy to Clipboard
Parent classes:
Inherits: Progress.Lang.Object

File:SessionHelper
Syntax:Static methods only, Protected constructor to disallow
instance creation
Author(s):Mike Fechner / Consultingwerk Ltd.
Created:Sun Aug 08 21:32:44 CEST 2010
/* External procedure definitions here are used in the InputIsRedirected method



Top Method Summary
Options Name Purpose
+ LOGICAL AllowsCompile () Returns if the current session allows compilation of ABL source code
+ CHARACTER CurrentDirectory () Returns the current working directory
+ CHARACTER CurrentMethodName () Returns the name of the current method of the caller
+ CHARACTER ExecutablePath () Returns the name of the current Progress Executable
+ CHARACTER FullVersionString () Returns the Progress Version (incl. Service Pack Level)
+ Consultingwerk.DateFormat GetDateFormat () Returns the current session date format
+ Consultingwerk.InternationalizationSettings GetInternationalizationSettings () Returns the current InternationalizationSettings
+ Consultingwerk.NumericFormat GetNumericFormat () Returns the current session numeric format
+ CHARACTER GetPatchLevel () Reads the Version file to see if there is a patch level
+ CHARACTER GetUserId () Returns the current windows user d
+ CHARACTER GetUserName () Returns the current windows user name
+ LOGICAL InputIsRedirected () Indicates whether the session is receiving redirected input (eg from < )
+ INTEGER ProcessBitness () Returns the "bitness" of the current process (32 / 64 bit)
+ DECIMAL ProVersionNumeric () Returns a numeric representation of the progress runtime version
+ SetDateFormat (DateFormat) Sets the Sessions date format
+ SetDefaultDateFormat () Sets the ABL default date format (mdy-1950)
+ SetDefaultInternationalizationSettings () Resets the InternationalizationSettings to the American Defaults
+ SetDefaultNumericFormat () Sets the ABL default numeric format (AMERICAN)
+ SetInternationalizationSettings (InternationalizationSettings) Sets the InternationalizationSettings
+ SetNumericFormat (NumericFormat) Sets the Sessions numeric format
+ CHARACTER StartupParameters () Returns the startup parameters of the current Progress session

Top Constructor Summary
Options Name Purpose
# SessionHelper () Protected default constructor.

Top Property Summary
Options Name Purpose
+ CHARACTER AssembliesDirectory
+ CHARACTER AssembliesFullPath
+ CHARACTER DLC
+ CHARACTER PROMSGS


Method Detail
Top

PUBLIC LOGICAL AllowsCompile ()

Purpose: Returns if the current session allows compilation of ABL source code
Notes: Compiles a non existing .p file (random file name) and tests the
error message.

Returns LOGICAL
Logical value indicating if the current session allows compilation
Top

PUBLIC CHARACTER CurrentDirectory ()

Purpose: Returns the current working directory
Notes:

Returns CHARACTER
The current working directory
Top

PUBLIC CHARACTER CurrentMethodName ()

Purpose: Returns the name of the current method of the caller
Notes: Returns the first entry by space of PROGRAM-NAME(2)

Returns CHARACTER
The name of the current method of the caller
Top

PUBLIC CHARACTER ExecutablePath ()

Purpose: Returns the name of the current Progress Executable
Notes: Uses System.Environment:CommandLine

Returns CHARACTER
The path to the current executable
Top

PUBLIC CHARACTER FullVersionString ()

Purpose: Returns the Progress Version (incl. Service Pack Level)
Notes: From src/adecomm/_about.p

Returns CHARACTER
The full progress version string
Top

PUBLIC Consultingwerk.DateFormat GetDateFormat ()

Purpose: Returns the current session date format
Notes:

Returns Consultingwerk.DateFormat
The Consultingwerk.DateFormat with the current session Settings
Top

PUBLIC Consultingwerk.InternationalizationSettings GetInternationalizationSettings ()

Purpose: Returns the current InternationalizationSettings
Notes:

Returns Consultingwerk.InternationalizationSettings
The InternationalizationSettings instance describing the Date- and NumericFormat
Top

PUBLIC Consultingwerk.NumericFormat GetNumericFormat ()

Purpose: Returns the current session numeric format
Notes:

Returns Consultingwerk.NumericFormat
The Consultingwerk.NumericFormat with the current session Settings
Top

PUBLIC CHARACTER GetPatchLevel ()

Purpose: Reads the Version file to see if there is a patch level
Notes: From src/adecomm/_about.p

Returns CHARACTER
The current patch level
Top

PUBLIC CHARACTER GetUserId ()

Purpose: Returns the current windows user d
Notes:

Returns CHARACTER
The ID of the current windows user
Top

PUBLIC CHARACTER GetUserName ()

Purpose: Returns the current windows user name
Notes:

Returns CHARACTER
The Display name of the current windows user
Top

PUBLIC LOGICAL InputIsRedirected ()

Purpose: Indicates whether the session is receiving redirected input (eg from < )
Notes: If the current SESSION:CLIENT-TYPE is not webclient or a 4GL runtime, then
the result is always FALSE.

Returns LOGICAL
If TRUE, then STDIN is redirected to a WebClient or 4GLClient AVM process; FALSE otherwise.
Top

PUBLIC INTEGER ProcessBitness ()

Purpose: Returns the "bitness" of the current process (32 / 64 bit)
Notes:

Returns INTEGER
32 or 64 depending on the current Process process
Top

PUBLIC DECIMAL ProVersionNumeric ()

Purpose: Returns a numeric representation of the progress runtime version
Notes: The return value is built using the major version before the comma
and the minor version behind the comma

Returns DECIMAL
The numeric representation of the progress runtime version, e.g. 10,2 or 11,1
Top

PUBLIC SetDateFormat (DateFormat)

Purpose: Sets the Sessions date format
Notes:

Parameters:
poDateFormat Consultingwerk.DateFormat
The DateFormat object with the settings for the current session
Top

PUBLIC SetDefaultDateFormat ()

Purpose: Sets the ABL default date format (mdy-1950)
Notes:

Top

PUBLIC SetDefaultInternationalizationSettings ()

Purpose: Resets the InternationalizationSettings to the American Defaults
Notes:

Top

PUBLIC SetDefaultNumericFormat ()

Purpose: Sets the ABL default numeric format (AMERICAN)
Notes:

Top

PUBLIC SetInternationalizationSettings (InternationalizationSettings)

Purpose: Sets the InternationalizationSettings
Notes:

Parameters:
poSettings Consultingwerk.InternationalizationSettings
The InternationalizationSettings instance describing the Date- and NumericFormat
Top

PUBLIC SetNumericFormat (NumericFormat)

Purpose: Sets the Sessions numeric format
Notes:

Parameters:
poNumericFormat Consultingwerk.NumericFormat
The NumericFormat object with the settings for the current session
Top

PUBLIC CHARACTER StartupParameters ()

Purpose: Returns the startup parameters of the current Progress session
Notes: Uses System.Environment:CommandLine

Returns CHARACTER
The list of session startup parameters


Constructor Detail
Top

PROTECTED SessionHelper ()

Purpose: Protected default constructor.
Notes: There's no need to create instances of the helper classes



Property Detail
Top

PUBLIC CHARACTER AssembliesDirectory


Returns CHARACTER
Top

PUBLIC CHARACTER AssembliesFullPath


Returns CHARACTER
Top

PUBLIC CHARACTER DLC


Returns CHARACTER
Top

PUBLIC CHARACTER PROMSGS


Returns CHARACTER


©2006-2023 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       15.04.2024 06:16:59