net.sf.basedb.core
Class CommonItem<D extends CommonData>
java.lang.Object
net.sf.basedb.core.BasicItem<D>
net.sf.basedb.core.OwnedItem<D>
net.sf.basedb.core.SharedItem<D>
net.sf.basedb.core.CommonItem<D>
- All Implemented Interfaces:
- AccessControlled, Identifiable, Nameable, Ownable, Removable, Shareable
- Direct Known Subclasses:
- AnnotatedItem, AnnotationType, AnnotationTypeCategory, BioMaterialList, BioPlateEvent, Client, Experiment, File, FileServer, Formula, Hardware, JobAgent, Label, PermissionTemplate, PlateMapping, PlateType, ReporterList, Software
public abstract class CommonItem<D extends CommonData>
- extends SharedItem<D>
- implements Nameable, Removable
- Version:
- 2.0
- Author:
- Nicklas
Methods inherited from class net.sf.basedb.core.BasicItem |
addUsingItems, addUsingItems, checkPermission, equals, getData, getDbControl, getId, getPermissions, getPluginPermissions, getSessionControl, getUsingItems, getVersion, hashCode, hasPermission, isDetached, isInDatabase, isUsed, onAfterCommit, onAfterInsert, onRollback, setDbControl, setProjectDefaults, toString, toTransferable, validate |
CommonItem
CommonItem(D commonData)
getName
public String getName()
- Description copied from interface:
Nameable
- Get the name of the item.
- Specified by:
getName
in interface Nameable
- Returns:
- A
String
with the name of the item
setName
public void setName(String name)
throws PermissionDeniedException,
InvalidDataException
- Description copied from interface:
Nameable
- Set the name of the item. The name cannot be null and mustn't
be longer than the value specified by the
Nameable.MAX_NAME_LENGTH
constant.
- Specified by:
setName
in interface Nameable
- Parameters:
name
- The new name for the item
- Throws:
PermissionDeniedException
- If the logged in user doesn't
have write permission
InvalidDataException
- If the name is null or longer
than specified by the Nameable.MAX_NAME_LENGTH
constant
getDescription
public String getDescription()
- Description copied from interface:
Nameable
- Get the description for the item.
- Specified by:
getDescription
in interface Nameable
- Returns:
- A
String
with a description of the item
setDescription
public void setDescription(String description)
throws PermissionDeniedException,
InvalidDataException
- Description copied from interface:
Nameable
- Set the description for the item. The description can be null but
mustn't be longer than the value specified by the
Nameable.MAX_DESCRIPTION_LENGTH
constant.
- Specified by:
setDescription
in interface Nameable
- Parameters:
description
- The new description for the item
- Throws:
PermissionDeniedException
- If the logged in user doesn't
have write permission
InvalidDataException
- If the description longer
than specified by the Nameable.MAX_DESCRIPTION_LENGTH
constant
isRemoved
public boolean isRemoved()
- Description copied from interface:
Removable
- Check if the removed flag is set for this item.
- Specified by:
isRemoved
in interface Removable
- Returns:
- TRUE if the item is flagged as removed, FALSE otherwise
setRemoved
public void setRemoved(boolean removed)
throws PermissionDeniedException
- Description copied from interface:
Removable
- Set the removed flag for this item.
- Specified by:
setRemoved
in interface Removable
- Parameters:
removed
- TRUE if the item should be flagged as removed,
FALSE otherwise
- Throws:
PermissionDeniedException
- If the logged in user doesn't
have Permission.DELETE
permission for setting the flag
to TRUE or Permission.WRITE
permission for setting the
flag to FALSE
toTransferable
CommonItemInfo toTransferable(CommonItemInfo info)
- Since:
- 2.5