hudson.plugins.pmd.util.model
Class JavaProject

java.lang.Object
  extended by hudson.plugins.pmd.util.model.AnnotationContainer
      extended by hudson.plugins.pmd.util.model.JavaProject
All Implemented Interfaces:
AnnotationProvider, java.io.Serializable

public class JavaProject
extends AnnotationContainer

A serializable Java Bean class representing a project that has been built by Hudson.

Author:
Ulli Hafner
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class hudson.plugins.pmd.util.model.AnnotationContainer
AnnotationContainer.Hierarchy
 
Constructor Summary
JavaProject()
          Creates a new instance of JavaProject.
 
Method Summary
 void addError(java.lang.String additionalError)
          Appends the error message to the project error messages.
 void addModule(MavenModule module)
          Adds the specified module with its annotations to this project.
 void addModules(java.util.Collection<MavenModule> modules)
          Adds the specified modules with their annotations to this project.
protected  java.util.Collection<? extends AnnotationContainer> getChildren()
          Returns the children containers of this container.
 java.lang.String getError()
          Returns the error message that denotes that why project creation has been failed.
 java.lang.String getWorkspacePath()
          Returns the root path of the workspace files.
 boolean hasError()
          Returns whether a module with an error is part of this project.
 void setError(java.lang.String error)
          Sets the error message that denotes that why project creation has been failed.
 void setWorkspacePath(java.lang.String workspacePath)
          Sets the root path of the workspace files.
 
Methods inherited from class hudson.plugins.pmd.util.model.AnnotationContainer
addAnnotation, addAnnotations, addAnnotations, containsCategory, containsFile, containsModule, containsPackage, containsType, getAnnotation, getAnnotation, getAnnotationBound, getAnnotations, getAnnotations, getAnnotations, getCategories, getCategory, getContainer, getFile, getFiles, getHighAnnotations, getLowAnnotations, getModule, getModules, getName, getNormalAnnotations, getNumberOfAnnotations, getNumberOfAnnotations, getNumberOfAnnotations, getPackage, getPackageCategoryName, getPackages, getToolTip, getType, getTypes, hasAnnotations, hasAnnotations, hasAnnotations, rebuildMappings, setHierarchy, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaProject

public JavaProject()
Creates a new instance of JavaProject.

Method Detail

addModule

public void addModule(MavenModule module)
Adds the specified module with its annotations to this project.

Parameters:
module - the module to add

addModules

public void addModules(java.util.Collection<MavenModule> modules)
Adds the specified modules with their annotations to this project.

Parameters:
modules - the modules to add

setWorkspacePath

public void setWorkspacePath(java.lang.String workspacePath)
Sets the root path of the workspace files.

Parameters:
workspacePath - path to workspace

getWorkspacePath

public java.lang.String getWorkspacePath()
Returns the root path of the workspace files.

Returns:
the workspace path

hasError

public boolean hasError()
Returns whether a module with an error is part of this project.

Returns:
true if at least one module has an error.

setError

public void setError(java.lang.String error)
Sets the error message that denotes that why project creation has been failed.

Parameters:
error - the new error message

addError

public void addError(java.lang.String additionalError)
Appends the error message to the project error messages.

Parameters:
additionalError - the new error message to add

getError

public java.lang.String getError()
Returns the error message that denotes that why project creation has been failed.

Returns:
the error message that denotes that why project creation has been failed.

getChildren

protected java.util.Collection<? extends AnnotationContainer> getChildren()
Returns the children containers of this container. If we are already at the leaf level, then an empty collection is returned.

Specified by:
getChildren in class AnnotationContainer
Returns:
the children containers of this container.


Copyright © 2008. All Rights Reserved.