Class DomainRequirementProvider
java.lang.Object
com.google.jenkins.plugins.credentials.domains.DomainRequirementProvider
- All Implemented Interfaces:
ExtensionPoint
- Direct Known Subclasses:
DescribableDomainRequirementProvider
This
ExtensionPoint
serves as a means for plugins to augment the
domain-requirement discovery process. The intended usage is:
List<T> list = DomainRequirementProvider.lookupRequirements(
FooRequirement.class);
This will delegate to the various extension implementations to
provide(Class)
a List
of requirements from things it
understands how to discover. The expectation is that it will call:
of(discoveredClass, type /* parameter to provide */);
in order to perform the RequiresDomain
resolution.-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends com.cloudbees.plugins.credentials.domains.DomainRequirement>
List<T>lookupRequirements
(Class<T> type) The the entrypoint for requirement gathering, this static method delegates to any registered providers to provide their set of discoverable requirements.static <T extends com.cloudbees.plugins.credentials.domains.DomainRequirement>
TThis is called by implementations ofprovide()
to instantiate the class specified by an actual attribute, if present.protected abstract <T extends com.cloudbees.plugins.credentials.domains.DomainRequirement>
List<T>This hook is intended for providers to implement such that they can surface custom class-discovery logic, on which they will callof()
to instantiate the elements returned.
-
Constructor Details
-
DomainRequirementProvider
public DomainRequirementProvider()
-
-
Method Details
-
provide
protected abstract <T extends com.cloudbees.plugins.credentials.domains.DomainRequirement> List<T> provide(Class<T> type) This hook is intended for providers to implement such that they can surface custom class-discovery logic, on which they will callof()
to instantiate the elements returned. -
lookupRequirements
public static <T extends com.cloudbees.plugins.credentials.domains.DomainRequirement> List<T> lookupRequirements(Class<T> type) The the entrypoint for requirement gathering, this static method delegates to any registered providers to provide their set of discoverable requirements. -
of
@Nullable public static <T extends com.cloudbees.plugins.credentials.domains.DomainRequirement> T of(Class<?> type, Class<T> requirementType) This is called by implementations ofprovide()
to instantiate the class specified by an actual attribute, if present. It returns null otherwise.
-