Class VFSServicesServerImpl

  • All Implemented Interfaces:
    org.uberfire.backend.vfs.VFSService

    @ApplicationScoped
    public class VFSServicesServerImpl
    extends Object
    implements org.uberfire.backend.vfs.VFSService
    • Constructor Detail

      • VFSServicesServerImpl

        protected VFSServicesServerImpl()
      • VFSServicesServerImpl

        @Inject
        public VFSServicesServerImpl​(@Named("ioStrategy")
                                     org.uberfire.io.IOService ioService)
    • Method Detail

      • get

        public org.uberfire.backend.vfs.Path get​(String uri)
        Specified by:
        get in interface org.uberfire.backend.vfs.VFSService
      • newDirectoryStream

        public org.uberfire.backend.vfs.DirectoryStream<org.uberfire.backend.vfs.Path> newDirectoryStream​(org.uberfire.backend.vfs.Path dir)
                                                                                                   throws IllegalArgumentException,
                                                                                                          org.uberfire.java.nio.file.NotDirectoryException,
                                                                                                          org.uberfire.java.nio.IOException
        Specified by:
        newDirectoryStream in interface org.uberfire.backend.vfs.VFSService
        Throws:
        IllegalArgumentException
        org.uberfire.java.nio.file.NotDirectoryException
        org.uberfire.java.nio.IOException
      • newDirectoryStream

        public org.uberfire.backend.vfs.DirectoryStream<org.uberfire.backend.vfs.Path> newDirectoryStream​(org.uberfire.backend.vfs.Path dir,
                                                                                                          org.uberfire.backend.vfs.DirectoryStream.Filter<org.uberfire.backend.vfs.Path> filter)
                                                                                                   throws IllegalArgumentException,
                                                                                                          org.uberfire.java.nio.file.NotDirectoryException,
                                                                                                          org.uberfire.java.nio.IOException
        Specified by:
        newDirectoryStream in interface org.uberfire.backend.vfs.VFSService
        Throws:
        IllegalArgumentException
        org.uberfire.java.nio.file.NotDirectoryException
        org.uberfire.java.nio.IOException
      • createDirectories

        public org.uberfire.backend.vfs.Path createDirectories​(org.uberfire.backend.vfs.Path dir)
                                                        throws UnsupportedOperationException,
                                                               org.uberfire.java.nio.file.FileAlreadyExistsException,
                                                               org.uberfire.java.nio.IOException,
                                                               SecurityException
        Specified by:
        createDirectories in interface org.uberfire.backend.vfs.VFSService
        Throws:
        UnsupportedOperationException
        org.uberfire.java.nio.file.FileAlreadyExistsException
        org.uberfire.java.nio.IOException
        SecurityException
      • createDirectories

        public org.uberfire.backend.vfs.Path createDirectories​(org.uberfire.backend.vfs.Path dir,
                                                               Map<String,​?> attrs)
                                                        throws UnsupportedOperationException,
                                                               org.uberfire.java.nio.file.FileAlreadyExistsException,
                                                               org.uberfire.java.nio.IOException,
                                                               SecurityException
        Specified by:
        createDirectories in interface org.uberfire.backend.vfs.VFSService
        Throws:
        UnsupportedOperationException
        org.uberfire.java.nio.file.FileAlreadyExistsException
        org.uberfire.java.nio.IOException
        SecurityException
      • setAttributes

        public void setAttributes​(org.uberfire.backend.vfs.Path path,
                                  Map<String,​Object> attrs)
                           throws IllegalArgumentException,
                                  org.uberfire.java.nio.file.FileSystemAlreadyExistsException,
                                  org.uberfire.java.nio.file.ProviderNotFoundException
        Specified by:
        setAttributes in interface org.uberfire.backend.vfs.VFSService
        Throws:
        IllegalArgumentException
        org.uberfire.java.nio.file.FileSystemAlreadyExistsException
        org.uberfire.java.nio.file.ProviderNotFoundException
      • delete

        public void delete​(org.uberfire.backend.vfs.Path path)
                    throws IllegalArgumentException,
                           org.uberfire.java.nio.file.NoSuchFileException,
                           org.uberfire.java.nio.file.DirectoryNotEmptyException,
                           org.uberfire.java.nio.IOException
        Specified by:
        delete in interface org.uberfire.backend.vfs.VFSService
        Throws:
        IllegalArgumentException
        org.uberfire.java.nio.file.NoSuchFileException
        org.uberfire.java.nio.file.DirectoryNotEmptyException
        org.uberfire.java.nio.IOException
      • deleteIfExists

        public boolean deleteIfExists​(org.uberfire.backend.vfs.Path path)
                               throws IllegalArgumentException,
                                      org.uberfire.java.nio.file.DirectoryNotEmptyException,
                                      org.uberfire.java.nio.IOException
        Specified by:
        deleteIfExists in interface org.uberfire.backend.vfs.VFSService
        Throws:
        IllegalArgumentException
        org.uberfire.java.nio.file.DirectoryNotEmptyException
        org.uberfire.java.nio.IOException
      • copy

        public org.uberfire.backend.vfs.Path copy​(org.uberfire.backend.vfs.Path source,
                                                  org.uberfire.backend.vfs.Path target)
                                           throws UnsupportedOperationException,
                                                  org.uberfire.java.nio.file.FileAlreadyExistsException,
                                                  org.uberfire.java.nio.file.DirectoryNotEmptyException,
                                                  org.uberfire.java.nio.IOException
        Specified by:
        copy in interface org.uberfire.backend.vfs.VFSService
        Throws:
        UnsupportedOperationException
        org.uberfire.java.nio.file.FileAlreadyExistsException
        org.uberfire.java.nio.file.DirectoryNotEmptyException
        org.uberfire.java.nio.IOException
      • move

        public org.uberfire.backend.vfs.Path move​(org.uberfire.backend.vfs.Path source,
                                                  org.uberfire.backend.vfs.Path target)
                                           throws UnsupportedOperationException,
                                                  org.uberfire.java.nio.file.FileAlreadyExistsException,
                                                  org.uberfire.java.nio.file.DirectoryNotEmptyException,
                                                  org.uberfire.java.nio.file.AtomicMoveNotSupportedException,
                                                  org.uberfire.java.nio.IOException
        Specified by:
        move in interface org.uberfire.backend.vfs.VFSService
        Throws:
        UnsupportedOperationException
        org.uberfire.java.nio.file.FileAlreadyExistsException
        org.uberfire.java.nio.file.DirectoryNotEmptyException
        org.uberfire.java.nio.file.AtomicMoveNotSupportedException
        org.uberfire.java.nio.IOException
      • readAllString

        public String readAllString​(org.uberfire.backend.vfs.Path path)
                             throws IllegalArgumentException,
                                    org.uberfire.java.nio.file.NoSuchFileException,
                                    org.uberfire.java.nio.IOException
        Specified by:
        readAllString in interface org.uberfire.backend.vfs.VFSService
        Throws:
        IllegalArgumentException
        org.uberfire.java.nio.file.NoSuchFileException
        org.uberfire.java.nio.IOException
      • isRegularFile

        public boolean isRegularFile​(String uri)
        Specified by:
        isRegularFile in interface org.uberfire.backend.vfs.VFSService
      • isRegularFile

        public boolean isRegularFile​(org.uberfire.backend.vfs.Path path)
        Specified by:
        isRegularFile in interface org.uberfire.backend.vfs.VFSService
      • isDirectory

        public boolean isDirectory​(String uri)
        Specified by:
        isDirectory in interface org.uberfire.backend.vfs.VFSService
      • isDirectory

        public boolean isDirectory​(org.uberfire.backend.vfs.Path path)
        Specified by:
        isDirectory in interface org.uberfire.backend.vfs.VFSService