Annotation Type RequiresDomain


@Documented @Retention(RUNTIME) @Target(TYPE) @Inherited public @interface RequiresDomain
This annotation is used to indicate that a given class has the specified DomainRequirement. This is used to automatically discover the extent of existing requirements, so that the user can specify the necessary requirements from a sufficiently complete list presented in the UI. For Example (URI): If a plugin only supports https/ssh URIs, we might annotate: @RequiresDomain(value = SecureURIRequirement.class) Even though only one of the two may be necessary, it is sufficient to only surface the options HTTPS/SSH in the specification UI. For Example (OAuth2): This is much more important for less constrained spaces than URI schemes, especially when the options are harder to type options, e.g. OAuth2 scopes. In this case, a plugin might annotate: @RequiresDomain(value = OAuth2ScopesABandC.class) Even though the task they end up configuring may only require scopes "A" and "B".
See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Class<? extends com.cloudbees.plugins.credentials.domains.DomainRequirement>
    The class of DomainRequirement to which the annotated class adheres.
  • Element Details

    • value

      Class<? extends com.cloudbees.plugins.credentials.domains.DomainRequirement> value
      The class of DomainRequirement to which the annotated class adheres.