|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.workflow.base.BaseDescriptor
public class BaseDescriptor
Basic implementation of the Descriptor interface.
| Field Summary | |
|---|---|
protected String |
name
The name of the Java object (in some scope). |
protected String |
scope
The scope of the Java object. |
protected Class |
type
The optional Java class expected by this Descriptor. |
protected String |
xpath
The XPath expression used to access the Java object. |
| Constructor Summary | |
|---|---|
BaseDescriptor()
Create an instance with default values. |
|
BaseDescriptor(String xpath)
Create an instance with the specified values. |
|
BaseDescriptor(String xpath,
Class type)
Create an instance with the specified values. |
|
BaseDescriptor(String name,
String scope)
Create an instance with the specified values. |
|
BaseDescriptor(String name,
String scope,
Class type)
Create an instance with the specified values. |
|
BaseDescriptor(String name,
String scope,
String xpath,
Class type)
Create an instance with the specified values. |
|
| 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. |
String |
toString()
Render a printable version of this object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected String name
protected String scope
protected Class type
protected String xpath
| Constructor Detail |
|---|
public BaseDescriptor()
public BaseDescriptor(String xpath)
xpath - The XPath reference expression
public BaseDescriptor(String xpath,
Class type)
xpath - The XPath reference expressiontype - The expected class of this object
public BaseDescriptor(String name,
String scope)
name - The object namescope - The object scope
public BaseDescriptor(String name,
String scope,
Class type)
name - The object namescope - The object scopetype - The expected class of this object
public BaseDescriptor(String name,
String scope,
String xpath,
Class type)
name - The object namescope - The object scopexpath - The XPath reference expressiontype - The expected class| Method Detail |
|---|
public String getName()
getName in interface Descriptorpublic void setName(String name)
setName in interface Descriptorname - The new object namepublic String getScope()
getScope in interface Descriptorpublic void setScope(String scope)
setScope in interface Descriptorscope - The new scope namepublic Class getType()
getType in interface Descriptorpublic void setType(Class type)
setType in interface Descriptortype - The new expected typepublic String getXpath()
getXpath in interface Descriptorpublic void setXpath(String xpath)
setXpath in interface Descriptorxpath - The new XPath expressionpublic Object get(Context context)
null.
get in interface Descriptorcontext - Context from which to retrieve this valuepublic 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. A positive
result depends on the data type of the retrieved value:
String of length greater than 0.
positive in interface Descriptorcontext - Context from which to retrieve this value
public void put(Context context,
Object value)
put in interface Descriptorcontext - Context into which to store this valuevalue - Object value to be storedpublic void remove(Context context)
remove in interface Descriptorcontext - Context from which to remove this value.public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||