hudson.plugins.violations.model
Class BuildModel

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

public class BuildModel
extends java.lang.Object

A model of the violations of the build used during rendering time.


Nested Class Summary
static class BuildModel.FileCount
          A class of file name to count mapping.
static class BuildModel.TypeCount
          A class used in displaying number of violations and files in violation.
 
Constructor Summary
BuildModel(java.io.File xmlFile)
          Create a model of the violations.
 
Method Summary
 void addFileCount(java.lang.String type, java.lang.String name, int[] count)
          Add a file count.
 java.util.SortedSet<BuildModel.FileCount> getFileCounts(java.lang.String type)
          get a set of file counts for a type.
 java.util.Map<java.lang.String,FileModelProxy> getFileModelMap()
          Get the file model map.
 java.util.Map<java.lang.String,BuildModel.TypeCount> getTypeCountMap()
          Get the type count map.
 java.util.Collection<BuildModel.TypeCount> getTypeCounts()
          Get the collection of type counts.
 java.util.SortedMap<java.lang.String,java.util.SortedSet<BuildModel.FileCount>> getTypeMap()
          Get the map of type to file counts.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BuildModel

public BuildModel(java.io.File xmlFile)
Create a model of the violations.

Parameters:
xmlFile - the file used to create this (used to get the directory for parsing the per file xml files on demand).
Method Detail

getTypeMap

public java.util.SortedMap<java.lang.String,java.util.SortedSet<BuildModel.FileCount>> getTypeMap()
Get the map of type to file counts.

Returns:
the map of type to file counts.

getFileModelMap

public java.util.Map<java.lang.String,FileModelProxy> getFileModelMap()
Get the file model map.

Returns:
a map of name to file model proxy.

getTypeCounts

public java.util.Collection<BuildModel.TypeCount> getTypeCounts()
Get the collection of type counts.

Returns:
the collection of type counts.

getTypeCountMap

public java.util.Map<java.lang.String,BuildModel.TypeCount> getTypeCountMap()
Get the type count map.

Returns:
the type count map.

getFileCounts

public java.util.SortedSet<BuildModel.FileCount> getFileCounts(java.lang.String type)
get a set of file counts for a type.

Parameters:
type - the type to ge for.
Returns:
a set of file counts.

addFileCount

public void addFileCount(java.lang.String type,
                         java.lang.String name,
                         int[] count)
Add a file count.

Parameters:
type - the type.
name - the filename.
count - the number of violations.


Copyright © 2004-2012. All Rights Reserved.