hudson.plugins.violations.render
Class FileModelProxy

java.lang.Object
  extended by hudson.plugins.violations.render.FileModelProxy

public class FileModelProxy
extends java.lang.Object

A proxy class for FileModel used to allow lazy loading of FileModel. This class is also used to render the FileModel.


Constructor Summary
FileModelProxy(java.io.File xmlFile)
          Construct this proxy.
 
Method Summary
 FileModelProxy build(hudson.model.AbstractBuild<?,?> build)
          Fluid setting of the build attribute.
 FileModelProxy contextPath(java.lang.String contextPath)
          Fluid setting of context path.
 hudson.model.AbstractBuild<?,?> getBuild()
          get the current build.
 java.lang.String getFileContent()
          This gets called from the index.jelly script to render the marked up contents of the file.
 FileModel getFileModel()
          Get the file model.
 boolean getShowLines()
          Wheter to show lines.
 java.lang.String severityColumn(Violation v)
          Get the severity column for a violation.
 java.lang.String typeLine(java.lang.String type)
          Get the type line.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileModelProxy

public FileModelProxy(java.io.File xmlFile)
Construct this proxy.

Parameters:
xmlFile - the xmlfile to create the FileModel from.
Method Detail

build

public FileModelProxy build(hudson.model.AbstractBuild<?,?> build)
Fluid setting of the build attribute.

Parameters:
build - the owner build.
Returns:
this object.

contextPath

public FileModelProxy contextPath(java.lang.String contextPath)
Fluid setting of context path. This is used for getting icons.

Parameters:
contextPath - the current WEB context path.
Returns:
this object.

getBuild

public hudson.model.AbstractBuild<?,?> getBuild()
get the current build.

Returns:
the current build.

typeLine

public java.lang.String typeLine(java.lang.String type)
Get the type line.

Parameters:
type - the violation type.
Returns:
a rendered line containing the number of violations and the number of suppressed violations.

getShowLines

public boolean getShowLines()
Wheter to show lines.

Returns:
true if the file model contains lines.

getFileContent

public java.lang.String getFileContent()
This gets called from the index.jelly script to render the marked up contents of the file.

Returns:
a table of lines and associated violations in html.

getFileModel

public FileModel getFileModel()
Get the file model. If the file model is present, return it, otherwise parse the xml file.

Returns:
the file model or null if unable to parse.

severityColumn

public java.lang.String severityColumn(Violation v)
Get the severity column for a violation.

Parameters:
v - the violation.
Returns:
a string to place in the severity column of the violation table.


Copyright © 2004-2012. All Rights Reserved.