org.apache.tapestry.spec
Class ExtensionSpecification
java.lang.Object
org.apache.tapestry.util.BasePropertyHolder
org.apache.tapestry.spec.LocatablePropertyHolder
org.apache.tapestry.spec.ExtensionSpecification
- All Implemented Interfaces:
- org.apache.hivemind.Locatable, org.apache.hivemind.LocationHolder, IExtensionSpecification, IPropertyHolder
public class ExtensionSpecification
- extends LocatablePropertyHolder
- implements IExtensionSpecification
Defines an "extension", which is much like a helper bean, but is part of a library or application
specification (and has the same lifecycle as the application).
- Since:
- 2.2
- Author:
- Howard Lewis Ship
Constructor Summary |
ExtensionSpecification(org.apache.hivemind.ClassResolver resolver,
ValueConverter valueConverter)
Creates a new instance which will use the specified resolver to resolve classes and converter
to coerce values to their desired type. |
Methods inherited from interface org.apache.hivemind.LocationHolder |
setLocation |
Methods inherited from interface org.apache.hivemind.Locatable |
getLocation |
_configuration
protected Map _configuration
ExtensionSpecification
public ExtensionSpecification(org.apache.hivemind.ClassResolver resolver,
ValueConverter valueConverter)
- Creates a new instance which will use the specified resolver to resolve classes and converter
to coerce values to their desired type.
- Parameters:
resolver
- The class resolver used to resolve classes safely in a servlet environment.valueConverter
- Converter used to coerce values.
getClassName
public String getClassName()
- Specified by:
getClassName
in interface IExtensionSpecification
setClassName
public void setClassName(String className)
- Specified by:
setClassName
in interface IExtensionSpecification
addConfiguration
public void addConfiguration(String propertyName,
String value)
- Specified by:
addConfiguration
in interface IExtensionSpecification
getConfiguration
public Map getConfiguration()
- Returns an immutable Map of the configuration; keyed on property name, with values as
properties to assign.
- Specified by:
getConfiguration
in interface IExtensionSpecification
instantiateExtension
public Object instantiateExtension()
- Invoked to instantiate an instance of the extension and return it. It also configures
properties of the extension.
- Specified by:
instantiateExtension
in interface IExtensionSpecification
toString
public String toString()
- Overrides:
toString
in class Object
isImmediate
public boolean isImmediate()
- Returns true if the extensions should be instantiated immediately after the containing
LibrarySpecification
if parsed. Non-immediate extensions are
instantiated only as needed.
- Specified by:
isImmediate
in interface IExtensionSpecification
setImmediate
public void setImmediate(boolean immediate)
- Specified by:
setImmediate
in interface IExtensionSpecification
Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.