Class FileRepository
java.lang.Object
org.pentaho.reporting.libraries.repository.file.FileRepository
- All Implemented Interfaces:
Serializable
,Repository
,UrlRepository
A file-repository uses a subset of the local filesystem to provide a repository view on top of it. This repository
type is the most commonly used repository, as most applications are allowed to access the local filsystem.
- Author:
- Thomas Morgner
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFileRepository
(File file) Creates a new repository for the given file.FileRepository
(File file, MimeRegistry mimeRegistry) Creates a new repository for the given file. -
Method Summary
-
Constructor Details
-
FileRepository
Creates a new repository for the given file. The file must point to a directory. This constructor uses the default mime-registry.- Parameters:
file
- the directory, which should form the root of the repository.- Throws:
ContentIOException
- if an error prevents the repository creation.
-
FileRepository
Creates a new repository for the given file. The file must point to a directory.- Parameters:
file
- the directory, which should form the root of the repository.mimeRegistry
- the mime registry to be used.- Throws:
ContentIOException
- if an error prevents the repository creation.
-
-
Method Details
-
getMimeRegistry
Returns the mime-registry for the repository.- Specified by:
getMimeRegistry
in interfaceRepository
- Returns:
- the mime-registry.
- See Also:
-
getRoot
Returns the repositories root directory entry.- Specified by:
getRoot
in interfaceRepository
- Returns:
- the root directory.
- Throws:
ContentIOException
- if an error occurs.
-
getURL
Returns the URL that represents this repository. The meaning of the URL returned here is implementation specific and is probably not suitable to resolve names to global objects.- Specified by:
getURL
in interfaceUrlRepository
- Returns:
- the repository's URL.
- Throws:
MalformedURLException
- if the URL could not be computed.
-