X-Git-Url: https://code.grnet.gr/git/pithos/blobdiff_plain/d74c027051076c7ee3b10588db3169dca1b9b8f8..872e1390a7d5a4dc283ae72686e0166c7c1bfd24:/src/gr/ebs/gss/server/ejb/ExternalAPI.java diff --git a/src/gr/ebs/gss/server/ejb/ExternalAPI.java b/src/gr/ebs/gss/server/ejb/ExternalAPI.java index 57c9e66..10c195b 100644 --- a/src/gr/ebs/gss/server/ejb/ExternalAPI.java +++ b/src/gr/ebs/gss/server/ejb/ExternalAPI.java @@ -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 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 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 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 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 permissions) - throws ObjectNotFoundException, InsufficientPermissionsException; - /** * Returns a list of all shared root folders of a user. *