public interface FileLoader
A file loader is responsible for loading, storing and deleting the data associated with a file in a virtual filesystem. A file is identified using a unique file id.
Modifier and Type | Method and Description |
---|---|
void |
addFileProcessor(FileProcessor fileProc)
Add a file processor to process files before storing and after loading.
|
void |
closeFile(SrvSession sess,
NetworkFile netFile)
Close the network file
|
void |
deleteFile(String fname,
int fid,
int stid)
Delete the specified file data
|
int |
getRequiredDBFeatures()
Return the database features required by this file loader.
|
void |
initializeLoader(org.springframework.extensions.config.ConfigElement params,
DeviceContext ctx)
Initialize the file loader using the specified parameters
|
NetworkFile |
openFile(FileOpenParams params,
int fid,
int stid,
int did,
boolean create,
boolean dir)
Create a network file for the specified file
|
void |
queueFileRequest(FileRequest fileReq)
Request file data to be loaded or saved
|
void |
setContext(DBDeviceContext dbCtx)
Set the database context, used before the loader is fully initialized so that it can
query the database interface if required.
|
void |
shutdownLoader(boolean immediate)
Shutdown the file loader and release all resources
|
void |
startLoader(DeviceContext ctx)
Start the file loader
|
boolean |
supportsStreams()
Determine if the file loader supports NTFS streams
|
int getRequiredDBFeatures()
NetworkFile openFile(FileOpenParams params, int fid, int stid, int did, boolean create, boolean dir) throws IOException, FileNotFoundException
params
- FileOpenParamsfid
- intstid
- intdid
- intcreate
- booleandir
- booleanIOException
FileNotFoundException
void closeFile(SrvSession sess, NetworkFile netFile) throws IOException
sess
- SrvSessionnetFile
- NetworkFileIOException
void deleteFile(String fname, int fid, int stid) throws IOException
fname
- Stringfid
- intstid
- intIOException
void queueFileRequest(FileRequest fileReq)
fileReq
- FileRequestvoid initializeLoader(org.springframework.extensions.config.ConfigElement params, DeviceContext ctx) throws FileLoaderException, IOException
params
- ConfigElementctx
- DeviceContextFileLoaderException
IOException
void startLoader(DeviceContext ctx)
ctx
- DeviceContextvoid shutdownLoader(boolean immediate)
immediate
- booleanboolean supportsStreams()
void addFileProcessor(FileProcessor fileProc) throws FileLoaderException
fileProc
- FileProcessorFileLoaderException
void setContext(DBDeviceContext dbCtx)
dbCtx
- DBDeviceContextCopyright © 2005–2017 Alfresco Software. All rights reserved.