01: package org.enhydra.dm.api;
02:
03: import java.util.Properties;
04:
05: import org.enhydra.dm.api.exceptions.BaseException;
06: import org.enhydra.dm.api.loggers.Log;
07:
08: public interface DocumentStore {
09:
10: /**
11: * Saving document content into document store for the first time
12: *
13: * @param documentName
14: * @param documentContent
15: * @return
16: * @throws BaseException
17: */
18: public String saveDocumentContent(String documentName,
19: byte[] documentContent) throws BaseException;
20:
21: /**
22: * Saving document content into document store - overwrite existing
23: *
24: * @param documentName
25: * @param documentContent
26: * @param path
27: * @return
28: * @throws BaseException
29: */
30: public String saveDocumentContent(String documentName,
31: byte[] documentContent, String path) throws BaseException;
32:
33: /**
34: * Load document content from document store.
35: *
36: * @param documentFilePath
37: * @return
38: * @throws BaseException
39: */
40: public byte[] loadDocumentContent(String documentFilePath)
41: throws BaseException;
42:
43: /**
44: * Getter for logger.
45: *
46: * @return
47: */
48: public Log getLogger();
49:
50: /**
51: * Setter for logger.
52: *
53: * @param logger
54: */
55: public void setLogger(Log logger);
56:
57: /**
58: * Getter for document store path
59: *
60: * @return
61: */
62: public String getDocStorePath();
63:
64: /**
65: * Setter for document store path
66: *
67: * @param docStorePath
68: */
69: public void setDocStorePath(String docStorePath);
70:
71: /**
72: * Configure method that reads parameters from Properties
73: *
74: * @param properties
75: * @throws BaseException
76: */
77: public void configure(Properties properties) throws BaseException;
78:
79: }
|