org.apache.beehive.controls.api.properties
Annotation Type PropertySet


@Inherited
@Retention(value=RUNTIME)
@Target(value=ANNOTATION_TYPE)
public @interface PropertySet

The PropertySet annotation type is used to mark an interface that defines a set of properties that are associated with a Java Control. By convention, property sets are declared as an inner annotation types on the Java Control public interface.

Each member of the annotation type targeted by the PropertySet annotation will define a new property for the control.

Here is a simple example:

 public interface MyControl extends org.apache.beehive.controls.api.Control
 {
     @PropertySet
     public @interface MyProperties
     {
         public String aStringProperty();
         public int anIntProperty();
         ...
       }
 }
 

A Java Control can have multiple property sets associated with it.


Optional Element Summary
 boolean externalConfig
          The externalConfig member defines whether properties in the set will be settable via external configuration.
 String prefix
          The prefix member defines a prefix that will be used in all property setter/getter methods for properties in the PropertySet.
 

prefix

public abstract String prefix
The prefix member defines a prefix that will be used in all property setter/getter methods for properties in the PropertySet. It is necessary to specify a prefixes when a control interface has multiple property sets that contain properties with the same name.

The following code shows the basic conventions for setter/getter methods on a Java Control Bean:

     public void set<prefix><propertyName>(<propertyType> value);
     public <propertyType> get<prefix><propertyName>();
 
/code> where prefix is the prefix member value, propertyName is the name of the declared property member, and propertyType is the type associated with the declared property member.

Default:
""

externalConfig

public abstract boolean externalConfig
The externalConfig member defines whether properties in the set will be settable via external configuration.

Default:
false