|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 MBean instance. |
Variable |
create(Object source)
Creates a variable MBean instance with imported attributes. |
Variable |
create(String type)
Creates a typed variable MBean instance. |
Variable |
create(String type,
Object source)
Creates a typed variable MBean 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. |
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. |
EnumeratedList |
getEnumeration(Variable variable,
MBeanAttributeInfo attribute)
Gets the specified attribute value enumeration as a list of localized enumeration attributes. |
protected Filter |
getFilter(Class clazz)
Gets the first specific filter from the filter chain. |
protected HttpFilterChain |
getFilterChain()
Gets the current filter chain if available. |
protected String |
getFilterKey(Class clazz)
Gets the key of the first specific key filter from the filter chain. |
String |
getGroup(Variable variable,
MBeanAttributeInfo attribute)
Gets the specified attribute group. |
Object |
getKeyValue(Variable variable,
String name)
Gets the named key attribute value of the specified variable. |
protected MBeanServer |
getMBeanServer()
Gets the MBean server if available. |
protected String |
getName()
Gets the bound name. |
protected Principal |
getPrincipal()
Gets the current principal if available. |
protected ServletRequest |
getRequest()
Gets the current request if available. |
protected ResourceMap |
getResourceMap()
Gets the resource map MBean. |
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. |
protected VariableRegistry |
getVariableRegistry()
Gets the referent of the variable registry MBean. |
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 |
isLocalizedVariables()
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 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. |
void |
setValue(Variable variable,
String name,
Object value,
boolean forced)
Sets the named attribute value of the specified variable optionally by-passing attribute's current writable and mandatory settings. |
String |
toString(Variable variable,
String name)
Returns the specified attribute value as a localized string. |
String[] |
toStrings(Variable variable,
String name)
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, createVariable, exportTo, exportTo, getComparator, getConverter, getInfo, getInfo, getList, getList, getLocale, getMax, getMin, getPattern, getResource, getResourceBundle, getResourceBundle, getResourceBundleName, getResourceBundleName, hasConverter, importFrom, importFrom, isArray, isBlankAccepted, isCloneable, isCorrelative, isDisabled, isEmptyAccepted, isEnumerated, isInteractive, isLocal, isLocalized, isMandatory, isOrdered, isReadable, isSerialized, isSorted, isTraceable, isTransient, isTrimmed, isVisible, isWritable, setLocale |
| 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 Recyclablepublic void dispose()
Recyclable
dispose in interface Recyclablepublic boolean isDisposed()
Recyclable
isDisposed in interface Recyclablepublic void recycled(MBeanReference instance)
Poolable
recycled in interface Poolableinstance - the pool MBean reference.public void disposed()
Poolable
disposed in interface Poolablepublic Variable create()
Introspector
create in class Introspectorpublic Variable create(Object source)
Introspector
create in class Introspectorsource - the source object.
public Variable create(String type)
Introspector
create in class Introspectortype - the variable type.
public Variable create(String type,
Object source)
Introspector
create in class Introspectortype - the variable type.source - the source object.
public Object getValue(Variable variable,
String name)
Introspector
getValue in class Introspectorvariable - the variable.name - the attribute name.
public void setValue(Variable variable,
String name,
Object value)
Introspector
setValue in class Introspectorvariable - the variable.name - the attribute name.value - the attribute value.
public void setValue(Variable variable,
String name,
Object value,
boolean forced)
Introspector
setValue in class Introspectorvariable - the variable.name - the attribute name.value - the attribute value.forced - if true, forces the setting.
public Object getValue(Variable variable,
String name,
int index)
Introspector
getValue in class Introspectorvariable - 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 Introspectorvariable - 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 Introspectorvariable - 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 Introspectorvariable - 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 Introspectorvariable - 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 Introspectorvariable - the variable.name - the attribute name.index - the element index.
public Object getKeyValue(Variable variable,
String name)
Introspector
getKeyValue in class Introspectorvariable - the variable.name - the attribute name.
public String toString(Variable variable,
String name)
Introspector
toString in class Introspectorvariable - the variable.name - the attribute name.
public String[] toStrings(Variable variable,
String name)
Introspector
toStrings in class Introspectorvariable - the variable.name - the attribute name.
public int length(Variable variable,
String name)
Introspector
length in class Introspectorvariable - the variable.name - the attribute name.
public String getDescription(Variable variable,
MBeanAttributeInfo attribute)
Introspector
getDescription in class Introspectorvariable - the variable.attribute - the attribute.
public String getGroup(Variable variable,
MBeanAttributeInfo attribute)
Introspector
getGroup in class Introspectorvariable - the variable.attribute - the attribute.
public String getDetail(Variable variable,
MBeanAttributeInfo attribute)
Introspector
getDetail in class Introspectorvariable - the variable.attribute - the attribute.
public EnumeratedList getEnumeration(Variable variable,
MBeanAttributeInfo attribute)
Introspector
getEnumeration in class Introspectorvariable - the variable.attribute - the attribute.
public Locale getDefaultLocale()
Introspector
getDefaultLocale in class Introspectorpublic boolean isLocalizedVariables()
Introspector
isLocalizedVariables in class Introspectorpublic void valueBound(ContextBindingEvent event)
ContextBindingListener
valueBound in interface ContextBindingListenerevent - the binding event.public void valueUnbound(ContextBindingEvent event)
ContextBindingListener
valueUnbound in interface ContextBindingListenerevent - the binding event.protected ResourceMap getResourceMap()
Introspector
getResourceMap in class Introspectorprotected VariableRegistry getVariableRegistry()
Introspector
getVariableRegistry in class Introspectorprotected ServletRequest getRequest()
protected ServletResponse getResponse()
protected Principal getPrincipal()
protected HttpFilterChain getFilterChain()
protected MBeanServer getMBeanServer()
getMBeanServer in class Introspectorprotected Filter getFilter(Class clazz)
clazz - the class or interface of the filter.
protected String getFilterKey(Class clazz)
clazz - the class or interface of the key filter.
protected boolean isFilterChanged()
protected TemplateContext getContext()
protected String getName()
protected boolean isBound()
protected ContextToolFilter getContextToolFilter()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||