Package org.sonar.api.config
Class PropertyDefinition.Builder
- java.lang.Object
-
- org.sonar.api.config.PropertyDefinition.Builder
-
- Enclosing class:
- PropertyDefinition
public static class PropertyDefinition.Builder extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description PropertyDefinitionbuild()PropertyDefinition.Buildercategory(java.lang.String category)PropertyDefinition.BuilderdefaultValue(java.lang.String defaultValue)PropertyDefinition.BuilderdeprecatedKey(java.lang.String deprecatedKey)PropertyDefinition.Builderdescription(java.lang.String description)PropertyDefinition.Builderfields(java.util.List<PropertyFieldDefinition> fields)PropertyDefinition.Builderfields(PropertyFieldDefinition first, PropertyFieldDefinition... rest)PropertyDefinition.Builderhidden()Flag the property as hidden.PropertyDefinition.Builderindex(int index)Set the order index in Settings pages.PropertyDefinition.BuildermultiValues(boolean multiValues)PropertyDefinition.Buildername(java.lang.String name)PropertyDefinition.BuilderonlyOnQualifiers(java.lang.String first, java.lang.String... rest)The property will be available in the components with the given qualifiers, but NOT in General Settings.PropertyDefinition.BuilderonlyOnQualifiers(java.util.List<java.lang.String> qualifiers)The property will be available in the components with the given qualifiers, but NOT in General Settings.PropertyDefinition.BuilderonQualifiers(java.lang.String first, java.lang.String... rest)The property will be available in General Settings AND in the components with the given qualifiers.PropertyDefinition.BuilderonQualifiers(java.util.List<java.lang.String> qualifiers)The property will be available in General Settings AND in the components with the given qualifiers.PropertyDefinition.Builderoptions(java.lang.String first, java.lang.String... rest)PropertyDefinition.Builderoptions(java.util.List<java.lang.String> options)PropertyDefinition.BuilderpropertySetKey(java.lang.String propertySetKey)Deprecated.since 6.1, as it was not used and too complex to maintain.PropertyDefinition.BuildersubCategory(java.lang.String subCategory)PropertyDefinition.Buildertype(PropertyType type)
-
-
-
Method Detail
-
description
public PropertyDefinition.Builder description(java.lang.String description)
-
name
public PropertyDefinition.Builder name(java.lang.String name)
- See Also:
PropertyDefinition.name()
-
defaultValue
public PropertyDefinition.Builder defaultValue(java.lang.String defaultValue)
- See Also:
PropertyDefinition.defaultValue()
-
category
public PropertyDefinition.Builder category(java.lang.String category)
- See Also:
PropertyDefinition.category()
-
subCategory
public PropertyDefinition.Builder subCategory(java.lang.String subCategory)
- See Also:
PropertyDefinition.subCategory()
-
onQualifiers
public PropertyDefinition.Builder onQualifiers(java.lang.String first, java.lang.String... rest)
The property will be available in General Settings AND in the components with the given qualifiers.
For example @{code onQualifiers(Qualifiers.PROJECT)} allows to configure the property in General Settings and in Project Settings.
See supported constant values inQualifiers. By default property is available only in General Settings.
-
onQualifiers
public PropertyDefinition.Builder onQualifiers(java.util.List<java.lang.String> qualifiers)
The property will be available in General Settings AND in the components with the given qualifiers.
For example @{code onQualifiers(Arrays.asList(Qualifiers.PROJECT))} allows to configure the property in General Settings and in Project Settings.
See supported constant values inQualifiers. By default property is available only in General Settings.
-
onlyOnQualifiers
public PropertyDefinition.Builder onlyOnQualifiers(java.lang.String first, java.lang.String... rest)
The property will be available in the components with the given qualifiers, but NOT in General Settings.
For example @{code onlyOnQualifiers(Qualifiers.PROJECT)} allows to configure the property in Project Settings only.
See supported constant values inQualifiers. By default property is available only in General Settings.
-
onlyOnQualifiers
public PropertyDefinition.Builder onlyOnQualifiers(java.util.List<java.lang.String> qualifiers)
The property will be available in the components with the given qualifiers, but NOT in General Settings.
For example @{code onlyOnQualifiers(Arrays.asList(Qualifiers.PROJECT))} allows to configure the property in Project Settings only.
See supported constant values inQualifiers. By default property is available only in General Settings.
-
type
public PropertyDefinition.Builder type(PropertyType type)
- See Also:
PropertyDefinition.type()
-
options
public PropertyDefinition.Builder options(java.lang.String first, java.lang.String... rest)
-
options
public PropertyDefinition.Builder options(java.util.List<java.lang.String> options)
-
multiValues
public PropertyDefinition.Builder multiValues(boolean multiValues)
-
propertySetKey
@Deprecated public PropertyDefinition.Builder propertySetKey(java.lang.String propertySetKey)
Deprecated.since 6.1, as it was not used and too complex to maintain.
-
fields
public PropertyDefinition.Builder fields(PropertyFieldDefinition first, PropertyFieldDefinition... rest)
-
fields
public PropertyDefinition.Builder fields(java.util.List<PropertyFieldDefinition> fields)
-
deprecatedKey
public PropertyDefinition.Builder deprecatedKey(java.lang.String deprecatedKey)
-
hidden
public PropertyDefinition.Builder hidden()
Flag the property as hidden. Hidden properties are not displayed in Settings pages but allow plugins to benefit from type and default values when callingSettings.
-
index
public PropertyDefinition.Builder index(int index)
Set the order index in Settings pages. A property with a lower index is displayed before properties with higher index.
-
build
public PropertyDefinition build()
-
-