Contexts, data elements, and typed data

A context groups data in a structure. Contexts are organized in a tree hierarchy and an application can define the context hierarchy statically but manipulate it dynamically at runtime. The contexts hierarchy groups data according to functional and business needs. For example, a context can group user-specific data, and a child of this context can hold operation-specific data. Contexts use a chain of responsibility pattern, so that if the toolkit requests some data element or service but does not find it in one context, it then searches in the parent of that context, and so on until it finds the data element or reaches the root context.

Data elements hold the values for the data or hold other data elements to form a hierarchy. Each data element is accessible by its name so that other components can retrieve or update the data. Data elements may be type-aware, which means that they can provide information about the type of the business object they represent. When the business object (for example, a Money object of type Money or a Customer object of type Person) is realized in Java(TM) code, the toolkit associates converters and validators with the object, handles the object cloning process, and holds any other business information required for the specific business object.