public final class PCShare
extends java.lang.Object
The PC share class holds the details of a network share, including the required username and password access control.
Constructor and Description |
---|
PCShare()
Construct an empty PCShare object.
|
PCShare(java.lang.String netpath)
Construct a PCShare using the supplied UNC path.
|
PCShare(java.lang.String nname,
java.lang.String shr,
java.lang.String uname,
java.lang.String pwd)
Construct a PCShare using the specified remote server and access control
details.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDomain()
Return the domain for the share.
|
int |
getExtendedSecurityFlags()
Return the extended security flags
|
java.lang.String |
getFileName()
Get the remote file name string.
|
java.lang.String |
getNetworkPath()
Return the full UNC path for this PC share object.
|
java.lang.String |
getNodeName()
Get the remote node name string.
|
java.lang.String |
getPassword()
Get the remote password required to access the remote share.
|
java.lang.String |
getPath()
Get the share relative path string.
|
int |
getPrimaryProtocol()
Get the primary protocol to connect with
|
java.lang.String |
getRelativePath()
Return the share relative path for this PC share object.
|
int |
getSecondaryProtocol()
Get the secondary protocol to connect with
|
java.lang.String |
getShareName()
Get the remote share name string.
|
java.lang.String |
getUserName()
Get the remote user name string.
|
boolean |
hasDomain()
Determine if the share has a domain specified.
|
boolean |
hasExtendedSecurityFlags()
Determine if extended security flags have been set
|
boolean |
isNullLogon()
Check if this a null logon should be used
|
static java.lang.String |
makePath(java.lang.String workdir,
java.lang.String fname)
Build a share relative path using the supplied working directory and
file name.
|
void |
setDomain(java.lang.String domain)
Set the domain to be used during the session setup.
|
void |
setExtendedSecurityFlags(int extFlags)
Set the extended security negotiation flags
|
void |
setFileName(java.lang.String fn)
Set the remote file name string.
|
void |
setNetworkPath(java.lang.String netpath)
Set the PC share from the supplied UNC path string.
|
void |
setNodeName(java.lang.String nname)
Set the remote node name string.
|
void |
setNullLogon(boolean nullLogon)
Set the null logon flag
|
void |
setPassword(java.lang.String pwd)
Set the remote password string.
|
void |
setPath(java.lang.String pth)
Set the share relative path string.
|
void |
setProtocolOrder(int pri,
int sec)
Set the primary and secondary protocol order that is used to connect to the remote
host.
|
void |
setShareName(java.lang.String shr)
Set the remote share name string.
|
void |
setUserName(java.lang.String uname)
Set the remote user name string.
|
static void |
setUserNameParsing(boolean ena)
Enable/disbale parsing of the user name value
|
java.lang.String |
toString()
Return the PCShare object as a string
|
public PCShare()
public PCShare(java.lang.String netpath) throws InvalidUNCPathException
netpath
- Network path of the remote server, in UNC format ie.
\\node\\share.InvalidUNCPathException
- If the network path is invalid.public PCShare(java.lang.String nname, java.lang.String shr, java.lang.String uname, java.lang.String pwd)
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.public static java.lang.String makePath(java.lang.String workdir, java.lang.String fname)
workdir
- Working directory string, relative to the root of the share.fname
- File name string.public final java.lang.String getDomain()
public final java.lang.String getFileName()
public final java.lang.String getNetworkPath()
public final java.lang.String getNodeName()
public final java.lang.String getPassword()
public final java.lang.String getPath()
public final java.lang.String getRelativePath()
public final java.lang.String getShareName()
public final java.lang.String getUserName()
public final int getPrimaryProtocol()
public final int getSecondaryProtocol()
public final boolean hasDomain()
public final boolean isNullLogon()
public final boolean hasExtendedSecurityFlags()
public final int getExtendedSecurityFlags()
public final void setDomain(java.lang.String domain)
domain
- java.lang.Stringpublic final void setExtendedSecurityFlags(int extFlags)
extFlags
- intpublic final void setFileName(java.lang.String fn)
fn
- Remote file name string.public final void setNetworkPath(java.lang.String netpath) throws InvalidUNCPathException
netpath
- UNC format remote file path.InvalidUNCPathException
public final void setNodeName(java.lang.String nname)
nname
- Remote node name string.public final void setNullLogon(boolean nullLogon)
nullLogon
- booleanpublic final void setPassword(java.lang.String pwd)
pwd
- Remote password string, required to access the remote share.public final void setPath(java.lang.String pth)
pth
- Share relative path string.public final void setShareName(java.lang.String shr)
shr
- Remote share name string.public final void setUserName(java.lang.String uname)
uname
- Remote user name string.public final void setProtocolOrder(int pri, int sec)
pri
- intsec
- intpublic final java.lang.String toString()
toString
in class java.lang.Object
public static final void setUserNameParsing(boolean ena)
ena
- booleanCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.