Class NetworkDrive


  • public abstract class NetworkDrive
    extends java.lang.Object
    Author:
    Paul Brodner
    • Constructor Detail

      • NetworkDrive

        public NetworkDrive​(UserModel userModel,
                            java.lang.String serverNetworkPath,
                            java.lang.String localVolumePath)
        For MAC #mountOsApp can be mount_smbfs
        Parameters:
        mountOsapp -
        networkPath -
        localVolumePath -
    • Method Detail

      • mountCode

        protected abstract void mountCode()
                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • umountCode

        protected abstract void umountCode()
                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • mount

        public void mount()
                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • unount

        public void unount()
                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getUserForNetworkAccess

        public UserModel getUserForNetworkAccess()
      • setUserForNetworkAccess

        public void setUserForNetworkAccess​(UserModel userModel)
      • runCommand

        protected void runCommand​(java.lang.String command,
                                  java.lang.Object... arguments)
                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getLocalVolumePath

        public java.lang.String getLocalVolumePath()
      • setLocalVolumePath

        public void setLocalVolumePath​(java.lang.String localVolumePath)
      • getServerNetworkPath

        public java.lang.String getServerNetworkPath()
      • setServerNetworkPath

        public void setServerNetworkPath​(java.lang.String serverNetworkPath)
      • isNetworkDriveMounted

        public boolean isNetworkDriveMounted()
                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • assertNetworkDriveIsMounted

        public void assertNetworkDriveIsMounted()
                                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • assertNetworkDriveIsUmounted

        public void assertNetworkDriveIsUmounted()
                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • createFile

        public java.io.File createFile​(java.lang.String relativePathToLocalVolumePath)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • createFile

        public java.io.File createFile​(java.lang.String relativePathToLocalVolumePath,
                                       java.io.FileInputStream fileInputStream)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • createFolder

        public java.io.File createFolder​(java.lang.String relativePathToLocalVolumePath)
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • deleteContent

        public void deleteContent​(java.lang.String relativePathToLocalVolumePath)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • updateContent

        public java.io.File updateContent​(java.lang.String relativePathToLocalVolumePath,
                                          java.io.ByteArrayInputStream byteArrayInputStream)
                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • renameContent

        public java.io.File renameContent​(java.lang.String originalRelativePath,
                                          java.lang.String renamedRelativePath)
                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • copyFile

        public java.io.File copyFile​(java.lang.String sourceRelativePath,
                                     java.lang.String destinationRelativePath)
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • copyFolder

        public java.io.File copyFolder​(java.lang.String sourceRelativePath,
                                       java.lang.String destinationRelativePath)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • moveFile

        public java.io.File moveFile​(java.lang.String sourceRelativePath,
                                     java.lang.String destinationRelativePath)
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • moveFolder

        public java.io.File moveFolder​(java.lang.String sourceRelativePath,
                                       java.lang.String destinationRelativePath)
                                throws java.io.IOException
        Throws:
        java.io.IOException