Class SoapFolderService

    • Constructor Detail

      • SoapFolderService

        public SoapFolderService()
    • Method Detail

      • create

        public WSFolder create​(String sid,
                               WSFolder folder)
                        throws Exception
        Description copied from interface: FolderService
        Creates a new folder. The user can completely customize the folder through a value object containing the folder's metadata
        Specified by:
        create in interface FolderService
        Parameters:
        sid - Session identifier
        folder - value object containing the folder's metadata
        Returns:
        The value object containing the folder's metadata
        Throws:
        Exception - error during folder creation
      • createAlias

        public WSFolder createAlias​(String sid,
                                    long parentId,
                                    long foldRef)
                             throws Exception
        Description copied from interface: FolderService
        Creates a new folder alias
        Specified by:
        createAlias in interface FolderService
        Parameters:
        sid - Session identifier
        parentId - The parent folder
        foldRef - The referenced folder
        Returns:
        The newly created alias
        Throws:
        Exception - error during alias creation
      • createFolder

        public long createFolder​(String sid,
                                 long parentId,
                                 String name)
                          throws Exception
        Description copied from interface: FolderService
        Create a new folder.
        Specified by:
        createFolder in interface FolderService
        Parameters:
        sid - Session identifier
        parentId - The parent's ID
        name - The new folder's name
        Returns:
        The newly created folder ID
        Throws:
        Exception - error during folder creation
      • delete

        public void delete​(String sid,
                           long folderId)
                    throws Exception
        Description copied from interface: FolderService
        Deletes an existing folder.
        Specified by:
        delete in interface FolderService
        Parameters:
        sid - Session identifier
        folderId - The folder id
        Throws:
        Exception - error in the server application
      • getFolder

        public WSFolder getFolder​(String sid,
                                  long folderId)
                           throws Exception
        Description copied from interface: FolderService
        Gets an existing folder
        Specified by:
        getFolder in interface FolderService
        Parameters:
        sid - Session identifier
        folderId - The folder id
        Returns:
        A value object containing the folder's metadata
        Throws:
        Exception - error in the server application
      • findByPath

        public WSFolder findByPath​(String sid,
                                   String path)
                            throws Exception
        Description copied from interface: FolderService
        Finds the folder at the specified path
        Specified by:
        findByPath in interface FolderService
        Parameters:
        sid - Session identifier
        path - The folder's path(for example /Default/dog/cat/mouse)
        Returns:
        The created folder
        Throws:
        Exception - error in the server application
      • isReadable

        public boolean isReadable​(String sid,
                                  long folderId)
                           throws Exception
        Description copied from interface: FolderService
        Tests if a folder is readable.
        Specified by:
        isReadable in interface FolderService
        Parameters:
        sid - Session identifier
        folderId - The folder id
        Returns:
        True if the identifier denotes a readable folder, otherwise false.
        Throws:
        Exception - error in the server application
      • listChildren

        public WSFolder[] listChildren​(String sid,
                                       long folderId)
                                throws Exception
        Description copied from interface: FolderService
        Lists all direct folders of a parent folder.
        Attention: readable only sub-folders are returned.
        Specified by:
        listChildren in interface FolderService
        Parameters:
        sid - identifier of th session
        folderId - identifier of the folder
        Returns:
        Array of folders contained in the folder
        Throws:
        Exception - error in the server application
      • move

        public void move​(String sid,
                         long folderId,
                         long parentId)
                  throws Exception
        Description copied from interface: FolderService
        Moves an existing folder with the given identifier.
        Specified by:
        move in interface FolderService
        Parameters:
        sid - Session identifier
        folderId - The folder id
        parentId - The folder id of the new parent folder
        Throws:
        Exception - error in the server application
      • copy

        public void copy​(String sid,
                         long folderId,
                         long targetId,
                         int foldersOnly,
                         String securityOption)
                  throws Exception
        Description copied from interface: FolderService
        Copies an existing folder with the given identifier.
        Specified by:
        copy in interface FolderService
        Parameters:
        sid - Session identifier
        folderId - The folder id
        targetId - The folder id of the target folder
        foldersOnly - If 1, only the folders will be copied and not the documents
        securityOption - How to assign the security policies to the newly created folders:
        • null or none: empty security policies
        • inherit: the new folder will point to the parent for the security policies
        • replicate: the new folder will have a copy of the security policies of the source folder
        Throws:
        Exception - error during copy
      • rename

        public void rename​(String sid,
                           long folderId,
                           String name)
                    throws Exception
        Description copied from interface: FolderService
        Renames an existing folder.
        Specified by:
        rename in interface FolderService
        Parameters:
        sid - Session identifier
        folderId - The folder id
        name - The new folder name
        Throws:
        Exception - error during folder rename
      • isWritable

        public boolean isWritable​(String sid,
                                  long folderId)
                           throws Exception
        Description copied from interface: FolderService
        Tests if a folder is writable
        Specified by:
        isWritable in interface FolderService
        Parameters:
        sid - Session identifier
        folderId - The folder id
        Returns:
        True if the identifier denotes a writable folder, otherwise false
        Throws:
        Exception - error in the server application
      • isGranted

        public boolean isGranted​(String sid,
                                 long folderId,
                                 int permission)
                          throws Exception
        Description copied from interface: FolderService
        Tests if the current user has a specific permission on a folder
        Specified by:
        isGranted in interface FolderService
        Parameters:
        sid - Session identifier
        folderId - The folder id
        permission - The permission representation
        Returns:
        True if the identifier denotes a granted permission, otherwise false
        Throws:
        Exception - error in the server application
      • getPath

        public WSFolder[] getPath​(String sid,
                                  long folderId)
                           throws Exception
        Description copied from interface: FolderService
        Computes the path from the root to the target folder.
        Specified by:
        getPath in interface FolderService
        Parameters:
        sid - Session identifier
        folderId - The target folder id
        Returns:
        The list of folder, the first is the root, the last is the target folder
        Throws:
        Exception - error in the server application
      • grantUser

        public void grantUser​(String sid,
                              long folderId,
                              long userId,
                              int permissions,
                              boolean recursive)
                       throws Exception
        Description copied from interface: FolderService
        Grants user permission to the folder.
        Specified by:
        grantUser in interface FolderService
        Parameters:
        sid - Session identifier
        folderId - Folder id
        userId - User Id
        permissions - the permission integer representation. If '0', the user will be not granted to access the folder.
        recursive - recursion option. If true, the grant operation is applied also to the subfolders.
        Throws:
        Exception - error in the server application
      • grantGroup

        public void grantGroup​(String sid,
                               long folderId,
                               long groupId,
                               int permissions,
                               boolean recursive)
                        throws Exception
        Description copied from interface: FolderService
        Grants group permission to the folder
        Specified by:
        grantGroup in interface FolderService
        Parameters:
        sid - Session identifier
        folderId - Folder id
        groupId - Group Id
        permissions - the permission integer representation. If '0', the group will be not granted to access the folder.
        recursive - recursion option. If true, the grant operation is applied also to the subfolders
        Throws:
        Exception - error in the server application
      • getGrantedUsers

        public WSRight[] getGrantedUsers​(String sid,
                                         long folderId)
                                  throws Exception
        Description copied from interface: FolderService
        Retrieves the list of granted users for the given folder.
        Specified by:
        getGrantedUsers in interface FolderService
        Parameters:
        sid - Session identifier
        folderId - Folder id
        Returns:
        'error' if error occurred, the right objects collection.
        Throws:
        Exception - error in the server application
      • getGrantedGroups

        public WSRight[] getGrantedGroups​(String sid,
                                          long folderId)
                                   throws Exception
        Description copied from interface: FolderService
        Retrieves the list of granted groups for the given folder
        Specified by:
        getGrantedGroups in interface FolderService
        Parameters:
        sid - Session identifier
        folderId - Folder id
        Returns:
        'error' if error occurred, the right objects collection
        Throws:
        Exception - error in the server application
      • update

        public void update​(String sid,
                           WSFolder folder)
                    throws Exception
        Description copied from interface: FolderService
        Updates an existing folder. To perform this you need the RENAME permission.
        Specified by:
        update in interface FolderService
        Parameters:
        sid - Session identifier
        folder - The folders metadata(please compile the ID)
        Throws:
        Exception - error during update
      • createPath

        public WSFolder createPath​(String sid,
                                   long parentId,
                                   String path)
                            throws Exception
        Description copied from interface: FolderService
        Creates the folder for the specified path. All unexisting nodes specified in the path will be created
        Specified by:
        createPath in interface FolderService
        Parameters:
        sid - Session identifier
        parentId - The parent folder
        path - The folder's path(for example /Default/dog/cat/mouse)
        Returns:
        The created folder
        Throws:
        Exception - error in the server application
      • merge

        public void merge​(String sid,
                          long sourceId,
                          long targetId)
                   throws Exception
        Description copied from interface: FolderService
        Merges the contents of folder into a target
        Specified by:
        merge in interface FolderService
        Parameters:
        sid - Session identifier
        sourceId - Identifier of the source folder
        targetId - Identifier of the target folder
        Throws:
        Exception - error in the server application