Annotation Interface OnVSField


Annotation for tagging methods to receive VirtualSpace Field events, i.e. for Virtual Field Processors.

Only 1 acceptable method pattern for this annotation.
Note: methodName can be any name you want to use.

Example:

   @VirtualSpace(ref="Proj:/vs/subFolder/OneVS")
   public class MyVSListener
     {
     public MyVSListener()
       {
       ...
       }

     // Method called to validate the "FieldName" field.
     @OnVSField(name="FieldName", descr="Validates a Field Name", ops={VSFieldEvent.Op.VALIDATE})
     public void onMyValidate(VSFieldEvent event) throws ValueConversionException
       {
       ...
       }

     // Method called to convert the "group/FieldName" field value to other formats.
     @OnVSField(name="group/FieldName", descr="Converts a Field Value", ops={Op.CONVERT_TO_NATIVE}, source={String.class}, target={Boolean.class})
     public void onMyConvert(VSFieldEvent event) throws ValueConversionException
       {
       ...
       }
     }
 

Author:
Christopher Mindus
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The description of the field processor routine, used in the Eclipse UI.
    The Name or Relative Path of the Property to associate with the method.
    The list of supported event operations in this instance.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<?>[]
    The list of supported Value conversion classes that are handled as source conversion from a value, used in the CONVERT_* operations.
    Class<?>[]
    The list of supported Value conversion classes that are handled as target conversion from a value, used in the CONVERT_* operations.
  • Element Details

    • name

      String name
      The Name or Relative Path of the Property to associate with the method. The name is either a Name without slash ('/') that is a direct child of the VirtualSpace reference, or a Relative Path from the VirtualSpace root.
      Returns:
      The Property Name path from the VirtualSpace base "ref" reference specification, e.g. "myField" or "group/mySubField".
    • descr

      String descr
      The description of the field processor routine, used in the Eclipse UI.
      Returns:
      A descriptive string of the field processor.
    • ops

      The list of supported event operations in this instance. Only the event for the supported operations are fired to the annotation implementing method.
      Returns:
      The list of supported events, e.g. VALIDATE and/or CONVERT_*.
    • source

      Class<?>[] source
      The list of supported Value conversion classes that are handled as source conversion from a value, used in the CONVERT_* operations.
      Returns:
      One or more supported native conversion classes from:
      • String.class,
      • java.math.BigDecimal.class,
      • Boolean.class,
      • Byte.class,
      • Short.class,
      • Integer.class,
      • Long.class,
      • Float.class,
      • Double.class,
      • byte[].class (Binary value type),
      • java.sql.Date.class,
      • java.sql.Time.class,
      • java.sql.Timestamp.class,
      • Number.class (meaning BigDecimal, Byte, Short, Integer, Long, Float and Double at once).
      Default:
      {}
    • target

      Class<?>[] target
      The list of supported Value conversion classes that are handled as target conversion from a value, used in the CONVERT_* operations.
      Returns:
      One or more supported native value classes of the list below:
      • String.class,
      • java.math.BigDecimal.class,
      • Boolean.class,
      • Byte.class,
      • Short.class,
      • Integer.class,
      • Long.class,
      • Float.class,
      • Double.class,
      • byte[].class (Binary value type),
      • java.sql.Date.class,
      • java.sql.Time.class,
      • java.sql.Timestamp.class,
      • Number.class (meaning BigDecimal, Byte, Short, Integer, Long, Float and Double at once).
      Default:
      {}