hudson.plugins.analysis.util.model
Interface FileAnnotation

All Superinterfaces:
Comparable<FileAnnotation>
All Known Implementing Classes:
AbstractAnnotation

public interface FileAnnotation
extends Comparable<FileAnnotation>

Annotates a collection of line ranges in a file. An annotation consists of a description and a tooltip.

Author:
Ulli Hafner

Method Summary
 boolean canDisplayFile(hudson.model.AbstractBuild<?,?> owner)
          Checks if the file exists.
 String getCategory()
          Returns the category of the annotation.
 long getContextHashCode()
          Returns a hash code of the surrounding context of this annotation.
 String getFileName()
          Returns the absolute path of the workspace file that contains this annotation.
 long getKey()
          Returns the unique key of this annotation.
 Collection<LineRange> getLineRanges()
          Returns a collection of line ranges for this annotation.
 String getLinkName()
          Returns the name of this annotation that could be used as text in links.
 String getMessage()
          Returns the message of this annotation.
 String getModuleName()
          Returns the name of the maven or ant module that contains this annotation.
 String getOrigin()
          Returns the origin of the annotation.
 String getPackageName()
          Returns the name of package (or namespace) that contains this annotation.
 String getPathName()
          Returns the path name of this annotation (relative path to the affected file).
 int getPrimaryLineNumber()
          Returns the primary line number of this annotation that defines the anchor of this annotation.
 Priority getPriority()
          Returns the priority of this annotation.
 String getShortFileName()
          Gets the associated file name of this bug (without path).
 String getTempName(hudson.model.AbstractBuild<?,?> owner)
          Returns a file name for a temporary file that will hold the contents of the source.
 String getToolTip()
          Returns the a detailed description that will be used as tooltip.
 String getType()
          Returns the annotation type.
 boolean hasPackageName()
          Returns whether a package name is defined for this annotation.
 void setContextHashCode(long contextHashCode)
          Sets the context hash code to the specified value.
 void setFileName(String fileName)
          Sets the file name to the specified value.
 void setModuleName(String moduleName)
          Sets the name of the maven or ant module that contains this annotation.
 void setPathName(String workspacePath)
          Sets the pathname for this warning.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getMessage

String getMessage()
Returns the message of this annotation.

Returns:
the message of this annotation

getToolTip

String getToolTip()
Returns the a detailed description that will be used as tooltip.

Returns:
the tooltip of this annotation

getPrimaryLineNumber

int getPrimaryLineNumber()
Returns the primary line number of this annotation that defines the anchor of this annotation.

Returns:
the primary line number of this annotation

getLineRanges

Collection<LineRange> getLineRanges()
Returns a collection of line ranges for this annotation.

Returns:
the collection of line ranges for this annotation.

getKey

long getKey()
Returns the unique key of this annotation.

Returns:
the unique key of this annotation.

getPriority

Priority getPriority()
Returns the priority of this annotation.

Returns:
the priority of this annotation

getFileName

String getFileName()
Returns the absolute path of the workspace file that contains this annotation.

Returns:
the name of the workspace file that contains this annotation

getLinkName

String getLinkName()
Returns the name of this annotation that could be used as text in links.

Returns:
the link name of this duplication

getTempName

String getTempName(hudson.model.AbstractBuild<?,?> owner)
Returns a file name for a temporary file that will hold the contents of the source. This temporary file is used in a master - slave scenario where the original file remains on the slave while this temporary file is transferred to the master.

Parameters:
owner - the owner that provides the root directory where the files are stored
Returns:
the temporary name

setFileName

void setFileName(String fileName)
Sets the file name to the specified value.

Parameters:
fileName - the value to set

setPathName

void setPathName(String workspacePath)
Sets the pathname for this warning.

Parameters:
workspacePath - the workspace path

canDisplayFile

boolean canDisplayFile(hudson.model.AbstractBuild<?,?> owner)
Checks if the file exists.

Parameters:
owner - the owner that provides the root directory where the files are stored
Returns:
true, if successful

getShortFileName

String getShortFileName()
Gets the associated file name of this bug (without path).

Returns:
the short file name

getModuleName

String getModuleName()
Returns the name of the maven or ant module that contains this annotation.

Returns:
the name of the module that contains this annotation

setModuleName

void setModuleName(String moduleName)
Sets the name of the maven or ant module that contains this annotation.

Parameters:
moduleName - the name of the module that contains this annotation

getPackageName

String getPackageName()
Returns the name of package (or namespace) that contains this annotation.

Returns:
the name of the package that contains this annotation

hasPackageName

boolean hasPackageName()
Returns whether a package name is defined for this annotation.

Returns:
true if this annotation has a package or namespace name, false otherwise

getPathName

String getPathName()
Returns the path name of this annotation (relative path to the affected file).

Returns:
the path name

getOrigin

String getOrigin()
Returns the origin of the annotation. Might be an empty string.

Returns:
the origin of the annotation

getCategory

String getCategory()
Returns the category of the annotation. Might be an empty string if there is no category.

Returns:
the annotation category

getType

String getType()
Returns the annotation type. Might be an empty string if there is no type.

Returns:
the annotation type

getContextHashCode

long getContextHashCode()
Returns a hash code of the surrounding context of this annotation.

Returns:
a hash code of the surrounding context of this annotation.

setContextHashCode

void setContextHashCode(long contextHashCode)
Sets the context hash code to the specified value.

Parameters:
contextHashCode - the value to set


Copyright © 2004-2012 Hudson. All Rights Reserved.