public class ServerShare
extends Object
-
Constructor Summary
Constructors
-
Method Summary
Give a user access to the Userdata, need write perms
Delete a shared userData from the server, the user must have write access
Get all the SharedUserDatas from the authenticated user (the ones he shared with other user and
the ones shared with him)
Remove a user access to the Userdata, need write perms
Share a userData to someone else
Update a SharedUserData on the server
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Details
-
shareUserData
Share a userData to someone else
- Parameters:
userData - data to share
receiver - user to share with
- Returns:
- the representation of the shared password on the server
- Throws:
AuthenticationException - if the authentication is outdated
TimeoutException - if the request took too much time to complete
IOException - if the connection was interrupted
ServerException
-
getSharedUserDatas
Get all the SharedUserDatas from the authenticated user (the ones he shared with other user and
the ones shared with him)
- Returns:
- List of the SharedUserData
- Throws:
AuthenticationException - If the user is no longer authenticated
TimeoutException - if the request took too much time to complete
IOException - if the connection failed with the server
ServerException
-
updateSharedUserData
Update a SharedUserData on the server
- Parameters:
sharedUserData - UserData to update on the server
- Returns:
- The updated sharedUserData
- Throws:
AuthenticationException - If the user is no longer connected
TimeoutException - if the request took too much time to complete
IOException - If the connection failed
ServerException
-
deleteSharedUserData
Delete a shared userData from the server, the user must have write access
- Parameters:
sharedUserData - SharedUserData to remove from the server
- Returns:
- the sharedUserData removed
- Throws:
AuthenticationException - if the authentication failed
ForbiddenAccessException - if the user has no access to the userdata on the server (or do
not exist anymore)
ServerException - for any other server related exception
TimeoutException - if the request took too much time to complete
IOException - If the connection failed
-
addUserSharedUserData
Give a user access to the Userdata, need write perms
- Parameters:
sharedUserData - Userdata to share
user - user to give access to the userdata
- Returns:
- The updated sharedUserData
- Throws:
NotFoundException - if the user do not exist or if the SharedData doesn't exist
ForbiddenAccessException - if no permissions to add a new user
AuthenticationException - if the user is no longer authenticated
IOException - the connection with the server failed
TimeoutException - if the request took too much time to complete
CipherException - if the decryption of the object key failed (or the decryption of the
payload with the object key)
ServerException
-
removeUserSharedUserData
Remove a user access to the Userdata, need write perms
- Parameters:
sharedUserData - Shared User data
user - user to remove access to the userdata
- Returns:
- The updated sharedUserData
- Throws:
NotFoundException - if the user do not exist or if the SharedData doesn't exist
ForbiddenAccessException - if no permissions to remove a new user
AuthenticationException - if the user is no longer authenticated
IOException - the connection with the server failed
CipherException - if the decryption of the object key failed (or the decryption of the
payload with the object key)
ServerException
TimeoutException