Package org.mapfish.print.map
Interface MapLayerFactoryPlugin<PARAM>
-
- Type Parameters:
PARAM
- the type of object that will be populated from the JSON and passed to the factory to create the layer.
- All Known Implementing Classes:
AbstractFeatureSourceLayerPlugin
,FeatureLayer.Plugin
,GeoJsonLayer.Plugin
,GeotiffLayer.Plugin
,GmlLayer.Plugin
,GridLayerPlugin
,ImageLayer.ImageLayerPlugin
,OsmLayerParserPlugin
,TiledWmsLayerParserPlugin
,WmsLayerFactoryPlugin
,WmtsLayerParserPlugin
public interface MapLayerFactoryPlugin<PARAM>
Parses layer request data and creates a MapLayer from it.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PARAM
createParameter()
Create an instance of a param object.java.util.Set<java.lang.String>
getTypeNames()
Return a set of all the values the json 'type' property should have for this plugin to apply typenames MUST be lowercase.MapLayer
parse(Template template, PARAM layerData)
Inspect the json data and return Optional<MapLayer> or Optional.absent().
-
-
-
Method Detail
-
getTypeNames
java.util.Set<java.lang.String> getTypeNames()
Return a set of all the values the json 'type' property should have for this plugin to apply typenames MUST be lowercase.
-
createParameter
PARAM createParameter()
Create an instance of a param object. Each instance must be new and unique. Instances must NOT be shared.The object will be populated from the json. Each public field will be populated by looking up the value in the json.
The same mechanism used for reading from the JSON into the param object is also used for parsing the JSON into
Attribute
value objects. SeeReflectiveAttribute.createValue(org.mapfish.print.config.Template)
()} for details on how the parsing mechanism works.
-
parse
@Nonnull MapLayer parse(@Nonnull Template template, @Nonnull PARAM layerData) throws java.io.IOException
Inspect the json data and return Optional<MapLayer> or Optional.absent().- Parameters:
template
- the configuration related to the current request.layerData
- an object populated from the json for the layer- Throws:
java.io.IOException
-
-