Last update: 2011-06-23

org.proteios.core
Class OwnedItem<D extends OwnedData>

java.lang.Object
  extended by org.proteios.core.BasicItem<D>
      extended by 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) $

Method Summary
 User getOwner()
          Get the User that is the owner of the item.
 void setOwner(User owner)
          Change the owner of the item.
 
Methods inherited from class org.proteios.core.BasicItem
checkPermission, equals, getDbControl, getId, getPermissions, getSessionControl, getVersion, hashCode, hasPermission, isDetached, isInDatabase, isUsed, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.proteios.core.Identifiable
getId, getType, getVersion
 
Methods inherited from interface org.proteios.core.AccessControlled
checkPermission, hasPermission
 

Method Detail

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

Last update: 2011-06-23