ro.isdc.wro.extensions.support.lint
Class ReportXmlFormatter

java.lang.Object
  extended by ro.isdc.wro.extensions.support.lint.AbstractReportXmlFormatter<LintItem>
      extended by ro.isdc.wro.extensions.support.lint.ReportXmlFormatter

public class ReportXmlFormatter
extends AbstractReportXmlFormatter<LintItem>

Builds an XML report for lint errors based on provided collection of LinterError's.

Since:
1.5.0
Author:
Alex Objelean

Nested Class Summary
static class ReportXmlFormatter.FormatterType
           
 
Constructor Summary
protected ReportXmlFormatter(LintReport<LintItem> lintReport, ReportXmlFormatter.FormatterType type)
           
 
Method Summary
protected  void buildDocument()
          Populates document with required DOM elements.
static ReportXmlFormatter create(LintReport<LintItem> lintReport, ReportXmlFormatter.FormatterType formatterType)
          Factory method for creating ReportXmlFormatter.
static ReportXmlFormatter createForCssLintError(LintReport<CssLintError> lintReport, ReportXmlFormatter.FormatterType formatterType)
           
static ReportXmlFormatter createForLinterError(LintReport<LinterError> lintReport, ReportXmlFormatter.FormatterType formatterType)
           
protected  String getColumnAttributeName()
           
protected  String getIssueElementName()
           
protected  String getReasonAttributeName()
           
 
Methods inherited from class ro.isdc.wro.extensions.support.lint.AbstractReportXmlFormatter
getDocument, getLintReport, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReportXmlFormatter

protected ReportXmlFormatter(LintReport<LintItem> lintReport,
                             ReportXmlFormatter.FormatterType type)
Parameters:
lintReport - a not null collection of LinterError used to build an XML report from.
Method Detail

create

public static ReportXmlFormatter create(LintReport<LintItem> lintReport,
                                        ReportXmlFormatter.FormatterType formatterType)
Factory method for creating ReportXmlFormatter.

Parameters:
lintReport - LintReport to build xml reports from.

createForLinterError

public static ReportXmlFormatter createForLinterError(LintReport<LinterError> lintReport,
                                                      ReportXmlFormatter.FormatterType formatterType)

createForCssLintError

public static ReportXmlFormatter createForCssLintError(LintReport<CssLintError> lintReport,
                                                       ReportXmlFormatter.FormatterType formatterType)

buildDocument

protected void buildDocument()
Populates document with required DOM elements.

Specified by:
buildDocument in class AbstractReportXmlFormatter<LintItem>

getColumnAttributeName

protected String getColumnAttributeName()
Returns:
the name of the attribute indicating the character number where the issue is located.

getReasonAttributeName

protected String getReasonAttributeName()
Returns:
the name of the attribute indicating a reason of the issue.

getIssueElementName

protected String getIssueElementName()
Returns:
name of tag indicating an issue.


Copyright © 2008-2013. All Rights Reserved.