Package org.apache.jackrabbit.vault.vlt
Class VltFile
- java.lang.Object
-
- org.apache.jackrabbit.vault.vlt.VltFile
-
- All Implemented Interfaces:
DocumentSource
public class VltFile extends Object implements DocumentSource
VltFile
...
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VltFile.State
Possible state of this file
-
Field Summary
Fields Modifier and Type Field Description static String
PROP_CONTENT_TYPE
-
Constructor Summary
Constructors Constructor Description VltFile(VltDirectory parent, String name, VltEntry entry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileAction
add(boolean force)
boolean
canDescend()
FileAction
commit(VaultFile remoteFile)
FileAction
delete(boolean force)
VltDirectory
descend()
void
diff()
MetaFile
getBaseFile(boolean create)
String
getContentType()
VltEntry
getEntry()
File
getFile()
String
getLabel()
Returns a label of the source.String
getLocation()
Returns some location information of the source.String
getName()
String
getPath()
Properties
getProperties()
String
getProperty(String name)
VltFile.State
getStatus()
MetaFile
getTmpFile()
boolean
isBinary()
Checks if this file has binary content.boolean
resolved(boolean force)
boolean
revert()
void
setProperty(String name, String value)
FileAction
status(VaultFile remoteFile)
FileAction
update(VaultFile remoteFile, boolean force)
-
-
-
Field Detail
-
PROP_CONTENT_TYPE
public static final String PROP_CONTENT_TYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
VltFile
public VltFile(VltDirectory parent, String name, VltEntry entry) throws VltException
- Throws:
VltException
-
-
Method Detail
-
getProperties
public Properties getProperties() throws VltException
- Throws:
VltException
-
getProperty
public String getProperty(String name) throws VltException
- Throws:
VltException
-
setProperty
public void setProperty(String name, String value) throws VltException
- Throws:
VltException
-
getStatus
public VltFile.State getStatus() throws VltException
- Throws:
VltException
-
getName
public String getName()
-
getFile
public File getFile()
-
getPath
public String getPath()
-
getBaseFile
public MetaFile getBaseFile(boolean create) throws VltException
- Throws:
VltException
-
getContentType
public String getContentType()
-
isBinary
public boolean isBinary()
Checks if this file has binary content. It does not actually read the file data but callsMimeTypes.isBinary(String)
with the content type of the work file.- Returns:
true
if this is binary
-
getTmpFile
public MetaFile getTmpFile() throws VltException
- Throws:
VltException
-
canDescend
public boolean canDescend()
-
descend
public VltDirectory descend() throws VltException
- Throws:
VltException
-
getEntry
public VltEntry getEntry()
-
diff
public void diff() throws VltException
- Throws:
VltException
-
delete
public FileAction delete(boolean force) throws VltException
- Throws:
VltException
-
commit
public FileAction commit(VaultFile remoteFile) throws VltException
- Throws:
VltException
-
revert
public boolean revert() throws VltException
- Throws:
VltException
-
resolved
public boolean resolved(boolean force) throws VltException
- Throws:
VltException
-
update
public FileAction update(VaultFile remoteFile, boolean force) throws VltException
- Throws:
VltException
-
status
public FileAction status(VaultFile remoteFile) throws VltException
- Throws:
VltException
-
add
public FileAction add(boolean force) throws VltException
- Throws:
VltException
-
getLabel
public String getLabel()
Description copied from interface:DocumentSource
Returns a label of the source.- Specified by:
getLabel
in interfaceDocumentSource
- Returns:
- a label of the source.
-
getLocation
public String getLocation()
Description copied from interface:DocumentSource
Returns some location information of the source.- Specified by:
getLocation
in interfaceDocumentSource
- Returns:
- some location information.
-
-