T
- the class
.public abstract class DeployTargetDescriptor<T extends DeployTarget<T>> extends Descriptor<T>
DeployTarget
descriptorsDescriptor.FormException, Descriptor.PropertyType, Descriptor.Self
clazz
Modifier | Constructor and Description |
---|---|
protected |
DeployTargetDescriptor()
Infers the type of the corresponding
DeployTarget from the outer class. |
protected |
DeployTargetDescriptor(Class<? extends T> clazz)
For cases where the common convention cannot be followed.
|
Modifier and Type | Method and Description |
---|---|
DeploySource |
defaultDeploySource(DeploySource source,
Set<DeploySourceOrigin> origins,
Class<? extends AbstractProject> jobType)
If the specified source is null, try to pick the best default to select initially.
|
DescriptorExtensionList<DeploySource,Descriptor<DeploySource>> |
getDeploySourceDescriptors()
Gets all the
DeploySource descriptors. |
List<DeploySourceDescriptor> |
getDeploySourceDescriptors(Set<DeploySourceOrigin> origins,
Class<? extends AbstractProject> jobType)
Returns the
DeploySourceDescriptor s that are valid for the specific context. |
boolean |
isDirectoryTarget()
Returns
true if and only if this target can accept directories. |
boolean |
isFileTarget()
Returns
true if and only if this target can accept files. |
FormValidation |
validateFilePath(String filePathName,
FilePath filePath)
An extra validation hook for
DeployTarget instances to provide additional checks on the user's specified
DeploySource when resolving from the DeploySourceOrigin.WORKSPACE . |
addHelpFileRedirect, calcAutoCompleteSettings, calcFillSettings, configure, configure, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getDisplayName, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
protected DeployTargetDescriptor()
DeployTarget
from the outer class.
This version works when you follow the common convention, where a descriptor
is written as the static nested class of the describable class.protected DeployTargetDescriptor(@NonNull Class<? extends T> clazz)
clazz
- the type of DeployTarget
that this descriptor describes.public boolean isFileTarget()
true
if and only if this target can accept files.true
if and only if this target can accept files.public boolean isDirectoryTarget()
true
if and only if this target can accept directories.true
if and only if this target can accept directories.@NonNull public DescriptorExtensionList<DeploySource,Descriptor<DeploySource>> getDeploySourceDescriptors()
DeploySource
descriptors.DeploySource
descriptors.@NonNull public List<DeploySourceDescriptor> getDeploySourceDescriptors(@CheckForNull Set<DeploySourceOrigin> origins, @CheckForNull Class<? extends AbstractProject> jobType)
DeploySourceDescriptor
s that are valid for the specific context.origins
- the valid origins.jobType
- the project type.DeploySourceDescriptor
s that are valid for the specific context.@CheckForNull public DeploySource defaultDeploySource(@CheckForNull DeploySource source, @CheckForNull Set<DeploySourceOrigin> origins, @CheckForNull Class<? extends AbstractProject> jobType)
source
- the possibly null source.origins
- the origins from which sources can be considered valid.jobType
- the project type.null
) best guess default.public FormValidation validateFilePath(String filePathName, FilePath filePath) throws IOException, InterruptedException
DeployTarget
instances to provide additional checks on the user's specified
DeploySource
when resolving from the DeploySourceOrigin.WORKSPACE
.filePathName
- the user specified file path name value.filePath
- the resulting resolved file path.IOException
InterruptedException
Copyright © 2016–2022. All rights reserved.