|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Descriptor
A Descriptor is a description of the mechanism by which an arbitrary Java object (typically a JavaBean) is referenced. The following reference methods are supported, and are processed in the order specified here:
xpath property is set, it is used as an XPath
expression identifying the requested object.name (and optional scope) properties
are specified, they are used to select a particular named bean,
optionally found in a particular named scope.Context is consumed.
| Method Summary | |
|---|---|
Object |
get(Context context)
Return the value specified by this Descriptor from the specified Context. |
String |
getName()
Return the name of the Java object (in some scope) referenced by this Descriptor. |
String |
getScope()
Return the scope of the Java object referenced by this Descriptor. |
Class |
getType()
Return the optional Java class expected by this Descriptor. |
String |
getXpath()
Return the XPath expression used to access the Java object referenced by this Descriptor. |
boolean |
positive(Context context)
Call get() to retrieve the value specified by this
Descriptor, and then return true if this value represents
a positive result; otherwise return false. |
void |
put(Context context,
Object value)
Store the value into the destination specified by this Descriptor in the specified Context, replacing any existing value. |
void |
remove(Context context)
Remove any existing value associated with this Descriptor from the specified Context. |
void |
setName(String name)
Set the name of the Java object (in some scope) referenced by this Descriptor. |
void |
setScope(String scope)
Set the scope of the Java object referenced by this Descriptor. |
void |
setType(Class type)
Set the optional Java class expected by this Descriptor. |
void |
setXpath(String xpath)
Set the XPath expression used to access the Java object referenced by this Descriptor. |
| Method Detail |
|---|
String getName()
void setName(String name)
name - The new object nameString getScope()
void setScope(String scope)
scope - The new scope nameClass getType()
void setType(Class type)
type - The new expected typeString getXpath()
void setXpath(String xpath)
xpath - The new XPath expressionObject get(Context context)
null.
context - Context from which to retrieve this valueboolean positive(Context context)
Call get() to retrieve the value specified by this
Descriptor, and then return true if this value represents
a positive result; otherwise return false.
context - Context from which to retrieve this value
void put(Context context,
Object value)
context - Context into which to store this valuevalue - Object value to be storedvoid remove(Context context)
context - Context from which to remove this value.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||