org.kuali.maven.mojo.s3
Class CloudFrontHtmlGenerator

java.lang.Object
  extended by org.kuali.maven.mojo.s3.CloudFrontHtmlGenerator

public class CloudFrontHtmlGenerator
extends Object

Generate directory listings in html format that is Amazon CloudFront friendly


Field Summary
(package private)  S3BucketContext context
           
(package private)  HtmlUtils html
           
(package private)  SimpleDateFormat sdf
           
 
Constructor Summary
CloudFrontHtmlGenerator()
           
CloudFrontHtmlGenerator(S3BucketContext context)
           
 
Method Summary
protected  List<ColumnDecorator> getColumnDecorators()
          Decorators for the columns in the table
 S3BucketContext getContext()
           
protected  String getDirectory(String prefix, String delimiter)
          If prefix is null, return the delimiter.
If delimiter is "/" and prefix is "foo/bar" return "/foo/bar"
If delimiter is "/" and prefix is "foo/bar/" return "/foo/bar"
protected  String getDocType()
           
protected  String getGoogleAnalyticsJavascript()
           
 String getHtml(List<String[]> data, String prefix, String delimiter)
          Generate the full html page
protected  String getHtmlComment()
           
protected  String getHtmlTable(List<String[]> data, List<ColumnDecorator> columnDecorators)
          Generate the table representing a directory listing
protected  String getMeta()
           
protected  String getTableCell(String content, ColumnDecorator decorator)
          Generate html representing the contents of one table cell
protected  String getTableHeaders(List<ColumnDecorator> columnDecorators)
          Generate the html for the th tags from a list of ColumnDecorator objects
protected  String getTableRow(int row, String[] data, List<ColumnDecorator> columnDecorators)
          Generate an html table row for the String[]
protected  String getTableRows(List<String[]> data, List<ColumnDecorator> columnDecorators)
          Generate a table row for each String[] in the list
protected  Tag getTableRowTag(int row)
          Alternate the styling of each row
protected  boolean isEmpty(Collection<?> c)
          Return true if the Collection is null or contains no entries, false otherwise
 void setContext(S3BucketContext context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

html

HtmlUtils html

sdf

SimpleDateFormat sdf

context

S3BucketContext context
Constructor Detail

CloudFrontHtmlGenerator

public CloudFrontHtmlGenerator()

CloudFrontHtmlGenerator

public CloudFrontHtmlGenerator(S3BucketContext context)
Method Detail

getColumnDecorators

protected List<ColumnDecorator> getColumnDecorators()
Decorators for the columns in the table


getDirectory

protected String getDirectory(String prefix,
                              String delimiter)
If prefix is null, return the delimiter.
If delimiter is "/" and prefix is "foo/bar" return "/foo/bar"
If delimiter is "/" and prefix is "foo/bar/" return "/foo/bar"


getHtmlComment

protected String getHtmlComment()

getDocType

protected String getDocType()

getMeta

protected String getMeta()

getGoogleAnalyticsJavascript

protected String getGoogleAnalyticsJavascript()

getHtml

public String getHtml(List<String[]> data,
                      String prefix,
                      String delimiter)
Generate the full html page


getTableCell

protected String getTableCell(String content,
                              ColumnDecorator decorator)
Generate html representing the contents of one table cell


isEmpty

protected boolean isEmpty(Collection<?> c)
Return true if the Collection is null or contains no entries, false otherwise


getTableRowTag

protected Tag getTableRowTag(int row)
Alternate the styling of each row


getTableRow

protected String getTableRow(int row,
                             String[] data,
                             List<ColumnDecorator> columnDecorators)
Generate an html table row for the String[]


getTableRows

protected String getTableRows(List<String[]> data,
                              List<ColumnDecorator> columnDecorators)
Generate a table row for each String[] in the list


getTableHeaders

protected String getTableHeaders(List<ColumnDecorator> columnDecorators)
Generate the html for the th tags from a list of ColumnDecorator objects


getHtmlTable

protected String getHtmlTable(List<String[]> data,
                              List<ColumnDecorator> columnDecorators)
Generate the table representing a directory listing


getContext

public S3BucketContext getContext()

setContext

public void setContext(S3BucketContext context)


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.