Package com.luciad.wms.server
Class ALcdWMSCapabilitiesProvider
java.lang.Object
com.luciad.wms.server.ALcdWMSCapabilitiesProvider
- All Implemented Interfaces:
ILcdWMSCapabilitiesProvider
public abstract class ALcdWMSCapabilitiesProvider
extends Object
implements ILcdWMSCapabilitiesProvider
Abstract capabilities provider.
This capabilities provider implements some methods in function of the full capabilities object.
- Since:
- 2017.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetLayers
(List<String> aLayerNames, ILcdRequest aRequest) Returns the corresponding WMS layers for the requested layer names.getServiceMetaData
(ILcdRequest aRequest) Returns the WMS service metadata part of the WMS capabilities.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.luciad.wms.server.ILcdWMSCapabilitiesProvider
getCapabilities
-
Constructor Details
-
ALcdWMSCapabilitiesProvider
public ALcdWMSCapabilitiesProvider()
-
-
Method Details
-
getLayers
public List<ALcdWMSLayer> getLayers(List<String> aLayerNames, ILcdRequest aRequest) throws TLcdWMSServiceException Description copied from interface:ILcdWMSCapabilitiesProvider
Returns the corresponding WMS layers for the requested layer names. The returned WMS layers should be constructed such that calling the methodALcdWMSLayer.getParentWMSLayer()
returns a valid result (may always beNULL
. 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
TLcdWMSServiceException
with the exception codeLAYER_NOT_DEFINED
. Include the undefined layer name as theentity name of the exception to allow returning a proper message to the client application.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
getUserPrincipal
method. Use the following exception codes for handling access control.LAYER_NOT_AUTHORIZED
: to indicate the user has requested a layer he does not have access to.AUTHENTICATION_REQUIRED
: to indicate the user has request a layer for which authentication is required but no authentication has been provided yet.
- Specified by:
getLayers
in interfaceILcdWMSCapabilitiesProvider
- Parameters:
aLayerNames
- the names of the layers.aRequest
- the request.- Returns:
- the corresponding WMS layers.
- Throws:
TLcdWMSServiceException
- if there is an exception in retrieving the layers or if incorrect layers are requested.- See Also:
-
getServiceMetaData
public ALcdWMSServiceMetaData getServiceMetaData(ILcdRequest aRequest) throws TLcdWMSServiceException Description copied from interface:ILcdWMSCapabilitiesProvider
Returns the WMS service metadata part of the WMS capabilities.- Specified by:
getServiceMetaData
in interfaceILcdWMSCapabilitiesProvider
- Parameters:
aRequest
- the request being handled.- Returns:
- the WMS service metadata.
- Throws:
TLcdWMSServiceException
- if there is an issue to create the WMS service meta data.
-