edu.internet2.middleware.grouper.ws.rest.contentType
Class WsXhtmlOutputConverter

java.lang.Object
  extended by edu.internet2.middleware.grouper.ws.rest.contentType.WsXhtmlOutputConverter

public class WsXhtmlOutputConverter
extends Object

 this will write a bean based on javabean properties (read / getters).
 supports only:
 1. String fields
 2. int fields
 3. String arrays
 4. int arrays
 5. Bean fields
 6. Bean arrays
 7. Will not work with circular references
 Will throw exception if something is not right...
 Does not support any other structures.  Inheritance is not supported
 Use this object once and throw away
 


Constructor Summary
WsXhtmlOutputConverter(boolean theIncludeXhtmlHeaders, String theTitle)
           
 
Method Summary
 String writeBean(Object bean)
          based on object, get all getters, and write to stream.
 void writeBean(Object bean, Writer writer)
          based on object, get all getters, and write to stream.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WsXhtmlOutputConverter

public WsXhtmlOutputConverter(boolean theIncludeXhtmlHeaders,
                              String theTitle)
Parameters:
theIncludeXhtmlHeaders -
theTitle - do not pass in a writer, generally this is for testing
Method Detail

writeBean

public String writeBean(Object bean)
based on object, get all getters, and write to stream. This is a top level object where the classname (not fully qualified) is written to stream

Parameters:
bean - cannot be null, must be a javabean
Returns:
the xhtml

writeBean

public void writeBean(Object bean,
                      Writer writer)
based on object, get all getters, and write to stream. This is a top level object where the classname (not fully qualified) is written to stream

Parameters:
bean - cannot be null, must be a javabean
writer - is the writer to write to