Annotation Type ValidName


  • @Constraint(validatedBy={})
    @Target({METHOD,FIELD,ANNOTATION_TYPE})
    @Retention(RUNTIME)
    @Pattern(regexp="[^\\s\\/:\\[\\]*\'\"|?<>#]([^\\/:\\[\\]*\'\"|?<>#]*[^\\s\\/:\\[\\]*\'\"|?<>#])?")
    @ReportAsSingleViolation
    @Size(min=1,
          max=128)
    public @interface ValidName
    A name string for pubserver is a non-empty string with maximum of 128 characters where the first and last character have to be non-whitespace and the following characters are not allowed: "/", "\", ":", "?", "*", "#", "'", """, "|", "<", ">", "[", "]".

    A valid name can be used as a node name in the repository.

    • "A valid name_$" is a valid name.
    • " v[e]ry i/n\v:a?l*i#d'N"a|m<e>" is an invalid name.
    • 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 name - should be a non-empty string with maximum of 128 characters roughly following the rules of file name in a file explorer"
      • groups

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

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