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

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

public class WMSTocFunctionality
extends Object
implements TocFunctionality, Serializable

An implementation of TocFunctionality, which handles the WMS Resource. The default definition is in the wms-functionalities.xml, and here is a sample:

 <managed-bean>
   <managed-bean-name>wmsToc</managed-bean-name>
     <managed-bean-class>com.esri.adf.web.wms.data.WMSTocFunctionality</managed-bean-class>
   <managed-bean-scope>none</managed-bean-scope>
 </managed-bean>
 

See Also:
Serialized Form

Field Summary
protected  WMSMapFunctionality mFunc
           
protected  WebToc mToc
           
 
Fields inherited from interface com.esri.adf.web.data.TocFunctionality
FUNCTIONALITY_NAME
 
Constructor Summary
WMSTocFunctionality()
           
 
Method Summary
 void createTocHierarchy(TocNode parentNode)
           Creates the content hierarchy for this TOC.
 void destroyFunctionality()
           The cleanup chores (such as releasing held resources) for the functionality must be performed in this method.
 String getCustomLayerContentClassName()
          Returns the name of the custom class (which should be a sub-class of WMSTocLayerContent) to use for the Graphics layer nodes
 String getHideLayers()
          Returns the comma separated layer names.
 int getInitialVisibleLayerCount()
          Returns the initial visible layers count.
 WMSMapFunctionality getMapFunctionality()
          Gets the map functionality associated with the WMSTocFunctionality.
 WMSMapResource getResource()
          Returns the WMSMapResource object.
 void initFunctionality(GISResource resource)
           The initialization chores for the functionality must be performed in this method.
 boolean isShowAllLayers()
          Returns true if all the layer names are shown in Toc Control.
 void setCustomLayerContentClassName(String customLayerContentClassName)
          Sets the name of the custom class (which should be a sub-class of WMSTocLayerContent) to use for the WMS layer nodes
 void setHideLayers(String hideLayers)
          Sets the comma separated layer names to hide in Toc Control.
 void setInitialVisibleLayerCount(int initialVisibleLayerCount)
          Set the initial visible layers count.
 void setShowAllLayers(boolean showAllLayer)
          Setting to true will show all the layer names in Toc Control.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mFunc

protected WMSMapFunctionality mFunc

mToc

protected WebToc mToc
Constructor Detail

WMSTocFunctionality

public WMSTocFunctionality()
Method Detail

initFunctionality

public void initFunctionality(GISResource resource)
Description copied from interface: GISFunctionality

The initialization chores for the functionality must be performed in this method. This method is called by the resource when the functionality needs to be initialized. This happens either when the resource itself is being initialized or if users add this functionality to the resource using the GISResource.addFunctionality(String, GISFunctionality) method after the resource has already been initialized.

Classes which implement this method should maintain the resource as a class instance variable and return the same in the GISFunctionality.getResource() method. The functionality is ready for use only after this method has been called.

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()

createTocHierarchy

public void createTocHierarchy(TocNode parentNode)
Description copied from interface: TocFunctionality

Creates the content hierarchy for this TOC.

The content generated should be structured as a tree of TocNodes. The WebToc calls this method on each TOC functionality when it first creates the TOC hierarchy. It passes the TocNode representing the node for the resource of the functionality to this method. The TOC functionality is reponsible for generating its content as children nodes of this resource node.

Specified by:
createTocHierarchy in interface TocFunctionality
Parameters:
parentNode - the parent TocNode for the content generated by this TOC functionality

getResource

public WMSMapResource getResource()
Returns the WMSMapResource object.

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

isShowAllLayers

public boolean isShowAllLayers()
Returns true if all the layer names are shown in Toc Control.

Returns:
true if all the layer names are shown in Toc Control

setShowAllLayers

public void setShowAllLayers(boolean showAllLayer)
Setting to true will show all the layer names in Toc Control.

Parameters:
showAllLayer - true to show all layer names in Toc Control.

getHideLayers

public String getHideLayers()
Returns the comma separated layer names.

Returns:
the layer names

setHideLayers

public void setHideLayers(String hideLayers)
Sets the comma separated layer names to hide in Toc Control.

Parameters:
hideLayers - the comma separated layer names

getInitialVisibleLayerCount

public int getInitialVisibleLayerCount()
Returns the initial visible layers count.

Returns:
the initial visible layers count

setInitialVisibleLayerCount

public void setInitialVisibleLayerCount(int initialVisibleLayerCount)
Set the initial visible layers count. Note that the default value of this variable is 10.

Parameters:
initialVisibleLayerCount - the initial visible layers count

getMapFunctionality

public WMSMapFunctionality getMapFunctionality()
Gets the map functionality associated with the WMSTocFunctionality.

Returns:
Returns the mFunc.

setCustomLayerContentClassName

public void setCustomLayerContentClassName(String customLayerContentClassName)
Sets the name of the custom class (which should be a sub-class of WMSTocLayerContent) to use for the WMS layer nodes

Parameters:
customLayerContentClassName - the name of the TOC layer content custom class name

getCustomLayerContentClassName

public String getCustomLayerContentClassName()
Returns the name of the custom class (which should be a sub-class of WMSTocLayerContent) to use for the Graphics layer nodes

Returns:
the name of the toc layer content custom class name