use of org.polymap.core.data.wms.WmsRenderProcessor in project polymap4-core by Polymap4.
the class P4ImageStoreInfo method canHandle.
/**
* Returns a newly created {@link P4DataStoreInfo}, or null if the layer is not
* connected to a {@link FeatureStore}.
*
* @throws Exception
*/
public static P4ImageStoreInfo canHandle(Catalog catalog, ILayer layer) throws Exception {
GeoServerServlet server = GeoServerServlet.instance.get();
Optional<Pipeline> pipeline = server.getOrCreatePipeline(layer, ImageProducer.class);
if (pipeline.isPresent()) {
if (!(pipeline.get().getLast().processor() instanceof WmsRenderProcessor)) {
return null;
}
return new P4ImageStoreInfo(catalog, layer, pipeline.get());
} else {
return null;
}
}
Aggregations