01: package com.technoetic.xplanner.file;
02:
03: import net.sf.hibernate.HibernateException;
04: import net.sf.hibernate.Session;
05:
06: import java.io.InputStream;
07:
08: public interface FileSystem {
09: Directory getRootDirectory() throws HibernateException;
10:
11: Directory getDirectory(Session session, int directoryId)
12: throws HibernateException;
13:
14: Directory getDirectory(String path) throws HibernateException;
15:
16: File createFile(Directory directory, String name,
17: String contentType, long size, InputStream data)
18: throws HibernateException;
19:
20: File createFile(Session session, int directoryId, String name,
21: String contentType, long size, InputStream data)
22: throws HibernateException;
23:
24: File getFile(Session session, int fileId) throws HibernateException;
25:
26: void deleteFile(Session session, int fileId)
27: throws HibernateException;
28:
29: Directory createDirectory(Session session, int parentDirectoryId,
30: String name) throws HibernateException;
31:
32: Directory createDirectory(Session session, Directory parent,
33: String name) throws HibernateException;
34:
35: void deleteDirectory(Session session, int directoryId)
36: throws HibernateException;
37:
38: }
|