DPML
DPML Metro Context Datatype
HomeUtilitiesStationMetroDepotTransit
Context
Description

Declaration of the initial context model state together including context entry key/value bindings. A context directive typically contains a series of <entry> directives where each directive asserts a default inital value for a context entry key. Any required context entry declared by a component must be associated with a context entry directive. Failure to provide context entry directives for all required context keys will result in a deployment failure.

Context Nested Elements
entry The entry element may contain 0..n nested <entry> directives. A entry directive allows the creation by (value or reference) of a value associated with a context entry key.
Examples
General Example

The following example demonstrates a variety of context entry directives including the usage of symbolic values, static field references, direct value creation, composite value creation, and service wiring.

<context>
  <entry key="name" value="${user.name}"/>
  <entry key="printer" lookup="org.acme.Printer"/>
  <entry key="background" method="RED"/>
  <entry key="foreground">
    <param class="float" value="100"/>
    <param class="float" value="200"/>
    <param class="float" value="0"/>
  </entry>
  <entry key="widget" class="org.acme.DefaultWidget">
    <param class="org.acme.DefaultGizmo">
      <param class="float" value="0"/>
      <param class="int" value="1024"/>
    </param>
  </entry>
</context>
Technical Notes

The context descriptor class provides support for the declaration of an alternative context class hewever this feature is not currently supporting within the runtime.