org.sonar.api.resources
Class Project
java.lang.Object
org.sonar.api.resources.Project
- All Implemented Interfaces:
- Resource
public class Project
- extends java.lang.Object
- implements Resource
Constructor Summary |
Project(org.apache.maven.project.MavenProject mavenProject)
|
Project(org.apache.maven.project.MavenProject pom,
org.apache.commons.configuration.Configuration configuration)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
PARAM_DEPRECATED_BRANCH
public static final java.lang.String PARAM_DEPRECATED_BRANCH
- See Also:
- Constant Field Values
PARAM_BRANCH
public static final java.lang.String PARAM_BRANCH
- See Also:
- Constant Field Values
PARAM_VERSION
public static final java.lang.String PARAM_VERSION
- See Also:
- Constant Field Values
PARAM_DATE
public static final java.lang.String PARAM_DATE
- See Also:
- Constant Field Values
PARAM_LANGUAGE
public static final java.lang.String PARAM_LANGUAGE
- See Also:
- Constant Field Values
PARAM_DYNAMIC_ANALYSIS
public static final java.lang.String PARAM_DYNAMIC_ANALYSIS
- See Also:
- Constant Field Values
PARAM_EXCLUSIONS
public static final java.lang.String PARAM_EXCLUSIONS
- See Also:
- Constant Field Values
Project
public Project(org.apache.maven.project.MavenProject mavenProject)
Project
public Project(org.apache.maven.project.MavenProject pom,
org.apache.commons.configuration.Configuration configuration)
getSnapshot
public Snapshot getSnapshot()
getId
public java.lang.Integer getId()
setDatabaseSettings
public Project setDatabaseSettings(java.lang.Integer projectId,
Snapshot snapshot)
setLanguages
public Project setLanguages(Languages languages)
getRoot
public Project getRoot()
getPackaging
public java.lang.String getPackaging()
isRoot
public boolean isRoot()
isModule
public boolean isModule()
getAnalysisType
public Project.AnalysisType getAnalysisType()
getGroupId
public java.lang.String getGroupId()
getArtifactId
public java.lang.String getArtifactId()
getBranch
public java.lang.String getBranch()
getName
public java.lang.String getName()
- Specified by:
getName
in interface Resource
getDescription
public java.lang.String getDescription()
- Specified by:
getDescription
in interface Resource
getLanguage
public Language getLanguage()
- Specified by:
getLanguage
in interface Resource
getLanguageKey
public java.lang.String getLanguageKey()
getScope
public java.lang.String getScope()
- Specified by:
getScope
in interface Resource
getQualifier
public java.lang.String getQualifier()
- Specified by:
getQualifier
in interface Resource
matchFilePattern
public boolean matchFilePattern(java.lang.String antPattern)
- Description copied from interface:
Resource
- Check resource against an Ant pattern, like mypackag?/*Foo.java. It's used for example
to match resource exclusions.
- Specified by:
matchFilePattern
in interface Resource
- Parameters:
antPattern
- Ant-like pattern (with **, * and ?). It includes file suffixes.
- Returns:
- true if the resource matches the Ant pattern
getParent
public Project getParent()
- Description copied from interface:
Resource
- The parent is used to build the resources tree, for example for relations between classes, packages and projects.
Return null if the parent is the project.
- Specified by:
getParent
in interface Resource
setParent
public void setParent(Project parent)
getModules
public java.util.List<Project> getModules()
getAnalysisVersion
public java.lang.String getAnalysisVersion()
getAnalysisDate
public java.util.Date getAnalysisDate()
getKey
public java.lang.String getKey()
- Project key is "groupId:artifactId[:branch]". Examples : org.struts:struts-core and org.codehaus.sonar:sonar:1.10
- Specified by:
getKey
in interface Resource
getExclusionPatterns
public java.lang.String[] getExclusionPatterns()
- Patterns of resource exclusion as defined in project settings page.
getFileSystem
public ProjectFileSystem getFileSystem()
getPom
public org.apache.maven.project.MavenProject getPom()
isSonarLightMode
@Deprecated
public boolean isSonarLightMode()
- Deprecated.
getConfiguration
public org.apache.commons.configuration.Configuration getConfiguration()
setConfiguration
public Project setConfiguration(org.apache.commons.configuration.Configuration configuration)
getProperty
public java.lang.Object getProperty(java.lang.String key)
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2009 SonarSource SA. All Rights Reserved.