hudson.plugins.collabnet.pblupload
Class PblUploader

java.lang.Object
  extended by hudson.tasks.BuildStepCompatibilityLayer
      extended by hudson.tasks.Publisher
          extended by hudson.tasks.Notifier
              extended by hudson.plugins.collabnet.pblupload.PblUploader
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.tasks.Publisher>, hudson.tasks.BuildStep, java.io.Serializable

public class PblUploader
extends hudson.tasks.Notifier
implements java.io.Serializable

The PblUploader is used to upload files to the Project Build Library (Pbl) of a Lab Management manager node.

See Also:
Serialized Form

Nested Class Summary
static class PblUploader.DescriptorImpl
          Descriptor for PblUploader.
 
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
PblUploader(java.lang.String hostUrl, java.lang.String user, java.lang.String key, java.lang.String project, java.lang.String pubOrPriv, java.lang.String[] file_patterns, java.lang.String path, boolean preserveLocal, boolean force, java.lang.String comment, java.lang.String description, java.lang.String removePrefixRegex)
          Constructs a new PblUploader instance.
 
Method Summary
 java.lang.String getComment()
           
 java.lang.String getDescription()
           
 java.lang.String[] getFilePatterns()
           
 boolean getForce()
           
 java.lang.String getHostUrl()
           
 java.lang.String getKey()
           
 java.lang.String getPath()
           
 boolean getPreserveLocal()
           
 java.lang.String getProject()
           
 java.lang.String getPubOrPriv()
           
 java.lang.String getRemovePrefixRegex()
           
 hudson.tasks.BuildStepMonitor getRequiredMonitorService()
           
 java.lang.String getUser()
           
 boolean needsToRunAfterFinalized()
          PBLUploader does not need to wait til the build is finalized.
 boolean perform(hudson.model.AbstractBuild<?,?> build, hudson.Launcher launcher, hudson.model.BuildListener listener)
          Upload the files to the PBL.
 
Methods inherited from class hudson.tasks.Notifier
getDescriptor
 
Methods inherited from class hudson.tasks.Publisher
all, getProjectAction, prebuild
 
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, 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, prebuild
 

Constructor Detail

PblUploader

public PblUploader(java.lang.String hostUrl,
                   java.lang.String user,
                   java.lang.String key,
                   java.lang.String project,
                   java.lang.String pubOrPriv,
                   java.lang.String[] file_patterns,
                   java.lang.String path,
                   boolean preserveLocal,
                   boolean force,
                   java.lang.String comment,
                   java.lang.String description,
                   java.lang.String removePrefixRegex)
Constructs a new PblUploader instance.

Parameters:
hostUrl - for the Cubit host.
user - to login as.
key - to login with.
project - to upload files to
pubOrPriv - whether these files should be in the pub (public) or priv (private) directory.
file_patterns - matching local files that should be uploaded.
path - one the Cubit host where the files will be uploaded.
preserveLocal - if true, local directory structure will be copied to the server.
force - if true, the files will be uploaded, even if they will overwrite existing files.
comment - about the upload.
description - of the files.
Method Detail

getHostUrl

public java.lang.String getHostUrl()
Returns:
the Cubit host's URL.

getUser

public java.lang.String getUser()
Returns:
the user to login as.

getKey

public java.lang.String getKey()
Returns:
the key to login with.

getProject

public java.lang.String getProject()
Returns:
the project to upload files to.

getPubOrPriv

public java.lang.String getPubOrPriv()
Returns:
"pub" if the files should be uploaded as public, "priv" if the files should be uploaded as private.

getFilePatterns

public java.lang.String[] getFilePatterns()
Returns:
the ant-style file patterns to match against the local workspace.

getPath

public java.lang.String getPath()
Returns:
the path to upload files to on the Cubit host.

getPreserveLocal

public boolean getPreserveLocal()
Returns:
whether or not local directory structure should be preserved.

getForce

public boolean getForce()
Returns:
whether or not the upload should continue if matching files are present.

getComment

public java.lang.String getComment()
Returns:
the comment.

getDescription

public java.lang.String getDescription()
Returns:
the description of the files.

getRemovePrefixRegex

public java.lang.String getRemovePrefixRegex()
Returns:
the description of the files.

getRequiredMonitorService

public hudson.tasks.BuildStepMonitor getRequiredMonitorService()
Specified by:
getRequiredMonitorService in interface hudson.tasks.BuildStep

perform

public boolean perform(hudson.model.AbstractBuild<?,?> build,
                       hudson.Launcher launcher,
                       hudson.model.BuildListener listener)
                throws java.lang.InterruptedException,
                       java.io.IOException
Upload the files to the PBL. This is the hudson builds entry point into this plugin

Specified by:
perform in interface hudson.tasks.BuildStep
Overrides:
perform in class hudson.tasks.BuildStepCompatibilityLayer
Parameters:
build - the current Hudson build.
launcher - unused.
listener - for events.
Returns:
true if uploading files succeeded.
Throws:
java.lang.InterruptedException
java.io.IOException

needsToRunAfterFinalized

public boolean needsToRunAfterFinalized()
PBLUploader does not need to wait til the build is finalized.

Overrides:
needsToRunAfterFinalized in class hudson.tasks.Publisher


Copyright © 2010. All Rights Reserved.