org.sonar.api.checks.templates
Class CheckTemplateRepository
java.lang.Object
org.sonar.api.checks.templates.CheckTemplateRepository
- All Implemented Interfaces:
- BatchComponent, BatchExtension, Extension, RulesRepository, ServerComponent, ServerExtension
public class CheckTemplateRepository
- extends java.lang.Object
- implements RulesRepository
EXPERIMENTAL - will be used in version 2.3
- Since:
- 2.1
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
CheckTemplateRepository
public CheckTemplateRepository()
CheckTemplateRepository
public CheckTemplateRepository(java.lang.String key)
getKey
public java.lang.String getKey()
setKey
public CheckTemplateRepository setKey(java.lang.String key)
getLanguage
public Language getLanguage()
- Specified by:
getLanguage
in interface RulesRepository
- Returns:
- the language the repository is associated
setLanguage
public CheckTemplateRepository setLanguage(Language l)
getTemplates
public java.util.List<CheckTemplate> getTemplates()
setTemplates
public CheckTemplateRepository setTemplates(java.util.List<CheckTemplate> c)
getTemplate
public CheckTemplate getTemplate(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
createFromXml
public static CheckTemplateRepository createFromXml(java.lang.String repositoryKey,
Language language,
java.lang.String pathToXml)
createFromAnnotatedClasses
public static CheckTemplateRepository createFromAnnotatedClasses(java.lang.String repositoryKey,
Language language,
java.util.Collection<java.lang.Class> classes)
getInitialReferential
public java.util.List<Rule> getInitialReferential()
- Specified by:
getInitialReferential
in interface RulesRepository
- Returns:
- the list of rules of the repository
parseReferential
public java.util.List<Rule> parseReferential(java.lang.String fileContent)
- Description copied from interface:
RulesRepository
- The method to parse the base referential of rules and return a list of rules
- Specified by:
parseReferential
in interface RulesRepository
- Parameters:
fileContent
- the initial referential
- Returns:
- a list of rules
getProvidedProfiles
public java.util.List<RulesProfile> getProvidedProfiles()
- Specified by:
getProvidedProfiles
in interface RulesRepository
- Returns:
- a list of profiles that are provided with the referential
Copyright © 2009-2010 SonarSource. All Rights Reserved.