Class DomainRequirementProvider
- java.lang.Object
-
- com.google.jenkins.plugins.credentials.domains.DomainRequirementProvider
-
- All Implemented Interfaces:
ExtensionPoint
- Direct Known Subclasses:
DescribableDomainRequirementProvider
public abstract class DomainRequirementProvider extends Object implements ExtensionPoint
ThisExtensionPoint
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 toprovide(Class)
aList
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 theRequiresDomain
resolution.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description DomainRequirementProvider()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description 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.static <T extends com.cloudbees.plugins.credentials.domains.DomainRequirement>
Tof(Class<?> type, Class<T> requirementType)
This 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>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.
-
-
-
Method Detail
-
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.
-
-