com.slide.hudson.plugins
Class CIFSShare

java.lang.Object
  extended by com.slide.hudson.plugins.CIFSShare

public class CIFSShare
extends java.lang.Object

Encapsulates the information for a single CIFS share

Author:
Alex Earl

Constructor Summary
CIFSShare()
          Instantiates a new CIFS share..
CIFSShare(java.lang.String server, int port, int timeOut, java.lang.String username, java.lang.String password, java.lang.String domain, java.lang.String dir)
          Instantiates a new CIFS share.
CIFSShare(java.lang.String server, java.lang.String port, java.lang.String timeOut, java.lang.String username, java.lang.String password, java.lang.String domain)
          Instantiates a new CIFS share.
 
Method Summary
 void delete(java.lang.String filePath, java.io.PrintStream logger)
           
 java.lang.String getDisplayUrl()
          Gets the display safe (no password) URL for the share.
 java.lang.String getDomain()
          Gets the domain portion of the URL.
 int getIntegerPort()
          Gets the integer port.
 java.lang.String getPassword()
          Gets the password.
 java.lang.String getPort()
          Gets the port.
 java.lang.String getServer()
          Gets the hostname.
 java.lang.String getShareName()
          Gets the SMB share dir.
 int getTimeOut()
          Gets the time out.
 java.lang.String getUrl()
          Gets the FULL URL for the share including escaped password.
 java.lang.String getUsername()
          Gets the username.
 void mkdirs(java.lang.String filePath, java.io.PrintStream logger)
          Mkdirs.
 void setDomain(java.lang.String domain)
          Sets the domain portion of the URL.
 void setPassword(java.lang.String password)
          Sets the password.
 void setPort(java.lang.String port)
          Sets the port.
 void setServer(java.lang.String server)
          Sets the hostname.
 void setShareName(java.lang.String dir)
          Sets the share dir.
 void setTimeOut(int timeOut)
          Sets the time out.
 void setUsername(java.lang.String username)
          Sets the username.
 int upload(hudson.FilePath filePath, java.lang.String destDir, java.util.Map<java.lang.String,java.lang.String> envVars, java.io.PrintStream logger)
          Uploads a file (or multiple files) to the share defined by this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CIFSShare

public CIFSShare()
Instantiates a new CIFS share..


CIFSShare

@DataBoundConstructor
public CIFSShare(java.lang.String server,
                                      int port,
                                      int timeOut,
                                      java.lang.String username,
                                      java.lang.String password,
                                      java.lang.String domain,
                                      java.lang.String dir)
Instantiates a new CIFS share.

Parameters:
server - the server
port - the port
timeOut - the time out
username - the username
password - the password
domain - the domain
dir - the cifs dir

CIFSShare

public CIFSShare(java.lang.String server,
                 java.lang.String port,
                 java.lang.String timeOut,
                 java.lang.String username,
                 java.lang.String password,
                 java.lang.String domain)
Instantiates a new CIFS share.

Parameters:
server - the server
port - the port
timeOut - the time out
username - the username
password - the password
domain - the domain
Method Detail

getTimeOut

public int getTimeOut()
Gets the time out.

Returns:
the time out

setTimeOut

public void setTimeOut(int timeOut)
Sets the time out.

Parameters:
timeOut - the new time out

getServer

public java.lang.String getServer()
Gets the hostname.

Returns:
the hostname

setServer

public void setServer(java.lang.String server)
Sets the hostname.

Parameters:
hostname - the new hostname

getPort

public java.lang.String getPort()
Gets the port.

Returns:
the port

setPort

public void setPort(java.lang.String port)
Sets the port.

Parameters:
port - the new port

getIntegerPort

public int getIntegerPort()
Gets the integer port.

Returns:
the integer port

getUsername

public java.lang.String getUsername()
Gets the username.

Returns:
the username

setUsername

public void setUsername(java.lang.String username)
Sets the username.

Parameters:
username - the new username

getPassword

public java.lang.String getPassword()
Gets the password.

Returns:
the password

setPassword

public void setPassword(java.lang.String password)
Sets the password.

Parameters:
password - the new password

getDomain

public java.lang.String getDomain()
Gets the domain portion of the URL.

Returns:
the domain of the share login

setDomain

public void setDomain(java.lang.String domain)
Sets the domain portion of the URL.

Parameters:
domain - the domain for the share login

getShareName

public java.lang.String getShareName()
Gets the SMB share dir.

Returns:
the SMB share dir

setShareName

public void setShareName(java.lang.String dir)
Sets the share dir.

Parameters:
dir - the new share dir

getUrl

public java.lang.String getUrl()
Gets the FULL URL for the share including escaped password.

Returns:
The FULL URL for the share, including password.

getDisplayUrl

public java.lang.String getDisplayUrl()
Gets the display safe (no password) URL for the share.

Returns:
The display safe URL for the share.

upload

public int upload(hudson.FilePath filePath,
                  java.lang.String destDir,
                  java.util.Map<java.lang.String,java.lang.String> envVars,
                  java.io.PrintStream logger)
           throws java.io.IOException,
                  java.lang.InterruptedException
Uploads a file (or multiple files) to the share defined by this object.

Throws:
java.io.IOException
java.lang.InterruptedException

mkdirs

public void mkdirs(java.lang.String filePath,
                   java.io.PrintStream logger)
            throws java.io.IOException
Mkdirs.

Parameters:
filePath - the file path
logger - the logger
Throws:
SftpException - the sftp exception
java.io.IOException - Signals that an I/O exception has occurred.

delete

public void delete(java.lang.String filePath,
                   java.io.PrintStream logger)
            throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2011. All Rights Reserved.