Class AbstractUploadDescriptor
- java.lang.Object
-
- hudson.model.Descriptor<AbstractUpload>
-
- com.google.jenkins.plugins.storage.AbstractUploadDescriptor
-
- Direct Known Subclasses:
AbstractBucketLifecycleManagerDescriptor
,ClassicUpload.DescriptorImpl
,StdoutUpload.DescriptorImpl
public abstract class AbstractUploadDescriptor extends Descriptor<AbstractUpload>
Descriptor from which Upload extensions must derive their descriptor.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self
-
-
Field Summary
Fields Modifier and Type Field Description static String
GCS_SCHEME
-
Fields inherited from class hudson.model.Descriptor
clazz
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractUploadDescriptor(Class<? extends AbstractUpload> clazz)
Create the descriptor of the Upload from it's type ofAbstractUpload
.protected
AbstractUploadDescriptor(Class<? extends AbstractUpload> clazz, UploadModule module)
Create the descriptor of the Upload from it's type on associated module for instantiating dependencies.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description FormValidation
doCheckBucket(String bucket)
Form validation for bucket parameter.FormValidation
doCheckBucketNameWithVars(String bucketNameWithVars)
This callback validates thebucketNameWithVars
input field's values.UploadModule
getModule()
AbstractUpload
newInstance(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject formData)
static FormValidation
staticDoCheckBucket(String bucketNameWithVars)
This callback validates thebucketNameWithVars
input field's values.-
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, 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, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
-
-
-
Field Detail
-
GCS_SCHEME
public static final String GCS_SCHEME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbstractUploadDescriptor
protected AbstractUploadDescriptor(Class<? extends AbstractUpload> clazz, UploadModule module)
Create the descriptor of the Upload from it's type on associated module for instantiating dependencies.- Parameters:
clazz
- Class that extendsAbstractUpload
.module
- Helper class methods to use for execution.
-
AbstractUploadDescriptor
protected AbstractUploadDescriptor(Class<? extends AbstractUpload> clazz)
Create the descriptor of the Upload from it's type ofAbstractUpload
.- Parameters:
clazz
- Class that extendsAbstractUpload
.
-
-
Method Detail
-
getModule
public UploadModule getModule()
- Returns:
- Retrieve the module to use for instantiating dependencies for instances described by this descriptor.
-
staticDoCheckBucket
public static FormValidation staticDoCheckBucket(String bucketNameWithVars)
This callback validates thebucketNameWithVars
input field's values.- Parameters:
bucketNameWithVars
- GCS bucket.- Returns:
- Valid form validation result or error message if invalid.
-
doCheckBucketNameWithVars
public FormValidation doCheckBucketNameWithVars(@QueryParameter String bucketNameWithVars) throws IOException
This callback validates thebucketNameWithVars
input field's values.- Parameters:
bucketNameWithVars
- GCS bucket.- Returns:
- Valid form validation result or error message if invalid.
- Throws:
IOException
- If there was an issue validating the bucket.
-
doCheckBucket
public FormValidation doCheckBucket(@QueryParameter String bucket) throws IOException
Form validation for bucket parameter.- Parameters:
bucket
- GCS bucket.- Returns:
- Valid form validation result or error message if invalid.
- Throws:
IOException
- If there was an issue validating the bucket.
-
newInstance
public AbstractUpload newInstance(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject formData) throws Descriptor.FormException
- Overrides:
newInstance
in classDescriptor<AbstractUpload>
- Throws:
Descriptor.FormException
-
-