Annotation Type ValidIdentifier


  • @Constraint(validatedBy={})
    @Target({METHOD,FIELD,ANNOTATION_TYPE})
    @Retention(RUNTIME)
    @ReportAsSingleViolation
    @Pattern(regexp="([\\p{L}_$][\\p{L}\\p{N}_$]*\\.)*[\\p{L}_$][\\p{L}\\p{N}_$]*")
    @Size(min=1,
          max=128)
    public @interface ValidIdentifier
    A valid pubserver identifier is a non-empty string with maximum of 128 non whitespace characters that follows the same rules as package names in Java (words separated by dots, no use of whitespace, but underscore and dollar signs allowed). A valid identifier can be used as a node name in the repository and is easily parsable for when used in a parameter parser.

    Example: "my.world.devided.by.three" is okay but "my.world.devided by.3" is not because of the inner blank and because the word is starting with digit instead of letter)

    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.Class<?>[] groups  
      java.lang.String message  
      java.lang.Class<? extends javax.validation.Payload>[] payload  
    • Element Detail

      • message

        java.lang.String message
        Default:
        "Input is not a valid pubserver identifier - should be a non-empty string with maximum of 128 non whitespace characters that follows the rules of package names in Java"
      • groups

        java.lang.Class<?>[] groups
        Default:
        {}
      • payload

        java.lang.Class<? extends javax.validation.Payload>[] payload
        Default:
        {}