Package org.sonar.api

Annotation Type PropertyField


  • @Retention(RUNTIME)
    @Target(TYPE)
    public @interface PropertyField
    Property field.
    Since:
    3.3
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      java.lang.String key
      Unique key within a property.
      java.lang.String name
      This name will be displayed on the Settings page.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String description
      If not empty, this description will be displayed on the Settings page.
      int indicativeSize
      Deprecated.
      since 6.1, as it was only used for UI.
      java.lang.String[] options
      Options for *_LIST types
      PropertyType type  
    • Element Detail

      • key

        java.lang.String key
        Unique key within a property. It shouldn't be prefixed. Settings for this field are stored into the database with a composite key {key of parent property}.{key of the set}.{key of this field} eg. sonar.jira.servers.JIRA1.url
      • name

        java.lang.String name
        This name will be displayed on the Settings page. This can be overridden/translated by adding a a value for: field.{key of parent property}.{key of this field}.name in the language bundle.
      • description

        java.lang.String description
        If not empty, this description will be displayed on the Settings page. This can be overridden/translated by adding a a value for: field.{key of parent property}.{key of this field}.description in the language bundle.
        Default:
        ""
      • indicativeSize

        @Deprecated
        int indicativeSize
        Deprecated.
        since 6.1, as it was only used for UI.
        Indicative size of the field value in characters. This size is not validated, it is merely used by the GUI to size the different input fields of a property set.
        Default:
        20
      • type

        PropertyType type
        Default:
        org.sonar.api.PropertyType.STRING
      • options

        java.lang.String[] options
        Options for *_LIST types
        Default:
        {}