com.esri.adf.web.wms.data
Class WMSOverviewFunctionality

java.lang.Object
  extended by com.esri.adf.web.wms.data.WMSOverviewFunctionality
All Implemented Interfaces:
GISFunctionality, OverviewFunctionality, Serializable

public class WMSOverviewFunctionality
extends Object
implements OverviewFunctionality, Serializable

Represents the overview functionality implementation for the WMS Resource.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.esri.adf.web.data.OverviewFunctionality
FUNCTIONALITY_NAME
 
Constructor Summary
WMSOverviewFunctionality()
           
 
Method Summary
 void destroyFunctionality()
           The cleanup chores (such as releasing held resources) for the functionality must be performed in this method.
 InputStream exportImage()
           Exports this overview map for the extent indicated by the WebOverview.
 WMSMapResource getResource()
           Returns the GISResource associated with this functionality.
 List<String> getVisibleLayers()
          Gets the list of layers that will be visible in the overview map.
 com.esri.wms.client.Map getWmsMap()
           
 void initFunctionality(GISResource resource)
          Initializes an instance of the overview functionality for this resource.
 boolean isDisabled()
           Returns true if this overview functionality is disabled.
 void setDisabled(boolean disabled)
           If true, this overview functionality is disabled.
 void setVisibleLayers(List<String> layers)
          Sets the layers that will be included in the overview map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WMSOverviewFunctionality

public WMSOverviewFunctionality()
Method Detail

initFunctionality

public void initFunctionality(GISResource resource)
Initializes an instance of the overview functionality for this resource.

Specified by:
initFunctionality in interface GISFunctionality
Parameters:
resource - the GISResource that this functionality supports
See Also:
GISResource.init(WebContext)

destroyFunctionality

public void destroyFunctionality()
Description copied from interface: GISFunctionality

The cleanup chores (such as releasing held resources) for the functionality must be performed in this method. This method is called by the GISResource when the resource itself is being destroyed.

The functionality is no longer usable after this method has been called.

Specified by:
destroyFunctionality in interface GISFunctionality
See Also:
GISResource.destroy()

getResource

public WMSMapResource getResource()
Description copied from interface: GISFunctionality

Returns the GISResource associated with this functionality.

The resource passed to GISFunctionality.initFunctionality(GISResource) is maintained as a class variable and is accessible through this method.

Specified by:
getResource in interface GISFunctionality
Returns:
the GISResource associated with this functionality

isDisabled

public boolean isDisabled()
Description copied from interface: OverviewFunctionality

Returns true if this overview functionality is disabled. If a overview functionality is disabled, the WebOverview will not call the OverviewFunctionality.exportImage() on that functionality while it is disabled.

A overview functionality is typically disabled by using the "Disable Overview" context menu item on the resource node in the Table of Contents control. Similarly, the functionality can be enabled by using "Enable Overview".

Specified by:
isDisabled in interface OverviewFunctionality
Returns:
true if this overview functionality is disabled

setDisabled

public void setDisabled(boolean disabled)
Description copied from interface: OverviewFunctionality

If true, this overview functionality is disabled. If a overview functionality is disabled, the WebOverview will not call the OverviewFunctionality.exportImage() on that functionality while it is disabled.

A overview functionality is typically disabled by using the "Disable Overview" context menu item on the resource node in the Table of Contents control. Similarly, the functionality can be enabled by using "Enable Overview".

Specified by:
setDisabled in interface OverviewFunctionality
Parameters:
disabled - true if this overview functionality is disabled

exportImage

public InputStream exportImage()
Description copied from interface: OverviewFunctionality

Exports this overview map for the extent indicated by the WebOverview. Implementations should ensure the following:

The WebOverview calls this method on all its overview functionalities and eventually fuses all the exported maps before streaming it to the user. This method is called by the WebOverview in these scenarios:

Specified by:
exportImage in interface OverviewFunctionality
Returns:
a java.io.InputStream to the exported image

getWmsMap

public com.esri.wms.client.Map getWmsMap()

getVisibleLayers

public List<String> getVisibleLayers()
Gets the list of layers that will be visible in the overview map. By default the value is null and the overview map honors the setting in the WMSMapFunctionality.getLayerSubset() . By default the visibleLayers is null, the overview honors the visibility setting in the map functionality.

Returns:
Returns the layers.

setVisibleLayers

public void setVisibleLayers(List<String> layers)
Sets the layers that will be included in the overview map. Some WMS servers have a restriction on the number of layers that can be requested by a client. For those servers, you use this property to specify a subset of layers that should be included. The list should specify layers by their names. The name of the layer is a property you can find in the WMS GetCapabilities response. If the name refers to a group layer, then all sublayers will be automatically be included. The layer list can be set as a managed bean property and the order of the layers doesn't affect the rendering order:
   <managed-bean>
    <managed-bean-name>wmsOverview</managed-bean-name>
    <managed-bean-class>com.esri.adf.web.wms.data.WMSOverviewFunctionality </managed-bean-class>
    <managed-bean-scope>none</managed-bean-scope>
    <managed-property>
      <property-name>visibleLayers</property-name>
      <list-entries>
        <value>countries</value>
        <value>cities</value>
      </list-entries>
    </managed-property>
   </managed-bean>
 

Parameters:
layers - The layers to set.