public class LegacyFileStateDriver extends Object implements ExtendedDiskInterface
This class decorates an ExtendedDiskInterface with odds and ends to keep JLan happy.
In particular this implementation cannot contain any code that requires access to the alfresco repository.
Constructor and Description |
---|
LegacyFileStateDriver() |
Modifier and Type | Method and Description |
---|---|
void |
closeFile(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree,
org.alfresco.jlan.server.filesys.NetworkFile file) |
org.alfresco.jlan.server.core.DeviceContext |
createContext(String shareName,
org.springframework.extensions.config.ConfigElement args) |
void |
createDirectory(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree,
org.alfresco.jlan.server.filesys.FileOpenParams params) |
org.alfresco.jlan.server.filesys.NetworkFile |
createFile(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree,
org.alfresco.jlan.server.filesys.FileOpenParams params) |
void |
deleteDirectory(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree,
String dir) |
void |
deleteFile(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree,
String name) |
int |
fileExists(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree,
String name) |
void |
flushFile(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree,
org.alfresco.jlan.server.filesys.NetworkFile file) |
ExtendedDiskInterface |
getDiskInterface() |
org.alfresco.jlan.server.filesys.FileInfo |
getFileInformation(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree,
String name) |
org.alfresco.jlan.server.locking.FileLockingInterface |
getFileLockingInterface() |
org.alfresco.jlan.server.locking.OpLockInterface |
getOpLockInterface() |
void |
init() |
boolean |
isReadOnly(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.core.DeviceContext ctx) |
org.alfresco.jlan.server.filesys.NetworkFile |
openFile(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree,
org.alfresco.jlan.server.filesys.FileOpenParams params) |
int |
readFile(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree,
org.alfresco.jlan.server.filesys.NetworkFile file,
byte[] buf,
int bufPos,
int siz,
long filePos) |
void |
registerContext(org.alfresco.jlan.server.core.DeviceContext ctx)
Register an independently created device context object for this instance of the shared device.
|
void |
renameFile(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree,
String oldName,
String newName) |
long |
seekFile(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree,
org.alfresco.jlan.server.filesys.NetworkFile file,
long pos,
int typ) |
void |
setDiskInterface(ExtendedDiskInterface diskInterface) |
void |
setFileInformation(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree,
String name,
org.alfresco.jlan.server.filesys.FileInfo info) |
void |
setFileLockingInterface(org.alfresco.jlan.server.locking.FileLockingInterface fileLockingInterface) |
void |
setOpLockInterface(org.alfresco.jlan.server.locking.OpLockInterface opLockInterface) |
org.alfresco.jlan.server.filesys.SearchContext |
startSearch(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree,
String searchPath,
int attrib) |
void |
treeClosed(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree) |
void |
treeOpened(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree) |
void |
truncateFile(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree,
org.alfresco.jlan.server.filesys.NetworkFile file,
long siz) |
int |
writeFile(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree,
org.alfresco.jlan.server.filesys.NetworkFile file,
byte[] buf,
int bufoff,
int siz,
long fileoff) |
public void init()
public void treeOpened(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree)
treeOpened
in interface org.alfresco.jlan.server.core.DeviceInterface
public void treeClosed(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree)
treeClosed
in interface org.alfresco.jlan.server.core.DeviceInterface
public org.alfresco.jlan.server.filesys.NetworkFile createFile(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree, org.alfresco.jlan.server.filesys.FileOpenParams params) throws IOException
createFile
in interface org.alfresco.jlan.server.filesys.DiskInterface
IOException
public org.alfresco.jlan.server.filesys.NetworkFile openFile(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree, org.alfresco.jlan.server.filesys.FileOpenParams params) throws IOException
openFile
in interface org.alfresco.jlan.server.filesys.DiskInterface
IOException
public void closeFile(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree, org.alfresco.jlan.server.filesys.NetworkFile file) throws IOException
closeFile
in interface org.alfresco.jlan.server.filesys.DiskInterface
IOException
public void registerContext(org.alfresco.jlan.server.core.DeviceContext ctx) throws org.alfresco.jlan.server.core.DeviceContextException
ExtendedDiskInterface
registerContext
in interface ExtendedDiskInterface
ctx
- the device contextorg.alfresco.jlan.server.core.DeviceContextException
public void setDiskInterface(ExtendedDiskInterface diskInterface)
public ExtendedDiskInterface getDiskInterface()
public void createDirectory(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree, org.alfresco.jlan.server.filesys.FileOpenParams params) throws IOException
createDirectory
in interface org.alfresco.jlan.server.filesys.DiskInterface
IOException
public void deleteDirectory(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree, String dir) throws IOException
deleteDirectory
in interface org.alfresco.jlan.server.filesys.DiskInterface
IOException
public void deleteFile(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree, String name) throws IOException
deleteFile
in interface org.alfresco.jlan.server.filesys.DiskInterface
IOException
public int fileExists(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree, String name)
fileExists
in interface org.alfresco.jlan.server.filesys.DiskInterface
public void flushFile(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree, org.alfresco.jlan.server.filesys.NetworkFile file) throws IOException
flushFile
in interface org.alfresco.jlan.server.filesys.DiskInterface
IOException
public org.alfresco.jlan.server.filesys.FileInfo getFileInformation(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree, String name) throws IOException
getFileInformation
in interface org.alfresco.jlan.server.filesys.DiskInterface
IOException
public boolean isReadOnly(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.core.DeviceContext ctx) throws IOException
isReadOnly
in interface org.alfresco.jlan.server.filesys.DiskInterface
IOException
public int readFile(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree, org.alfresco.jlan.server.filesys.NetworkFile file, byte[] buf, int bufPos, int siz, long filePos) throws IOException
readFile
in interface org.alfresco.jlan.server.filesys.DiskInterface
IOException
public void renameFile(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree, String oldName, String newName) throws IOException
renameFile
in interface org.alfresco.jlan.server.filesys.DiskInterface
IOException
public long seekFile(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree, org.alfresco.jlan.server.filesys.NetworkFile file, long pos, int typ) throws IOException
seekFile
in interface org.alfresco.jlan.server.filesys.DiskInterface
IOException
public void setFileInformation(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree, String name, org.alfresco.jlan.server.filesys.FileInfo info) throws IOException
setFileInformation
in interface org.alfresco.jlan.server.filesys.DiskInterface
IOException
public org.alfresco.jlan.server.filesys.SearchContext startSearch(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree, String searchPath, int attrib) throws FileNotFoundException
startSearch
in interface org.alfresco.jlan.server.filesys.DiskInterface
FileNotFoundException
public void truncateFile(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree, org.alfresco.jlan.server.filesys.NetworkFile file, long siz) throws IOException
truncateFile
in interface org.alfresco.jlan.server.filesys.DiskInterface
IOException
public int writeFile(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree, org.alfresco.jlan.server.filesys.NetworkFile file, byte[] buf, int bufoff, int siz, long fileoff) throws IOException
writeFile
in interface org.alfresco.jlan.server.filesys.DiskInterface
IOException
public org.alfresco.jlan.server.core.DeviceContext createContext(String shareName, org.springframework.extensions.config.ConfigElement args) throws org.alfresco.jlan.server.core.DeviceContextException
createContext
in interface org.alfresco.jlan.server.core.DeviceInterface
org.alfresco.jlan.server.core.DeviceContextException
public void setFileLockingInterface(org.alfresco.jlan.server.locking.FileLockingInterface fileLockingInterface)
public org.alfresco.jlan.server.locking.FileLockingInterface getFileLockingInterface()
public void setOpLockInterface(org.alfresco.jlan.server.locking.OpLockInterface opLockInterface)
public org.alfresco.jlan.server.locking.OpLockInterface getOpLockInterface()
Copyright © 2005–2017 Alfresco Software. All rights reserved.