Annotation Type PackageURL


  • @Target(FIELD)
    @Retention(RUNTIME)
    @Constraint(validatedBy=PackageURLConstraintValidator.class)
    public @interface PackageURL
    Annotation that can be applied to a String field within a class. The PackageURL annotation instructs the JSR-303 compliant validator to validate the field to ensure it meets the Package URL specification.
    Since:
    1.3.0
    • 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:
        "The Package URL (purl) must be a valid URI and conform to https://github.com/package-url/purl-spec"
      • groups

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

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