Class SolutionRepositoryVfsFileObject

  • All Implemented Interfaces:
    Closeable, AutoCloseable, Comparable<org.apache.commons.vfs2.FileObject>, Iterable<org.apache.commons.vfs2.FileObject>, org.apache.commons.vfs2.FileObject

    public class SolutionRepositoryVfsFileObject
    extends Object
    implements org.apache.commons.vfs2.FileObject
    • Constructor Detail

      • SolutionRepositoryVfsFileObject

        public SolutionRepositoryVfsFileObject​(String fileRef)
    • Method Detail

      • getRepository

        public org.pentaho.platform.api.repository2.unified.IUnifiedRepository getRepository()
      • getConverterHandler

        public org.pentaho.platform.api.repository2.unified.IRepositoryContentConverterHandler getConverterHandler()
      • getFileRef

        public String getFileRef()
      • getName

        public org.apache.commons.vfs2.FileName getName()
        Specified by:
        getName in interface org.apache.commons.vfs2.FileObject
      • getURL

        public URL getURL()
                   throws org.apache.commons.vfs2.FileSystemException
        TODO: This impl always returns null as the URL constructor throws an exception on not finding a handler for 'solution' protocol We should either fix this or remove this method as it is not called by any code
        Specified by:
        getURL in interface org.apache.commons.vfs2.FileObject
        Returns:
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • exists

        public boolean exists()
                       throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        exists in interface org.apache.commons.vfs2.FileObject
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • isHidden

        public boolean isHidden()
                         throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        isHidden in interface org.apache.commons.vfs2.FileObject
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • isReadable

        public boolean isReadable()
                           throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        isReadable in interface org.apache.commons.vfs2.FileObject
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • isWriteable

        public boolean isWriteable()
                            throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        isWriteable in interface org.apache.commons.vfs2.FileObject
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • getType

        public org.apache.commons.vfs2.FileType getType()
                                                 throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        getType in interface org.apache.commons.vfs2.FileObject
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • getParent

        public org.apache.commons.vfs2.FileObject getParent()
                                                     throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        getParent in interface org.apache.commons.vfs2.FileObject
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • getPublicURIString

        public String getPublicURIString()
        Specified by:
        getPublicURIString in interface org.apache.commons.vfs2.FileObject
      • getFileSystem

        public org.apache.commons.vfs2.FileSystem getFileSystem()
        Specified by:
        getFileSystem in interface org.apache.commons.vfs2.FileObject
      • getChildren

        public org.apache.commons.vfs2.FileObject[] getChildren()
                                                         throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        getChildren in interface org.apache.commons.vfs2.FileObject
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • getChild

        public org.apache.commons.vfs2.FileObject getChild​(String arg0)
                                                    throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        getChild in interface org.apache.commons.vfs2.FileObject
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • resolveFile

        public org.apache.commons.vfs2.FileObject resolveFile​(String arg0,
                                                              org.apache.commons.vfs2.NameScope arg1)
                                                       throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        resolveFile in interface org.apache.commons.vfs2.FileObject
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • setExecutable

        public boolean setExecutable​(boolean executable,
                                     boolean ownerOnly)
                              throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        setExecutable in interface org.apache.commons.vfs2.FileObject
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • setReadable

        public boolean setReadable​(boolean readable,
                                   boolean ownerOnly)
                            throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        setReadable in interface org.apache.commons.vfs2.FileObject
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • setWritable

        public boolean setWritable​(boolean writable,
                                   boolean ownerOnly)
                            throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        setWritable in interface org.apache.commons.vfs2.FileObject
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • resolveFile

        public org.apache.commons.vfs2.FileObject resolveFile​(String arg0)
                                                       throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        resolveFile in interface org.apache.commons.vfs2.FileObject
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • findFiles

        public org.apache.commons.vfs2.FileObject[] findFiles​(org.apache.commons.vfs2.FileSelector arg0)
                                                       throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        findFiles in interface org.apache.commons.vfs2.FileObject
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • findFiles

        public void findFiles​(org.apache.commons.vfs2.FileSelector arg0,
                              boolean arg1,
                              List arg2)
                       throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        findFiles in interface org.apache.commons.vfs2.FileObject
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • delete

        public boolean delete()
                       throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        delete in interface org.apache.commons.vfs2.FileObject
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • delete

        public int delete​(org.apache.commons.vfs2.FileSelector arg0)
                   throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        delete in interface org.apache.commons.vfs2.FileObject
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • deleteAll

        public int deleteAll()
                      throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        deleteAll in interface org.apache.commons.vfs2.FileObject
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • createFolder

        public void createFolder()
                          throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        createFolder in interface org.apache.commons.vfs2.FileObject
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • createFile

        public void createFile()
                        throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        createFile in interface org.apache.commons.vfs2.FileObject
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • copyFrom

        public void copyFrom​(org.apache.commons.vfs2.FileObject arg0,
                             org.apache.commons.vfs2.FileSelector arg1)
                      throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        copyFrom in interface org.apache.commons.vfs2.FileObject
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • moveTo

        public void moveTo​(org.apache.commons.vfs2.FileObject arg0)
                    throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        moveTo in interface org.apache.commons.vfs2.FileObject
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • canRenameTo

        public boolean canRenameTo​(org.apache.commons.vfs2.FileObject arg0)
        Specified by:
        canRenameTo in interface org.apache.commons.vfs2.FileObject
      • getContent

        public org.apache.commons.vfs2.FileContent getContent()
                                                       throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        getContent in interface org.apache.commons.vfs2.FileObject
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • close

        public void close()
                   throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Closeable
        Specified by:
        close in interface org.apache.commons.vfs2.FileObject
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • refresh

        public void refresh()
                     throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        refresh in interface org.apache.commons.vfs2.FileObject
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • isAttached

        public boolean isAttached()
        Specified by:
        isAttached in interface org.apache.commons.vfs2.FileObject
      • isContentOpen

        public boolean isContentOpen()
        Specified by:
        isContentOpen in interface org.apache.commons.vfs2.FileObject
      • isExecutable

        public boolean isExecutable()
                             throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        isExecutable in interface org.apache.commons.vfs2.FileObject
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • isFile

        public boolean isFile()
                       throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        isFile in interface org.apache.commons.vfs2.FileObject
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • isFolder

        public boolean isFolder()
                         throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        isFolder in interface org.apache.commons.vfs2.FileObject
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • getFileOperations

        public org.apache.commons.vfs2.operations.FileOperations getFileOperations()
                                                                            throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        getFileOperations in interface org.apache.commons.vfs2.FileObject
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • getInputStream

        public InputStream getInputStream()
                                   throws org.pentaho.platform.api.repository2.unified.UnifiedRepositoryException,
                                          org.apache.commons.vfs2.FileSystemException
        Throws:
        org.pentaho.platform.api.repository2.unified.UnifiedRepositoryException
        org.apache.commons.vfs2.FileSystemException
      • getAclHelper

        protected org.pentaho.platform.api.repository2.unified.IAclNodeHelper getAclHelper()
      • setTestAclHelper

        public static void setTestAclHelper​(org.pentaho.platform.api.repository2.unified.IAclNodeHelper helper)
        We do not control the lifecycle (creation) of these class instances. Therefore, for testing purposes when we need to override the IAclNodeHelper, this is the method to call.
        Parameters:
        helper -
      • compareTo

        public int compareTo​(org.apache.commons.vfs2.FileObject file)
        Specified by:
        compareTo in interface Comparable<org.apache.commons.vfs2.FileObject>
      • iterator

        public Iterator<org.apache.commons.vfs2.FileObject> iterator()
        Specified by:
        iterator in interface Iterable<org.apache.commons.vfs2.FileObject>