org.apache.commons.workflow
Interface Descriptor

All Known Implementing Classes:
BaseDescriptor

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:

Version:
$Revision: 155475 $ $Date: 2005-02-26 13:31:11 +0000 (Sat, 26 Feb 2005) $
Author:
Craig R. McClanahan

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

getName

String getName()
Return the name of the Java object (in some scope) referenced by this Descriptor.


setName

void setName(String name)
Set the name of the Java object (in some scope) referenced by this Descriptor.

Parameters:
name - The new object name

getScope

String getScope()
Return the scope of the Java object referenced by this Descriptor.


setScope

void setScope(String scope)
Set the scope of the Java object referenced by this Descriptor.

Parameters:
scope - The new scope name

getType

Class getType()
Return the optional Java class expected by this Descriptor.


setType

void setType(Class type)
Set the optional Java class expected by this Descriptor.

Parameters:
type - The new expected type

getXpath

String getXpath()
Return the XPath expression used to access the Java object referenced by this Descriptor.


setXpath

void setXpath(String xpath)
Set the XPath expression used to access the Java object referenced by this Descriptor.

Parameters:
xpath - The new XPath expression

get

Object get(Context context)
Return the value specified by this Descriptor from the specified Context. If there is no such value, return null.

Parameters:
context - Context from which to retrieve this value

positive

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.

Parameters:
context - Context from which to retrieve this value

put

void put(Context context,
         Object value)
Store the value into the destination specified by this Descriptor in the specified Context, replacing any existing value.

Parameters:
context - Context into which to store this value
value - Object value to be stored

remove

void remove(Context context)
Remove any existing value associated with this Descriptor from the specified Context.

Parameters:
context - Context from which to remove this value.


Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.