Package net.sf.basedb.core
Interface FileAttachable
-
- All Superinterfaces:
AccessControlled
,Identifiable
- All Known Implementing Classes:
Protocol
public interface FileAttachable extends Identifiable
AFileAttachable
item is an item that can have aFile
attached to it.- Version:
- 2.0
- Author:
- enell
- Last modified
- $Date: 2009-04-06 14:52:39 +0200 (må, 06 apr 2009) $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.AccessControlled
checkPermission, getPermissions, hasPermission
-
Methods inherited from interface net.sf.basedb.core.Identifiable
getId, getType, getVersion
-
-
-
-
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 fileBaseException
- 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 itemBaseException
- If there is another error
-
-