Package org.sonar.api.server.rule
Class RuleDescriptionSectionBuilder
- java.lang.Object
- 
- org.sonar.api.server.rule.RuleDescriptionSectionBuilder
 
- 
 public final class RuleDescriptionSectionBuilder extends java.lang.ObjectThis builder allows to build the right implementation ofRuleDescriptionSection, depending on the provided arguments- Since:
- 9.6
 
- 
- 
Constructor SummaryConstructors Constructor Description RuleDescriptionSectionBuilder()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description RuleDescriptionSectionbuild()RuleDescriptionSectionBuildercontext(Context context)For context specific descriptions, the context key, must be unique across a given section of a rule.RuleDescriptionSectionBuilderhtmlClasspathResourceUrl(java.net.URL htmlClasspathResourceUrl)The classpath URL of the resource containing the rule section content in HTML format.RuleDescriptionSectionBuilderhtmlContent(java.lang.String htmlContent)The content, in HTML formatRuleDescriptionSectionBuildersectionKey(java.lang.String sectionKey)Identifier of the section, must be unique across sections of a given rule Section keys must follow the format defined inStringPatternValidator.COMMON_PATTERN_FOR_KEYS
 
- 
- 
- 
Method Detail- 
sectionKeypublic RuleDescriptionSectionBuilder sectionKey(java.lang.String sectionKey) Identifier of the section, must be unique across sections of a given rule Section keys must follow the format defined inStringPatternValidator.COMMON_PATTERN_FOR_KEYS
 - 
htmlContentpublic RuleDescriptionSectionBuilder htmlContent(java.lang.String htmlContent) The content, in HTML format
 - 
htmlClasspathResourceUrlpublic RuleDescriptionSectionBuilder htmlClasspathResourceUrl(java.net.URL htmlClasspathResourceUrl) The classpath URL of the resource containing the rule section content in HTML format. Example :htmlClasspathResourceUrl(getClass().getResource("/myrepo/Rule1234_section_intro.html")
 - 
contextpublic RuleDescriptionSectionBuilder context(@Nullable Context context) For context specific descriptions, the context key, must be unique across a given section of a rule.- Since:
- 9.7
 
 - 
buildpublic RuleDescriptionSection build() 
 
- 
 
-