|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sonar.api.resources.Resource
org.sonar.api.resources.Project
public class Project
A class that manipulates Projects in the Sonar way.
| Nested Class Summary | |
|---|---|
static class |
Project.AnalysisType
Deprecated. since 4.4 Since 4.3 SQ will no more run tests. So basically it's always reuse report. |
| Field Summary | |
|---|---|
static Language |
NONE_LANGUAGE
Internal use |
static String |
PARAM_REUSE_RULES_CONFIG
Deprecated. since version 1.11. Constant moved to CoreProperties |
static String |
SCOPE
|
| 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_SUBVIEW, QUALIFIER_UNIT_TEST_CLASS, QUALIFIER_VIEW, SCOPE_ENTITY, 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)
|
static Project |
createFromMavenIds(String groupId,
String artifactId,
String branch)
|
Date |
getAnalysisDate()
|
Project.AnalysisType |
getAnalysisType()
Deprecated. since 4.4 Since 4.3 SQ will no more run tests. So basically it's always reuse report. |
String |
getAnalysisVersion()
|
String |
getArtifactId()
Deprecated. since 2.5. See http://jira.codehaus.org/browse/SONAR-2011 |
String |
getBranch()
|
org.apache.commons.configuration.Configuration |
getConfiguration()
Deprecated. since 2.12. The component org.sonar.api.config.Settings must be used. |
String |
getDescription()
|
String[] |
getExclusionPatterns()
Deprecated. replaced by FileExclusions in version 3.5 |
ProjectFileSystem |
getFileSystem()
Deprecated. replaced by ModuleFileSystem in 3.5 |
String |
getGroupId()
Deprecated. since 2.5. See http://jira.codehaus.org/browse/SONAR-2011 |
Language |
getLanguage()
Deprecated. since 4.2 use FileSystem.languages() |
String |
getLanguageKey()
Deprecated. since 4.2 use FileSystem.languages() |
String |
getLongName()
|
List<Project> |
getModules()
|
String |
getName()
|
String |
getPackaging()
Deprecated. in 2.8. See http://jira.codehaus.org/browse/SONAR-2341 |
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()
Deprecated. since 2.5. See http://jira.codehaus.org/browse/SONAR-2011 , MavenProject can be retrieved as an IoC dependency |
Object |
getProperty(String key)
Deprecated. since 3.6. Replaced by Settings. |
String |
getQualifier()
The qualifier tells the type of the resource. |
boolean |
getReuseExistingRulesConfig()
Deprecated. since 2.5. See discussion from http://jira.codehaus.org/browse/SONAR-1873 |
Project |
getRoot()
|
String |
getScope()
|
String[] |
getTestExclusionPatterns()
Deprecated. replaced by FileExclusions in version 3.5 |
boolean |
isLatestAnalysis()
Deprecated. in 3.6. The analysis is now always the latest one (past analysis must be done in a chronological order). See http://jira.codehaus.org/browse/SONAR-4334 |
boolean |
isModule()
|
boolean |
isRoot()
|
String |
key()
|
String |
longName()
|
boolean |
matchFilePattern(String antPattern)
Check resource against an Ant pattern, like mypackag?/*Foo.java. |
String |
name()
|
String |
path()
Path of the component relative to basedir of the parent module. |
String |
qualifier()
|
void |
removeFromParent()
For internal use only. |
Project |
setAnalysisDate(Date analysisDate)
For internal use only. |
Project |
setAnalysisType(Project.AnalysisType at)
Deprecated. since 4.4 Since 4.3 SQ will no more run tests. So basically it's always reuse report. |
Project |
setAnalysisVersion(String analysisVersion)
For internal use only. |
Project |
setBranch(String branch)
For internal use only. |
Project |
setConfiguration(org.apache.commons.configuration.Configuration configuration)
For internal use only. |
Project |
setDescription(String description)
For internal use only. |
Project |
setExclusionPatterns(String[] s)
Deprecated. replaced by FileExclusions in version 3.5 |
Project |
setFileSystem(ProjectFileSystem fs)
Deprecated. since 2.6. See http://jira.codehaus.org/browse/SONAR-2126 |
Project |
setLanguage(Language language)
Internal use |
Project |
setLatestAnalysis(boolean b)
Deprecated. in 3.6. It's not possible to analyze a project before the latest known quality snapshot. See http://jira.codehaus.org/browse/SONAR-4334 |
Project |
setName(String name)
For internal use only. |
Project |
setPackaging(String packaging)
Deprecated. in 2.8. See http://jira.codehaus.org/browse/SONAR-2341 |
Project |
setParent(Project parent)
For internal use only. |
Project |
setPom(org.apache.maven.project.MavenProject pom)
For internal use only. |
String |
toString()
|
| Methods inherited from class org.sonar.api.resources.Resource |
|---|
equals, getDeprecatedKey, getEffectiveKey, getId, getKey, getPath, hashCode, isExcluded, normalize, setDeprecatedKey, setEffectiveKey, setExcluded, setId, setKey, setPath |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Language NONE_LANGUAGE
public static final String SCOPE
@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)
@Deprecated public String getPackaging()
public String getName()
getName in class Resourcepublic String getLongName()
getLongName in class Resourcepublic String getDescription()
getDescription in class Resourcepublic Project setName(String name)
public Project setDescription(String description)
@Deprecated public Project setPackaging(String packaging)
public boolean isRoot()
public Project getRoot()
public boolean isModule()
@Deprecated public Project.AnalysisType getAnalysisType()
@Deprecated public Project setAnalysisType(Project.AnalysisType at)
@Deprecated public boolean isLatestAnalysis()
@Deprecated public Project setLatestAnalysis(boolean b)
@Deprecated public Language getLanguage()
FileSystem.languages()
getLanguage in class Resourcepublic Project setLanguage(Language language)
@Deprecated public String getLanguageKey()
FileSystem.languages()
public Project setAnalysisDate(Date analysisDate)
public Project setAnalysisVersion(String analysisVersion)
public String getScope()
getScope in class Resourcepublic String getQualifier()
Resource
getQualifier in class Resourcefor the list of qualifiers,
to find out if a resource if a class, a unit test,... from its qualifierpublic boolean matchFilePattern(String antPattern)
Resource
matchFilePattern in class ResourceantPattern - Ant-like pattern (with **, * and ?). It includes file suffixes.
public Project getParent()
ResourceReturn null if the parent is the project.
getParent in class Resourcepublic Project setParent(Project parent)
public void removeFromParent()
public List<Project> getModules()
@Deprecated public boolean getReuseExistingRulesConfig()
public String getAnalysisVersion()
public Date getAnalysisDate()
@Deprecated public String[] getExclusionPatterns()
FileExclusions in version 3.5
@Deprecated public String[] getTestExclusionPatterns()
FileExclusions in version 3.5
@Deprecated public Project setExclusionPatterns(String[] s)
FileExclusions in version 3.5
@Deprecated public ProjectFileSystem getFileSystem()
ModuleFileSystem in 3.5
@Deprecated public Project setFileSystem(ProjectFileSystem fs)
@Deprecated public String getGroupId()
@Deprecated public String getArtifactId()
@Deprecated public org.apache.maven.project.MavenProject getPom()
@Deprecated public org.apache.commons.configuration.Configuration getConfiguration()
public final Project setConfiguration(org.apache.commons.configuration.Configuration configuration)
@Deprecated public Object getProperty(String key)
Settings.
public static Project createFromMavenIds(String groupId,
String artifactId)
public static Project createFromMavenIds(String groupId,
String artifactId,
@Nullable
String branch)
public String toString()
toString in class Objectpublic String key()
key in interface Componentpublic String name()
name in interface Componentpublic String path()
Component
path in interface Componentpublic String longName()
longName in interface Componentpublic String qualifier()
qualifier in interface Component
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||