|
CStockage 4.2_beta-RC-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.CStockage.provider.access.ServerAccess
Id: ServerAccess.java,v 1.0 14 avr. 2004
Copyright (c) 2004 Esup Portail (www.esup-portail.org)
Classes: ServerAccess
Original Author: Yohan Colmant
Interface for the dav access
Constructor Summary | |
ServerAccess()
|
Method Summary | |
abstract boolean |
canPaste(Space fromSpace,
java.lang.String toSpaceKey,
java.lang.String clipboardPath,
java.util.Vector clipboard,
java.lang.String curentDirPath)
Check if we can paste here |
abstract boolean |
canRead(java.lang.String path)
Check if we are authorized to read this resource |
abstract boolean |
canRead(java.lang.String resourceName,
java.lang.String path)
Check if we are authorized to read this resource |
abstract boolean[] |
checkPrivileges(java.lang.String path)
Check The privileges for the current user |
abstract void |
connect()
Connect this object to the server |
boolean |
copy(java.lang.String resource,
Space fromSpace,
java.lang.String fromPath,
java.lang.String toSpaceKey,
java.lang.String toPath)
Copy method |
abstract boolean |
createDir(java.lang.String name,
java.lang.String path)
Create the directory given in argument |
abstract boolean |
delete(java.lang.String file,
java.lang.String path)
Delete the resource given in argument |
abstract org.esupportail.portal.utils.webdav.acl.EsupPermissions |
deny(java.lang.String path,
java.lang.String principal,
java.lang.String permissionType,
boolean inheritable)
Add a deny permission on a resource for a user role specified |
abstract void |
disconnect()
Disconnection of the server |
abstract ChannelResource |
download(java.lang.String name,
java.lang.String path)
Return the resource associated to the file to download |
abstract boolean |
exists(java.lang.String fullPath)
Check is the resource exists |
abstract boolean |
exists(java.lang.String resourceName,
java.lang.String path)
Check is the resource exists |
abstract java.io.InputStream |
getMethodData(java.lang.String fullPath)
Return the stream from a resource |
abstract org.esupportail.portal.utils.webdav.acl.EsupPermissions |
getPermissions(java.lang.String path)
Get a resource permissions as an EsupPermissions object |
abstract org.esupportail.portal.utils.webdav.acl.EsupPermissions |
getPermissions(java.lang.String path,
java.lang.String permissionType)
Get a resource permissions as an EsupPermissions object |
abstract java.lang.String |
getProperty(java.lang.String namespace,
java.lang.String path,
java.lang.String propertyName)
Get a resource's property specified by the path |
abstract org.esupportail.portal.utils.webdav.acl.EsupPermissions |
grant(java.lang.String path,
java.lang.String principal,
java.lang.String permissionType,
boolean inheritable)
Add a grant permission on a resource for a user role specified |
abstract java.util.Vector |
hasInheritedPermission(java.lang.String path,
java.lang.String principal,
java.lang.String permissionType,
boolean negative,
boolean inheritable)
Check if the specified resource has the inherited permission given in parameter |
abstract boolean |
hasNotInheritedPermission(java.lang.String path,
java.lang.String principal,
java.lang.String permissionType,
boolean negative,
boolean inheritable)
Check if the specified resource has the not inherited permission given in parameter |
abstract void |
init(Space space)
This method initializes the parameters. |
abstract boolean |
isDirectory(java.lang.String name,
java.lang.String path)
Check if the resource named name is a directory in the path given |
abstract boolean |
isEmpty(java.lang.String dir,
java.lang.String path)
Check if the directory named dir is empty or not. |
abstract ChannelResource[] |
ls(java.lang.String fullPath)
List all ressources for a given path |
abstract ChannelResource[] |
ls(java.lang.String path,
java.lang.String targetDirectory)
List all ressources for a given path |
boolean |
move(java.lang.String resource,
Space fromSpace,
java.lang.String fromPath,
java.lang.String toSpaceKey,
java.lang.String toPath)
Move method |
abstract boolean |
rename(java.lang.String oldName,
java.lang.String newName,
java.lang.String path)
Rename the resource |
abstract org.esupportail.portal.utils.webdav.acl.EsupPermissions |
revoke(java.lang.String path,
java.lang.String principal,
java.lang.String permissionType,
boolean inheritable)
Revoke permission on a resource for a user role specified |
abstract void |
revokeAllPermissons(java.lang.String path)
Revoke all the permissions on a resource |
abstract boolean |
setProperty(java.lang.String namespace,
java.lang.String path,
java.lang.String propertyName,
java.lang.String propertyValue)
Set the property of resource |
abstract boolean |
upload(java.lang.String fileName,
java.io.InputStream fileStream,
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 ServerAccess()
Method Detail |
public abstract void init(Space space) throws java.net.MalformedURLException, PropertiesException
space
- the space corresponding to the server access
java.net.MalformedURLException
PropertiesException
public abstract void connect() throws ServerException, BadConnexionParameters
ServerException
BadConnexionParameters
public abstract void disconnect() throws ServerException
ServerException
public abstract ChannelResource[] ls(java.lang.String fullPath) throws NotExistsResourceException, ApplicationException, NotAuthorizedException
fullPath
- directory path on the dav server
NotExistsResourceException
ApplicationException
NotAuthorizedException
public abstract ChannelResource[] ls(java.lang.String path, java.lang.String targetDirectory) throws NotExistsResourceException, ApplicationException, NotAuthorizedException
path
- directory path on the dav servertargetDirectory
- the directory name to list
NotExistsResourceException
ApplicationException
NotAuthorizedException
public abstract boolean upload(java.lang.String fileName, java.io.InputStream fileStream, java.lang.String path) throws ApplicationException, ServerException, NotExistsResourceException, StillExistsException, BadFormatException, UploadException, EmptyFileOnUploadException, OverQuotaException, NotAuthorizedDeleteException, NotAuthorizedUploadException, NotAuthorizedException, PropertiesException
fileName
- the input file namefileStream
- the input file streampath
- the path
ApplicationException
ServerException
NotExistsResourceException
StillExistsException
BadFormatException
UploadException
EmptyFileOnUploadException
OverQuotaException
NotAuthorizedDeleteException
NotAuthorizedUploadException
NotAuthorizedException
PropertiesException
public abstract boolean delete(java.lang.String file, java.lang.String path) throws ApplicationException, DeleteException, NotAuthorizedDeleteException, NotExistsResourceException, NotAuthorizedException
file
- file/directory to deletepath
- path where is file/directory
ApplicationException
DeleteException
NotAuthorizedDeleteException
NotExistsResourceException
NotAuthorizedException
public abstract boolean rename(java.lang.String oldName, java.lang.String newName, java.lang.String path) throws StillExistsException, BadFormatException, ApplicationException, RenameException, NotAuthorizedRenameException, NotExistsResourceException, NotAuthorizedException, PropertiesException
oldName
- file/directory to renamenewName
- new name of the file/directorypath
- path where is file/directory
StillExistsException
BadFormatException
ApplicationException
RenameException
NotAuthorizedRenameException
NotExistsResourceException
NotAuthorizedException
PropertiesException
public abstract boolean createDir(java.lang.String name, java.lang.String path) throws ApplicationException, CreateDirectoryException, StillExistsException, BadFormatException, NotAuthorizedNewDirException, NotExistsResourceException, NotAuthorizedException, PropertiesException
name
- file/directory to deletepath
- path where is file/directory
ApplicationException
CreateDirectoryException
StillExistsException
BadFormatException
NotAuthorizedNewDirException
NotExistsResourceException
NotAuthorizedException
PropertiesException
public abstract boolean canPaste(Space fromSpace, java.lang.String toSpaceKey, java.lang.String clipboardPath, java.util.Vector clipboard, java.lang.String curentDirPath) throws ApplicationException, PasteInChildDirectoryException, PasteWithSameNameException, PasteDeletedResourceException, NotAuthorizedException
fromSpace
- the space from whitch we want to pastetoSpaceKey
- the space key where we want to pasteclipboardPath
- the path where is the clipboadclipboard
- the containt of the clipboardcurentDirPath
- the path of the curent dir
ApplicationException
PasteInChildDirectoryException
PasteWithSameNameException
PasteDeletedResourceException
NotAuthorizedException
public boolean copy(java.lang.String resource, Space fromSpace, java.lang.String fromPath, java.lang.String toSpaceKey, java.lang.String toPath) throws ChannelException, CopyException, ApplicationException, OverQuotaException, PasteNotAuthorizedResourceException, NotExistsResourceException, PasteNotAuthorizedResourceException, NotAuthorizedException, NotAuthorizedUploadException
resource
- resource to copyfromSpace
- the space from witch we want to movefromPath
- path where is the resourcetoSpaceKey
- the space key to witch we want to movetoPath
- path to copy the resource
ChannelException
CopyException
ApplicationException
OverQuotaException
PasteNotAuthorizedResourceException
NotExistsResourceException
PasteNotAuthorizedResourceException
NotAuthorizedException
NotAuthorizedUploadException
public boolean move(java.lang.String resource, Space fromSpace, java.lang.String fromPath, java.lang.String toSpaceKey, java.lang.String toPath) throws ChannelException, MoveException, ApplicationException, OverQuotaException, PasteNotAuthorizedResourceException, NotExistsResourceException, PasteNotAuthorizedResourceException, NotAuthorizedException, NotAuthorizedUploadException
resource
- resource to movefromSpace
- the space from witch we want to movefromPath
- path where is the resourcetoSpaceKey
- the space key to witch we want to movetoPath
- path to move the resource
ChannelException
ApplicationException
MoveException
PasteNotAuthorizedResourceException
NotExistsResourceException
PasteNotAuthorizedResourceException
NotAuthorizedException
NotAuthorizedUploadException
OverQuotaException
public abstract ChannelResource download(java.lang.String name, java.lang.String path) throws DownloadException
name
- the file namepath
- the path where to find the file
DownloadException
public abstract java.io.InputStream getMethodData(java.lang.String fullPath) throws java.io.IOException
fullPath
- the full resource path
java.io.IOException
public abstract boolean exists(java.lang.String fullPath) throws ApplicationException, NotAuthorizedException
fullPath
- path to find the file/directory
ApplicationException
NotAuthorizedException
public abstract boolean exists(java.lang.String resourceName, java.lang.String path) throws ApplicationException, NotAuthorizedException
resourceName
- name of the file/directory to verifypath
- path to find the file/directory
ApplicationException
NotAuthorizedException
public abstract boolean canRead(java.lang.String resourceName, java.lang.String path) throws ApplicationException
resourceName
- name of the file/directory to verifypath
- path to find the file/directory
ApplicationException
public abstract boolean canRead(java.lang.String path) throws ApplicationException
path
- path to find the file/directory
ApplicationException
public abstract boolean isDirectory(java.lang.String name, java.lang.String path) throws ApplicationException, NotAuthorizedException, NotExistsResourceException
name
- the name of the resourcepath
- the path
ApplicationException
NotAuthorizedException
NotExistsResourceException
public abstract boolean isEmpty(java.lang.String dir, java.lang.String path) throws ApplicationException, NotExistsResourceException, NotAuthorizedException
dir
- the name of the directorypath
- the path
ApplicationException
NotExistsResourceException
NotAuthorizedException
public abstract java.lang.String getProperty(java.lang.String namespace, java.lang.String path, java.lang.String propertyName) throws ServerException
namespace
- the namespace used for this metadatapath
- the resource pathpropertyName
- the property name
ServerException
public abstract boolean setProperty(java.lang.String namespace, java.lang.String path, java.lang.String propertyName, java.lang.String propertyValue) throws ServerException
namespace
- the namespace used for this metadatapath
- the resource pathpropertyName
- the name of the property to setpropertyValue
- the value of the property to set
ServerException
public abstract org.esupportail.portal.utils.webdav.acl.EsupPermissions getPermissions(java.lang.String path, java.lang.String permissionType) throws AclReadException, AclAccessException, NotSupportedAclException
path
- the resource pathpermissionType
- the type of permission (read, write, ....)
AclReadException
AclAccessException
NotSupportedAclException
public abstract org.esupportail.portal.utils.webdav.acl.EsupPermissions getPermissions(java.lang.String path) throws AclReadException, AclAccessException, NotSupportedAclException
path
- the resource path
AclReadException
AclAccessException
NotSupportedAclException
public abstract org.esupportail.portal.utils.webdav.acl.EsupPermissions grant(java.lang.String path, java.lang.String principal, java.lang.String permissionType, boolean inheritable) throws AclReadException, AclAccessException, AclWriteException, NotSupportedAclException
path
- the resource pathprincipal
- the concerned user rolepermissionType
- the permission type: [read|read-acl|read-current-user-privilege-set|write|write-acl|write-properties|write-content]
AclReadException
AclAccessException
AclWriteException
NotSupportedAclException
public abstract org.esupportail.portal.utils.webdav.acl.EsupPermissions deny(java.lang.String path, java.lang.String principal, java.lang.String permissionType, boolean inheritable) throws AclReadException, AclAccessException, AclWriteException, NotSupportedAclException
path
- the resource pathprincipal
- the concerned user rolepermissionType
- the permission type: [read|read-acl|read-current-user-privilege-set|write|write-acl|write-properties|write-content]
AclReadException
AclAccessException
AclWriteException
NotSupportedAclException
public abstract org.esupportail.portal.utils.webdav.acl.EsupPermissions revoke(java.lang.String path, java.lang.String principal, java.lang.String permissionType, boolean inheritable) throws AclReadException, AclAccessException, AclWriteException, NotSupportedAclException
path
- the resource pathprincipal
- the concerned user rolepermissionType
- the permission type: [read|read-acl|read-current-user-privilege-set|write|write-acl|write-properties|write-content]
AclReadException
AclAccessException
AclWriteException
NotSupportedAclException
public abstract void revokeAllPermissons(java.lang.String path) throws AclReadException, AclAccessException, AclWriteException, NotSupportedAclException
path
- the resource path
java.io.IOException
org.esupportail.portal.utils.webdav.acl.exception.ReadAclException
org.esupportail.portal.utils.webdav.acl.exception.WriteAclException
AclReadException
AclAccessException
AclWriteException
NotSupportedAclException
public abstract java.util.Vector hasInheritedPermission(java.lang.String path, java.lang.String principal, java.lang.String permissionType, boolean negative, boolean inheritable) throws AclReadException, AclAccessException, NotSupportedAclException
path
- the resource pathprincipal
- the concerned user rolepermissionType
- the permission type: [read|read-acl|read-current-user-privilege-set|write|write-acl|write-properties|write-content]negative
- false for grant, true for deny
AclReadException
AclAccessException
NotSupportedAclException
public abstract boolean hasNotInheritedPermission(java.lang.String path, java.lang.String principal, java.lang.String permissionType, boolean negative, boolean inheritable) throws AclReadException, AclAccessException, NotSupportedAclException
path
- the resource pathprincipal
- the concerned user rolepermissionType
- the permission type: [read|read-acl|read-current-user-privilege-set|write|write-acl|write-properties|write-content]negative
- false for grant, true for deny
AclReadException
AclAccessException
NotSupportedAclException
public abstract boolean[] checkPrivileges(java.lang.String path)
path
- the path of the space
|
CStockage 4.2_beta-RC-1 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |