|
CWebdav 0.1 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.esupportail.portal.channels.CWebdav.provider.DavAccess
org.esupportail.portal.channels.CWebdav.provider.DavAccessImpl
Id: DavAccessImpl.java,v 1.0 14 avr. 2004 Copyright (c) 2004 Esup Portail (www.esup-portail.org) Classes: DavAccessImpl Original Author: Yohan Colmant
Constructor Summary | |
DavAccessImpl()
Default constructor |
Method Summary | |
boolean |
canPaste(java.lang.String clipboardPath,
java.util.Vector clipboard,
java.lang.String curentDirPath)
Check if we can paste here |
void |
connect()
Connect this object to the server |
boolean |
copy(java.lang.String resource,
java.lang.String fromPath,
java.lang.String toPath)
Copy method |
boolean |
createDir(java.lang.String name,
java.lang.String path)
Create the directory given in argument |
boolean |
delete(java.lang.String file,
java.lang.String path)
Delete the resource given in argument |
void |
disconnect()
Disconnection of the server |
java.lang.String |
getContentType()
Search content type of the file whiwh will be downloaded |
java.io.InputStream |
getInputStream()
Real download WARNING : the method "fileToDownload.getMethodData()" create a tempory file which be delete when the JVM will be stoped |
java.lang.String |
getLogin()
Give the user login |
java.lang.String |
getPassword()
Give the user password |
java.lang.String |
getUri()
Give the uri webdav access |
void |
init(java.lang.String uri,
java.lang.String login,
java.lang.String password)
This method initialize the parameters. |
boolean |
isDirectory(java.lang.String name,
java.lang.String path)
Check if the resource named name is a directory in the path given |
boolean |
isEmpty(java.lang.String dir,
java.lang.String path)
Check if the directory named dir is empty or not. |
boolean |
isExist(java.lang.String resourceName,
java.lang.String path)
Check is the resource exists |
org.apache.webdav.lib.WebdavResource[] |
ls(java.lang.String path)
All ressources for a given path |
boolean |
move(java.lang.String resource,
java.lang.String fromPath,
java.lang.String toPath)
Move method |
boolean |
rename(java.lang.String oldName,
java.lang.String newName,
java.lang.String path)
Rename the resource |
boolean |
setFileToDownload(java.lang.String name,
java.lang.String path)
Prepare the file whiwh will be downloaded |
boolean |
upload(org.jasig.portal.MultipartDataSource inputFile,
java.lang.String path)
Upload a file to the path given in argument |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DavAccessImpl()
Method Detail |
public java.lang.String getLogin()
getLogin
in class DavAccess
public java.lang.String getPassword()
getPassword
in class DavAccess
public java.lang.String getUri()
getUri
in class DavAccess
public void init(java.lang.String uri, java.lang.String login, java.lang.String password) throws java.net.MalformedURLException
init
in class DavAccess
uri
- webdav urilogin
- connexion loginpassword
- connexioàn password
java.net.MalformedURLException
public void connect() throws ServerException
connect
in class DavAccess
ServerException
public void disconnect() throws ServerException
disconnect
in class DavAccess
ServerException
public org.apache.webdav.lib.WebdavResource[] ls(java.lang.String path) throws NotExistsResourceException, ApplicationException
ls
in class DavAccess
path
- directory path on the dav server
NotExistsResourceException
ApplicationException
public boolean upload(org.jasig.portal.MultipartDataSource inputFile, java.lang.String path) throws ApplicationException, ServerException, NotExistsResourceException, StillExistsException, BadFormatException, UploadException, EmptyFileOnUploadException, OverQuotaException
upload
in class DavAccess
inputFile
- the input filepath
- the path
ApplicationException
ServerException
NotExistsResourceException
StillExistsException
BadFormatException
UploadException
EmptyFileOnUploadException
OverQuotaException
public boolean delete(java.lang.String file, java.lang.String path) throws ApplicationException, DeleteException
delete
in class DavAccess
file
- file/directory to deletepath
- path where is file/directory
ApplicationException
DeleteException
public boolean rename(java.lang.String oldName, java.lang.String newName, java.lang.String path) throws StillExistsException, BadFormatException, ApplicationException, RenameException
rename
in class DavAccess
oldName
- file/directory to renamenewName
- new name of the file/directorypath
- path where is file/directory
StillExistsException
BadFormatException
ApplicationException
RenameException
public boolean createDir(java.lang.String name, java.lang.String path) throws ApplicationException, CreateDirectoryException, StillExistsException, BadFormatException
createDir
in class DavAccess
path
- path where is file/directory
ApplicationException
CreateDirectoryException
StillExistsException
BadFormatException
public boolean canPaste(java.lang.String clipboardPath, java.util.Vector clipboard, java.lang.String curentDirPath) throws ApplicationException, PasteInChildDirectoryException, PasteWithSameNameException, PasteDeletedResourceException
canPaste
in class DavAccess
clipboardPath
- the path where is the clipboadclipboard
- the containt of the clipboardcurentDirPath
- the path of the curent dir
ApplicationException
PasteInChildDirectoryException
PasteWithSameNameException
PasteDeletedResourceException
public boolean copy(java.lang.String resource, java.lang.String fromPath, java.lang.String toPath) throws CopyException, ApplicationException, OverQuotaException
copy
in class DavAccess
resource
- resource to copyfromPath
- path where is the resourcetoPath
- path to copy the resource
ApplicationException
CopyException
OverQuotaException
public boolean move(java.lang.String resource, java.lang.String fromPath, java.lang.String toPath) throws ApplicationException, MoveException
move
in class DavAccess
resource
- resource to movefromPath
- path where is the resourcetoPath
- path to move the resource
ApplicationException
MoveException
public boolean setFileToDownload(java.lang.String name, java.lang.String path)
setFileToDownload
in class DavAccess
DavAccess.setFileToDownload(java.lang.String, java.lang.String)
public java.lang.String getContentType()
getContentType
in class DavAccess
DavAccess.getContentType()
public java.io.InputStream getInputStream()
getInputStream
in class DavAccess
org.esupportail.portal.channels.CWebdav.provider.DavAccess#downloadData(java.io.OutputStream, java.lang.String, java.lang.String)
public boolean isExist(java.lang.String resourceName, java.lang.String path) throws ApplicationException
isExist
in class DavAccess
resourceName
- name of the file/directory to verifypath
- path to find the file/directory
java.io.IOException
org.apache.commons.httpclient.HttpException
ApplicationException
public boolean isDirectory(java.lang.String name, java.lang.String path) throws ApplicationException
isDirectory
in class DavAccess
name
- the name of the resourcepath
- the path
ApplicationException
public boolean isEmpty(java.lang.String dir, java.lang.String path) throws ApplicationException, NotExistsResourceException
isEmpty
in class DavAccess
dir
- the name of the directorypath
- the path
ApplicationException
NotExistsResourceException
|
CWebdav 0.1 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |