View Javadoc

1   package net.sourceforge.blogentis.storage;
2   
3   //-----------------------------------------------------------------------
4   //Blogentis - a blog publishing platform.
5   //Copyright (C) 2004 Tassos Bassoukos <abassouk@gmail.com>
6   //
7   //This library is free software; you can redistribute it and/or
8   //modify it under the terms of the GNU Lesser General Public
9   //License as published by the Free Software Foundation; either
10  //version 2.1 of the License, or (at your option) any later version.
11  //
12  //This library is distributed in the hope that it will be useful,
13  //but WITHOUT ANY WARRANTY; without even the implied warranty of
14  //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  //Lesser General Public License for more details.
16  //
17  //You should have received a copy of the GNU Lesser General Public
18  //License along with this library; if not, write to the Free Software
19  //Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20  //-----------------------------------------------------------------------
21  //
22  //$Id: IStorageExtension.java,v 1.1 2004/10/22 17:34:11 tassos Exp $
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 }