public interface ILcdWMSCapabilitiesProvider
Provides the WMS capabilities, or parts of it. The capabilities describe what this server has to offer, which layers, styles etc. This is a core extension point when implementing your own server. Alternatively, you can use the Fusion Platform, where the capabilities are configured through the Studio web application.
As the capabilities are retrieved for every request, it for example allows to easily add or remove layers without
having to restart the server. Furthermore, the request that is being handled is provided as a parameter, which
allows for tailor-made capabilities based on that information. It could for example be used to implement access
control: grant certain users access to more layers than others. Access control is described in some more detail in
As this interface is called for every request, the implementation must be fast and efficient. It could for example apply caching, to avoid any work if no changes to the capabilities are needed. The simplest implementation would ignore the provided request parameter and always provide the same capabilities object.
getCapabilities is used for the
The other methods are used for the other WMS requests. They allow for retrieving only a sub-set of the information
that is needed for validation and processing of the WMS request. A default implementation of these methods,
in function of the full capabilities, is available within
Implement them directly when you can obtain the sub-set of the needed information in a more efficient way than
using the full capabilities object.
|Modifier and Type||Method and Description|
Returns the corresponding WMS layers for the requested layer names.
Returns the WMS service metadata part of the WMS capabilities.
ALcdWMSCapabilities getCapabilities(ILcdRequest aRequest) throws TLcdWMSServiceException
ALcdWMSCapabilitiesobject for a given request. This method is called within the context of a
GetCapabilitiesrequest performed by a client application or user.
ILcdRequest can be used to determine whether the request is done by an authenticated user.
This allows to return a capabilities response that is tailored to the authorization the user has.
Main use is to filter out layers for which the user has not been granted permissions.
aRequest- the user request.
TLcdWMSServiceException- if there is an issue to create the capabilities.
java.util.List<ALcdWMSLayer> getLayers(java.util.List<java.lang.String> aLayerNames, ILcdRequest aRequest) throws TLcdWMSServiceException
ALcdWMSLayer.getParentWMSLayer()returns a valid result (may always be
NULL. The parent layer may be needed to validate whether named styles are applicable for a layer. They may have been inherited from the parent.
If there is no corresponding WMS layer the method should throw a
with the exception code
Include the undefined layer name as the
This method allows to differentiate access to layers based on the user's authorization information.
The user's authorization information can be extracted from the request using the
Use the following exception codes for handling access control.
aLayerNames- the names of the layers.
aRequest- the request.
TLcdWMSServiceException- if there is an exception in retrieving the layers or if incorrect layers are requested.
ALcdWMSServiceMetaData getServiceMetaData(ILcdRequest aRequest) throws TLcdWMSServiceException
aRequest- the request being handled.
TLcdWMSServiceException- if there is an issue to create the WMS service meta data.