Interface MetaDirectory
-
public interface MetaDirectoryProvides an abstraction of a virtual directory that holds additional information about the files under vault control.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Synchronizes and closes this meta directory.voidcreate(String path)Creates the internal structures for this meta directory and initializes it with the given path.voiddelete()Deletes the internal structures of this meta directorybooleanexists()Checks if this meta directory already exists on the filesystem.MetaFilegetBaseFile(String name, boolean create)Returns a file from the internal base storage of this directory.VltEntriesgetEntries()Returns the entries that are recorded in this meta directoryFilegetFile()Returns the underlying system file or directory.MetaFilegetFile(String name)Returns a file of this meta directory.MetaFilegetFile(String name, boolean create)Returns a file of this meta directory.StringgetRepositoryUrl()Returns the repository url defined for this meta directory.MetaFilegetTmpFile(String name, boolean create)Returns a file from the internal temporary storage of this directory.booleanhasFile(String name)Checks if the file with the given name exists.voidsetRepositoryUrl(String url)Sets the repository url define for this meta directoryvoidsync()Synchronizes any internal changes to this meta directory with the underlying structures.
-
-
-
Method Detail
-
getFile
File getFile()
Returns the underlying system file or directory.- Returns:
- the system file.
-
exists
boolean exists()
Checks if this meta directory already exists on the filesystem.- Returns:
trueif this meta directory exists.
-
create
void create(String path) throws IOException
Creates the internal structures for this meta directory and initializes it with the given path.- Parameters:
path- the platform path relative to the jcr_root of this meta directory.- Throws:
IOException- if an I/O error occurs
-
delete
void delete() throws IOExceptionDeletes the internal structures of this meta directory- Throws:
IOException- if an I/O error occurs
-
sync
void sync() throws IOException
Synchronizes any internal changes to this meta directory with the underlying structures.- Throws:
IOException- if an I/O error occurs
-
close
void close() throws IOExceptionSynchronizes and closes this meta directory.- Throws:
IOException- if an I/O error occurs
-
getRepositoryUrl
String getRepositoryUrl() throws IOException
Returns the repository url defined for this meta directory.- Returns:
- the url or
nullif not defined. - Throws:
IOException- if an I/O error occurs
-
setRepositoryUrl
void setRepositoryUrl(String url) throws IOException
Sets the repository url define for this meta directory- Parameters:
url- the url- Throws:
IOException- if an I/O error occurs
-
getEntries
VltEntries getEntries() throws VltException
Returns the entries that are recorded in this meta directory- Returns:
- the entries.
- Throws:
VltException- if an error during reading of the entries occurrs.
-
getFile
MetaFile getFile(String name) throws IOException
Returns a file of this meta directory.- Parameters:
name- name of the file- Returns:
- the file or
nullif not found - Throws:
IOException- if an I/O error occurs
-
getFile
MetaFile getFile(String name, boolean create) throws IOException
Returns a file of this meta directory.- Parameters:
name- name of the filecreate- iftruea new file will be created if not exists.- Returns:
- the file or
nullif not found and create isfalse. - Throws:
IOException- if an I/O error occurs
-
getTmpFile
MetaFile getTmpFile(String name, boolean create) throws IOException
Returns a file from the internal temporary storage of this directory.- Parameters:
name- name of the file.create- iftruea new file will be created if not exists.- Returns:
- the file or
nullif not found and create isfalse. - Throws:
IOException- if an I/O error occurs
-
getBaseFile
MetaFile getBaseFile(String name, boolean create) throws IOException
Returns a file from the internal base storage of this directory.- Parameters:
name- name of the file.create- iftruea new file will be created if not exists.- Returns:
- the file or
nullif not found and create isfalse. - Throws:
IOException- if an I/O error occurs
-
hasFile
boolean hasFile(String name) throws IOException
Checks if the file with the given name exists.- Parameters:
name- name of the file.- Returns:
trueif the file exists.- Throws:
IOException- if an I/O error occurs
-
-