org.sonar.api
Annotation Type Property


@Retention(value=RUNTIME)
@Target(value=TYPE)
public @interface Property

Property value can be set in different ways :

Value is accessible in batch extensions via the Configuration object of class org.sonar.api.resources.Project (see method getConfiguration()).

Must be used in org.sonar.api.Plugin classes only.

Since:
1.10

Required Element Summary
 String key
          Unique key within all plugins.
 String name
           
 
Optional Element Summary
 String category
           
 String defaultValue
           
 String description
           
 boolean global
          Is the property displayed in global settings page ?
 boolean module
          Is the property displayed in module settings page ? A module is a maven sub-project.
 String[] options
          Options for *_LIST types
 boolean project
          Is the property displayed in projet settings page ?
 PropertyType type
           
 

Element Detail

key

public abstract String key
Unique key within all plugins. It's recommended to prefix the key by 'sonar.' and the plugin name. Examples : 'sonar.cobertura.reportPath' and 'sonar.cpd.minimumTokens'.


name

public abstract String name

defaultValue

public abstract String defaultValue
Default:
""

description

public abstract String description
Default:
""

category

public abstract String category
Since:
2.11
Default:
""

project

public abstract boolean project
Is the property displayed in projet settings page ?

Default:
false

module

public abstract boolean module
Is the property displayed in module settings page ? A module is a maven sub-project.

Default:
false

global

public abstract boolean global
Is the property displayed in global settings page ?

Default:
true

type

public abstract PropertyType type
Since:
3.0
Default:
org.sonar.api.PropertyType.STRING

options

public abstract String[] options
Options for *_LIST types

Since:
3.0
Default:
{}


Copyright © 2009-2012 SonarSource. All Rights Reserved.