|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.japisoft.filebrowser.FileResourceManager
| Constructor Summary | |
FileResourceManager()
|
|
FileResourceManager(java.io.File rootPath)
|
|
| Method Summary | |
void |
deleteFile(ResourceItem path)
Delete a file or an empty directory for this path |
byte[] |
getContent(ResourceItem path)
|
boolean |
isConnectionSupported()
|
boolean |
isLockSupported()
|
ResourceItemModel |
list(ResourceItem item)
List a directory |
void |
lock(ResourceItem path,
boolean locked)
Lock this resource located at the path. |
void |
renameFile(ResourceItem path,
java.lang.String newPathName)
Rename a file name to another one. |
void |
setContent(ResourceItem path,
byte[] content)
Reset a content located at this path |
java.lang.String |
start(java.lang.String host,
java.lang.String user,
java.lang.String password)
Open a connection to a server or a specific resource. |
void |
stop()
Close the current connection |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public FileResourceManager()
public FileResourceManager(java.io.File rootPath)
| Method Detail |
public java.lang.String start(java.lang.String host,
java.lang.String user,
java.lang.String password)
throws ResourceException
ResourceManager
start in interface ResourceManagerhost - The Remote server IP locationuser - The user account namepassword - The user password name
ResourceException - If the connection cannot be opened
public void deleteFile(ResourceItem path)
throws ResourceException
ResourceManager
deleteFile in interface ResourceManagerpath - A file or an empty directory location
ResourceException - If the file cannot be deleted
public byte[] getContent(ResourceItem path)
throws ResourceException
getContent in interface ResourceManagerpath - A location for a file
java.lang.String
ResourceException - If the file cannot be downloadedpublic void stop()
ResourceManager
stop in interface ResourceManagerpublic boolean isConnectionSupported()
isConnectionSupported in interface ResourceManager if an host, user and password is required before browing a content public boolean isLockSupported()
isLockSupported in interface ResourceManagertrue if the file lock if supported
public ResourceItemModel list(ResourceItem item)
throws ResourceException
ResourceManager
list in interface ResourceManageritem - A directory
ResourceException - If the listing is not possible
public void lock(ResourceItem path,
boolean locked)
throws ResourceException
ResourceManagerisLockSupported method returns true
lock in interface ResourceManagerpath - A file or a directorylocked - true for locking the resource path
ResourceException - If the file cannot be locked
public void renameFile(ResourceItem path,
java.lang.String newPathName)
throws ResourceException
ResourceManager
renameFile in interface ResourceManagerpath - A file or a directorynewPathName - A new name
ResourceException - If the file or the directory cannot be renammed
public void setContent(ResourceItem path,
byte[] content)
throws ResourceException
ResourceManager
setContent in interface ResourceManagerpath - A file locationcontent - A new content
ResourceException - If the file cannot be updated
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||