Interface OwnableService
-
- All Known Implementing Classes:
OwnableServiceImpl,OwnableServiceNOOPImpl
public interface OwnableServiceService support around managing ownership.- Author:
- Andy Hind
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetOwner(NodeRef nodeRef)Get the username of the owner of the given object.booleanhasOwner(NodeRef nodeRef)Does the given node have an owner?voidsetOwner(NodeRef nodeRef, String userName)Set the owner of the object.voidtakeOwnership(NodeRef nodeRef)Set the owner of the object to be the current user.
-
-
-
Field Detail
-
NO_OWNER
static final String NO_OWNER
- See Also:
- Constant Field Values
-
-
Method Detail
-
getOwner
@Auditable(parameters="nodeRef") String getOwner(NodeRef nodeRef)
Get the username of the owner of the given object.- Parameters:
nodeRef- NodeRef- Returns:
- the username or null if the object has no owner
-
setOwner
@Auditable(parameters={"nodeRef","userName"}) void setOwner(NodeRef nodeRef, String userName)
Set the owner of the object.- Parameters:
nodeRef- NodeRefuserName- String
-
takeOwnership
@Auditable(parameters="nodeRef") void takeOwnership(NodeRef nodeRef)
Set the owner of the object to be the current user.- Parameters:
nodeRef- NodeRef
-
hasOwner
@Auditable(parameters="nodeRef") boolean hasOwner(NodeRef nodeRef)
Does the given node have an owner?- Parameters:
nodeRef- NodeRef- Returns:
- boolean
-
-