public interface ConfigBean extends Comparable
This interfaces should be implemented by a object pool that
is registered with the ConfigBeanFactory
.
Modifier and Type | Interface and Description |
---|---|
static interface |
ConfigBean.ConfigDefinition
Top-level interface that defines a single configuration
file entry.
|
Modifier and Type | Method and Description |
---|---|
void |
assignParent(ComponentBean b)
Sets the isA parent's for a
ComponentBean . |
void |
checkTree(ComponentBean b)
Verifies there is not a duplicate component id within a naming container.
|
void |
destroy()
This method is invoked with the application is unloaded.
|
ComponentBean |
getElement(String id)
Factory method that returns a
ComponentBean
using an identifier. |
javax.servlet.ServletContext |
getServletContext()
Returns an instance of the
ServletContext set
by the init(ServletContext) method. |
int |
getWeight()
A ordering weight used by the
ConfigBeanFactory
for determining the ConfigBean that will return a ComponentBean
for a jsfid . |
void |
init(javax.servlet.ServletContext context)
Initialization method passing the
ServletContext . |
void |
realizingInheritance(ComponentBean b)
Fixes up the meta inheritance of a
ComponentBean . |
boolean |
refresh(boolean forceReload)
This method should be called from key points in the application to invoke
automatic reloading of the configuration files if they have been modified since
last reloaded.
|
boolean |
validMoniker(String id)
|
compareTo
ComponentBean getElement(String id)
Factory method that returns a ComponentBean
using an identifier.
id
- jsfid of a config beanboolean validMoniker(String id)
Returns true
if the jsfid
can be
used by the getElement(jsfid)
to return a
ComponentBean
.
id
- jsfid of a config beantrue
if the config bean is handled hereint getWeight()
A ordering weight used by the ConfigBeanFactory
for determining the ConfigBean that will return a ComponentBean
for a jsfid
.
void init(javax.servlet.ServletContext context)
Initialization method passing the ServletContext
.
context
- web container servlet contextvoid destroy()
This method is invoked with the application is unloaded. The
ConfigBeanFactory
will invoke this method on all
registered ConfigBean
. This sequence will be started
by the ClayConfigureListener
javax.servlet.ServletContext getServletContext()
Returns an instance of the ServletContext
set
by the init(ServletContext)
method.
void realizingInheritance(ComponentBean b)
Fixes up the meta inheritance of a ComponentBean
. It
assumes that assignParent(ComponentBean
has already
been called
b
- config bean needing inheritance resolvedvoid assignParent(ComponentBean b)
Sets the isA parent's for a ComponentBean
. The next
step would be to call the realizeInheritance(ComponentBean)
method.
b
- config bean needing heritage fixed-upboolean refresh(boolean forceReload)
This method should be called from key points in the application to invoke
automatic reloading of the configuration files if they have been modified since
last reloaded. If the parameter forceReload
is true
,
all files will be reloaded. The return value is true
, if the
files were reloaded.
forceReload
- true
if all template and config files are reloadedtrue
if a modifed file was foundvoid checkTree(ComponentBean b)
Verifies there is not a duplicate component id within a naming container.
A root ComponentBean
is passed as a single parameter.
b
- root config beanCopyright © 2004-2013 Apache Software Foundation. All Rights Reserved.