Class RuntimePropertyRetriever

In the base configuration, Guidewire provides a RuntimePropertyRetriever class with a number of public getter methods to retrieve the different types of runtime properties, for example:
  • getBooleanProperty(propertyName)
  • getIntegerProperty(propertyName)
  • getStringProperty(propertyName)
The RuntimePropertyRetriever class contains a constructor method that takes a single Group parameter and returns an instance of the RuntimePropertyRetriever class, for example:
  • runtimePropertyRetriever = new RuntimePropertyRetriever(RuntimePropertyGroup.TC_CONFIGURATION)

Notice the use of a typecode from the RuntimePropertyGroup typelist to define the Group argument. You can only access a runtime property from the specified Group passed to the constructor.

Example

The following code is a simple example of how to access a String runtime property in Gosu application code:
uses gw.api.properties.RuntimePropertyRetriever
...

var runtimePropertyRetriever = new RuntimePropertyRetriever(RuntimePropertyGroup.TC_CONFIGURATION)
var myImportantProperty = runtimePropertyRetriever.getStringProperty("myImportantProperty")
In this code, notice the following:
  • The code uses the myImportantProperty runtime property already created and defined through the Runtime Properties screen.
  • The code sets the Group argument using the RuntimePropertyGroup typelist.