Class WsXhtmlOutputConverter

java.lang.Object
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 Details

    • WsXhtmlOutputConverter

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

    • 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