1 package net.sourceforge.blogentis.storage;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 import net.sourceforge.blogentis.plugins.IBlogExtension;
26
27 import org.apache.slide.content.NodeRevisionContent;
28 import org.apache.slide.content.NodeRevisionDescriptor;
29 import org.apache.slide.content.NodeRevisionDescriptors;
30 import org.apache.slide.content.NodeRevisionNumber;
31
32 /***
33 * @author abas
34 */
35 public interface IStorageExtension
36 extends IBlogExtension {
37
38 /***
39 *
40 * @param originalPath
41 * the original path of the resource about to be stored.
42 * @param revisionDescriptors
43 * @param revisionDescriptor
44 * @param revisionContent
45 */
46 public void preStoreContent(String originalPath,
47 NodeRevisionDescriptors revisionDescriptors,
48 NodeRevisionDescriptor revisionDescriptor,
49 NodeRevisionContent revisionContent);
50
51 /***
52 *
53 * @param originalPath
54 * @param revisionDescriptors
55 * @param revisionDescriptor
56 * @param revisionContent
57 */
58 public void postStoreContent(String originalPath,
59 NodeRevisionDescriptors revisionDescriptors,
60 NodeRevisionDescriptor revisionDescriptor,
61 NodeRevisionContent revisionContent);
62
63 /***
64 *
65 * @param originalPath
66 * @param revisionDescriptors
67 * @param revisionNumber
68 * @param revisionDescriptor
69 */
70 public void preRetrieveContent(String originalPath,
71 NodeRevisionDescriptors revisionDescriptors,
72 NodeRevisionNumber revisionNumber,
73 NodeRevisionDescriptor revisionDescriptor);
74
75 /***
76 * Method that will be called after retrieving content from the store.
77 *
78 * @param originalPath
79 * the original path of the resource
80 * @param revisionDescriptors
81 * @param revisionDescriptor
82 * @param revisionContent
83 * the actual modifiable content.
84 */
85 public void postRetrieveContent(
86 String originalPath,
87 NodeRevisionDescriptors revisionDescriptors,
88 NodeRevisionDescriptor revisionDescriptor,
89 NodeRevisionContent revisionContent);
90
91 /***
92 * Method that will be called immediately before the resource will be
93 * removed.
94 *
95 * @param originalPath
96 * the original path of the resource about to be removed. may be
97 * null.
98 * @param revisionDescriptors
99 * may be null
100 * @param revisionDescriptor
101 * may be null
102 */
103 public void preRemoveContent(String originalPath,
104 NodeRevisionDescriptors revisionDescriptors,
105 NodeRevisionDescriptor revisionDescriptor);
106 }