hudson.plugins.violations.model
Class FullFileModel

java.lang.Object
  extended by hudson.plugins.violations.model.FullFileModel

public class FullFileModel
extends java.lang.Object

A model of the violations in the a file. This is used during project action and it contains all the violations found. A subset of these are written to an xml file later.


Constructor Summary
FullFileModel()
           
 
Method Summary
 void addViolation(Violation violation)
          Add a violation to the file model.
 java.lang.String getDisplayName()
          Get the display name of this file.
 long getLastModified()
          Get the last modified time of the file.
 java.util.SortedMap<java.lang.Integer,java.lang.String> getLines()
          Get a sorted map of lines.
 java.util.Map<java.lang.Integer,java.util.Set<Violation>> getLineViolationMap()
          Get a map of line number to a set of violations.
 java.io.File getSourceFile()
          Get the source file.
 java.util.TreeMap<java.lang.String,java.util.TreeSet<Violation>> getTypeMap()
          Get the map of types to violations.
 void setDisplayName(java.lang.String name)
          Set thr name to use to display this file.
 void setLastModified(long lastModified)
          Set the last modified time of the file.
 void setSourceFile(java.io.File sourceFile)
          Set the source file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FullFileModel

public FullFileModel()
Method Detail

addViolation

public void addViolation(Violation violation)
Add a violation to the file model.

Parameters:
violation - the violation to add.

getDisplayName

public java.lang.String getDisplayName()
Get the display name of this file.

Returns:
the name to use whrn displaying the file violations.

setDisplayName

public void setDisplayName(java.lang.String name)
Set thr name to use to display this file.

Parameters:
name - the name to use.

getSourceFile

public java.io.File getSourceFile()
Get the source file.

Returns:
the source file.

setSourceFile

public void setSourceFile(java.io.File sourceFile)
Set the source file.

Parameters:
sourceFile - the value to use.

setLastModified

public void setLastModified(long lastModified)
Set the last modified time of the file.

Parameters:
lastModified - the time to use.

getLastModified

public long getLastModified()
Get the last modified time of the file.

Returns:
the lastModified time.

getLineViolationMap

public java.util.Map<java.lang.Integer,java.util.Set<Violation>> getLineViolationMap()
Get a map of line number to a set of violations.

Returns:
the map.

getLines

public java.util.SortedMap<java.lang.Integer,java.lang.String> getLines()
Get a sorted map of lines.

Returns:
a line number to line content map.

getTypeMap

public java.util.TreeMap<java.lang.String,java.util.TreeSet<Violation>> getTypeMap()
Get the map of types to violations.

Returns:
the type to violation map.


Copyright © 2004-2012. All Rights Reserved.