org.apache.shale.clay.config.beans
Class TemplateComponentConfigBean

java.lang.Object
  extended by org.apache.shale.clay.config.beans.ComponentConfigBean
      extended by org.apache.shale.clay.config.beans.TemplateConfigBean
          extended by org.apache.shale.clay.config.beans.TemplateComponentConfigBean
All Implemented Interfaces:
Comparable, ConfigBean

public class TemplateComponentConfigBean
extends TemplateConfigBean

This ConfigBean is responsible for handling full XML views. For full XML views, the viewId will correspond to an XML file that defines meta-component declarations specific for the page. It's assumed that here will be a top-level component with a jsfid matching the viewId.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.shale.clay.config.beans.ComponentConfigBean
ComponentConfigBean.WatchDog, ComponentConfigBean.XmlConfigDef
 
Nested classes/interfaces inherited from interface org.apache.shale.clay.config.beans.ConfigBean
ConfigBean.ConfigDefinition
 
Field Summary
 
Fields inherited from class org.apache.shale.clay.config.beans.ComponentConfigBean
context, displayElements, isWatchDogOn, messages, NAMING_CONTAINER_TYPES, parser, suffixes, watchDogs
 
Constructor Summary
TemplateComponentConfigBean()
           
 
Method Summary
 int getWeight()
          Returns an integer value use to order the registered ConfigBean instances with the ConfigBeanFactory.
protected  void loadConfigFiles()
          This is an overridden method called from the init method.
 boolean refresh(boolean forceReload)
          If the forceReload is true, the displayElements cache is invalidated.
 boolean validMoniker(String id)
          Overrides the super call to change the condition of the filter.
 
Methods inherited from class org.apache.shale.clay.config.beans.TemplateConfigBean
clear, getElement, getTopLevelElement, init, optimizeTree
 
Methods inherited from class org.apache.shale.clay.config.beans.ComponentConfigBean
addChild, assignParent, checkCircularInheritance, checkTree, checkTree, compareTo, describeRelationships, destroy, getAssociations, getConfigDefinitions, getGeneralizations, getServletContext, isDesigntime, isNamingContainer, realizingInheritance, realizingInheritance, resolveInheritance, setDesigntime, unassignParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemplateComponentConfigBean

public TemplateComponentConfigBean()
Method Detail

getWeight

public int getWeight()

Returns an integer value use to order the registered ConfigBean instances with the ConfigBeanFactory.

Specified by:
getWeight in interface ConfigBean
Overrides:
getWeight in class TemplateConfigBean
Returns:
a weight of 2

loadConfigFiles

protected void loadConfigFiles()

This is an overridden method called from the init method. It loads an instance of the ClayXmlParser and establishes a Map collection to hold the resource ComponentConfigBean.WatchDog's.

Overrides:
loadConfigFiles in class TemplateConfigBean

refresh

public boolean refresh(boolean forceReload)

If the forceReload is true, the displayElements cache is invalidated. A true value is returned if cache has been cleared.

All files loaded on-demand are purged. Full view definitions loaded using the Globals.CLAY_FULLXML_CONFIG_FILES initialization parameter are reloaded if modified or if a forceReload is specified.

Specified by:
refresh in interface ConfigBean
Overrides:
refresh in class TemplateConfigBean
Parameters:
forceReload - true if the group of associated resources should be reloaded
Returns:
true if one of the resources changed

validMoniker

public boolean validMoniker(String id)

Overrides the super call to change the condition of the filter. This ConfigBean can create components where the id end in the suffix defined in the web deployment descriptor as a initialization parameter with the name defined by Globals.CLAY_XML_TEMPLATE_SUFFIX Or, using the default defined by Globals.CLAY_DEFAULT_XML_TEMPLATE_SUFFIX

Specified by:
validMoniker in interface ConfigBean
Overrides:
validMoniker in class TemplateConfigBean
Parameters:
id - jsfid
Returns:
true if the jsfid can be handle


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.