Geomajas Community Documentation
The configuration API has been split up in a back-end part and a client (or faces) part. The following general rules have been kept in mind:
Back-end configuration should be restricted to those properties that are functionally needed on the back-end. We essentially regard the back-end as a container of layers or, in WFS terms, feature types. Higher level concepts like map or application should be dealt with at the client (or faces) level.
Client configuration should not impact the back-end state. In the near future, this will make it possible to reconfigure clients without restarting the server.
The configuration API has profoundly changed. Where
possible, the back-end classes have retained their original (before
the split) names, after pruning them to remove all client related
information. The client classes have been mostly created from scratch
and have been named ClientXxxInfo.java
for consistency.
They have been located in a separate package, called
org.geomajas.configuration.client.
The following table
gives a top-down overview of the back-end configuration classes (new
classes and properties have been marked in
bold
):
Name | Property | Action or description |
---|---|---|
ApplicationInfo | * | removed |
LayerInfo | label | moved to ClientLayerInfo |
visible | moved to ClientLayerInfo | |
viewScaleMin, viewScaleMax | moved to ClientLayerInfo | |
VectorLayerInfo | labelAttribute | moved to LabelStyleInfo |
snappingRules | moved to ClientVectorLayerInfo | |
styleDefinitions | replaced by namedStyleInfos | |
creatable, updatable, deletable | moved to ClientVectorLayerInfo (automatically assigned) | |
namedStyleInfos | list of NamedStyleInfo. Lists the predefined styles available for this layer. Multiple styles are possible so clients can choose a style | |
RasterLayerInfo | style | moved to ClientRasterLayerInfo |
NamedStyleInfo | featureStyles | list of FeatureStyleInfo. Ordered list of style definitions with applicable filters. Together with the label style they define a single named layer style. |
labelStyleInfo | label attribute name and style | |
FeatureStyleInfo | * | replaces StyleInfo same properties except for index |
index | replaces id (automatically assigned) | |
LabelStyleInfo | * | replaces LabelAttribute, same properties |
ValidatorInfo and XxxConstraintInfo | * | moved to package
org.geomajas.configuration.validation
|
Table A.3. Back end configuration changes
The most important changes are:
The removal of client-side properties like visible, label, viewScaleMin, viewScaleMax, style and snapping rules. These are moved to the client configuration (see hereafter).
The replacement of the single style definition list by a set of named styles. These are styles that are preconfigured in the back end.
Inclusion of the label attribute name and style as part of the named style. This is more logical and in line with the SLD (Styled Layer Descriptor) specification.
The client or face classes are largely new and have been
relocated to the org.geomajas.configuration.client
package. The following table gives a top-down overview of the back-end
configuration classes (new classes and properties have been marked in
bold
):
Name | Property | Action or description |
---|---|---|
ClientApplicationInfo | name | removed |
ClientMapInfo | maxBounds | replaces MapInfo, optional maximum extent of the map, if present it will be used instead of the union of the layers' maximum extent |
ClientLayerInfo | label | moved from LayerInfo |
visible | moved from LayerInfo | |
viewScaleMin, viewScaleMax | moved from LayerInfo | |
layerInfo | reference to back-end LayerInfo | |
maxExtent | transformed extent from back-end | |
ClientVectorLayerInfo | snappingRules | moved from VectorLayerInfo |
namedStyleInfo | The style to apply on the layer. Should be a reference to one of the back-end layer's predefined styles (see VectorLayerInfo). | |
creatable, updatable, deletable | moved from VectorLayerInfo | |
featureInfo | optional replacement of the back-end layer's FeatureInfo. If present, it is used instead. | |
ClientRasterLayerInfo | style | moved from ClientRasterLayerInfo |
ClientLayerTreeInfo | * | rename of LayerTreeInfo, same properties |
ClientLayerTreeNodeInfo | * | rename of LayerTreeNodeInfo |
layers | list of ClientLayerInfo objects, replaces previous list of layer ids | |
expanded | changed from string to boolean | |
ClientToolbarInfo | * | rename of ToolbarInfo |
ClientToolInfo | * | rename of ToolInfo |
Table A.4. Client configuration
Apart from these changes in content, some general technical improvements have been made as well:
The Spring bean name (or id) is used to set the id property
of the class if there is one. This makes it unnecessary to define
the id separately. The way this is done is by using a Spring
BeanPostProcessor
. (see
org.geomajas.internal.configuration.ConfigurationBeanPostProcessor
)
Some calculations that were previously done in the
GetConfigurationCommand
are now done in the
ConfigurationBeanPostProcessor.
Cloning of the client configuration classes can be done with general deep cloning techniques like serialization, bypassing the need for custom cloneable implementations.
As usual, example configurations can be found in the application projects.