org.jenkinsci.plugins.packagecloud
Class ArtifactPublisher.DescriptorImpl

java.lang.Object
  extended by hudson.model.Descriptor<T>
      extended by hudson.tasks.BuildStepDescriptor<hudson.tasks.Publisher>
          extended by org.jenkinsci.plugins.packagecloud.ArtifactPublisher.DescriptorImpl
All Implemented Interfaces:
hudson.model.Saveable
Enclosing class:
ArtifactPublisher

public static final class ArtifactPublisher.DescriptorImpl
extends hudson.tasks.BuildStepDescriptor<hudson.tasks.Publisher>

BuildStepDescriptor


Nested Class Summary
 
Nested classes/interfaces inherited from class hudson.model.Descriptor
hudson.model.Descriptor.FormException, hudson.model.Descriptor.PropertyType, hudson.model.Descriptor.Self
 
Field Summary
 
Fields inherited from class hudson.model.Descriptor
clazz
 
Fields inherited from interface hudson.model.Saveable
NOOP
 
Constructor Summary
ArtifactPublisher.DescriptorImpl()
          The default constructor.
 
Method Summary
 hudson.util.FormValidation doCheckUsername(String value, String hostname)
          Validates we can find credentials for this username
 hudson.util.ListBoxModel doFillDistroItems(String hostname, String port, String protocol, String username)
          Fills out the distributions dropdown.
 String getDisplayName()
          The name of the plugin to display them on the project configuration web page.
 String getHelpFile()
          Return the location of the help document for this publisher.
 boolean isApplicable(Class<? extends hudson.model.AbstractProject> jobType)
          Returns true if this task is applicable to the given project.
 
Methods inherited from class hudson.tasks.BuildStepDescriptor
filter
 
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, calcAutoCompleteSettings, calcFillSettings, configure, configure, doHelp, find, find, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArtifactPublisher.DescriptorImpl

public ArtifactPublisher.DescriptorImpl()
The default constructor.

Method Detail

getDisplayName

@JavaScriptMethod
public String getDisplayName()
The name of the plugin to display them on the project configuration web page.

Specified by:
getDisplayName in class hudson.model.Descriptor<hudson.tasks.Publisher>
Returns:
See Also:
Descriptor.getDisplayName()

getHelpFile

public String getHelpFile()
Return the location of the help document for this publisher.

Overrides:
getHelpFile in class hudson.model.Descriptor<hudson.tasks.Publisher>
Returns:
See Also:
Descriptor.getHelpFile()

isApplicable

public boolean isApplicable(Class<? extends hudson.model.AbstractProject> jobType)
Returns true if this task is applicable to the given project.

Specified by:
isApplicable in class hudson.tasks.BuildStepDescriptor<hudson.tasks.Publisher>
Returns:
See Also:
AbstractProject.AbstractProjectDescriptor.isApplicable(Descriptor)

doCheckUsername

public hudson.util.FormValidation doCheckUsername(@QueryParameter
                                                  String value,
                                                  @QueryParameter
                                                  String hostname)
Validates we can find credentials for this username

Parameters:
value - the username
hostname - the hostname
Returns:
validation result

doFillDistroItems

public hudson.util.ListBoxModel doFillDistroItems(@QueryParameter(value="hostname")
                                                  String hostname,
                                                  @QueryParameter(value="port")
                                                  String port,
                                                  @QueryParameter(value="protocol")
                                                  String protocol,
                                                  @QueryParameter(value="username")
                                                  String username)
                                           throws Exception
Fills out the distributions dropdown. Since the username is not known (or needed) to retrieve distributions, we iterate through all available credentials until we find a working token.

Parameters:
hostname - the hostname
port - the port
protocol - the protocol
username - the username
Returns:
the list box model
Throws:
Exception


Copyright © 2004-2016. All Rights Reserved.