2.17.2: 2011-06-17

net.sf.basedb.core
Interface FileAttachable

All Superinterfaces:
AccessControlled, Identifiable
All Known Implementing Classes:
Image, Protocol

public interface FileAttachable
extends Identifiable

A FileAttachable item is an item that can have a File attached to it.

Version:
2.0
Author:
enell
Last modified
$Date: 2009-04-06 14:52:39 +0200 (Mon, 06 Apr 2009) $

Method Summary
 File getFile()
          Get the file that is attached to the item.
 void setFile(File file)
          Attach a file to the item.
 
Methods inherited from interface net.sf.basedb.core.Identifiable
getId, getType, getVersion
 
Methods inherited from interface net.sf.basedb.core.AccessControlled
checkPermission, getPermissions, hasPermission
 

Method Detail

getFile

File getFile()
             throws PermissionDeniedException,
                    BaseException
Get the file that is attached to the item.

Returns:
A File item, or null if no file is attached
Throws:
PermissionDeniedException - If the logged in user doesn't have read permission for the file
BaseException - If there is another error

setFile

void setFile(File file)
             throws PermissionDeniedException,
                    BaseException
Attach a file to the item.

Parameters:
file - The file to attach to the item
Throws:
PermissionDeniedException - If the logged in user doesn't have use permission for the file or write permission for the item
BaseException - If there is another error

2.17.2: 2011-06-17