Business Objects
Quark Platform Documentation
Version 1.7.0_0
Business Objects

org.openquark.cal.runtime
Class ExecutionContextProperties

java.lang.Object
  extended by org.openquark.cal.runtime.ExecutionContextProperties

public final class ExecutionContextProperties
extends Object

This class encapsulates an immutable map of key-value pairs which are exposed in CAL as system properties. Only strings can be used as keys.

There are a number of keys whose values are constrained to be of a particular type, e.g. the value for the "cal.locale" property must be of type Locale. For these special keys, dedicated methods are available for accessing their values. These properties are known as system properties.

For other keys, their corresponding values can be objects of any type. It is up to the client code to coordinate the setting of the property on the Java side with the retrieval on the CAL side.

Note that instances of this class are immutable. In fact, the only way to build an instance is through the ExecutionContextProperties.Builder class, which contains methods for adding key-value pairs, and for finally building an instance of this class.

Author:
Joseph Wong

Nested Class Summary
static class ExecutionContextProperties.Builder
          An instance of this class can be used to gather up key-value pairs to turn into a ExecutionContextProperties instance.
 
Field Summary
static String SYS_PROP_KEY_LOCALE
          The system property key for the current locale associated with the execution context.
static String SYS_PROP_KEY_TIMEZONE
          The system property key for the current time zone associated with the execution context.
 
Method Summary
 Locale getLocale()
           
 Object getProperty(String key)
          Returns the value of the specified property.
 List<String> getPropertyKeys()
          Returns the keys of all the defined properties.
 TimeZone getTimeZone()
           
 boolean hasProperty(String key)
          Returns whether the specified property is defined.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SYS_PROP_KEY_LOCALE

public static final String SYS_PROP_KEY_LOCALE
The system property key for the current locale associated with the execution context.


SYS_PROP_KEY_TIMEZONE

public static final String SYS_PROP_KEY_TIMEZONE
The system property key for the current time zone associated with the execution context.

Method Detail

hasProperty

public boolean hasProperty(String key)
Returns whether the specified property is defined.

Parameters:
key - the key for the property.
Returns:
true if the property is defined.

getProperty

public Object getProperty(String key)
Returns the value of the specified property.

Parameters:
key - the key for the property.
Returns:
the value of the property, or null if there is no such property.

getPropertyKeys

public List<String> getPropertyKeys()
Returns the keys of all the defined properties.

Returns:
a List of the keys of all the defined properties.

getLocale

public Locale getLocale()
Returns:
the value of the system property for the current locale associated with the execution context.

getTimeZone

public TimeZone getTimeZone()
Returns:
the value of the system property for the current time zone associated with the execution context.

Business Objects
Quark Platform Documentation
Version 1.7.0_0
Business Objects

Copyright © 2007 Business Objects. All rights reserved.