public class Project extends Resource implements Component
Modifier and Type | Class and Description |
---|---|
static class |
Project.AnalysisType
Deprecated.
since 4.4 Since 4.3 SQ will no more run tests. So basically it's always reuse report.
|
Modifier and Type | Field and Description |
---|---|
static Language |
NONE_LANGUAGE
Internal use
|
static String |
SCOPE |
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 and Description |
---|
Project(String key) |
Project(String key,
String branch,
String name) |
Modifier and Type | Method and Description |
---|---|
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 |
getBranch() |
String |
getDescription() |
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() |
Project |
getParent()
The parent is used to build the resources tree, for example for relations between files, directories and projects.
|
String |
getQualifier()
The qualifier tells the type of the resource.
|
Project |
getRoot() |
String |
getScope() |
Settings |
getSettings()
Deprecated.
since 5.0
|
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.sonarsource.com/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.
|
void |
setBaseDir(File baseDir) |
Project |
setBranch(String branch)
For internal use only.
|
Project |
setDescription(String description)
For internal use only.
|
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.sonarsource.com/browse/SONAR-4334
|
Project |
setName(String name)
For internal use only.
|
Project |
setParent(Project parent)
For internal use only.
|
Project |
setSettings(Settings settings)
Internal use
|
String |
toString() |
equals, getEffectiveKey, getId, getKey, getPath, getUuid, hashCode, isExcluded, language, normalize, setEffectiveKey, setExcluded, setId, setKey, setPath, setUuid
public static final Language NONE_LANGUAGE
public static final String SCOPE
public String getLongName()
getLongName
in class Resource
public String getDescription()
getDescription
in class Resource
public Project setDescription(String description)
public boolean isRoot()
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 Resource
public Project setLanguage(Language language)
@Deprecated public String getLanguageKey()
FileSystem.languages()
public Project setSettings(Settings settings)
@Deprecated public Settings getSettings()
public Project setAnalysisDate(Date analysisDate)
public Project setAnalysisVersion(String analysisVersion)
public String getQualifier()
Resource
getQualifier
in class Resource
for the list of qualifiers
,
to find out if a resource if a class, a unit test,... from its qualifier
public boolean matchFilePattern(String antPattern)
Resource
matchFilePattern
in class Resource
antPattern
- Ant-like pattern (with **, * and ?). It includes file suffixes.@CheckForNull public Project getParent()
Resource
Return null if the parent is the current project (or module in case of multi-module).
public void removeFromParent()
public List<Project> getModules()
public String getAnalysisVersion()
public Date getAnalysisDate()
public static Project createFromMavenIds(String groupId, String artifactId)
public static Project createFromMavenIds(String groupId, String artifactId, @Nullable String branch)
public String path()
Component
public void setBaseDir(File baseDir)
Copyright © 2009–2016 SonarSource. All rights reserved.