javawebparts.ajaxparts.taglib.config
Class AjaxConfig

java.lang.Object
  |
  +--javawebparts.ajaxparts.taglib.config.AjaxConfig

public class AjaxConfig
extends java.lang.Object

This class is the top-level class that holds all Ajax configuration information generated by the parsing of the config file. It contains two collections, one contains the configuration information for all the custom handlers defined and the other contains configuration information on all the groups defined.

Author:
Frank W. Zammetti

Field Summary
private  int dummy
          This field is soley to get rid of a CheckStyle complaint.
private static boolean frozen
          Flag: Is the configuration frozen?
private static java.util.HashMap groups
          The collection of groups defined in the config file.
private static java.util.HashMap handlers
          The collection of handlers defined in the config file.
 
Constructor Summary
AjaxConfig()
           
 
Method Summary
static void addGroup(AjaxGroup group)
          Adds an AjaxGroup instance to the collection under its ajaxRef.
static void addHandler(AjaxHandlerConfig handler)
          Adds a AjaxHandlerConfig object to the collection of handlers defined in the config file.
static void freeze()
          Freezes the configuration of this object.
 int getDummy()
          Accessor for dummy field.
static AjaxGroup getGroup(java.lang.String ajaxRef)
          Returns an AjaxGroup instance from the collection by ajaxRef.
static java.util.HashMap getGroups()
          Returns a collection of all groups defined in the config file.
static AjaxHandlerConfig getHandler(java.lang.String name)
          Returns an AjaxHandlerConfig instance from the collection by name.
static java.util.HashMap getHandlers()
          Returns a collection of all handlers defined in the config file.
static boolean isFrozen()
          Returns true if this onject's config is frozen, false otherwise.
 void setDummy(int inDummy)
          Mutator for dummy field.
private static boolean validate()
          This method is called when the object is frozen to ensure it is configured in a legal way.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

handlers

private static java.util.HashMap handlers
The collection of handlers defined in the config file.


groups

private static java.util.HashMap groups
The collection of groups defined in the config file.


frozen

private static boolean frozen
Flag: Is the configuration frozen?


dummy

private int dummy
This field is soley to get rid of a CheckStyle complaint. Yes, I *AM* that anal!

Constructor Detail

AjaxConfig

public AjaxConfig()
Method Detail

getDummy

public int getDummy()
Accessor for dummy field. Pointless, but necessary.

Returns:
int Current value of dummy Field.

setDummy

public void setDummy(int inDummy)
Mutator for dummy field. Pointless, but necessary.

Parameters:
inDummy - New value of dummy field.

addHandler

public static void addHandler(AjaxHandlerConfig handler)
Adds a AjaxHandlerConfig object to the collection of handlers defined in the config file.

Parameters:
handler - An AjaxHandlerConfig instance being added to the collection.

getHandler

public static AjaxHandlerConfig getHandler(java.lang.String name)
Returns an AjaxHandlerConfig instance from the collection by name.

Parameters:
name - The name of the handler to return.
Returns:
The AjaxHandlerConfig instance requested by name from the collection.

addGroup

public static void addGroup(AjaxGroup group)
Adds an AjaxGroup instance to the collection under its ajaxRef.

Parameters:
group - The AjaxGroup instance to add

getGroup

public static AjaxGroup getGroup(java.lang.String ajaxRef)
Returns an AjaxGroup instance from the collection by ajaxRef.

Parameters:
ajaxRef - The AjaxGroup to return.
Returns:
The AjaxGroup instance requested by ajaxRef from the collection.

getHandlers

public static java.util.HashMap getHandlers()
Returns a collection of all handlers defined in the config file.

Returns:
The collection of handlers.

getGroups

public static java.util.HashMap getGroups()
Returns a collection of all groups defined in the config file.

Returns:
The collection of groups.

freeze

public static void freeze()
Freezes the configuration of this object.


isFrozen

public static boolean isFrozen()
Returns true if this onject's config is frozen, false otherwise.

Returns:
True if frozen, false if not.

validate

private static boolean validate()
This method is called when the object is frozen to ensure it is configured in a legal way. Note that at present, the is no validation done here, so it simply returns true. This is left here in case anything comes up at a later time.

Returns:
True if validation passes, false if not.


Copyright © 2005 Frank W. Zammetti