org.proteios.core
Class OwnedItem<D extends OwnedData>
java.lang.Object
org.proteios.core.BasicItem<D>
org.proteios.core.OwnedItem<D>
- All Implemented Interfaces:
- AccessControlled, Identifiable, Ownable
- Direct Known Subclasses:
- Job, Project, SharedItem
public abstract class OwnedItem<D extends OwnedData>
- extends BasicItem<D>
- implements Ownable
This class inherits from the BasicItem
class and implements the Ownable interface.
An Ownable item is an item that has a
User as its owner.
- Version:
- 2.0
- Author:
- Nicklas
- See Also:
Ownable- Last modified
- $Date: 2009-04-09 08:48:11 +0200 (Thu, 09 Apr 2009) $
| Methods inherited from class org.proteios.core.BasicItem |
checkPermission, equals, getDbControl, getId, getPermissions, getSessionControl, getVersion, hashCode, hasPermission, isDetached, isInDatabase, isUsed, toString |
getOwner
public User getOwner()
throws PermissionDeniedException,
BaseException
- Description copied from interface:
Ownable
- Get the
User that is the owner of the item.
- Specified by:
getOwner in interface Ownable
- Returns:
- The owner of the item
- Throws:
PermissionDeniedException - If the logged in user doesn't
have read permission to the owner
BaseException - If there is another error
setOwner
public void setOwner(User owner)
throws PermissionDeniedException,
InvalidDataException
- Description copied from interface:
Ownable
- Change the owner of the item.
- Specified by:
setOwner in interface Ownable
- Parameters:
owner - The new owner of the item
- Throws:
PermissionDeniedException - If the logged in user doesn't
have permission to change the owner on the item
InvalidDataException - If the owner is null