|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.commons.workflow.base.BaseDescriptor
Basic implementation of the Descriptor interface.
| Field Summary | |
protected java.lang.String |
name
The name of the Java object (in some scope). |
protected java.lang.String |
scope
The scope of the Java object. |
protected java.lang.Class |
type
The optional Java class expected by this Descriptor. |
protected java.lang.String |
xpath
The XPath expression used to access the Java object. |
| Constructor Summary | |
BaseDescriptor()
Create an instance with default values. |
|
BaseDescriptor(java.lang.String xpath)
Create an instance with the specified values. |
|
BaseDescriptor(java.lang.String xpath,
java.lang.Class type)
Create an instance with the specified values. |
|
BaseDescriptor(java.lang.String name,
java.lang.String scope)
Create an instance with the specified values. |
|
BaseDescriptor(java.lang.String name,
java.lang.String scope,
java.lang.Class type)
Create an instance with the specified values. |
|
BaseDescriptor(java.lang.String name,
java.lang.String scope,
java.lang.String xpath,
java.lang.Class type)
Create an instance with the specified values. |
|
| Method Summary | |
java.lang.Object |
get(org.apache.commons.workflow.Context context)
Return the value specified by this Descriptor from the specified Context. |
java.lang.String |
getName()
Return the name of the Java object (in some scope) referenced by this Descriptor. |
java.lang.String |
getScope()
Return the scope of the Java object referenced by this Descriptor. |
java.lang.Class |
getType()
Return the optional Java class expected by this Descriptor. |
java.lang.String |
getXpath()
Return the XPath expression used to access the Java object referenced by this Descriptor. |
boolean |
positive(org.apache.commons.workflow.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(org.apache.commons.workflow.Context context,
java.lang.Object value)
Store the value into the destination specified by this Descriptor in the specified Context, replacing any existing value. |
void |
remove(org.apache.commons.workflow.Context context)
Remove any existing value associated with this Descriptor from the specified Context. |
void |
setName(java.lang.String name)
Set the name of the Java object (in some scope) referenced by this Descriptor. |
void |
setScope(java.lang.String scope)
Set the scope of the Java object referenced by this Descriptor. |
void |
setType(java.lang.Class type)
Set the optional Java class expected by this Descriptor. |
void |
setXpath(java.lang.String xpath)
Set the XPath expression used to access the Java object referenced by this Descriptor. |
java.lang.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 java.lang.String name
protected java.lang.String scope
protected java.lang.Class type
protected java.lang.String xpath
| Constructor Detail |
public BaseDescriptor()
public BaseDescriptor(java.lang.String xpath)
xpath - The XPath reference expression
public BaseDescriptor(java.lang.String xpath,
java.lang.Class type)
xpath - The XPath reference expressiontype - The expected class of this object
public BaseDescriptor(java.lang.String name,
java.lang.String scope)
name - The object namescope - The object scope
public BaseDescriptor(java.lang.String name,
java.lang.String scope,
java.lang.Class type)
name - The object namescope - The object scopetype - The expected class of this object
public BaseDescriptor(java.lang.String name,
java.lang.String scope,
java.lang.String xpath,
java.lang.Class type)
name - The object namescope - The object scopexpath - The XPath reference expressiontype - The expected class| Method Detail |
public java.lang.String getName()
getName in interface org.apache.commons.workflow.Descriptorpublic void setName(java.lang.String name)
setName in interface org.apache.commons.workflow.Descriptorname - The new object namepublic java.lang.String getScope()
getScope in interface org.apache.commons.workflow.Descriptorpublic void setScope(java.lang.String scope)
setScope in interface org.apache.commons.workflow.Descriptorscope - The new scope namepublic java.lang.Class getType()
getType in interface org.apache.commons.workflow.Descriptorpublic void setType(java.lang.Class type)
setType in interface org.apache.commons.workflow.Descriptortype - The new expected typepublic java.lang.String getXpath()
getXpath in interface org.apache.commons.workflow.Descriptorpublic void setXpath(java.lang.String xpath)
setXpath in interface org.apache.commons.workflow.Descriptorxpath - The new XPath expressionpublic java.lang.Object get(org.apache.commons.workflow.Context context)
null.
get in interface org.apache.commons.workflow.Descriptorcontext - Context from which to retrieve this valuepublic boolean positive(org.apache.commons.workflow.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 org.apache.commons.workflow.Descriptorcontext - Context from which to retrieve this value
public void put(org.apache.commons.workflow.Context context,
java.lang.Object value)
put in interface org.apache.commons.workflow.Descriptorcontext - Context into which to store this valuevalue - Object value to be storedpublic void remove(org.apache.commons.workflow.Context context)
remove in interface org.apache.commons.workflow.Descriptorcontext - Context from which to remove this value.public java.lang.String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||