org.sonar.api.config
Class PropertyDefinition.Builder

java.lang.Object
  extended by org.sonar.api.config.PropertyDefinition.Builder
Enclosing class:
PropertyDefinition

public static class PropertyDefinition.Builder
extends Object


Method Summary
 PropertyDefinition build()
           
 PropertyDefinition.Builder category(String category)
           
 PropertyDefinition.Builder defaultValue(String defaultValue)
           
 PropertyDefinition.Builder deprecatedKey(String deprecatedKey)
           
 PropertyDefinition.Builder description(String description)
           
 PropertyDefinition.Builder fields(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(String name)
           
 PropertyDefinition.Builder onlyOnQualifiers(List<String> qualifiers)
          The property will be available in the components with the given qualifiers, but NOT in General Settings.
 PropertyDefinition.Builder onlyOnQualifiers(String first, String... rest)
          The property will be available in the components with the given qualifiers, but NOT in General Settings.
 PropertyDefinition.Builder onQualifiers(List<String> qualifiers)
          The property will be available in General Settings AND in the components with the given qualifiers.
 PropertyDefinition.Builder onQualifiers(String first, String... rest)
          The property will be available in General Settings AND in the components with the given qualifiers.
 PropertyDefinition.Builder options(List<String> options)
           
 PropertyDefinition.Builder options(String first, String... rest)
           
 PropertyDefinition.Builder propertySetKey(String propertySetKey)
           
 PropertyDefinition.Builder subCategory(String subCategory)
           
 PropertyDefinition.Builder type(PropertyType type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

description

public PropertyDefinition.Builder description(String description)

name

public PropertyDefinition.Builder name(String name)
See Also:
PropertyDefinition.name()

defaultValue

public PropertyDefinition.Builder defaultValue(String defaultValue)
See Also:
PropertyDefinition.defaultValue()

category

public PropertyDefinition.Builder category(String category)
See Also:
PropertyDefinition.category()

subCategory

public PropertyDefinition.Builder subCategory(String subCategory)
See Also:
PropertyDefinition.subCategory()

onQualifiers

public PropertyDefinition.Builder onQualifiers(String first,
                                               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 in Qualifiers. By default property is available only in General Settings.


onQualifiers

public PropertyDefinition.Builder onQualifiers(List<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 in Qualifiers. By default property is available only in General Settings.


onlyOnQualifiers

public PropertyDefinition.Builder onlyOnQualifiers(String first,
                                                   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 in Qualifiers. By default property is available only in General Settings.


onlyOnQualifiers

public PropertyDefinition.Builder onlyOnQualifiers(List<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 in Qualifiers. 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(String first,
                                          String... rest)

options

public PropertyDefinition.Builder options(List<String> options)

multiValues

public PropertyDefinition.Builder multiValues(boolean multiValues)

propertySetKey

public PropertyDefinition.Builder propertySetKey(String propertySetKey)

fields

public PropertyDefinition.Builder fields(PropertyFieldDefinition first,
                                         PropertyFieldDefinition... rest)

fields

public PropertyDefinition.Builder fields(List<PropertyFieldDefinition> fields)

deprecatedKey

public PropertyDefinition.Builder deprecatedKey(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 calling Settings.


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()


Copyright © 2009-2013 SonarSource. All Rights Reserved.