org.pentaho.platform.repository.solution.filebased
Class FileSolutionFile

java.lang.Object
  extended by org.pentaho.platform.repository.solution.filebased.FileSolutionFile
All Implemented Interfaces:
ISolutionFile

public class FileSolutionFile
extends Object
implements ISolutionFile


Constructor Summary
FileSolutionFile(File inFile, File inSolutionRoot)
           
 
Method Summary
 boolean exists()
           
 byte[] getData()
           
 String getExtension()
           
 File getFile()
           
 String getFileName()
           
 String getFileType()
           
 String getFullPath()
           
 long getLastModified()
           
 String getSolution()
           
 String getSolutionPath()
           
 boolean isDirectory()
           
 boolean isRoot()
           
 ISolutionFile[] listFiles()
          If this is a directory, will list all children files/directories for hierarchical navigation.
 ISolutionFile[] listFiles(IFileFilter filter)
           
static void main(String[] args)
           
 ISolutionFile retrieveParent()
          NOTE: This method is named 'retrieveParent' instead of 'getParent' because the generic ISolutionFile type is not a 'Hibernate' described type and one of the base classes (RepositoryFile) will fail dependency checking.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileSolutionFile

public FileSolutionFile(File inFile,
                        File inSolutionRoot)
Method Detail

isDirectory

public boolean isDirectory()
Specified by:
isDirectory in interface ISolutionFile
Returns:
true if the ISolutionFile points to a directory.

getFileName

public String getFileName()
Specified by:
getFileName in interface ISolutionFile
Returns:
The name of the file/directory

getSolutionPath

public String getSolutionPath()
Specified by:
getSolutionPath in interface ISolutionFile
Returns:
path within the solution to the file/directory.

getSolution

public String getSolution()
Specified by:
getSolution in interface ISolutionFile
Returns:
Name of the solution this file/directory is contained within

getExtension

public String getExtension()
Specified by:
getExtension in interface ISolutionFile

getFullPath

public String getFullPath()
Specified by:
getFullPath in interface ISolutionFile
Returns:
fully qualified path to this file/directory

getFileType

public String getFileType()

listFiles

public ISolutionFile[] listFiles()
Description copied from interface: ISolutionFile
If this is a directory, will list all children files/directories for hierarchical navigation.

Specified by:
listFiles in interface ISolutionFile

toString

public String toString()
Overrides:
toString in class Object

main

public static void main(String[] args)

isRoot

public boolean isRoot()
Specified by:
isRoot in interface ISolutionFile
Returns:
true if this is the root solution folder NOTE: This will always return false for a filebased solution

getData

public byte[] getData()
Specified by:
getData in interface ISolutionFile

retrieveParent

public ISolutionFile retrieveParent()
Description copied from interface: ISolutionFile
NOTE: This method is named 'retrieveParent' instead of 'getParent' because the generic ISolutionFile type is not a 'Hibernate' described type and one of the base classes (RepositoryFile) will fail dependency checking.

Specified by:
retrieveParent in interface ISolutionFile
Returns:
The parent file for this ISolutionFile

exists

public boolean exists()
Specified by:
exists in interface ISolutionFile

getFile

public File getFile()

getLastModified

public long getLastModified()
Specified by:
getLastModified in interface ISolutionFile
Returns:
Returns the modDate.

listFiles

public ISolutionFile[] listFiles(IFileFilter filter)
Specified by:
listFiles in interface ISolutionFile