org.jenkinsci.plugins.mongodbdocumentupload
Class UploadPublisher

java.lang.Object
  extended by hudson.tasks.BuildStepCompatibilityLayer
      extended by hudson.tasks.Publisher
          extended by hudson.tasks.Recorder
              extended by org.jenkinsci.plugins.mongodbdocumentupload.UploadPublisher
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.tasks.Publisher>, hudson.tasks.BuildStep

public class UploadPublisher
extends hudson.tasks.Recorder

UploadPublisher Recorder.

When the user configures the project and enables this recorder, Descriptor.newInstance(org.kohsuke.stapler.StaplerRequest) is invoked and a new UploadPublisher is created. The created instance is persisted to the project configuration XML by using XStream, so this allows you to use instance fields (like serverName) to remember the configuration.

When a build is performed, the perform(hudson.model.AbstractBuild, hudson.Launcher, hudson.model.BuildListener) method will be invoked.

Author:
Kohsuke Kawaguchi

Nested Class Summary
static class UploadPublisher.DescriptorImpl
          Descriptor for UploadPublisher.
 
Nested classes/interfaces inherited from class hudson.tasks.Publisher
hudson.tasks.Publisher.DescriptorExtensionListImpl
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
hudson.tasks.BuildStep.PublisherList
 
Field Summary
 
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
 
Constructor Summary
UploadPublisher(String serverName, String databaseName, String collectionName, String files)
           
 
Method Summary
 String getCollectionName()
           
 String getDatabaseName()
           
 UploadPublisher.DescriptorImpl getDescriptor()
           
 String getFiles()
           
 hudson.tasks.BuildStepMonitor getRequiredMonitorService()
           
 String getServerName()
           
 boolean perform(hudson.model.AbstractBuild build, hudson.Launcher launcher, hudson.model.BuildListener listener)
           
 
Methods inherited from class hudson.tasks.Publisher
all, getProjectAction, needsToRunAfterFinalized, prebuild
 
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectActions, perform, prebuild
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface hudson.tasks.BuildStep
getProjectAction, getProjectActions, prebuild
 

Constructor Detail

UploadPublisher

@DataBoundConstructor
public UploadPublisher(String serverName,
                                            String databaseName,
                                            String collectionName,
                                            String files)
Method Detail

getServerName

public String getServerName()

getDatabaseName

public String getDatabaseName()

getCollectionName

public String getCollectionName()

getFiles

public String getFiles()

perform

public boolean perform(hudson.model.AbstractBuild build,
                       hudson.Launcher launcher,
                       hudson.model.BuildListener listener)
Specified by:
perform in interface hudson.tasks.BuildStep
Overrides:
perform in class hudson.tasks.BuildStepCompatibilityLayer

getDescriptor

public UploadPublisher.DescriptorImpl getDescriptor()
Specified by:
getDescriptor in interface hudson.model.Describable<hudson.tasks.Publisher>
Overrides:
getDescriptor in class hudson.tasks.Recorder

getRequiredMonitorService

public hudson.tasks.BuildStepMonitor getRequiredMonitorService()


Copyright © 2004-2013. All Rights Reserved.