Annotation Interface 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
    Class<?>[]
     
     
    Class<? extends jakarta.validation.Payload>[]
     
  • Element Details

    • message

      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

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

      Class<? extends jakarta.validation.Payload>[] payload
      Default:
      {}