All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.starla.lite.PCShare

java.lang.Object
   |
   +----com.starla.lite.PCShare

public final class PCShare
extends Object
PC share class. The PC share class holds the details of a network share, including the required username and password access control.


Constructor Index

 o PCShare()
Construct an empty PCShare object.
 o PCShare(String)
Construct a PCShare using the supplied UNC path.
 o PCShare(String, String, String, String)
Construct a PCShare using the specified remote server and access control details.

Method Index

 o getFileName()
Get the remote file name string.
 o getNetworkPath()
Return the full UNC path for this PC share object.
 o getNodeName()
Get the remote node name string.
 o getPassword()
Get the remote password required to access the remote share.
 o getPath()
Get the share relative path string.
 o getRelativePath()
Return the share relative path for this PC share object.
 o getShareName()
Get the remote share name string.
 o getUserName()
Get the remote user name string.
 o makePath(String, String)
Build a share relative path using the supplied working directory and file name.
 o setFileName(String)
Set the remote file name string.
 o setNetworkPath(String)
Set the PC share from the supplied UNC path string.
 o setNodeName(String)
Set the remote node name string.
 o setPassword(String)
Set the remote password string.
 o setPath(String)
Set the share relative path string.
 o setShareName(String)
Set the remote share name string.
 o setUserName(String)
Set the remote user name string.
 o toString()
Return the PCShare object as a string

Constructors

 o PCShare
 public PCShare()
Construct an empty PCShare object.

 o PCShare
 public PCShare(String netpath) throws InvalidUNCPathException
Construct a PCShare using the supplied UNC path.

Parameters:
netpath - Network path of the remote server, in UNC format ie. \\node\share.
Throws: InvalidUNCPathException
If the network path is invalid.
 o PCShare
 public PCShare(String nname,
                String shr,
                String uname,
                String pwd)
Construct a PCShare using the specified remote server and access control details.

Parameters:
nname - Node name of the remote server.
shr - Share name on the remote server.
uname - User name used to access the remote share.
pwd - Password used to access the remote share.

Methods

 o getFileName
 public final String getFileName()
Get the remote file name string.

Returns:
Remote file name string.
 o getNetworkPath
 public final String getNetworkPath()
Return the full UNC path for this PC share object.

Returns:
Path string of the remote share/path/file in UNC format, ie. \\node\share\path\file.
 o getNodeName
 public final String getNodeName()
Get the remote node name string.

Returns:
Node name string.
 o getPassword
 public final String getPassword()
Get the remote password required to access the remote share.

Returns:
Remote password string.
 o getPath
 public final String getPath()
Get the share relative path string.

Returns:
Share relative path string.
 o getRelativePath
 public final String getRelativePath()
Return the share relative path for this PC share object.

Returns:
Path string of the remote share/path/file relative to the share, ie. \path\file.
 o getShareName
 public final String getShareName()
Get the remote share name string.

Returns:
Remote share name string.
 o getUserName
 public final String getUserName()
Get the remote user name string.

Returns:
Remote user name string required to access the remote share.
 o makePath
 public static String makePath(String workdir,
                               String fname)
Build a share relative path using the supplied working directory and file name.

Parameters:
workdir - Working directory string, relative to the root of the share.
fname - File name string.
Returns:
Share relative path string.
 o setFileName
 public final void setFileName(String fn)
Set the remote file name string.

Parameters:
fn - Remote file name string.
 o setNetworkPath
 public final void setNetworkPath(String netpath) throws InvalidUNCPathException
Set the PC share from the supplied UNC path string.

Parameters:
netpath - UNC format remote file path.
 o setNodeName
 public final void setNodeName(String nname)
Set the remote node name string.

Parameters:
nname - Remote node name string.
 o setPassword
 public final void setPassword(String pwd)
Set the remote password string.

Parameters:
pwd - Remote password string, required to access the remote share.
 o setPath
 public final void setPath(String pth)
Set the share relative path string.

Parameters:
pth - Share relative path string.
 o setShareName
 public final void setShareName(String shr)
Set the remote share name string.

Parameters:
shr - Remote share name string.
 o setUserName
 public final void setUserName(String uname)
Set the remote user name string.

Parameters:
uname - Remote user name string.
 o toString
 public final String toString()
Return the PCShare object as a string

Returns:
PCShare string.
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index