Use exponential backoff when updating the password or last login time in WebDAV.
[pithos] / src / gr / ebs / gss / server / ejb / ExternalAPI.java
index 57c9e66..10c195b 100644 (file)
@@ -249,6 +249,7 @@ public interface ExternalAPI {
         * @param userId the ID of the current user
         * @param folderId the ID of the folder to retrieve
         * @param folderName
+        * @param permissions
         * @return the updated folder
         * @throws InsufficientPermissionsException if the user does not have the
         *             appropriate privileges
@@ -257,7 +258,7 @@ public interface ExternalAPI {
         * @throws DuplicateNameException if the specified name already exists in
         *             the parent folder, as either a folder or file
         */
-       public FolderDTO modifyFolder(Long userId, Long folderId, String folderName)
+       public FolderDTO updateFolder(Long userId, Long folderId, String folderName, Set<PermissionDTO> permissions)
                        throws InsufficientPermissionsException, ObjectNotFoundException, DuplicateNameException;
 
        /**
@@ -376,13 +377,14 @@ public interface ExternalAPI {
         * @param versioned the new value of the versioned flag
         * @param readForAll
         * @param permissions
+        * @throws DuplicateNameException
         * @throws ObjectNotFoundException
         * @throws InsufficientPermissionsException
         */
        public void updateFile(Long userId, Long fileId, String name, String tagSet,
                        Date modificationDate, Boolean versioned, Boolean readForAll,
                        Set<PermissionDTO> permissions)
-                       throws ObjectNotFoundException, InsufficientPermissionsException;
+                       throws DuplicateNameException, ObjectNotFoundException, InsufficientPermissionsException;
 
        /**
         * Retrieve the contents of the current body for the file
@@ -828,26 +830,15 @@ public interface ExternalAPI {
         * @param username the username of the new user
         * @param name the full name of the new user
         * @param mail the e-mail of the new user
+        * @param persistentId the persistent ID of the new user
         * @return the newly-created User object
         * @throws DuplicateNameException if a user with the same username already exists
         * @throws ObjectNotFoundException if no username was provided
         */
-       public User createUser(String username, String name, String mail)
+       public User createUser(String username, String name, String mail, String persistentId)
                        throws DuplicateNameException, ObjectNotFoundException;
 
        /**
-        * Update the user with the specified username with the provided name
-        * and e-mail address.
-        *
-        * @param username the username of the user
-        * @param name the modified full name of the user
-        * @param mail the modified e-mail of the user
-        * @return the updated User object
-        * @throws ObjectNotFoundException if no username was provided
-        */
-       public User updateUser(String username, String name, String mail) throws ObjectNotFoundException;
-
-       /**
         * Updates the authentication token for the specified user.
         *
         * @param userId the ID of the user whose token should be updated
@@ -887,17 +878,6 @@ public interface ExternalAPI {
                        throws ObjectNotFoundException, InsufficientPermissionsException;
 
        /**
-        * update folder permissions
-        * @param userId
-        * @param folderId
-        * @param permissions
-        * @throws ObjectNotFoundException
-        * @throws InsufficientPermissionsException
-        */
-       public void setFolderPermissions(Long userId, Long folderId, Set<PermissionDTO> permissions)
-                       throws ObjectNotFoundException, InsufficientPermissionsException;
-
-       /**
         * Retrieve file user and group permissions
         *
         * @param userId the ID of the user whose token should be updated
@@ -909,20 +889,6 @@ public interface ExternalAPI {
        public Set<PermissionDTO> getFilePermissions(Long userId, Long fileId)
                        throws ObjectNotFoundException, InsufficientPermissionsException;
 
-
-       /**
-        * update file permissions
-        * @param userId
-        * @param fileId
-        * @param readForAll
-        * @param permissions
-        * @throws ObjectNotFoundException
-        * @throws InsufficientPermissionsException
-        */
-       public void setFilePermissions(Long userId, Long fileId, Boolean readForAll,
-                               Set<PermissionDTO> permissions)
-                       throws ObjectNotFoundException, InsufficientPermissionsException;
-
        /**
         * Returns a list of all shared root folders of a user.
         *