org.esupportail.portal.channels.CWebdav.provider.access
Class CifsAccessImpl

java.lang.Object
  extended byorg.esupportail.portal.channels.CWebdav.provider.access.ServerAccess
      extended byorg.esupportail.portal.channels.CWebdav.provider.access.CifsAccessImpl

public class CifsAccessImpl
extends ServerAccess

Implements the ServerAccess interface to access a CIFS(SMB) server
Id: CifsAccessImpl.java
Classes: CifsAccessImpl
Creation date: 17/12/2004
Last modification: 17/12/2004
Copyright (c) 2004 Esup Portail (www.esup-portail.org).
Notes :

  • 1. In this document the term resource refer to a directory or a file
  • 2. An URI like /myDirectory/mySubDirectory/myResource is called full path (of myResource) whereas an URI like /myDirectory/mySubDirectory is called path (of myResource)
  • 3. A resource (file/directory) can be written in many ways to call methods. For example you can write /myResource, or /myResource/, but also myResource. Even if the resource is a file you can write /myFile.txt/ !
  • Version:
    1.0
    Author:
    Thomas Bellembois

    Field Summary
    private  java.lang.String disablePlainTextPassword
               
    private  java.lang.String domain
               
    private static int INPUTSTREAM_BUFFER
               
    protected static org.apache.commons.logging.Log log
               
    private static int LOG_DEBUG
               
    private static int LOG_ERROR
               
    private static int LOG_INFO
               
    private static int LOG_WARN
               
    private  java.lang.String login
               
    private  jcifs.smb.NtlmPasswordAuthentication ntlmPasswordAuthentication
               
    private  java.lang.String password
               
    private  java.lang.String resolveOrder
               
    private  java.lang.String resourcePath
               
    private static int RESSOURCE_FILE_PATH
               
    private static int RESSOURCE_FILEORFOLDER_NAME
               
    private static int RESSOURCE_FOLDER_PATH
               
    private static int RESSOURCE_UNKNOWN_PATH
               
    private static int RESSOURCE_URI
               
    private  jcifs.smb.SmbFile smbFile
               
    private  java.lang.String uri
               
     
    Constructor Summary
    CifsAccessImpl()
               
     
    Method Summary
     boolean canPaste(Space fromSpace, java.lang.String toSpaceKey, java.lang.String clipboardPath, java.util.Vector clipboard, java.lang.String curentDirPath)
              Check that we can paste a file in the target directory
    This version does not support inter spaces paste !
     boolean canRead(java.lang.String path)
              Check if we are authorized to read this resource (file or directory)
     boolean canRead(java.lang.String resourceName, java.lang.String path)
              Check if we are authorized to read this resource (file or directory)
     void connect()
              Connect to the server
     boolean createDir(java.lang.String name, java.lang.String path)
              Create a directory
     boolean delete(java.lang.String file, java.lang.String path)
              Delete a resource (file or directory)
     org.esupportail.portal.utils.webdav.acl.EsupPermissions deny(java.lang.String path, java.lang.String principal, java.lang.String permissionType)
              not implemented
     void disconnect()
              Disconnect from the server
    private  boolean distantCopy(ChannelResource resource, ServerAccess fromAccess, java.lang.String toPath)
              Copy a resource from a server to the CIFS server
    All required checking (if a directory exists...) are supposed to be done by the calling application
    protected  boolean distantCopy(java.lang.String resource, ServerAccess fromAccess, java.lang.String fromPath, java.lang.String toPath)
              Copy a resource from a server to the CIFS server
    All required checking (if a directory exists...) are supposed to be done by the calling application
    private  boolean distantCopyDirectory(java.lang.String directoryName, ServerAccess fromAccess, java.lang.String absoluteFromPath, java.lang.String toPath)
              Copy a directory from a server to the CIFS server
    All required checking (if a directory exists...) are supposed to be done by the calling application
    private  boolean distantCopyFile(java.lang.String fileName, ServerAccess fromAccess, java.lang.String absoluteFromPath, java.lang.String toPath)
              Copy a file from a server to the CIFS server
    All required checking (if a directory exists...) are supposed to be done by the calling application
     ChannelResource download(java.lang.String name, java.lang.String path)
              Download a file
     boolean exists(java.lang.String fullPath)
              Check is the resource (file or directory) exists
     boolean exists(java.lang.String resourceName, java.lang.String path)
              Check is the resource (file or directory) exists
     java.io.InputStream getMethodData(java.lang.String fullPath)
              Return the stream of a file
     org.esupportail.portal.utils.webdav.acl.EsupPermissions getPermissions(java.lang.String path)
              not implemented
     org.esupportail.portal.utils.webdav.acl.EsupPermissions getPermissions(java.lang.String path, java.lang.String permissionType)
              not implemented
     java.lang.String getProperty(java.lang.String path, java.lang.String propertyName)
              not implemented
     java.lang.String getServerCurrentHierPath()
              Returns the current path on the server
    Example : if the current server url is smb://URL:PORT/test, the current path is /test
     org.esupportail.portal.utils.webdav.acl.EsupPermissions grant(java.lang.String path, java.lang.String principal, java.lang.String permissionType)
              not implemented
     java.util.Vector hasInheritedPermission(java.lang.String path, java.lang.String principal, java.lang.String permissionType, boolean negative)
              not implemented
     boolean hasNotInheritedPermission(java.lang.String path, java.lang.String principal, java.lang.String permissionType, boolean negative)
              not implemented
     void init(Space space)
              Initializes the CIFS server parameters
    You have to call this method before calling the connect method.
     boolean isDirectory(java.lang.String name, java.lang.String path)
              Check that the resource is a directory
     boolean isEmpty(java.lang.String dir, java.lang.String path)
              Check that the directory is empty
    protected  boolean localCopy(java.lang.String resource, java.lang.String fromPath, java.lang.String toPath)
              Copy a resource
    protected  boolean localMove(java.lang.String resource, java.lang.String fromPath, java.lang.String toPath)
              Move a resource
    private  void logMethod(int type, java.lang.String message)
               
     ChannelResource[] ls(java.lang.String fullPath)
              List all the resources of a directory
     ChannelResource[] ls(java.lang.String path, java.lang.String targetDirectory)
              List all the resources of the given directory
    private  java.lang.String normalizeResourceUri(java.lang.String stringToProcess, int ressourceType)
               
     boolean rename(java.lang.String oldName, java.lang.String newName, java.lang.String path)
              Rename a resource (file or directory)
     org.esupportail.portal.utils.webdav.acl.EsupPermissions revoke(java.lang.String path, java.lang.String principal, java.lang.String permissionType)
              not implemented
     boolean setProperty(java.lang.String path, java.lang.String propertyName, java.lang.String propertyValue)
              not implemented
     boolean upload(org.jasig.portal.MultipartDataSource inputFile, java.lang.String path)
              Upload a file
     
    Methods inherited from class org.esupportail.portal.channels.CWebdav.provider.access.ServerAccess
    copy, move
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Field Detail

    log

    protected static final org.apache.commons.logging.Log log

    LOG_DEBUG

    private static final int LOG_DEBUG
    See Also:
    Constant Field Values

    LOG_INFO

    private static final int LOG_INFO
    See Also:
    Constant Field Values

    LOG_WARN

    private static final int LOG_WARN
    See Also:
    Constant Field Values

    LOG_ERROR

    private static final int LOG_ERROR
    See Also:
    Constant Field Values

    RESSOURCE_FILEORFOLDER_NAME

    private static final int RESSOURCE_FILEORFOLDER_NAME
    See Also:
    Constant Field Values

    RESSOURCE_FILE_PATH

    private static final int RESSOURCE_FILE_PATH
    See Also:
    Constant Field Values

    RESSOURCE_FOLDER_PATH

    private static final int RESSOURCE_FOLDER_PATH
    See Also:
    Constant Field Values

    RESSOURCE_UNKNOWN_PATH

    private static final int RESSOURCE_UNKNOWN_PATH
    See Also:
    Constant Field Values

    RESSOURCE_URI

    private static final int RESSOURCE_URI
    See Also:
    Constant Field Values

    INPUTSTREAM_BUFFER

    private static final int INPUTSTREAM_BUFFER
    See Also:
    Constant Field Values

    uri

    private java.lang.String uri

    resourcePath

    private java.lang.String resourcePath

    domain

    private java.lang.String domain

    login

    private java.lang.String login

    password

    private java.lang.String password

    resolveOrder

    private java.lang.String resolveOrder

    ntlmPasswordAuthentication

    private jcifs.smb.NtlmPasswordAuthentication ntlmPasswordAuthentication

    disablePlainTextPassword

    private java.lang.String disablePlainTextPassword

    smbFile

    private jcifs.smb.SmbFile smbFile
    Constructor Detail

    CifsAccessImpl

    public CifsAccessImpl()
    Method Detail

    logMethod

    private void logMethod(int type,
                           java.lang.String message)

    normalizeResourceUri

    private java.lang.String normalizeResourceUri(java.lang.String stringToProcess,
                                                  int ressourceType)

    init

    public void init(Space space)
              throws java.net.MalformedURLException,
                     PropertiesException
    Initializes the CIFS server parameters
    You have to call this method before calling the connect method.
    About Space parameters :
    A lot of parameters could be used to configure the access to the CIFS server. But only the more required parameters are used by this class.
    For more details about all the available parameters, refer to the JCIFS documentation at http://jcifs.samba.org/src/docs/api/
  • login : login to connect to the server
  • password : password to connect to the server
  • uri : URL of the CIFS server - example : smb://myServer:myPort
  • resourcePath : resource full path on the CIFS server - example : /myHomeDir/myDirectory/myFile.txt
  • domain : domain of the CIFS server
  • resolveOrder : A comma separated list of name resolution method identifiers that specify which methods will be used and in what order to resolve hostnames. The possible identifiers in default order are LMHOSTS, WINS, BCAST, and DNS.
  • disablePlainTextPassword : Plain text passwords should never be used and are disabled by default. To enable jCIFS to use plain text password this property must be set to false.
  • Specified by:
    init in class ServerAccess
    Parameters:
    space - space used to get connexion parameters
    Throws:
    java.net.MalformedURLException
    PropertiesException

    getServerCurrentHierPath

    public java.lang.String getServerCurrentHierPath()
                                              throws java.net.MalformedURLException
    Returns the current path on the server
    Example : if the current server url is smb://URL:PORT/test, the current path is /test

    Specified by:
    getServerCurrentHierPath in class ServerAccess
    Returns:
    the current path as a String
    Throws:
    java.net.MalformedURLException

    connect

    public void connect()
                 throws ServerException,
                        BadConnexionParameters
    Connect to the server

    Specified by:
    connect in class ServerAccess
    Throws:
    ServerException
    BadConnexionParameters

    disconnect

    public void disconnect()
                    throws ServerException
    Disconnect from the server

    Specified by:
    disconnect in class ServerAccess
    Throws:
    ServerException

    ls

    public ChannelResource[] ls(java.lang.String fullPath)
                         throws NotExistsResourceException,
                                ApplicationException,
                                NotAuthorizedException
    List all the resources of a directory

    Specified by:
    ls in class ServerAccess
    Parameters:
    fullPath - full path of the directory to list
    Returns:
    the list of resources as an array of ChannelWebdavResource
    Throws:
    NotExistsResourceException
    ApplicationException
    NotAuthorizedException

    ls

    public ChannelResource[] ls(java.lang.String path,
                                java.lang.String targetDirectory)
                         throws NotExistsResourceException,
                                ApplicationException,
                                NotAuthorizedException
    List all the resources of the given directory

    Specified by:
    ls in class ServerAccess
    Parameters:
    path - path of the directory to list
    targetDirectory - name of the directory to list
    Returns:
    the list of resources as an array of ChannelWebdavResource
    Throws:
    NotExistsResourceException
    ApplicationException
    NotAuthorizedException

    upload

    public boolean upload(org.jasig.portal.MultipartDataSource inputFile,
                          java.lang.String path)
                   throws ApplicationException,
                          ServerException,
                          NotExistsResourceException,
                          StillExistsException,
                          BadFormatException,
                          UploadException,
                          EmptyFileOnUploadException,
                          OverQuotaException,
                          NotAuthorizedDeleteException,
                          NotAuthorizedUploadException,
                          NotAuthorizedException
    Upload a file

    Specified by:
    upload in class ServerAccess
    Parameters:
    inputFile - file to upload
    path - path of the directory where to upload the file
    Returns:
    boolean true if no problem occured, else false
    Throws:
    ApplicationException
    ServerException
    NotExistsResourceException
    StillExistsException
    BadFormatException
    UploadException
    EmptyFileOnUploadException
    OverQuotaException
    NotAuthorizedDeleteException
    NotAuthorizedUploadException
    NotAuthorizedException

    delete

    public boolean delete(java.lang.String file,
                          java.lang.String path)
                   throws ApplicationException,
                          DeleteException,
                          NotAuthorizedDeleteException,
                          NotExistsResourceException,
                          NotAuthorizedException
    Delete a resource (file or directory)

    Specified by:
    delete in class ServerAccess
    Parameters:
    file - resource to delete
    path - path of the resource
    Returns:
    boolean true if no problem occured else false
    Throws:
    ApplicationException
    DeleteException
    NotAuthorizedDeleteException
    NotExistsResourceException
    NotAuthorizedException

    rename

    public boolean rename(java.lang.String oldName,
                          java.lang.String newName,
                          java.lang.String path)
                   throws StillExistsException,
                          BadFormatException,
                          ApplicationException,
                          RenameException,
                          NotAuthorizedRenameException,
                          NotExistsResourceException,
                          NotAuthorizedException
    Rename a resource (file or directory)

    Specified by:
    rename in class ServerAccess
    Parameters:
    oldName - resource to rename
    newName - new name of the resource
    path - path of the resource
    Returns:
    boolean true if no problem occured else false
    Throws:
    StillExistsException
    BadFormatException
    ApplicationException
    RenameException
    NotAuthorizedRenameException
    NotExistsResourceException
    NotAuthorizedException

    createDir

    public boolean createDir(java.lang.String name,
                             java.lang.String path)
                      throws ApplicationException,
                             CreateDirectoryException,
                             StillExistsException,
                             BadFormatException,
                             NotAuthorizedNewDirException,
                             NotExistsResourceException,
                             NotAuthorizedException
    Create a directory

    Specified by:
    createDir in class ServerAccess
    Parameters:
    name - name of the directory to create
    path - path where to create the directory
    Returns:
    boolean true if no problem occured else false
    Throws:
    ApplicationException
    CreateDirectoryException
    StillExistsException
    BadFormatException
    NotAuthorizedNewDirException
    NotExistsResourceException
    NotAuthorizedException

    canPaste

    public 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
    Check that we can paste a file in the target directory
    This version does not support inter spaces paste !

    Specified by:
    canPaste in class ServerAccess
    Parameters:
    fromSpace - the space from which we want to paste - not used
    toSpaceKey - the space key where we want to paste - not used
    clipboardPath - the path of the clipboad
    clipboard - the contain of the clipboard
    curentDirPath - the path of the current dir
    Returns:
    true if no problem occured else an exception is thrown
    Throws:
    ApplicationException
    PasteInChildDirectoryException
    PasteWithSameNameException
    PasteDeletedResourceException
    NotAuthorizedException

    localCopy

    protected boolean localCopy(java.lang.String resource,
                                java.lang.String fromPath,
                                java.lang.String toPath)
                         throws CopyException,
                                ApplicationException,
                                OverQuotaException,
                                NotExistsResourceException,
                                PasteNotAuthorizedResourceException,
                                NotAuthorizedException,
                                NotAuthorizedUploadException
    Copy a resource

    Specified by:
    localCopy in class ServerAccess
    Parameters:
    resource - resource name
    fromPath - path of the resource
    toPath - path where to copy the resource
    Returns:
    true if no error occured else false
    Throws:
    CopyException
    ApplicationException
    OverQuotaException
    NotExistsResourceException
    PasteNotAuthorizedResourceException
    NotAuthorizedException
    NotAuthorizedUploadException

    distantCopyFile

    private boolean distantCopyFile(java.lang.String fileName,
                                    ServerAccess fromAccess,
                                    java.lang.String absoluteFromPath,
                                    java.lang.String toPath)
                             throws CopyException,
                                    ApplicationException,
                                    OverQuotaException,
                                    PasteNotAuthorizedResourceException,
                                    NotExistsResourceException,
                                    PasteNotAuthorizedResourceException,
                                    NotAuthorizedException,
                                    NotAuthorizedUploadException
    Copy a file from a server to the CIFS server
    All required checking (if a directory exists...) are supposed to be done by the calling application

    Parameters:
    fileName - name of the file to copy
    fromAccess - space access from which we want to copy
    absoluteFromPath - source path
    toPath - destination path
    Returns:
    true if no problem occured else false
    Throws:
    CopyException
    ApplicationException
    OverQuotaException
    PasteNotAuthorizedResourceException
    NotExistsResourceException
    PasteNotAuthorizedResourceException
    NotAuthorizedException
    NotAuthorizedUploadException

    distantCopyDirectory

    private boolean distantCopyDirectory(java.lang.String directoryName,
                                         ServerAccess fromAccess,
                                         java.lang.String absoluteFromPath,
                                         java.lang.String toPath)
                                  throws CopyException,
                                         ApplicationException,
                                         OverQuotaException,
                                         PasteNotAuthorizedResourceException,
                                         NotExistsResourceException,
                                         PasteNotAuthorizedResourceException,
                                         NotAuthorizedException,
                                         NotAuthorizedUploadException,
                                         ServerException
    Copy a directory from a server to the CIFS server
    All required checking (if a directory exists...) are supposed to be done by the calling application

    Parameters:
    directoryName - name of the directory to copy
    fromAccess - space access from which we want to copy
    absoluteFromPath - source path
    toPath - destination path
    Returns:
    true if no problem occured else false
    Throws:
    CopyException
    ApplicationException
    OverQuotaException
    PasteNotAuthorizedResourceException
    NotExistsResourceException
    PasteNotAuthorizedResourceException
    NotAuthorizedException
    NotAuthorizedUploadException
    ServerException

    distantCopy

    protected boolean distantCopy(java.lang.String resource,
                                  ServerAccess fromAccess,
                                  java.lang.String fromPath,
                                  java.lang.String toPath)
                           throws CopyException,
                                  ApplicationException,
                                  OverQuotaException,
                                  NotExistsResourceException,
                                  PasteNotAuthorizedResourceException,
                                  NotAuthorizedException,
                                  NotAuthorizedUploadException,
                                  ServerException
    Copy a resource from a server to the CIFS server
    All required checking (if a directory exists...) are supposed to be done by the calling application

    Specified by:
    distantCopy in class ServerAccess
    Parameters:
    resource - name of the resource to copy
    fromAccess - space access from which we want to copy
    toPath - destination path
    fromPath - path where is the resource
    Returns:
    true if no problem occured else false
    Throws:
    CopyException
    ApplicationException
    OverQuotaException
    PasteNotAuthorizedResourceException
    NotExistsResourceException
    PasteNotAuthorizedResourceException
    NotAuthorizedException
    NotAuthorizedUploadException
    ServerException

    distantCopy

    private boolean distantCopy(ChannelResource resource,
                                ServerAccess fromAccess,
                                java.lang.String toPath)
                         throws CopyException,
                                ApplicationException,
                                OverQuotaException,
                                PasteNotAuthorizedResourceException,
                                NotExistsResourceException,
                                PasteNotAuthorizedResourceException,
                                NotAuthorizedException,
                                NotAuthorizedUploadException,
                                ServerException
    Copy a resource from a server to the CIFS server
    All required checking (if a directory exists...) are supposed to be done by the calling application

    Parameters:
    resource - ChannelResource to copy
    fromAccess - space access from which we want to copy
    toPath - destination path
    Returns:
    true if no problem occured else false
    Throws:
    CopyException
    ApplicationException
    OverQuotaException
    PasteNotAuthorizedResourceException
    NotExistsResourceException
    PasteNotAuthorizedResourceException
    NotAuthorizedException
    NotAuthorizedUploadException
    ServerException

    localMove

    protected boolean localMove(java.lang.String resource,
                                java.lang.String fromPath,
                                java.lang.String toPath)
                         throws MoveException,
                                ApplicationException,
                                OverQuotaException,
                                NotExistsResourceException,
                                PasteNotAuthorizedResourceException,
                                NotAuthorizedException,
                                NotAuthorizedUploadException
    Move a resource

    Specified by:
    localMove in class ServerAccess
    Parameters:
    resource - resource name
    fromPath - path of the resource
    toPath - path where to copy the resource
    Returns:
    true if no error occured else false
    Throws:
    MoveException
    ApplicationException
    OverQuotaException
    NotExistsResourceException
    PasteNotAuthorizedResourceException
    NotAuthorizedException
    NotAuthorizedUploadException

    download

    public ChannelResource download(java.lang.String name,
                                    java.lang.String path)
                             throws DownloadException
    Download a file

    Specified by:
    download in class ServerAccess
    Parameters:
    name - the file name
    path - the path of the file
    Returns:
    the ChannelWebdavResource
    Throws:
    DownloadException

    getMethodData

    public java.io.InputStream getMethodData(java.lang.String fullPath)
                                      throws java.io.IOException
    Return the stream of a file

    Specified by:
    getMethodData in class ServerAccess
    Parameters:
    fullPath - the full path of the file
    Returns:
    the InputStream
    Throws:
    java.io.IOException

    exists

    public boolean exists(java.lang.String fullPath)
                   throws ApplicationException,
                          NotAuthorizedException
    Check is the resource (file or directory) exists

    Specified by:
    exists in class ServerAccess
    Parameters:
    fullPath - the full path of the resource
    Returns:
    true if the resource exists else false
    Throws:
    ApplicationException
    NotAuthorizedException

    exists

    public boolean exists(java.lang.String resourceName,
                          java.lang.String path)
                   throws ApplicationException,
                          NotAuthorizedException
    Check is the resource (file or directory) exists

    Specified by:
    exists in class ServerAccess
    Parameters:
    resourceName - the name of the resource
    path - the relative path of the resource
    Returns:
    true if the resource exists else false
    Throws:
    ApplicationException
    NotAuthorizedException

    canRead

    public boolean canRead(java.lang.String resourceName,
                           java.lang.String path)
                    throws ApplicationException
    Check if we are authorized to read this resource (file or directory)

    Specified by:
    canRead in class ServerAccess
    Parameters:
    resourceName - the name of the resource
    path - relative path of the resource
    Returns:
    true if authorized else false
    Throws:
    ApplicationException

    canRead

    public boolean canRead(java.lang.String path)
                    throws ApplicationException
    Check if we are authorized to read this resource (file or directory)

    Specified by:
    canRead in class ServerAccess
    Parameters:
    path - full path of the resource
    Returns:
    true if authorized else false
    Throws:
    ApplicationException

    isDirectory

    public boolean isDirectory(java.lang.String name,
                               java.lang.String path)
                        throws ApplicationException,
                               NotAuthorizedException,
                               NotExistsResourceException
    Check that the resource is a directory

    Specified by:
    isDirectory in class ServerAccess
    Parameters:
    name - the name of the resource
    path - the relative path of the resource
    Returns:
    true if the resource is a directory, false else
    Throws:
    ApplicationException
    NotAuthorizedException
    NotExistsResourceException

    isEmpty

    public boolean isEmpty(java.lang.String dir,
                           java.lang.String path)
                    throws ApplicationException,
                           NotExistsResourceException,
                           NotAuthorizedException
    Check that the directory is empty

    Specified by:
    isEmpty in class ServerAccess
    Parameters:
    dir - the name of the directory
    path - the relative path of the directory
    Returns:
    true if the directory is empty, else false
    Throws:
    ApplicationException
    NotExistsResourceException
    NotAuthorizedException

    getProperty

    public java.lang.String getProperty(java.lang.String path,
                                        java.lang.String propertyName)
                                 throws ServerException
    not implemented

    Specified by:
    getProperty in class ServerAccess
    Parameters:
    path - the resource path
    propertyName - the property name
    Returns:
    the property as a String object
    Throws:
    ServerException

    setProperty

    public boolean setProperty(java.lang.String path,
                               java.lang.String propertyName,
                               java.lang.String propertyValue)
                        throws ServerException
    not implemented

    Specified by:
    setProperty in class ServerAccess
    Parameters:
    path - the resource path
    propertyName - the name of the property to set
    propertyValue - the value of the property to set
    Returns:
    true if well done
    Throws:
    ServerException

    getPermissions

    public org.esupportail.portal.utils.webdav.acl.EsupPermissions getPermissions(java.lang.String path,
                                                                                  java.lang.String permissionType)
                                                                           throws AclReadException,
                                                                                  AclAccessException,
                                                                                  NotSupportedAclException
    not implemented

    Specified by:
    getPermissions in class ServerAccess
    Parameters:
    path - the resource path
    permissionType - the type of permission (read, write, ....)
    Returns:
    an EsupPermissions object representing the permissions
    Throws:
    NotSupportedAclException
    AclAccessException
    AclReadException

    getPermissions

    public org.esupportail.portal.utils.webdav.acl.EsupPermissions getPermissions(java.lang.String path)
                                                                           throws AclReadException,
                                                                                  AclAccessException,
                                                                                  NotSupportedAclException
    not implemented

    Specified by:
    getPermissions in class ServerAccess
    Parameters:
    path - the resource path
    Returns:
    an EsupPermissions object representing the permissions
    Throws:
    NotSupportedAclException
    AclReadException
    AclAccessException

    grant

    public org.esupportail.portal.utils.webdav.acl.EsupPermissions grant(java.lang.String path,
                                                                         java.lang.String principal,
                                                                         java.lang.String permissionType)
                                                                  throws AclReadException,
                                                                         AclAccessException,
                                                                         AclWriteException,
                                                                         NotSupportedAclException
    not implemented

    Specified by:
    grant in class ServerAccess
    Parameters:
    path - the resource path
    principal - the concerned user role
    permissionType - the permission type: [read|read-acl|read-current-user-privilege-set|write|write-acl|write-properties|write-content]
    Returns:
    the EsupPermissions object modified by the action
    Throws:
    AclWriteException
    AclReadException
    AclAccessException
    NotSupportedAclException

    deny

    public org.esupportail.portal.utils.webdav.acl.EsupPermissions deny(java.lang.String path,
                                                                        java.lang.String principal,
                                                                        java.lang.String permissionType)
                                                                 throws AclReadException,
                                                                        AclAccessException,
                                                                        AclWriteException,
                                                                        NotSupportedAclException
    not implemented

    Specified by:
    deny in class ServerAccess
    Parameters:
    path - the resource path
    principal - the concerned user role
    permissionType - the permission type: [read|read-acl|read-current-user-privilege-set|write|write-acl|write-properties|write-content]
    Returns:
    the EsupPermissions object modified by the action
    Throws:
    AclAccessException
    AclReadException
    AclWriteException
    NotSupportedAclException

    revoke

    public org.esupportail.portal.utils.webdav.acl.EsupPermissions revoke(java.lang.String path,
                                                                          java.lang.String principal,
                                                                          java.lang.String permissionType)
                                                                   throws AclReadException,
                                                                          AclAccessException,
                                                                          AclWriteException,
                                                                          NotSupportedAclException
    not implemented

    Specified by:
    revoke in class ServerAccess
    Parameters:
    path - the resource path
    principal - the concerned user role
    permissionType - the permission type: [read|read-acl|read-current-user-privilege-set|write|write-acl|write-properties|write-content]
    Returns:
    the EsupPermissions object modified by the action
    Throws:
    AclWriteException
    AclAccessException
    NotSupportedAclException
    AclReadException

    hasInheritedPermission

    public java.util.Vector hasInheritedPermission(java.lang.String path,
                                                   java.lang.String principal,
                                                   java.lang.String permissionType,
                                                   boolean negative)
                                            throws AclReadException,
                                                   AclAccessException,
                                                   NotSupportedAclException
    not implemented

    Specified by:
    hasInheritedPermission in class ServerAccess
    Parameters:
    path - the resource path
    principal - the concerned user role
    permissionType - 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
    Returns:
    null if not inherited permission, else return the inherited permissions
    Throws:
    AclAccessException
    NotSupportedAclException
    AclReadException

    hasNotInheritedPermission

    public boolean hasNotInheritedPermission(java.lang.String path,
                                             java.lang.String principal,
                                             java.lang.String permissionType,
                                             boolean negative)
                                      throws AclReadException,
                                             AclAccessException,
                                             NotSupportedAclException
    not implemented

    Specified by:
    hasNotInheritedPermission in class ServerAccess
    Parameters:
    path - the resource path
    principal - the concerned user role
    permissionType - 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
    Throws:
    AclAccessException
    NotSupportedAclException
    AclReadException