Class SolutionRepositoryVfsFileObject
- java.lang.Object
-
- org.pentaho.platform.repository.solution.filebased.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 Summary
Constructors Constructor Description SolutionRepositoryVfsFileObject(String fileRef)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canRenameTo(org.apache.commons.vfs2.FileObject arg0)
void
close()
int
compareTo(org.apache.commons.vfs2.FileObject file)
void
copyFrom(org.apache.commons.vfs2.FileObject arg0, org.apache.commons.vfs2.FileSelector arg1)
void
createFile()
void
createFolder()
boolean
delete()
int
delete(org.apache.commons.vfs2.FileSelector arg0)
int
deleteAll()
boolean
exists()
org.apache.commons.vfs2.FileObject[]
findFiles(org.apache.commons.vfs2.FileSelector arg0)
void
findFiles(org.apache.commons.vfs2.FileSelector arg0, boolean arg1, List arg2)
protected org.pentaho.platform.api.repository2.unified.IAclNodeHelper
getAclHelper()
org.apache.commons.vfs2.FileObject
getChild(String arg0)
org.apache.commons.vfs2.FileObject[]
getChildren()
org.apache.commons.vfs2.FileContent
getContent()
org.pentaho.platform.api.repository2.unified.IRepositoryContentConverterHandler
getConverterHandler()
org.apache.commons.vfs2.operations.FileOperations
getFileOperations()
String
getFileRef()
org.apache.commons.vfs2.FileSystem
getFileSystem()
InputStream
getInputStream()
org.apache.commons.vfs2.FileName
getName()
org.apache.commons.vfs2.FileObject
getParent()
String
getPublicURIString()
org.pentaho.platform.api.repository2.unified.IUnifiedRepository
getRepository()
org.apache.commons.vfs2.FileType
getType()
URL
getURL()
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 codeboolean
isAttached()
boolean
isContentOpen()
boolean
isExecutable()
boolean
isFile()
boolean
isFolder()
boolean
isHidden()
boolean
isReadable()
boolean
isWriteable()
Iterator<org.apache.commons.vfs2.FileObject>
iterator()
void
moveTo(org.apache.commons.vfs2.FileObject arg0)
void
refresh()
org.apache.commons.vfs2.FileObject
resolveFile(String arg0)
org.apache.commons.vfs2.FileObject
resolveFile(String arg0, org.apache.commons.vfs2.NameScope arg1)
boolean
setExecutable(boolean executable, boolean ownerOnly)
boolean
setReadable(boolean readable, boolean ownerOnly)
static void
setTestAclHelper(org.pentaho.platform.api.repository2.unified.IAclNodeHelper helper)
We do not control the lifecycle (creation) of these class instances.boolean
setWritable(boolean writable, boolean ownerOnly)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
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 interfaceorg.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 interfaceorg.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 interfaceorg.apache.commons.vfs2.FileObject
- Throws:
org.apache.commons.vfs2.FileSystemException
-
isHidden
public boolean isHidden() throws org.apache.commons.vfs2.FileSystemException
- Specified by:
isHidden
in interfaceorg.apache.commons.vfs2.FileObject
- Throws:
org.apache.commons.vfs2.FileSystemException
-
isReadable
public boolean isReadable() throws org.apache.commons.vfs2.FileSystemException
- Specified by:
isReadable
in interfaceorg.apache.commons.vfs2.FileObject
- Throws:
org.apache.commons.vfs2.FileSystemException
-
isWriteable
public boolean isWriteable() throws org.apache.commons.vfs2.FileSystemException
- Specified by:
isWriteable
in interfaceorg.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 interfaceorg.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 interfaceorg.apache.commons.vfs2.FileObject
- Throws:
org.apache.commons.vfs2.FileSystemException
-
getPublicURIString
public String getPublicURIString()
- Specified by:
getPublicURIString
in interfaceorg.apache.commons.vfs2.FileObject
-
getFileSystem
public org.apache.commons.vfs2.FileSystem getFileSystem()
- Specified by:
getFileSystem
in interfaceorg.apache.commons.vfs2.FileObject
-
getChildren
public org.apache.commons.vfs2.FileObject[] getChildren() throws org.apache.commons.vfs2.FileSystemException
- Specified by:
getChildren
in interfaceorg.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 interfaceorg.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 interfaceorg.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 interfaceorg.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 interfaceorg.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 interfaceorg.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 interfaceorg.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 interfaceorg.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 interfaceorg.apache.commons.vfs2.FileObject
- Throws:
org.apache.commons.vfs2.FileSystemException
-
delete
public boolean delete() throws org.apache.commons.vfs2.FileSystemException
- Specified by:
delete
in interfaceorg.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 interfaceorg.apache.commons.vfs2.FileObject
- Throws:
org.apache.commons.vfs2.FileSystemException
-
deleteAll
public int deleteAll() throws org.apache.commons.vfs2.FileSystemException
- Specified by:
deleteAll
in interfaceorg.apache.commons.vfs2.FileObject
- Throws:
org.apache.commons.vfs2.FileSystemException
-
createFolder
public void createFolder() throws org.apache.commons.vfs2.FileSystemException
- Specified by:
createFolder
in interfaceorg.apache.commons.vfs2.FileObject
- Throws:
org.apache.commons.vfs2.FileSystemException
-
createFile
public void createFile() throws org.apache.commons.vfs2.FileSystemException
- Specified by:
createFile
in interfaceorg.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 interfaceorg.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 interfaceorg.apache.commons.vfs2.FileObject
- Throws:
org.apache.commons.vfs2.FileSystemException
-
canRenameTo
public boolean canRenameTo(org.apache.commons.vfs2.FileObject arg0)
- Specified by:
canRenameTo
in interfaceorg.apache.commons.vfs2.FileObject
-
getContent
public org.apache.commons.vfs2.FileContent getContent() throws org.apache.commons.vfs2.FileSystemException
- Specified by:
getContent
in interfaceorg.apache.commons.vfs2.FileObject
- Throws:
org.apache.commons.vfs2.FileSystemException
-
close
public void close() throws org.apache.commons.vfs2.FileSystemException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceorg.apache.commons.vfs2.FileObject
- Throws:
org.apache.commons.vfs2.FileSystemException
-
refresh
public void refresh() throws org.apache.commons.vfs2.FileSystemException
- Specified by:
refresh
in interfaceorg.apache.commons.vfs2.FileObject
- Throws:
org.apache.commons.vfs2.FileSystemException
-
isAttached
public boolean isAttached()
- Specified by:
isAttached
in interfaceorg.apache.commons.vfs2.FileObject
-
isContentOpen
public boolean isContentOpen()
- Specified by:
isContentOpen
in interfaceorg.apache.commons.vfs2.FileObject
-
isExecutable
public boolean isExecutable() throws org.apache.commons.vfs2.FileSystemException
- Specified by:
isExecutable
in interfaceorg.apache.commons.vfs2.FileObject
- Throws:
org.apache.commons.vfs2.FileSystemException
-
isFile
public boolean isFile() throws org.apache.commons.vfs2.FileSystemException
- Specified by:
isFile
in interfaceorg.apache.commons.vfs2.FileObject
- Throws:
org.apache.commons.vfs2.FileSystemException
-
isFolder
public boolean isFolder() throws org.apache.commons.vfs2.FileSystemException
- Specified by:
isFolder
in interfaceorg.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 interfaceorg.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 interfaceComparable<org.apache.commons.vfs2.FileObject>
-
-