Interface VaultFile
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canRead()
Checks if this file can be read from (eg.Aggregate
getAggregate()
Returns the artifacts node of this file ornull
if it's transientjava.lang.String
getAggregatePath()
Artifact
getArtifact()
Returns the underlying artifact for this os file.VaultFile
getChild(java.lang.String name)
Returns the child with the given name ornull
java.util.Collection<? extends VaultFile>
getChildren()
Returns a collection of the childrenjava.lang.String
getContentType()
Returns the content type of this file ornull
if the type cannot be determined or if it's a directory.Aggregate
getControllingAggregate()
Returns the aggregate that controls this file.VaultFileSystem
getFileSystem()
Returns the underlying file system.java.lang.String
getName()
Returns the name of this file.VaultFile
getParent()
Returns the parent file ornull
if this is the root file.java.lang.String
getPath()
Returns the os pathjava.util.Collection<? extends VaultFile>
getRelated()
Returns the os file set for this file.java.lang.String
getRepoRelPath()
void
invalidate()
boolean
isDirectory()
Checks if this file is a directory.boolean
isTransient()
Checks if this file is transient.long
lastModified()
Returns the last modified date or0
if not known.long
length()
Returns the length of the serialized data if it's known without doing the actual serialization.
-
-
-
Method Detail
-
getPath
java.lang.String getPath()
Returns the os path- Returns:
- the os path.
-
getRepoRelPath
java.lang.String getRepoRelPath()
-
getAggregatePath
java.lang.String getAggregatePath()
-
getName
java.lang.String getName()
Returns the name of this file.- Returns:
- the name of this file.
-
getArtifact
Artifact getArtifact()
Returns the underlying artifact for this os file. If this file represents the Meta-Directorynull
is returned.- Returns:
- the artifact or
null
.
-
isDirectory
boolean isDirectory()
Checks if this file is a directory.- Returns:
true
if this file is a directory.
-
isTransient
boolean isTransient()
Checks if this file is transient. a file is transient if it's only used as hierarchical node for a deeper 'real' file. i.e.- Returns:
true
if this file is transient
-
getParent
VaultFile getParent() throws java.io.IOException, RepositoryException
Returns the parent file ornull
if this is the root file.- Returns:
- the parent file.
- Throws:
java.io.IOException
- if an I/O error occurs.RepositoryException
- if a repository error occurs.
-
getAggregate
Aggregate getAggregate()
Returns the artifacts node of this file ornull
if it's transient- Returns:
- the artifacts node
-
getControllingAggregate
Aggregate getControllingAggregate()
Returns the aggregate that controls this file.- Returns:
- the artifacts node
-
getChild
VaultFile getChild(java.lang.String name) throws RepositoryException
Returns the child with the given name ornull
- Parameters:
name
- the name of the child- Returns:
- the child or
null
- Throws:
RepositoryException
- if an error occurs
-
getChildren
java.util.Collection<? extends VaultFile> getChildren() throws RepositoryException
Returns a collection of the children- Returns:
- a collection of the children
- Throws:
RepositoryException
- if an error occurs
-
getRelated
java.util.Collection<? extends VaultFile> getRelated() throws RepositoryException
Returns the os file set for this file. The set contains those are the files that are generated from the same jcr file.- Returns:
- the file set of related files
- Throws:
RepositoryException
- if an error occurs.
-
canRead
boolean canRead()
Checks if this file can be read from (eg. if it's not a directory)- Returns:
true
if this file can be read from.
-
lastModified
long lastModified()
Returns the last modified date or0
if not known.- Returns:
- the last modified date or
0
-
length
long length()
Returns the length of the serialized data if it's known without doing the actual serialization.- Returns:
- the length or
-1
if the length cannot be determined.
-
getContentType
java.lang.String getContentType()
Returns the content type of this file ornull
if the type cannot be determined or if it's a directory.- Returns:
- the content type or
null
.
-
getFileSystem
VaultFileSystem getFileSystem()
Returns the underlying file system.- Returns:
- the Vault filesystem
-
invalidate
void invalidate() throws RepositoryException
- Throws:
RepositoryException
-
-