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 Modifier and Type Method Description PropertyDefinition
build()
PropertyDefinition.Builder
category(java.lang.String category)
PropertyDefinition.Builder
defaultValue(java.lang.String defaultValue)
PropertyDefinition.Builder
deprecatedKey(java.lang.String deprecatedKey)
PropertyDefinition.Builder
description(java.lang.String description)
PropertyDefinition.Builder
fields(java.util.List<PropertyFieldDefinition> fields)
PropertyDefinition.Builder
fields(PropertyFieldDefinition first, PropertyFieldDefinition... rest)
PropertyDefinition.Builder
hidden()
Flag the property as hidden.PropertyDefinition.Builder
index(int index)
Set the order index in Settings pages.PropertyDefinition.Builder
multiValues(boolean multiValues)
PropertyDefinition.Builder
name(java.lang.String name)
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.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.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.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.PropertyDefinition.Builder
options(java.lang.String first, java.lang.String... rest)
PropertyDefinition.Builder
options(java.util.List<java.lang.String> options)
PropertyDefinition.Builder
subCategory(java.lang.String subCategory)
PropertyDefinition.Builder
type(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)
-
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()
-
-