public abstract class CapabilitiesResolver extends Object implements ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
Constructor and Description |
---|
CapabilitiesResolver() |
Modifier and Type | Method and Description |
---|---|
abstract Set<DeploySourceOrigin> |
getBuilderSources(AbstractProject<?,?> project)
Return the set of sources to be used by
DeployBuilder . |
abstract Set<DeploySourceOrigin> |
getInstantSources(AbstractProject<?,?> project)
Return the set of sources to be used by
DeployNowRunAction . |
static Run<?,?> |
getLastDeployableBuild(Job<?,?> job)
Returns the most recent successful or stable build of the specified job.
|
abstract Run<?,?> |
getLastSuccessfulBuild(AbstractProject<?,?> project)
Returns the last successful build of the specified project.
|
abstract Set<DeploySourceOrigin> |
getPublisherSources(AbstractProject<?,?> project)
Return the set of sources to be used by
DeployPublisher . |
boolean |
isBuilderApplicable()
Return
true if and only if DeployBuilder is allowed to apply to
project types known by this resolver. |
boolean |
isBuilderFromWorkspace()
Return
true if and only if DeployBuilder is allowed to resolve
deployable artifacts from the job workspace. |
boolean |
isInstantApplicable()
Return
true if and only if DeployNowRunAction is allowed to
apply to project types known by this resolver. |
boolean |
isPublisherApplicable()
Return
true if and only if DeployPublisher is allowed to apply to
project types known by this resolver. |
boolean |
isPublisherFromWorkspace()
Return
true if and only if DeployPublisher is allowed to resolve
deployable artifacts from the job workspace. |
protected abstract boolean |
knows(Class<? extends AbstractProject> jobType)
Returns
true if this resolver applies to the specific job type. |
static CapabilitiesResolver |
of(AbstractProject<?,?> project)
Returns the
CapabilitiesResolver for the specified project. |
static CapabilitiesResolver |
of(Class<? extends AbstractProject> jobType)
Returns the
CapabilitiesResolver for the specified job type. |
protected abstract boolean knows(@NonNull Class<? extends AbstractProject> jobType)
true
if this resolver applies to the specific job type.jobType
- the specific job type.true
if this resolver applies to the specific job type.@NonNull public abstract Set<DeploySourceOrigin> getBuilderSources(@CheckForNull AbstractProject<?,?> project)
DeployBuilder
.project
- the project.DeployBuilder
.@NonNull public abstract Set<DeploySourceOrigin> getPublisherSources(@CheckForNull AbstractProject<?,?> project)
DeployPublisher
.project
- the project.DeployPublisher
.@NonNull public abstract Set<DeploySourceOrigin> getInstantSources(@CheckForNull AbstractProject<?,?> project)
DeployNowRunAction
.project
- the project.DeployNowRunAction
.public boolean isBuilderApplicable()
true
if and only if DeployBuilder
is allowed to apply to
project types known by this resolver.true
if and only if DeployBuilder
is allowed to apply to
project types known by this resolver.public boolean isPublisherApplicable()
true
if and only if DeployPublisher
is allowed to apply to
project types known by this resolver.true
if and only if DeployPublisher
is allowed to apply to
project types known by this resolver.public boolean isInstantApplicable()
true
if and only if DeployNowRunAction
is allowed to
apply to project types known by this resolver.true
if and only if DeployNowRunAction
is allowed to
apply to project types known by this resolver.public boolean isBuilderFromWorkspace()
true
if and only if DeployBuilder
is allowed to resolve
deployable artifacts from the job workspace.true
if and only if DeployBuilder
is allowed to resolve
deployable artifacts from the job workspace.public boolean isPublisherFromWorkspace()
true
if and only if DeployPublisher
is allowed to resolve
deployable artifacts from the job workspace.true
if and only if DeployPublisher
is allowed to resolve
deployable artifacts from the job workspace.@CheckForNull public abstract Run<?,?> getLastSuccessfulBuild(@CheckForNull AbstractProject<?,?> project)
project
- the specified project.null
if no such build exists.@NonNull public static CapabilitiesResolver of(@CheckForNull Class<? extends AbstractProject> jobType)
CapabilitiesResolver
for the specified job type.jobType
- the specified job type.CapabilitiesResolver
@CheckForNull public static Run<?,?> getLastDeployableBuild(@CheckForNull Job<?,?> job)
job
- the specified job.@NonNull public static CapabilitiesResolver of(@CheckForNull AbstractProject<?,?> project)
CapabilitiesResolver
for the specified project.project
- the specified project.CapabilitiesResolver
Copyright © 2016–2022. All rights reserved.