|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.norther.tammi.core.rt.Introspector org.norther.tammi.spray.engine.tool.BeanTool
public class BeanTool
A request context tool for bean operations.
Constructor Summary | |
---|---|
BeanTool()
Constructs a new tool. |
Method Summary | ||
---|---|---|
void |
addValue(Variable variable,
String name,
int index,
Object value)
Adds the indexed element to the named array attribute of the specified variable. |
|
void |
addValue(Variable variable,
String name,
Object value)
Adds an element to the named array attribute of the specified variable. |
|
Variable |
create()
Creates an empty variable instance. |
|
Variable |
create(Object source)
Creates a variable instance with imported attributes. |
|
Variable |
create(Object names,
Object values,
Object types)
Creates a dynamic variable instance with specified attributes. |
|
Variable |
create(String type)
Creates a typed variable instance. |
|
Variable |
create(String type,
Object source)
Creates a typed variable instance with imported attributes. |
|
void |
dispose()
Disposes the object after use. |
|
void |
disposed()
A call back indicating that this instance is not needed any more and can be disposed. |
|
String |
getCharacterEncoding()
Gets the character encoding to apply. |
|
protected TemplateContext |
getContext()
Gets the target context. |
|
protected ContextToolFilter |
getContextToolFilter()
Gets the context tool filter if available. |
|
Locale |
getDefaultLocale()
Gets the default locale. |
|
String |
getDescription(Variable variable,
MBeanAttributeInfo attribute)
Gets the specified attribute description. |
|
String |
getDetail(Variable variable,
MBeanAttributeInfo attribute)
Gets the specified attribute detail. |
|
String |
getDetail(Variable variable,
MBeanAttributeInfo attribute,
Object arg)
Gets the specified attribute detail with an argument. |
|
protected int |
getEncodingSize()
Gets the encoding size. |
|
EnumeratedList |
getEnumeration(Variable variable,
MBeanAttributeInfo attribute)
Gets the specified attribute value enumeration as a list of localized enumeration attributes. |
|
protected EnumeratedList |
getEnumeration(Variable variable,
MBeanAttributeInfo attribute,
boolean encode)
Gets the specified attribute value enumeration as an optionally XML encoded list of localized enumeration attributes. |
|
protected
|
getFilter(Class<F> clazz)
Gets the first specific filter from the filter chain. |
|
protected HttpFilterChain |
getFilterChain()
Gets the current filter chain if available. |
|
protected
|
getFilterKey(Class<F> clazz,
String... cached)
Gets the key of the first specific key filter from the filter chain. |
|
String |
getGroup(Variable variable,
MBeanAttributeInfo attribute)
Gets the specified attribute group. |
|
String |
getInvalidation(SortedMap<String,Exception> validation,
Variable variable,
MBeanAttributeInfo attribute,
int... element)
Gets the invalidation message of the specified attribute. |
|
Object |
getKeyValue(Variable variable,
String name)
Gets the named key attribute value of the specified variable. |
|
KMLWriter |
getKMLWriter()
Gets a KML exchange writer. |
|
String |
getLOBLinkPattern()
Gets the encoded LOB link pattern. |
|
protected MBeanServer |
getMBeanServer()
Gets the MBean server if available. |
|
Principal |
getPrincipal()
Gets the principal. |
|
String |
getQualifier(Variable variable,
MBeanAttributeInfo attribute)
Gets the specified attribute qualifier. |
|
protected ServletRequest |
getRequest()
Gets the current request if available. |
|
protected ResourceMap |
getResourceMap()
Gets the resource map. |
|
protected ServletResponse |
getResponse()
Gets the current response if available. |
|
Object |
getValue(Variable variable,
String name)
Gets the named attribute value of the specified variable. |
|
Object |
getValue(Variable variable,
String name,
int index)
Gets the indexed element of the named array attribute of the specified variable. |
|
VarHandler |
getVarHandler()
Gets a var exchange handler. |
|
protected VariableRegistry |
getVariableRegistry()
Gets the referent of the variable registry. |
|
VarWriter |
getVarWriter()
Gets a var exchange writer. |
|
protected boolean |
isBound()
Gets the bound state. |
|
boolean |
isDisposed()
Checks whether the recyclable has been disposed. |
|
protected boolean |
isFilterChanged()
Checks whether the current filter has changed since the previous check. |
|
boolean |
isLocalized()
Checks whether variables are localized. |
|
int |
length(Variable variable,
String name)
Returns the length of the specified array attribute. |
|
void |
recycle()
Recycles the object for a new client. |
|
void |
recycled(MBeanReference<? extends Pool> instance)
A callback specifying the pool, from which this instance was recycled. |
|
Object |
removeValue(Variable variable,
String name,
int index)
Removes the indexed element from the named array attribute of the specified variable. |
|
boolean |
removeValue(Variable variable,
String name,
Object value)
Removes an element from the named array attribute of the specified variable. |
|
void |
setValue(Variable variable,
String name,
int index,
Object value)
Sets the indexed element of the named array attribute of the specified variable. |
|
void |
setValue(Variable variable,
String name,
Object value)
Sets the named attribute value of the specified variable. |
|
protected String |
toString(Variable variable,
String name,
boolean encode,
Object... values)
Returns the specified attribute value as an optionally XML encoded localized string. |
|
String |
toString(Variable variable,
String name,
Object... values)
Returns the specified attribute value as a localized string. |
|
protected String[] |
toStrings(Variable variable,
String name,
boolean encode,
Object... values)
Returns the specified attribute values as an optionally XML encoded localized string localized string array. |
|
String[] |
toStrings(Variable variable,
String name,
Object... values)
Returns the specified attribute values as a localized string array. |
|
void |
valueBound(ContextBindingEvent event)
Notifies the object that it is being bound to a context. |
|
void |
valueUnbound(ContextBindingEvent event)
Notifies the object that it is being unbound from a context. |
Methods inherited from class org.norther.tammi.core.rt.Introspector |
---|
clearResourceCache, contains, containsTrait, containsTrait, createVariable, cutValue, exportTo, exportTo, getComparator, getConverter, getException, getFormat, getInfo, getInfos, getLocale, getMax, getMessage, getMeta, getMin, getNodeValue, getNodeValue, getPattern, getResourceBundle, getResourceBundle, getResourceBundleName, getResourceBundleName, importFrom, importFrom, isArray, isEnumerated, isInvalid, isLOB, isReadable, isTrait, isTrait, isVisible, isWritable, resolve, resolve, setCharacterEncoding, setLOBLinkPattern, setLocale, setTrait, setTrait, toMediaFile, toSerializable, toSerializables |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BeanTool()
Method Detail |
---|
public void recycle()
Recyclable
recycle
in interface Recyclable
public void dispose()
Recyclable
dispose
in interface Recyclable
public boolean isDisposed()
Recyclable
isDisposed
in interface Recyclable
public void recycled(MBeanReference<? extends Pool> instance)
Poolable
recycled
in interface Poolable
instance
- the pool MBean reference.public void disposed()
Poolable
disposed
in interface Poolable
public Variable create()
Introspector
create
in class Introspector
public Variable create(Object source)
Introspector
create
in class Introspector
source
- the source object.
public Variable create(String type)
Introspector
create
in class Introspector
type
- the variable type.
public Variable create(String type, Object source)
Introspector
create
in class Introspector
type
- the variable type.source
- the source object.
public Variable create(Object names, Object values, Object types)
Introspector
create
in class Introspector
names
- the attribute names.values
- the attribute values.types
- the attribute types.
public Object getValue(Variable variable, String name)
Introspector
getValue
in class Introspector
variable
- the variable.name
- the attribute name.
public void setValue(Variable variable, String name, Object value)
Introspector
setValue
in class Introspector
variable
- the variable.name
- the attribute name.value
- the attribute value.public Object getValue(Variable variable, String name, int index)
Introspector
getValue
in class Introspector
variable
- the variable.name
- the attribute name.index
- the element index.
public void setValue(Variable variable, String name, int index, Object value)
Introspector
setValue
in class Introspector
variable
- the variable.name
- the attribute name.index
- the element index.value
- the attribute value.public void addValue(Variable variable, String name, Object value)
Introspector
addValue
in class Introspector
variable
- the variable.name
- the attribute name.value
- the attribute value.public void addValue(Variable variable, String name, int index, Object value)
Introspector
addValue
in class Introspector
variable
- the variable.name
- the attribute name.index
- the element index.value
- the attribute value.public boolean removeValue(Variable variable, String name, Object value)
Introspector
removeValue
in class Introspector
variable
- the variable.name
- the attribute name.value
- the value of the element.
public Object removeValue(Variable variable, String name, int index)
Introspector
removeValue
in class Introspector
variable
- the variable.name
- the attribute name.index
- the element index.
public Object getKeyValue(Variable variable, String name)
Introspector
getKeyValue
in class Introspector
variable
- the variable.name
- the attribute name.
public String toString(Variable variable, String name, Object... values)
Introspector
toString
in class Introspector
variable
- the variable.name
- the attribute name.values
- optional values.
public String[] toStrings(Variable variable, String name, Object... values)
Introspector
toStrings
in class Introspector
variable
- the variable.name
- the attribute name.values
- optional values.
public int length(Variable variable, String name)
Introspector
length
in class Introspector
variable
- the variable.name
- the attribute name.
public String getInvalidation(SortedMap<String,Exception> validation, Variable variable, MBeanAttributeInfo attribute, int... element)
Introspector
getInvalidation
in class Introspector
validation
- the validation.variable
- the variable.attribute
- the attribute.element
- the element index.
public String getDescription(Variable variable, MBeanAttributeInfo attribute)
Introspector
getDescription
in class Introspector
variable
- the variable.attribute
- the attribute.
public String getGroup(Variable variable, MBeanAttributeInfo attribute)
Introspector
getGroup
in class Introspector
variable
- the variable.attribute
- the attribute.
public String getDetail(Variable variable, MBeanAttributeInfo attribute)
Introspector
getDetail
in class Introspector
variable
- the variable.attribute
- the attribute.
public String getDetail(Variable variable, MBeanAttributeInfo attribute, Object arg)
Introspector
getDetail
in class Introspector
variable
- the variable.attribute
- the attribute.arg
- the argument.
public String getQualifier(Variable variable, MBeanAttributeInfo attribute)
Introspector
getQualifier
in class Introspector
variable
- the variable.attribute
- the attribute.
public EnumeratedList getEnumeration(Variable variable, MBeanAttributeInfo attribute)
Introspector
getEnumeration
in class Introspector
variable
- the variable.attribute
- the attribute.
public Locale getDefaultLocale()
Introspector
getDefaultLocale
in class Introspector
public String getCharacterEncoding()
Introspector
getCharacterEncoding
in class Introspector
public String getLOBLinkPattern()
Introspector
getLOBLinkPattern
in class Introspector
public Principal getPrincipal()
Introspector
getPrincipal
in class Introspector
public boolean isLocalized()
Introspector
isLocalized
in class Introspector
public KMLWriter getKMLWriter()
public VarWriter getVarWriter()
public VarHandler getVarHandler()
public void valueBound(ContextBindingEvent event)
ContextBindingListener
valueBound
in interface ContextBindingListener
event
- the binding event.public void valueUnbound(ContextBindingEvent event)
ContextBindingListener
valueUnbound
in interface ContextBindingListener
event
- the binding event.protected ResourceMap getResourceMap()
Introspector
getResourceMap
in class Introspector
protected VariableRegistry getVariableRegistry()
Introspector
getVariableRegistry
in class Introspector
protected String toString(Variable variable, String name, boolean encode, Object... values)
variable
- the variable.name
- the attribute name.values
- optional values.encode
- the XML encoding option.
protected String[] toStrings(Variable variable, String name, boolean encode, Object... values)
variable
- the variable.name
- the attribute name.values
- optional values.encode
- the XML encoding option.
protected EnumeratedList getEnumeration(Variable variable, MBeanAttributeInfo attribute, boolean encode)
variable
- the variable.attribute
- the attribute.encode
- the XML encoding option.
protected ServletRequest getRequest()
protected ServletResponse getResponse()
protected HttpFilterChain getFilterChain()
protected MBeanServer getMBeanServer()
getMBeanServer
in class Introspector
protected <F extends Filter> F getFilter(Class<F> clazz)
F
- the filter type.clazz
- the class or interface of the filter.
protected <F extends KeyFilter> String getFilterKey(Class<F> clazz, String... cached)
F
- the filter type.clazz
- the class or interface of the key filter.cached
- an optionally cached filter key value.
protected boolean isFilterChanged()
protected TemplateContext getContext()
protected boolean isBound()
protected int getEncodingSize()
protected ContextToolFilter getContextToolFilter()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |