Geomajas Community Documentation
All the layer access services provided by the Geomajas back-end
are implemented by invoking a pipeline. Using
PipelineService
, blocks of functionality become reusable
and highly configurable with limited coupling between the
pipeline step
s.
Some of the services which are implemented as
PipelineService
include:
RasterLayerService
: methods for accessing a
raster layer, especially getting tiles for a raster
layer.
VectorLayerService
: methods for accessing a
vector layer, for example for getting the features or obtaining
vector tiles.
Pipelines can nest. One of the steps in the default "vectorLayer.saveOrUpdate" pipeline will loop over all features to be updated and invoke the "vectorLayer.saveOrUpdateOne" pipeline for each.
Pipelines are server side only, client access is typically made available by invoking a command.
Pipelines are typically invoked for a specific layer. In that case, the default pipeline can be replaced by a layer specific pipeline. This way, layer specific configurations (like optimizations or specific rendering) can be applied. When a layer does not overwrite a pipeline, the default is used. Pipelines are always selected on pipeline name. You can create the layer specific pipeline by setting the layer id for which it applied. When several pipelines have the same steps, you can define the pipeline once, and refer to it later by using a pipeline delegate instead of a list of steps.
A pipeline consists of a number of steps. A pipeline is
configured using a PipelineInfo
object which details the
pipeline id and steps. When a pipeline is started (using the
PipelineService
) it executes the pipeline steps until the
pipeline is finished (a status which can be set by one of the steps),
or until no more steps are available in the pipeline. Each step gets
two parameters.
a context which contains a map of (typed) objects which can be used to pass data between the steps (including initial parameters for the pipeline).
the result object which can be filled or transformed during the pipeline's execution.
Pipelines can be extended. When a pipeline is defined, it is possible to include hooks for extensions. These are special no-op steps. When a pipeline is defined, your can either define all the pipeline steps, or refer to a delegate pipeline combined with a map of extension steps. The pipeline will then be based on the delegate pipeline with the extensions steps added after the hooks with matching names.