|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object 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_BRANCH
Deprecated. since version 1.11. Constant moved to CoreProperties |
static String |
PARAM_DATE
Deprecated. since version 1.11. Constant moved to CoreProperties |
static String |
PARAM_DEPRECATED_BRANCH
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 interface org.sonar.api.resources.Resource |
---|
QUALIFIER_CLASS, QUALIFIER_DIRECTORY, QUALIFIER_FILE, 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(org.apache.maven.project.MavenProject mavenProject)
Creates a Project from a MavenProject (pom) |
|
Project(org.apache.maven.project.MavenProject pom,
org.apache.commons.configuration.Configuration configuration)
Creates a project from MavenProject and a configuration |
|
Project(String key,
String name,
String packaging,
org.apache.commons.configuration.Configuration conf)
Creates a Project from key, name, packaging and configuration |
Method Summary | |
---|---|
boolean |
equals(Object o)
|
Date |
getAnalysisDate()
|
Project.AnalysisType |
getAnalysisType()
|
String |
getAnalysisVersion()
|
String |
getArtifactId()
Deprecated. since 1.12. Avoid coupling with Maven concepts. |
org.apache.commons.configuration.Configuration |
getConfiguration()
|
String |
getDescription()
|
String[] |
getExclusionPatterns()
Patterns of resource exclusion as defined in project settings page. |
ProjectFileSystem |
getFileSystem()
|
String |
getGroupId()
Deprecated. since 1.12. Avoid coupling with Maven concepts. |
Integer |
getId()
Internal use |
String |
getKey()
Project key is "groupId:artifactId[:branch]". |
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()
|
Snapshot |
getSnapshot()
Internal use |
int |
hashCode()
|
boolean |
isModule()
|
boolean |
isRoot()
|
boolean |
isSonarLightMode()
Deprecated. |
boolean |
matchFilePattern(String antPattern)
Check resource against an Ant pattern, like mypackag?/*Foo.java. |
Project |
setConfiguration(org.apache.commons.configuration.Configuration configuration)
Sets the configuration |
Project |
setDatabaseSettings(Integer projectId,
Snapshot snapshot)
Internal use |
void |
setExclusionPatterns(String[] patterns)
Set exclusion patterns. |
Project |
setLanguages(Languages languages)
Sets the project languaage |
void |
setParent(Project parent)
Sets a parent to the current object |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
@Deprecated public static final String PARAM_DEPRECATED_BRANCH
@Deprecated public static final String PARAM_BRANCH
@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(org.apache.maven.project.MavenProject mavenProject)
public Project(org.apache.maven.project.MavenProject pom, org.apache.commons.configuration.Configuration configuration)
public Project(String key, String name, String packaging, org.apache.commons.configuration.Configuration conf)
Method Detail |
---|
public Snapshot getSnapshot()
public Integer getId()
public Project setDatabaseSettings(Integer projectId, Snapshot snapshot)
public Project setLanguages(Languages languages)
public Project getRoot()
public String getPackaging()
public boolean isRoot()
public boolean isModule()
public Project.AnalysisType getAnalysisType()
@Deprecated public String getGroupId()
@Deprecated public String getArtifactId()
public String getName()
getName
in interface Resource
public String getLongName()
getLongName
in interface Resource
public String getDescription()
getDescription
in interface Resource
public Language getLanguage()
getLanguage
in interface Resource
public String getLanguageKey()
public String getScope()
getScope
in interface Resource
public String getQualifier()
getQualifier
in interface Resource
public boolean matchFilePattern(String antPattern)
Resource
matchFilePattern
in interface 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 interface Resource
public void setParent(Project parent)
public List<Project> getModules()
public boolean getReuseExistingRulesConfig()
public String getAnalysisVersion()
public Date getAnalysisDate()
public String getKey()
getKey
in interface Resource
public String[] getExclusionPatterns()
public void setExclusionPatterns(String[] patterns)
public ProjectFileSystem getFileSystem()
public org.apache.maven.project.MavenProject getPom()
@Deprecated public boolean isSonarLightMode()
public org.apache.commons.configuration.Configuration getConfiguration()
public Project setConfiguration(org.apache.commons.configuration.Configuration configuration)
public Object getProperty(String key)
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |