public class TreeConnection extends Object
Modifier and Type | Field and Description |
---|---|
static int |
INITIALFILES |
static int |
MAXFILES |
Constructor and Description |
---|
TreeConnection(SharedDevice shrDev)
Construct a tree connection using the specified shared device.
|
Modifier and Type | Method and Description |
---|---|
int |
addFile(NetworkFile file,
SrvSession sess)
Add a network file to the list of open files for this connection.
|
void |
closeConnection(SrvSession sess)
Close the tree connection, release resources.
|
NetworkFile |
findFile(int fid)
Return the specified network file.
|
DeviceContext |
getContext()
Return the interface specific context object.
|
int |
getFileTableLength()
Return the length of the file table
|
DeviceInterface |
getInterface()
Return the shared device interface
|
int |
getPermission()
Return the share access permissions that the user has been granted.
|
SharedDevice |
getSharedDevice()
Return the shared device that this tree connection is using.
|
boolean |
hasContext()
Determine if the shared device has an associated context
|
boolean |
hasPermission(int perm)
Check if the user has been granted the required access permission for this share.
|
boolean |
hasReadAccess()
Deterimine if the access permission for the shared device allows read access
|
boolean |
hasWriteAccess()
Determine if the access permission for the shared device allows write access
|
int |
openFileCount()
Return the count of open files on this tree connection.
|
void |
removeAllFiles()
Remove all files from the tree connection.
|
void |
removeFile(int idx,
SrvSession sess)
Remove a network file from the list of open files for this connection.
|
void |
setPermission(int perm)
Set the access permission for this share that the user has been granted.
|
String |
toString()
Return the tree connection as a string.
|
public static final int MAXFILES
public static final int INITIALFILES
public TreeConnection(SharedDevice shrDev)
shrDev
- SharedDevicepublic int addFile(NetworkFile file, SrvSession sess) throws TooManyFilesException
file
- NetworkFilesess
- SrvSessionTooManyFilesException
public void closeConnection(SrvSession sess)
sess
- SrvSessionpublic NetworkFile findFile(int fid)
public int getFileTableLength()
public final boolean hasContext()
public final DeviceContext getContext()
public final int getPermission()
public final boolean hasReadAccess()
public final boolean hasWriteAccess()
public final SharedDevice getSharedDevice()
public final DeviceInterface getInterface()
public final boolean hasPermission(int perm)
perm
- intpublic int openFileCount()
public final void removeAllFiles()
public void removeFile(int idx, SrvSession sess)
idx
- intsess
- SrvSessionpublic final void setPermission(int perm)
perm
- intCopyright © 2005–2017 Alfresco Software. All rights reserved.