Package org.sonar.api.config
Class PropertyDefinitions
- java.lang.Object
-
- org.sonar.api.config.PropertyDefinitions
-
@ScannerSide @ServerSide @ComputeEngineSide public final class PropertyDefinitions extends java.lang.Object
Metadata of all the properties declared by plugins- Since:
- 2.12
-
-
Constructor Summary
Constructors Constructor Description PropertyDefinitions(System2 system, java.lang.Object... components)
PropertyDefinitions(System2 system, java.util.Collection<PropertyDefinition> components)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PropertyDefinitions
addComponent(java.lang.Object object)
PropertyDefinitions
addComponent(java.lang.Object component, java.lang.String defaultCategory)
PropertyDefinitions
addComponents(java.util.Collection components)
PropertyDefinitions
addComponents(java.util.Collection components, java.lang.String defaultCategory)
PropertyDefinition
get(java.lang.String key)
java.util.Collection<PropertyDefinition>
getAll()
java.util.Map<java.lang.String,java.lang.String>
getAllPropertiesSetInEnv()
java.lang.String
getCategory(java.lang.String key)
java.lang.String
getCategory(Property prop)
java.lang.String
getDefaultValue(java.lang.String key)
java.lang.String
getDeprecatedKey(java.lang.String key)
java.lang.String
getNewKey(java.lang.String deprecatedKey)
java.lang.String
getSubCategory(java.lang.String key)
java.util.Optional<java.lang.String>
getValueFromEnv(java.lang.String key)
java.util.Map<Category,java.util.Map<SubCategory,java.util.Collection<PropertyDefinition>>>
propertiesByCategory(java.lang.String qualifier)
java.lang.String
validKey(java.lang.String key)
-
-
-
Constructor Detail
-
PropertyDefinitions
public PropertyDefinitions(System2 system, java.lang.Object... components)
-
PropertyDefinitions
public PropertyDefinitions(System2 system, java.util.Collection<PropertyDefinition> components)
-
-
Method Detail
-
addComponents
public PropertyDefinitions addComponents(java.util.Collection components)
-
addComponents
public PropertyDefinitions addComponents(java.util.Collection components, java.lang.String defaultCategory)
-
addComponent
public PropertyDefinitions addComponent(java.lang.Object object)
-
addComponent
public PropertyDefinitions addComponent(java.lang.Object component, java.lang.String defaultCategory)
-
get
@CheckForNull public PropertyDefinition get(java.lang.String key)
-
getValueFromEnv
public java.util.Optional<java.lang.String> getValueFromEnv(java.lang.String key)
-
getAllPropertiesSetInEnv
public java.util.Map<java.lang.String,java.lang.String> getAllPropertiesSetInEnv()
-
getAll
public java.util.Collection<PropertyDefinition> getAll()
-
validKey
public java.lang.String validKey(java.lang.String key)
-
propertiesByCategory
public java.util.Map<Category,java.util.Map<SubCategory,java.util.Collection<PropertyDefinition>>> propertiesByCategory(@Nullable java.lang.String qualifier)
- Since:
- 3.7
-
getDefaultValue
@CheckForNull public java.lang.String getDefaultValue(java.lang.String key)
-
getCategory
public java.lang.String getCategory(java.lang.String key)
-
getSubCategory
public java.lang.String getSubCategory(java.lang.String key)
-
getCategory
public java.lang.String getCategory(Property prop)
-
getNewKey
public java.lang.String getNewKey(java.lang.String deprecatedKey)
-
getDeprecatedKey
public java.lang.String getDeprecatedKey(java.lang.String key)
-
-