Interface Ownable

All Superinterfaces:
AccessControlled, Identifiable
All Known Subinterfaces:
DiskConsumable, Shareable
All Known Implementing Classes:
AnnotatedItem, AnnotationType, AnnotationTypeCategory, ArrayBatch, ArrayDesign, ArraySlide, BioMaterial, BioPlate, BioPlateEvent, BioSource, Client, CommonItem, DerivedBioAssay, Directory, Experiment, Extract, File, FileServer, Formula, Hardware, ItemList, Job, JobAgent, Kit, MeasuredBioMaterial, OwnedItem, PermissionTemplate, PhysicalBioAssay, Plate, PlateMapping, PlateType, PluginConfiguration, PluginDefinition, Project, Protocol, RawBioAssay, ReporterCloneTemplate, ReporterList, Sample, SharedItem, Software, Tag

public interface Ownable extends Identifiable
An Ownable item is an item which has a User as its owner. The OwnableUtil class provides methods that includes data validation to make it easy to implement this interface.

Reference implementation

public User getOwner()
   throws PermissionDeniedException, BaseException
{
   return getDbControl().getItem(User.class, getData().getOwner());
}
public void setOwner(User owner)
   throws PermissionDeniedException, InvalidDataException
{
   checkPermission(Permission.SET_OWNER);
   OwnableUtil.setOwner(getData(), owner);
}
Version:
2.0
Author:
Nicklas
See Also:
Last modified
$Date: 2009-04-06 14:52:39 +0200 (må, 06 apr 2009) $