Package com.cbe
Class ShareEventProtocol
- java.lang.Object
-
- com.cbe.ShareEventProtocol
-
public class ShareEventProtocol extends java.lang.Object
Protocol for implementing a share delegate.
Abstract base class which is used when you want notification on changes related to share calls. Note this class needs to be implemented by the user.
-
-
Constructor Summary
Constructors Constructor Description ShareEventProtocol()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onACLError(int type, long operation, long code, java.lang.String reason, java.lang.String message)
Gets called when errors regarding ACLs have occured, outcome of a get or setACL that has failed.void
onContainerACLAdded(ACL_Map ACLs)
Gets called when an Access Control List (std::map with user_id and permission) has been added to a Containervoid
onContainerAclLoaded(UserId_Vec userIds, ACL_Map ACLMap)
Gets called when an Access Control List (std::map with user_id and permission) has been loaded for a Containervoid
onContainerShared(long shareId)
Gets called when a Container has been sharedvoid
onContainerUnShared(java.lang.String message)
Gets called when a Container has been unShared, message will be OK else an shareError will be thrown.void
onListAvailableShares(QueryResult result)
Gets called when a query for available shares that have been shared to you.void
onListMyShares(QueryResult qResult)
Gets called when a query for shares that you have shared to other accounts or groups.void
onObjectACLAdded(ACL_Map ACLs)
Gets called when an Access Control List (std::map with user_id and permission) has been added to an Objectvoid
onObjectAclLoaded(UserId_Vec userIds, ACL_Map ACLMap)
Gets called when an Access Control List (std::map with user_id and permission) has been loaded for an Objectvoid
onObjectShared(long shareId)
Gets called when an Object has been shared.void
onObjectUnShared(java.lang.String message)
Gets called when an Object has been unshared, massage will be OK, if not ok there will be a shareError thrown.void
onShareError(int type, long operation, long code, java.lang.String reason, java.lang.String message)
Errors regarding share and list share calls onShareError.
-
-
-
Method Detail
-
onListAvailableShares
public void onListAvailableShares(QueryResult result)
Gets called when a query for available shares that have been shared to you.
-
onListMyShares
public void onListMyShares(QueryResult qResult)
Gets called when a query for shares that you have shared to other accounts or groups.
-
onContainerACLAdded
public void onContainerACLAdded(ACL_Map ACLs)
Gets called when an Access Control List (std::map with user_id and permission) has been added to a Container
-
onObjectACLAdded
public void onObjectACLAdded(ACL_Map ACLs)
Gets called when an Access Control List (std::map with user_id and permission) has been added to an Object
-
onContainerAclLoaded
public void onContainerAclLoaded(UserId_Vec userIds, ACL_Map ACLMap)
Gets called when an Access Control List (std::map with user_id and permission) has been loaded for a Container
-
onObjectAclLoaded
public void onObjectAclLoaded(UserId_Vec userIds, ACL_Map ACLMap)
Gets called when an Access Control List (std::map with user_id and permission) has been loaded for an Object
-
onContainerShared
public void onContainerShared(long shareId)
Gets called when a Container has been shared- Parameters:
shareId
- is the id of the share and is needed when unSharing and can be used to locate which user is tied to that share.
-
onContainerUnShared
public void onContainerUnShared(java.lang.String message)
Gets called when a Container has been unShared, message will be OK else an shareError will be thrown.
-
onObjectShared
public void onObjectShared(long shareId)
Gets called when an Object has been shared.
-
onObjectUnShared
public void onObjectUnShared(java.lang.String message)
Gets called when an Object has been unshared, massage will be OK, if not ok there will be a shareError thrown.
-
onShareError
public void onShareError(int type, long operation, long code, java.lang.String reason, java.lang.String message)
Errors regarding share and list share calls onShareError.
-
onACLError
public void onACLError(int type, long operation, long code, java.lang.String reason, java.lang.String message)
Gets called when errors regarding ACLs have occured, outcome of a get or setACL that has failed.- Parameters:
type
- is either Container or Object.operation
- is set or getACL for either Container or Object.code
- is according to w3 standards, for more information look at cloudbackend website or look at RFC 7231reason
- is from server/edge why the error occured.message
- of the error can be something like 403, forbidden, permission denied where permission denied is the message
telling you that the ACL:s you've set is not allowing the other user to access the Object or Container.
-
-