Class PropertyWebTemplateWriter

    • Constructor Summary

      Constructors 
      Constructor Description
      PropertyWebTemplateWriter​(net.officefloor.web.template.parse.PropertyParsedTemplateSectionContent content, ValueRetriever<java.lang.Object> valueRetriever, java.lang.Class<?> beanType)
      Initiate.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void write​(ServerWriter writer, boolean isDefaultCharset, java.lang.Object bean, ServerHttpConnection connection, java.lang.String templatePath)
      Writes the template content to the ServerWriter.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PropertyWebTemplateWriter

        public PropertyWebTemplateWriter​(net.officefloor.web.template.parse.PropertyParsedTemplateSectionContent content,
                                         ValueRetriever<java.lang.Object> valueRetriever,
                                         java.lang.Class<?> beanType)
                                  throws java.lang.Exception
        Initiate.
        Parameters:
        content - PropertyParsedTemplateSectionContent.
        valueRetriever - ValueRetriever.
        beanType - Bean type for the property.
        Throws:
        java.lang.Exception - If Method to obtain the value to write is not available on the bean type.
    • Method Detail

      • write

        public void write​(ServerWriter writer,
                          boolean isDefaultCharset,
                          java.lang.Object bean,
                          ServerHttpConnection connection,
                          java.lang.String templatePath)
                   throws HttpException
        Description copied from interface: WebTemplateWriter
        Writes the template content to the ServerWriter.
        Specified by:
        write in interface WebTemplateWriter
        Parameters:
        writer - ServerWriter to receive the template content.
        isDefaultCharset - Indicates if the default Charset for outputting the template is being used. While the Charset may be programmatically changed, it is expected in the majority of cases to be using the default Charset configured for the template. This flag allows static content to be cached in bytes (using default Charset) for improved performance.
        bean - Bean to potentially obtain data. May be null if template contents does not require a bean.
        connection - ServerHttpConnection.
        templatePath - Current path for the WebTemplate. As the path may be dynamic (contain path parameters), this is the path to be used by links in rending of the WebTemplate.
        Throws:
        HttpException - If fails to write content.