org.eobjects.datacleaner.repository
Interface RepositoryFolder

All Superinterfaces:
HasName, RepositoryNode, Serializable
All Known Subinterfaces:
Repository

public interface RepositoryFolder
extends RepositoryNode

Represents a folder in the Repository.


Method Summary
 RepositoryFile createFile(String name, Action<OutputStream> writeCallback)
          Creates a new file in this folder.
 RepositoryFolder createFolder(String name)
          Creates a new subfolder in this folder.
 RepositoryFile getFile(String name)
          Gets a file in this folder, by name.
 List<RepositoryFile> getFiles()
          Gets files in this folder.
 List<RepositoryFile> getFiles(String prefix, String extension)
          Gets files in this folder which have a particular extension.
 RepositoryFolder getFolder(String name)
          Gets a (sub)folder of this folder, by name.
 List<RepositoryFolder> getFolders()
          Get (sub)folders of this folder.
 RepositoryFile getLatestFile(String prefix, String extension)
          Gets the latest (newest / latest modified) file with the given prefix and extension.
 
Methods inherited from interface org.eobjects.datacleaner.repository.RepositoryNode
delete, getName, getParent, getQualifiedPath
 

Method Detail

getFolders

List<RepositoryFolder> getFolders()
Get (sub)folders of this folder.

Returns:
(sub)folders of this folder.

getFolder

RepositoryFolder getFolder(String name)
Gets a (sub)folder of this folder, by name.

Parameters:
name - the name of the (sub)folder.
Returns:
a (sub)folder of this folder, by name.

getFiles

List<RepositoryFile> getFiles()
Gets files in this folder.

Returns:
files in this folder.

getFiles

List<RepositoryFile> getFiles(String prefix,
                              String extension)
Gets files in this folder which have a particular extension.

Parameters:
prefix - an (optional, can be null) prefix for file selection.
extension - the filename extension to look for, eg. ".analysis.xml".
Returns:
files in this folder.

getLatestFile

RepositoryFile getLatestFile(String prefix,
                             String extension)
Gets the latest (newest / latest modified) file with the given prefix and extension.

Parameters:
prefix - an (optional, can be null) prefix for file selection.
extension - the filename extension to look for, eg. ".analysis.xml".
Returns:
the latest of the files that match the conditions, or null if no files match.

getFile

RepositoryFile getFile(String name)
Gets a file in this folder, by name.

Parameters:
name - the name of the file.
Returns:
a file in this folder, or null if none exist with the specified name.

createFile

RepositoryFile createFile(String name,
                          Action<OutputStream> writeCallback)
Creates a new file in this folder.

Parameters:
name - the name of the file.
writeCallback - a callback which should define what to write to the file.
Returns:
the RepositoryFile reference to the newly created file.

createFolder

RepositoryFolder createFolder(String name)
Creates a new subfolder in this folder.

Parameters:
name - the name of the folder.
Returns:
the resulting RepositoryFolder object.


Copyright © 2012 Human Inference. All Rights Reserved.