|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.proteios.core.BasicItem<D>
org.proteios.core.OwnedItem<D>
org.proteios.core.SharedItem<D>
org.proteios.core.CommonItem<ProtocolData>
org.proteios.core.Protocol
public class Protocol
This class is used to represent individual protocol items and information about them.
| Field Summary | |
|---|---|
static Item |
TYPE
The type of item represented by this class. |
| Fields inherited from interface org.proteios.core.Nameable |
|---|
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH |
| Method Summary | |
|---|---|
static Protocol |
getById(DbControl dc,
int id)
Get a Protocol item when you know the ID. |
File |
getFile()
Get the file that is attached to the item. |
ProtocolType |
getProtocolType()
Get the associated ProtocolType item. |
static ItemQuery<Protocol> |
getQuery()
Get a query configured to retrieve protocols. |
Item |
getType()
Get the type of item represented by the object. |
boolean |
isUsed()
Check if this protocol is used by: a BioMaterialEvent
|
void |
setFile(File file)
Attach a file to the item. |
void |
setProtocolType(ProtocolType protocolType)
Set the protocol type of this Protocol item. |
| Methods inherited from class org.proteios.core.CommonItem |
|---|
getDescription, getName, isRemoved, setDescription, setName, setRemoved |
| Methods inherited from class org.proteios.core.SharedItem |
|---|
getItemKey, getProjectKey, isShared, setItemKey, setProjectKey |
| Methods inherited from class org.proteios.core.OwnedItem |
|---|
getOwner, setOwner |
| Methods inherited from class org.proteios.core.BasicItem |
|---|
checkPermission, equals, getDbControl, getId, getPermissions, getSessionControl, getVersion, hashCode, hasPermission, isDetached, isInDatabase, 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, getVersion |
| Methods inherited from interface org.proteios.core.AccessControlled |
|---|
checkPermission, hasPermission |
| Methods inherited from interface org.proteios.core.Ownable |
|---|
getOwner, setOwner |
| Field Detail |
|---|
public static final Item TYPE
Item.PROTOCOL,
getType()| Method Detail |
|---|
public static Protocol getById(DbControl dc,
int id)
throws ItemNotFoundException,
PermissionDeniedException,
BaseException
Protocol item when you know the ID.
dc - The DbControl which will be used for permission
checking and database access.id - The ID of the item to load
Protocol item
ItemNotFoundException - This exception is thrown if an item with
the specified ID is not found
PermissionDeniedException - This exception is thrown if the logged
in user doesn't have READ permission to
the item
BaseException - This exception is thrown if there is another errorpublic static ItemQuery<Protocol> getQuery()
ItemQuery objectpublic Item getType()
IdentifiableItem enumeration.
getType in interface Identifiable
public File getFile()
throws PermissionDeniedException,
BaseException
FileAttachable
getFile in interface FileAttachableFile item, or null if no file is attached
PermissionDeniedException - If the logged in user doesn't have
read permission for the file
BaseException - If there is another error
public void setFile(File file)
throws PermissionDeniedException
FileAttachable
setFile in interface FileAttachablefile - The file to attach to the item
PermissionDeniedException - If the logged in user doesn't
have use permission for the file or write permission for the
item
public boolean isUsed()
throws BaseException
isUsed in class BasicItem<ProtocolData>BaseException
public ProtocolType getProtocolType()
throws PermissionDeniedException,
BaseException
ProtocolType item. All Protocol
items must have a type.
ProtocolType item
PermissionDeniedException - If the logged in user doesn't have
Permission.READ permission for the protocol type
BaseException - If there is any error
public void setProtocolType(ProtocolType protocolType)
throws PermissionDeniedException,
InvalidUseOfNullException
Protocol item. This
parameter mustn't be null.
protocolType - The new ProtocolType
PermissionDeniedException - If the logged in user doesn't have
Permission.WRITE permission to this protocol or
Permission.USE permission for the protocol type
InvalidUseOfNullException - If protocoltype is null
|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||