Annotation Interface Require.Permission

Enclosing class:
Require

@Retention(RUNTIME) @Target(TYPE) @Documented @Inherited public static @interface Require.Permission
The Permission annotation is used to define a set of permissions required by a class. It can be used to specify which functions the Identity must have to use the annotated class.

Example usage:

 @Permission(value = {"read", "write"})
 public class MyClass {
     // class members
 }
 

The value attribute is used to specify the functions required.

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Returns the functions required by the annotated class.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Returns the violation code for the annotated class.
  • Element Details

    • value

      String[] value
      Returns the functions required by the annotated class.

      The value attribute is used to specify the required functions as an array of strings.

      Returns:
      the functions required by the annotated class as an array of strings
    • violationCode

      String violationCode
      Returns the violation code for the annotated class.

      The violation code could be a string that uniquely identify a Code to be displayed when the required functions are not met.

      Returns:
      the violation code for the annotated class
      Default:
      ""