public interface DBInterface
Used by the DBDiskDriver virtual filesystem to provide the interface to the database allowing different databases to be used to store the file system strucuture, NTFS streams, file data and retention information.
Modifier and Type | Field and Description |
---|---|
static int |
FeatureData |
static int |
FeatureJarData |
static int |
FeatureNTFS |
static int |
FeatureObjectId |
static int |
FeatureQueue |
static int |
FeatureRetention |
static int |
FeatureSecDescriptor |
static int |
FeatureSymLinks |
static int |
FileAll |
static int |
FileIds |
static int |
FileNameOnly |
static int |
StreamAll |
static int |
StreamIds |
static int |
StreamNameOnly |
Modifier and Type | Method and Description |
---|---|
int |
createFileRecord(java.lang.String fname,
int dirId,
FileOpenParams params,
boolean retain)
Create a file record for a new file or folder
|
int |
createStreamRecord(java.lang.String sname,
int fid)
Create a stream record for a new file stream
|
void |
deleteFileRecord(int dirId,
int fid,
boolean markOnly)
Delete a file or folder record
|
void |
deleteStreamRecord(int fid,
int stid,
boolean markOnly)
Delete a file stream record
|
void |
deleteSymbolicLinkRecord(int dirId,
int fid)
Delete a symbolic link record
|
int |
fileExists(int dirId,
java.lang.String fname)
Check if a file/folder exists
|
java.lang.String |
getDBInterfaceName()
Return the database interface name
|
int |
getFileId(int dirid,
java.lang.String fname,
boolean dirOnly,
boolean caseLess)
Get the id for a file/folder, or -1 if the file/folder does not exist.
|
DBFileInfo |
getFileInformation(int dirId,
int fid,
int infoLevel)
Get information for a file or folder
|
RetentionDetails |
getFileRetentionDetails(int dirId,
int fid)
Return the retention period expiry date/time for the specified file, or zero if the file/folder
is not under retention.
|
StreamInfo |
getStreamInformation(int fid,
int stid,
int infoLevel)
Get information for a file stream
|
StreamInfoList |
getStreamsList(int fid,
int infoLevel)
Return the list of streams for the specified file
|
long |
getUsedFileSpace()
Return the used file space, or -1 if not supported.
|
void |
initializeDatabase(DBDeviceContext context,
org.springframework.extensions.config.ConfigElement params)
Initialize the database interface
|
boolean |
isOnline()
Check if the database is online
|
java.lang.String |
readSymbolicLink(int dirId,
int fid)
Return the data for a symbolic link
|
void |
renameFileRecord(int dirId,
int fid,
java.lang.String newName,
int newDir)
Rename a file or folder, may also change the parent directory.
|
void |
renameStreamRecord(int dirId,
int fid,
int stid,
java.lang.String newName)
Rename a file stream
|
void |
requestFeatures(int featureMask)
Request the specified database features be enabled
|
void |
setFileInformation(int dirId,
int fid,
FileInfo finfo)
Set file information for a file or folder
|
void |
setStreamInformation(int dirId,
int fid,
int stid,
StreamInfo sinfo)
Set information for a file stream
|
void |
shutdownDatabase(DBDeviceContext context)
Shutdown the database interface
|
DBSearchContext |
startSearch(int dirid,
java.lang.String searchPath,
int attrib,
int infoLevel,
int maxRecords)
Start a directory search
|
boolean |
supportsFeature(int feature)
Determine if the database interface supports the specified feature
|
static final int FeatureNTFS
static final int FeatureRetention
static final int FeatureQueue
static final int FeatureData
static final int FeatureJarData
static final int FeatureObjectId
static final int FeatureSymLinks
static final int FeatureSecDescriptor
static final int FileNameOnly
static final int FileIds
static final int FileAll
static final int StreamNameOnly
static final int StreamIds
static final int StreamAll
java.lang.String getDBInterfaceName()
boolean supportsFeature(int feature)
feature
- intvoid requestFeatures(int featureMask) throws DBException
featureMask
- intDBException
void initializeDatabase(DBDeviceContext context, org.springframework.extensions.config.ConfigElement params) throws InvalidConfigurationException
context
- DBDeviceContextparams
- ConfigElementInvalidConfigurationException
void shutdownDatabase(DBDeviceContext context)
context
- DBDeviceContextboolean isOnline()
int fileExists(int dirId, java.lang.String fname) throws DBException
dirId
- intfname
- StringDBException
int createFileRecord(java.lang.String fname, int dirId, FileOpenParams params, boolean retain) throws DBException, FileExistsException
fname
- StringdirId
- intparams
- FileOpenParamsretain
- booleanDBException
FileExistsException
int createStreamRecord(java.lang.String sname, int fid) throws DBException
sname
- Stringfid
- intDBException
void deleteFileRecord(int dirId, int fid, boolean markOnly) throws DBException, java.io.IOException, DirectoryNotEmptyException
dirId
- intfid
- intmarkOnly
- booleanDBException
java.io.IOException
DirectoryNotEmptyException
void deleteStreamRecord(int fid, int stid, boolean markOnly) throws DBException
fid
- intstid
- intmarkOnly
- booleanDBException
void setFileInformation(int dirId, int fid, FileInfo finfo) throws DBException
dirId
- intfid
- intfinfo
- FileInfoDBException
void setStreamInformation(int dirId, int fid, int stid, StreamInfo sinfo) throws DBException
dirId
- intfid
- intstid
- intsinfo
- StreamInfoDBException
int getFileId(int dirid, java.lang.String fname, boolean dirOnly, boolean caseLess) throws DBException
dirid
- intfname
- StringdirOnly
- booleancaseLess
- booleanDBException
DBFileInfo getFileInformation(int dirId, int fid, int infoLevel) throws DBException
dirId
- intfid
- intinfoLevel
- intDBException
StreamInfo getStreamInformation(int fid, int stid, int infoLevel) throws DBException
fid
- intstid
- intinfoLevel
- intDBException
StreamInfoList getStreamsList(int fid, int infoLevel) throws DBException
fid
- intinfoLevel
- intDBException
void renameFileRecord(int dirId, int fid, java.lang.String newName, int newDir) throws DBException, java.io.FileNotFoundException
dirId
- intfid
- intnewName
- StringnewDir
- intDBException
java.io.FileNotFoundException
void renameStreamRecord(int dirId, int fid, int stid, java.lang.String newName) throws DBException
dirId
- intfid
- intstid
- intnewName
- DBException
RetentionDetails getFileRetentionDetails(int dirId, int fid) throws DBException
dirId
- intfid
- intDBException
DBSearchContext startSearch(int dirid, java.lang.String searchPath, int attrib, int infoLevel, int maxRecords) throws DBException
dirid
- intsearchPath
- Stringattrib
- intinfoLevel
- intmaxRecords
- intDBException
java.lang.String readSymbolicLink(int dirId, int fid) throws DBException
dirId
- intfid
- intDBException
void deleteSymbolicLinkRecord(int dirId, int fid) throws DBException
dirId
- intfid
- intDBException
long getUsedFileSpace()
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.