org.milyn.payload
Class JavaSource

java.lang.Object
  extended by org.milyn.payload.FilterSource
      extended by org.milyn.payload.JavaSource
All Implemented Interfaces:
Source

public class JavaSource
extends FilterSource

Java Filtration/Transformation Source.

Author:
tom.fennelly@gmail.com

Constructor Summary
JavaSource()
          Default Contructor.
JavaSource(List<Object> sourceObjects)
          Construct a stream of SAX document/message events from the supplied source object list.
JavaSource(Object sourceObject)
          Construct a stream of SAX document/message events from the supplied source object.
 
Method Summary
 Map<String,Object> getBeans()
          Get the input bean map for the transform.
 List<Object> getSourceObjects()
          Get the source object list.
 void setBeans(Map<String,Object> beans)
          Set the input bean map for the transform.
 
Methods inherited from class org.milyn.payload.FilterSource
getSource, getSystemId, setSource, setSystemId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaSource

public JavaSource()
Default Contructor.

Allows the instance to be constructed without a set of "source objects" i.e. a set of objects from which a stream of SAX events will be generated. In this case a NullSourceXMLReader will be put in place by Smooks and used by the underlying filter (DOM/SAX).

This constructor can be used in conjunction with the setBeans(java.util.Map) method to (for example) apply a template directly to a bean map by targeting the template resource at the "$document" selector.


JavaSource

public JavaSource(Object sourceObject)
Construct a stream of SAX document/message events from the supplied source object.

Parameters:
sourceObject - The source object.

JavaSource

public JavaSource(List<Object> sourceObjects)
Construct a stream of SAX document/message events from the supplied source object list.

Parameters:
sourceObjects - The source object list.
Method Detail

getSourceObjects

public List<Object> getSourceObjects()
Get the source object list.

Returns:
The source object list.

getBeans

public Map<String,Object> getBeans()
Get the input bean map for the transform.

See the JavaSource(java.util.List) constructor.

Returns:
The bean map.

setBeans

public void setBeans(Map<String,Object> beans)
Set the input bean map for the transform.

See the JavaSource(java.util.List) constructor.

Parameters:
beans - The bean map.


Copyright © 2008. All Rights Reserved.