wt.templateutil.navigationbar
Class NavigationLinkTreePool

java.lang.Object
  extended bywt.templateutil.navigationbar.NavigationLinkTreePool

public class NavigationLinkTreePool
extends Object

Provides a "Pool" of NavigationTreeModels that can be "checked out" by the "name" of the section.

This class "checks out" and returns a NavigationTreeModel by the "name" of the section in the Navigation Configuration XML file. The instance that is returned is from a "Pool" of available instancess of that named section . If there are not enough entries in the pool of sections of that name, an ad-hoc instance will be created and added to the pool. There is a time out of 1 minute for the ad-hoc instances.

The Navigation Configuration XML file that is read is defined by the properties file entry

wt.templateutil.components.navigationbar.file

Here is an example of using the NavigationLinkTreePool

NavigationTreeModel treeModel = NavigationLinkTreePool.checkOut("SomeSectionName"); NavigationTreeNode rootNode = (NavigationTreeNode) this.treeModel.getRoot(); ... Peform some action with the NavigationTreeModel ... NavigationLinkTreePool.checkIn(treeModel, "SomeSectionName");

Supported API: false

Extendable: false


Field Summary
private static String CLASSNAME
          Deprecated.  
private static boolean DEBUG
          Deprecated.  
private static String DEFAULT_FILE_NAME
          Deprecated.  
private static long expirationTime
          Deprecated.  
private static Hashtable lockedTreeHashtable
          Deprecated.  
private static DebugWriter LOG
          Deprecated.  
private static String NAME_ELEMENT
          Deprecated.  
private static String NAVIGATION_TREE
          Deprecated.  
private static String NAVIGATION_TREES
          Deprecated.  
private static Document navigationBarDocument
          Deprecated.  
private static Hashtable unlockedTreeHashtable
          Deprecated.  
private static boolean VERBOSE
          Deprecated.  
 
Constructor Summary
private NavigationLinkTreePool()
          Deprecated.  
 
Method Summary
static void checkIn(NavigationTreeModel o, String navigationTreeName)
          Deprecated. Check in an instance of NavigationTreeModel into the Pool with the name provided by navigationTreeName.
static NavigationTreeModel checkOut(String navigationTreeName)
          Deprecated. Returns a NavigationTreeModel with the name provided by, navigationTreeName, from the Pool by checking the NavigationTreeModel instance out from the Pool, OR if no NavigationTreeModel instances with the name provided by navigationTreeName are available in the Pool, a NavigationTreeModel instance is created, added to the Pool, and then checked out the NavigationTreeModel instance.
private static NavigationTreeModel create(String navigationTreeName)
          Deprecated. Creates a NavigationTreeModel instance from the section in the Navigation Configuration XML file with the name provided by, navigationTreeName.
private static void expire(Object o)
          Deprecated.  
static Document getNavigationBarXml()
          Deprecated.  
private static boolean isCorrectNode(Node linksNode, String navigationTreeName)
          Deprecated. Returns a flag indicating if the linksNode is a sub-tree with the "name" navigationTreeName
static void refreshNavigationBarXml()
          Deprecated. Re-reads the Navigation Configuration XML file so that all new NavigationTreeModels will be created using this file
static void setNavigationBarDocument()
          Deprecated.  
private static boolean validate(Object o)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

navigationBarDocument

private static Document navigationBarDocument
Deprecated. 

DEFAULT_FILE_NAME

private static final String DEFAULT_FILE_NAME
Deprecated. 

NAVIGATION_TREES

private static final String NAVIGATION_TREES
Deprecated. 
See Also:
Constant Field Values

NAVIGATION_TREE

private static final String NAVIGATION_TREE
Deprecated. 
See Also:
Constant Field Values

NAME_ELEMENT

private static final String NAME_ELEMENT
Deprecated. 
See Also:
Constant Field Values

VERBOSE

private static final boolean VERBOSE
Deprecated. 

expirationTime

private static long expirationTime
Deprecated. 

lockedTreeHashtable

private static Hashtable lockedTreeHashtable
Deprecated. 

unlockedTreeHashtable

private static Hashtable unlockedTreeHashtable
Deprecated. 

CLASSNAME

private static final String CLASSNAME
Deprecated. 

DEBUG

private static final boolean DEBUG
Deprecated. 

LOG

private static final DebugWriter LOG
Deprecated. 
Constructor Detail

NavigationLinkTreePool

private NavigationLinkTreePool()
Deprecated. 
Method Detail

getNavigationBarXml

public static Document getNavigationBarXml()
Deprecated. 

setNavigationBarDocument

public static void setNavigationBarDocument()
Deprecated. 

checkOut

public static NavigationTreeModel checkOut(String navigationTreeName)
Deprecated. 
Returns a NavigationTreeModel with the name provided by, navigationTreeName, from the Pool by checking the NavigationTreeModel instance out from the Pool, OR if no NavigationTreeModel instances with the name provided by navigationTreeName are available in the Pool, a NavigationTreeModel instance is created, added to the Pool, and then checked out the NavigationTreeModel instance.

Parameters:
navigationTreeName - - Name of the section in the XML file to use

checkIn

public static void checkIn(NavigationTreeModel o,
                           String navigationTreeName)
Deprecated. 
Check in an instance of NavigationTreeModel into the Pool with the name provided by navigationTreeName.

Parameters:
o - - NavigationTreeModel instance to check in
navigationTreeName - - Name of the Pool to check it in to.

create

private static NavigationTreeModel create(String navigationTreeName)
Deprecated. 
Creates a NavigationTreeModel instance from the section in the Navigation Configuration XML file with the name provided by, navigationTreeName.

Parameters:
navigationTreeName - - Name of the section of the Navigation Configuration XML file to use for the NavigationTreeModel

expire

private static void expire(Object o)
Deprecated. 

validate

private static boolean validate(Object o)
Deprecated. 

isCorrectNode

private static boolean isCorrectNode(Node linksNode,
                                     String navigationTreeName)
Deprecated. 
Returns a flag indicating if the linksNode is a sub-tree with the "name" navigationTreeName

Parameters:
linksNode - - Node that represents the root of a navigation section
navigationTreeName - - Name that linksNode Node should match

refreshNavigationBarXml

public static void refreshNavigationBarXml()
Deprecated. 
Re-reads the Navigation Configuration XML file so that all new NavigationTreeModels will be created using this file