org.milyn.payload
Class JavaResult

java.lang.Object
  extended by org.milyn.payload.FilterResult
      extended by org.milyn.payload.JavaResult
All Implemented Interfaces:
Result

public class JavaResult
extends FilterResult

Java filtration/transformation result.

Used to extract a Java "result" Map from the transformation. Simply set an instance of this class as the Result arg in the call to Smooks.filter(javax.xml.transform.Source,javax.xml.transform.Result,org.milyn.container.ExecutionContext).

Author:
tom.fennelly@gmail.com

Field Summary
 
Fields inherited from interface javax.xml.transform.Result
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING
 
Constructor Summary
JavaResult()
          Public default constructor.
JavaResult(boolean preserveOrder)
          Public default constructor.
JavaResult(Map<String,Object> resultMap)
          Public constructor.
 
Method Summary
 Object getBean(String name)
          Get the named bean from the Java Result Map.
 Map<String,Object> getResultMap()
          Get the Java result map.
 void setResultMap(Map<String,Object> resultMap)
          Set the Java result map.
 String toString()
          XML Serialized form of the bean Map associate with the result instance.
 
Methods inherited from class org.milyn.payload.FilterResult
getResult, getSystemId, setResult, setSystemId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JavaResult

public JavaResult()
Public default constructor.


JavaResult

public JavaResult(boolean preserveOrder)
Public default constructor.


JavaResult

public JavaResult(Map<String,Object> resultMap)
Public constructor.

See setResultMap(java.util.Map).

Parameters:
resultMap - Result Map. This is the map onto which Java "result" objects will be set.
Method Detail

getBean

public Object getBean(String name)
Get the named bean from the Java Result Map.

Parameters:
name - the name of the bean.
Returns:
The bean Object, or null if the bean is not in the bean Result Map.
See Also:
getResultMap()

getResultMap

public Map<String,Object> getResultMap()
Get the Java result map.

Returns:
The Java result map.
See Also:
getBean(String)

setResultMap

public void setResultMap(Map<String,Object> resultMap)
Set the Java result map.

Parameters:
resultMap - The Java result map.

toString

public String toString()
XML Serialized form of the bean Map associate with the result instance.

Overrides:
toString in class Object
Returns:
XML Serialized form of the bean Map associate with the result instance.


Copyright © 2008. All Rights Reserved.