Package org.alfresco.utility.network
Class NetworkDrive
java.lang.Object
org.alfresco.utility.network.NetworkDrive
- Author:
- Paul Brodner
-
Constructor Summary
ConstructorsConstructorDescriptionNetworkDrive(UserModel userModel, String serverNetworkPath, String localVolumePath) For MAC#mountOsAppcan be mount_smbfs -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidcopyFolder(String sourceRelativePath, String destinationRelativePath) createFile(String relativePathToLocalVolumePath) createFile(String relativePathToLocalVolumePath, FileInputStream fileInputStream) createFolder(String relativePathToLocalVolumePath) voiddeleteContent(String relativePathToLocalVolumePath) booleanvoidmount()protected abstract voidmoveFolder(String sourceRelativePath, String destinationRelativePath) renameContent(String originalRelativePath, String renamedRelativePath) protected voidrunCommand(String command, Object... arguments) voidsetLocalVolumePath(String localVolumePath) voidsetServerNetworkPath(String serverNetworkPath) voidsetUserForNetworkAccess(UserModel userModel) protected abstract voidvoidunount()updateContent(String relativePathToLocalVolumePath, ByteArrayInputStream byteArrayInputStream)
-
Constructor Details
-
NetworkDrive
For MAC#mountOsAppcan be mount_smbfs- Parameters:
mountOsapp-networkPath-localVolumePath-
-
-
Method Details
-
mountCode
- Throws:
Exception
-
umountCode
- Throws:
Exception
-
mount
- Throws:
Exception
-
unount
- Throws:
Exception
-
getUserForNetworkAccess
-
setUserForNetworkAccess
-
runCommand
- Throws:
Exception
-
getLocalVolumePath
-
setLocalVolumePath
-
getServerNetworkPath
-
setServerNetworkPath
-
isNetworkDriveMounted
- Throws:
Exception
-
assertNetworkDriveIsMounted
- Throws:
Exception
-
assertNetworkDriveIsUmounted
- Throws:
Exception
-
createFile
- Throws:
IOException
-
createFile
public File createFile(String relativePathToLocalVolumePath, FileInputStream fileInputStream) throws IOException - Throws:
IOException
-
createFolder
- Throws:
IOException
-
deleteContent
- Throws:
IOException
-
updateContent
public File updateContent(String relativePathToLocalVolumePath, ByteArrayInputStream byteArrayInputStream) throws IOException - Throws:
IOException
-
renameContent
public File renameContent(String originalRelativePath, String renamedRelativePath) throws IOException - Throws:
IOException
-
copyFile
- Throws:
IOException
-
copyFolder
public File copyFolder(String sourceRelativePath, String destinationRelativePath) throws IOException - Throws:
IOException
-
moveFile
- Throws:
IOException
-
moveFolder
public File moveFolder(String sourceRelativePath, String destinationRelativePath) throws IOException - Throws:
IOException
-