2.17.2: 2011-06-17

net.sf.basedb.core.data
Interface ShareableData

All Superinterfaces:
IdentifiableData, OwnableData
All Known Implementing Classes:
AnnotatedData, AnnotationTypeCategoryData, AnnotationTypeData, ArrayBatchData, ArrayDesignData, ArraySlideData, BioMaterialData, BioMaterialListData, BioPlateData, BioPlateEventData, BioSourceData, ClientData, CommonData, DirectoryData, ExperimentData, ExtractData, FileData, FileServerData, FormulaData, HardwareData, HybridizationData, JobAgentData, LabelData, LabeledExtractData, MeasuredBioMaterialData, PermissionTemplateData, PlateData, PlateMappingData, PlateTypeData, PluginConfigurationData, PluginDefinitionData, ProtocolData, RawBioAssayData, ReporterListData, SampleData, ScanData, SharedData, SoftwareData

public interface ShareableData
extends OwnableData

A shareable item is an item which can be shared to other users, groups or projects. To be able to share an item, it must have an owner, thus this interface extends the OwnableData interface.

Access permissions are held in a ItemKeyData object for users and groups and a ProjectKeyData object for projects.

The SharedData class provides an implementation for this interface and it is recommended that shareable classes inherit from that class.

This interface defines Hibernate database mappings for the itemKey and projectKey properties to default database columns. If a subclass wants to map these properties to other columns, it should override the getItemKey() and getProjectKey() methods and add a Hibernate tag in the comment.

Reference implementation

private ItemKeyData itemKey;
public ItemKeyData getItemKey()
{
   return itemKey;
}
public void setItemKey(ItemKeyData itemKey)
{
   this.itemKey = itemKey;
}
private ProjectKeyData projectKey;
public ProjectKeyData getProjectKey()
{
   return projectKey;
}
public void setProjectKey(ProjectKeyData projectKey)
{
   this.projectKey = projectKey;
}

Version:
2.0
Author:
Nicklas
See Also:
SharedData, Shareable, Authentication overview, Basic classes and interfaces

Method Summary
 ItemKeyData getItemKey()
          Get the ItemKeyData for the item.
 ProjectKeyData getProjectKey()
          Get the ProjectKeyData for the item.
 void setItemKey(ItemKeyData key)
          Set the ItemKeyData for the item.
 void setProjectKey(ProjectKeyData key)
          Set the ProjectKeyData for the item.
 
Methods inherited from interface net.sf.basedb.core.data.OwnableData
getOwner, setOwner
 
Methods inherited from interface net.sf.basedb.core.data.IdentifiableData
getId, getVersion
 

Method Detail

getItemKey

ItemKeyData getItemKey()
Get the ItemKeyData for the item. An item key is used to share an item to individual users and/or groups.

Hibernate: many-to-one
column="`itemkey_id`" not-null="false" outer-join="false"

setItemKey

void setItemKey(ItemKeyData key)
Set the ItemKeyData for the item. An item key is used to share an item to individual users and or groups. Use null to disable sharing.


getProjectKey

ProjectKeyData getProjectKey()
Get the ProjectKeyData for the item. A project key is used to share an item to projects.

Hibernate: many-to-one
column="`projectkey_id`" not-null="false" outer-join="false"

setProjectKey

void setProjectKey(ProjectKeyData key)
Set the ProjectKeyData for the item. A project key is used to share an item to projects. Use null to disable sharing.


2.17.2: 2011-06-17