Interface ShareableData

All Superinterfaces:
IdentifiableData, OwnableData
All Known Implementing Classes:
AnnotatedData, AnnotationTypeCategoryData, AnnotationTypeData, ArrayBatchData, ArrayDesignData, ArraySlideData, BioMaterialData, BioPlateData, BioPlateEventData, BioSourceData, ClientData, CommonData, DerivedBioAssayData, DirectoryData, ExperimentData, ExtractData, FileData, FileServerData, FormulaData, HardwareData, ItemListData, JobAgentData, JobData, KitData, MeasuredBioMaterialData, PermissionTemplateData, PhysicalBioAssayData, PlateData, PlateMappingData, PlateTypeData, PluginConfigurationData, PluginDefinitionData, ProtocolData, RawBioAssayData, ReporterCloneTemplateData, ReporterListData, SampleData, SharedData, SoftwareData, TagData

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, Developer documentation: User authentication, Developer documentation: Basic classes and interfaces
  • Method Details

    • 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.