Package com.im.df.api.capabilities
Interface DFSharedObjectOwnerCapability
-
- All Superinterfaces:
DFCapability
,DFSharedObjectCapability
public interface DFSharedObjectOwnerCapability extends DFSharedObjectCapability
This capability is an read-write extension ofDFSharedObjectCapability
. If you are able to obtain this capability it means you are owner of the DFItem and you can change its sharing status (publish it or hide it).- Author:
- Petr Hamernik
-
-
Field Summary
-
Fields inherited from interface com.im.df.api.capabilities.DFSharedObjectCapability
PROP_OWNER, PROP_SHARING
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
giveOwnershipTo(java.lang.String user, com.im.commons.progress.DFEnvironmentRW env)
Give ownership of the item to another user.boolean
isValid()
The owner capability may be invalidated by passing the item ownership to another user.void
setSharing(com.im.commons.sharing.DFSharing sharing, com.im.commons.progress.DFEnvironmentRW env)
Change the sharing status of the object.-
Methods inherited from interface com.im.df.api.capabilities.DFSharedObjectCapability
getOwner, getSharing, isPrivateAndHidden, isSharedForReading
-
-
-
-
Method Detail
-
setSharing
void setSharing(com.im.commons.sharing.DFSharing sharing, com.im.commons.progress.DFEnvironmentRW env)
Change the sharing status of the object. If object's sharing status is going to be lowered, it means other users could still see it as it's part of their locally cached models. Once other user closes the connection and reload the model the object will not be there anymore. (depending if it's PUBLIC or SHARED).- Parameters:
sharing
- new sharing objectenv
- environment
-
giveOwnershipTo
void giveOwnershipTo(java.lang.String user, com.im.commons.progress.DFEnvironmentRW env)
Give ownership of the item to another user. This capability becomes invalid in the process.- Parameters:
user
- the new owner loginenv
- environment- See Also:
isValid()
-
isValid
boolean isValid()
The owner capability may be invalidated by passing the item ownership to another user. Once invalidated, this object never becomes valid again.- Returns:
- whether the object is still valid
-
-