Package org.alfresco.filesys.util
Class CifsMounter
- java.lang.Object
-
- org.alfresco.filesys.util.CifsMounter
-
public class CifsMounter extends Object
CIFS Mounter ClassMount/map a network drive taking care of platform differences.
- Author:
- gkspencer
-
-
Field Summary
Fields Modifier and Type Field Description static intDefaultstatic intNativeSMBstatic intNetBIOSstatic intWin32NetBIOS
-
Constructor Summary
Constructors Constructor Description CifsMounter()Default constructorCifsMounter(String srvName, String shareName, String userName, String password)Class constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetPassword()Return the passwordintgetProtocolPort()Return the protocol portStringgetServerAddress()Return hte server addressStringgetServerName()Return the server nameStringgetShareName()Return the share nameStringgetUserName()Return the user nameintisProtocolType()Return the protocol typevoidmountFilesystem(String driveLetter, String mountPoint)Mount a remote CIFS shared filesystemvoidsetPassword(String password)Set the passwordvoidsetProtocolPort(int port)Set the port to use for the connectionvoidsetProtocolType(int proto)Set the protocol type to usevoidsetServerAddress(String srvAddr)Set the server addressvoidsetServerName(String name)Set the server namevoidsetShareName(String name)Set the share namevoidsetUserName(String user)Set the user nameStringtoString()Return the CIFS mounter as a stringvoidunmountFilesystem(String driveLetter, String mountPoint)Unmount a remote CIFS shared filesystem
-
-
-
Field Detail
-
Default
public static final int Default
- See Also:
- Constant Field Values
-
NetBIOS
public static final int NetBIOS
- See Also:
- Constant Field Values
-
NativeSMB
public static final int NativeSMB
- See Also:
- Constant Field Values
-
Win32NetBIOS
public static final int Win32NetBIOS
- See Also:
- Constant Field Values
-
-
Method Detail
-
mountFilesystem
public void mountFilesystem(String driveLetter, String mountPoint) throws CifsMountException
Mount a remote CIFS shared filesystem- Parameters:
driveLetter- StringmountPoint- String- Throws:
CifsMountException
-
unmountFilesystem
public void unmountFilesystem(String driveLetter, String mountPoint) throws CifsMountException
Unmount a remote CIFS shared filesystem- Parameters:
driveLetter- StringmountPoint- String- Throws:
CifsMountException
-
getServerName
public final String getServerName()
Return the server name- Returns:
- String
-
getServerAddress
public final String getServerAddress()
Return hte server address- Returns:
- String
-
getShareName
public final String getShareName()
Return the share name- Returns:
- String
-
getUserName
public final String getUserName()
Return the user name- Returns:
- String
-
getPassword
public final String getPassword()
Return the password- Returns:
- String
-
isProtocolType
public final int isProtocolType()
Return the protocol type- Returns:
- int
-
getProtocolPort
public final int getProtocolPort()
Return the protocol port- Returns:
- int
-
setServerName
public final void setServerName(String name)
Set the server name- Parameters:
name- String
-
setServerAddress
public final void setServerAddress(String srvAddr)
Set the server address- Parameters:
srvAddr- String
-
setShareName
public final void setShareName(String name)
Set the share name- Parameters:
name- String
-
setUserName
public final void setUserName(String user)
Set the user name- Parameters:
user- String
-
setPassword
public final void setPassword(String password)
Set the password- Parameters:
password- String
-
setProtocolType
public final void setProtocolType(int proto)
Set the protocol type to use- Parameters:
proto- int
-
setProtocolPort
public final void setProtocolPort(int port)
Set the port to use for the connection- Parameters:
port- int
-
-