|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sonar.api.resources.Resource org.sonar.api.resources.Project
public class Project
A class that manipulates Projects in the Sonar way, i.e. mixing MavenProjects with the way it should be analyzed
Nested Class Summary | |
---|---|
static class |
Project.AnalysisType
Enumerates the type of possible analysis |
Field Summary | |
---|---|
static String |
PARAM_DATE
Deprecated. since version 1.11. Constant moved to CoreProperties |
static String |
PARAM_DYNAMIC_ANALYSIS
Deprecated. since version 1.11. Constant moved to CoreProperties |
static String |
PARAM_EXCLUSIONS
Deprecated. since version 1.11. Constant moved to CoreProperties |
static String |
PARAM_LANGUAGE
Deprecated. since version 1.11. Constant moved to CoreProperties |
static String |
PARAM_REUSE_RULES_CONFIG
Deprecated. since version 1.11. Constant moved to CoreProperties |
static String |
PARAM_VERSION
Deprecated. since version 1.11. Constant moved to CoreProperties |
Fields inherited from class org.sonar.api.resources.Resource |
---|
QUALIFIER_CLASS, QUALIFIER_DIRECTORY, QUALIFIER_FIELD, QUALIFIER_FILE, QUALIFIER_LIB, QUALIFIER_METHOD, QUALIFIER_MODULE, QUALIFIER_PACKAGE, QUALIFIER_PROJECT, QUALIFIER_PROJECT_BRANCH, QUALIFIER_PROJECT_TRUNK, QUALIFIER_SUBVIEW, QUALIFIER_UNIT_TEST_CLASS, QUALIFIER_VIEW, SCOPE_DIRECTORY, SCOPE_ENTITY, SCOPE_FILE, SCOPE_PROJECT, SCOPE_SET, SCOPE_SPACE |
Constructor Summary | |
---|---|
Project(String key)
|
|
Project(String key,
String branch,
String name)
|
Method Summary | |
---|---|
static Project |
createFromMavenIds(String groupId,
String artifactId)
|
Date |
getAnalysisDate()
|
Project.AnalysisType |
getAnalysisType()
|
String |
getAnalysisVersion()
|
String |
getArtifactId()
Used for Maven projects |
String |
getBranch()
|
org.apache.commons.configuration.Configuration |
getConfiguration()
|
String |
getDescription()
|
String[] |
getExclusionPatterns()
Patterns of resource exclusion as defined in project settings page. |
ProjectFileSystem |
getFileSystem()
|
String |
getGroupId()
Used for Maven projects |
Language |
getLanguage()
|
String |
getLanguageKey()
|
String |
getLongName()
|
List<Project> |
getModules()
|
String |
getName()
|
String |
getPackaging()
|
Project |
getParent()
The parent is used to build the resources tree, for example for relations between classes, packages and projects. |
org.apache.maven.project.MavenProject |
getPom()
|
Object |
getProperty(String key)
|
String |
getQualifier()
|
boolean |
getReuseExistingRulesConfig()
|
Project |
getRoot()
|
String |
getScope()
|
boolean |
isLatestAnalysis()
whether it's the latest analysis done on this project (displayed in sonar dashboard) or an analysis on a past revision. |
boolean |
isModule()
|
boolean |
isRoot()
|
boolean |
matchFilePattern(String antPattern)
Check resource against an Ant pattern, like mypackag?/*Foo.java. |
void |
removeFromParent()
For internal use only. |
Project |
setAnalysisDate(Date analysisDate)
For internal use only. |
Project |
setAnalysisType(Project.AnalysisType at)
|
Project |
setAnalysisVersion(String analysisVersion)
For internal use only. |
Project |
setBranch(String branch)
|
Project |
setConfiguration(org.apache.commons.configuration.Configuration configuration)
Sets the configuration |
Project |
setDescription(String description)
|
Project |
setExclusionPatterns(String[] s)
Set exclusion patterns. |
Project |
setFileSystem(ProjectFileSystem fs)
|
Project |
setLanguage(Language language)
|
Project |
setLanguageKey(String languageKey)
For internal use only. |
Project |
setLatestAnalysis(boolean b)
For internal use only. |
Project |
setName(String name)
|
Project |
setPackaging(String packaging)
|
Project |
setParent(Project parent)
For internal use only. |
Project |
setPom(org.apache.maven.project.MavenProject pom)
|
String |
toString()
|
Methods inherited from class org.sonar.api.resources.Resource |
---|
equals, getEffectiveKey, getId, getKey, hashCode, isExcluded, setEffectiveKey, setExcluded, setId, setKey |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
@Deprecated public static final String PARAM_VERSION
@Deprecated public static final String PARAM_DATE
@Deprecated public static final String PARAM_LANGUAGE
@Deprecated public static final String PARAM_DYNAMIC_ANALYSIS
@Deprecated public static final String PARAM_EXCLUSIONS
@Deprecated public static final String PARAM_REUSE_RULES_CONFIG
Constructor Detail |
---|
public Project(String key)
public Project(String key, String branch, String name)
Method Detail |
---|
public String getBranch()
public Project setBranch(String branch)
public final Project setPom(org.apache.maven.project.MavenProject pom)
public String getPackaging()
public String getName()
getName
in class Resource
public String getLongName()
getLongName
in class Resource
public String getDescription()
getDescription
in class Resource
public Project setName(String name)
public Project setDescription(String description)
public Project setPackaging(String packaging)
public boolean isRoot()
public Project getRoot()
public boolean isModule()
public Project.AnalysisType getAnalysisType()
public Project setAnalysisType(Project.AnalysisType at)
public boolean isLatestAnalysis()
public Project setLatestAnalysis(boolean b)
public String getGroupId()
public String getArtifactId()
public Language getLanguage()
getLanguage
in class Resource
public Project setLanguage(Language language)
public String getLanguageKey()
public Project setLanguageKey(String languageKey)
public Project setAnalysisDate(Date analysisDate)
public Project setAnalysisVersion(String analysisVersion)
public String getScope()
getScope
in class Resource
public String getQualifier()
getQualifier
in class Resource
public boolean matchFilePattern(String antPattern)
Resource
matchFilePattern
in class Resource
antPattern
- Ant-like pattern (with **, * and ?). It includes file suffixes.
public Project getParent()
Resource
Return null if the parent is the project.
getParent
in class Resource
public Project setParent(Project parent)
public void removeFromParent()
public List<Project> getModules()
public boolean getReuseExistingRulesConfig()
public String getAnalysisVersion()
public Date getAnalysisDate()
public String[] getExclusionPatterns()
public Project setExclusionPatterns(String[] s)
public ProjectFileSystem getFileSystem()
public Project setFileSystem(ProjectFileSystem fs)
public org.apache.maven.project.MavenProject getPom()
public org.apache.commons.configuration.Configuration getConfiguration()
public final Project setConfiguration(org.apache.commons.configuration.Configuration configuration)
public Object getProperty(String key)
public static Project createFromMavenIds(String groupId, String artifactId)
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |