Libraries.System.Properties Documentation

The properties class is designed to gather information about the system that the user is running. Currently, it supports a general property action, GetProperty, which can gather any known system property. It also currently contains helper methods for determining which operating system the user is on and for determining which web page was requested if this is a web project. System properties are equivalent to what are often termed "environment variables." The properties class does query the operating system for information, but does not contain any state itself.

Example Code

use Libraries.System.Properties

Properties properties
text address = properties:GetRequestedWebPage()
output addre

Inherits from: Libraries.Language.Object

Summary

Variable Summary Table

VariablesDescription
text requestedWebPageThis is a public constant for the web address environment variable, if one is se
text operatingSystemThis is a public constant for the operating system property nam
text versionThis asks the system for the operating system versio

Actions Summary Table

ActionsDescription
Compare(Libraries.Language.Object object)This action compares two object hash codes and returns an integer.
Equals(Libraries.Language.Object object)This action determines if two objects are equal based on their hash code values.
GetEnvironmentVariable(text key)This action returns an environment variable from the system.
GetHashCode()This action gets the hash code for an object.
GetOperatingSystemName()This property returns the name of the operating system currently running the program.
GetOperatingSystemVersion()This property returns the name of the operating system version currently running the program.
GetProperty(text key)This action returns a property from the system.
GetRequestedWebPage()This helper method returns the requested web address if the project was a web project.
GetRunLocation()This action returns a the location of the running executable on the system.
IsMac()This property returns whether or not the program is running on Mac.
IsWindows()This property returns whether or not the program is running on Windows.
SetProperty(text key, text value)This action sets a property on the system.

Actions Documentation

Compare(Libraries.Language.Object object)

This action compares two object hash codes and returns an integer. The result is larger if this hash code is larger than the object passed as a parameter, smaller, or equal. In this case, -1 means smaller, 0 means equal, and 1 means larger. This action was changed in Quorum 7 to return an integer, instead of a CompareResult object, because the previous implementation was causing efficiency issues.

Example Code

Object o
        Object t
        integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smalle

Parameters

Return

integer: The Compare result, Smaller, Equal, or Larger.

Equals(Libraries.Language.Object object)

This action determines if two objects are equal based on their hash code values.

Example Code

use Libraries.Language.Object
        use Libraries.Language.Types.Text
        Object o
        Text t
        boolean result = o:Equals(

Parameters

Return

boolean: True if the hash codes are equal and false if they are not equal.

GetEnvironmentVariable(text key)

This action returns an environment variable from the system.

Example Code

use Libraries.System.Properties

        Properties properties
        text value = properties:GetEnvironmentVariable("quorum.url")
        output val

Parameters

Return

text:

GetHashCode()

This action gets the hash code for an object.

Example Code

Object o
        integer hash = o:GetHashCode

Return

integer: The integer hash code of the object.

GetOperatingSystemName()

This property returns the name of the operating system currently running the program.

Example Code

use Libraries.System.Properties

    Properties properties
    text value = properties:GetOperatingSystemName()
    output val

Return

text:

GetOperatingSystemVersion()

This property returns the name of the operating system version currently running the program.

Example Code

use Libraries.System.Properties

    Properties properties
    text value = properties:GetOperatingSystemVersion()
    output val

Return

text:

GetProperty(text key)

This action returns a property from the system.

Example Code

use Libraries.System.Properties

        Properties properties
        text value = properties:GetProperty("os.name")
        output val

Parameters

Return

text:

GetRequestedWebPage()

This helper method returns the requested web address if the project was a web project.

Example Code

use Libraries.System.Properties

    Properties properties
    text address = properties:GetRequestedWebPage()
    output addre

Return

text:

GetRunLocation()

This action returns a the location of the running executable on the system.

Example Code

use Libraries.System.Properties
        use Libraries.System.File

        Properties properties
        File file = properties:GetRunPath()
        output file:GetAbsolutePath

Return

Libraries.System.File:

IsMac()

This property returns whether or not the program is running on Mac.

Example Code

use Libraries.System.Properties

    Properties properties
    boolean value = properties:IsMac()
    output val

Return

boolean:

IsWindows()

This property returns whether or not the program is running on Windows.

Example Code

use Libraries.System.Properties

    Properties properties
    boolean value = properties:IsWindows()
    output val

Return

boolean:

SetProperty(text key, text value)

This action sets a property on the system.

Example Code

use Libraries.System.Properties

        Properties properties
        properties:SetProperty("my.custom.property", "value

Parameters