KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > slide > content > Content


1 /*
2  * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/content/Content.java,v 1.16 2004/07/28 09:37:57 ib Exp $
3  * $Revision: 1.16 $
4  * $Date: 2004/07/28 09:37:57 $
5  *
6  * ====================================================================
7  *
8  * Copyright 1999-2002 The Apache Software Foundation
9  *
10  * Licensed under the Apache License, Version 2.0 (the "License");
11  * you may not use this file except in compliance with the License.
12  * You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS,
18  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  * See the License for the specific language governing permissions and
20  * limitations under the License.
21  *
22  */

23
24 package org.apache.slide.content;
25
26 import org.apache.slide.common.ServiceAccessException;
27 import org.apache.slide.common.SlideToken;
28 import org.apache.slide.lock.ObjectLockedException;
29 import org.apache.slide.security.AccessDeniedException;
30 import org.apache.slide.structure.LinkedObjectNotFoundException;
31 import org.apache.slide.structure.ObjectNotFoundException;
32 import org.apache.slide.event.VetoException;
33
34 /**
35  * Content.
36  *
37  * @version $Revision: 1.16 $
38  */

39 public interface Content {
40     
41     
42     // ------------------------------------------------------ Interface Methods
43

44     
45     /**
46      * Retrieve revision descriptors.
47      *
48      * @param strUri Uri
49      * @return NodeRevisionDescriptors
50      */

51     NodeRevisionDescriptors retrieve(SlideToken token, String JavaDoc strUri)
52         throws ObjectNotFoundException, AccessDeniedException,
53         LinkedObjectNotFoundException, ServiceAccessException,
54         ObjectLockedException, VetoException;
55     
56     
57     /**
58      * Retrieve revision descriptor.
59      *
60      * @param revisionDescriptors Node revision descriptors
61      * @param revisionNumber Node revision number
62      */

63     NodeRevisionDescriptor retrieve
64         (SlideToken token, NodeRevisionDescriptors revisionDescriptors,
65          NodeRevisionNumber revisionNumber)
66         throws ObjectNotFoundException, AccessDeniedException,
67         LinkedObjectNotFoundException, ServiceAccessException,
68         RevisionDescriptorNotFoundException, ObjectLockedException, VetoException;
69     
70     
71     /**
72      * Retrieve revision descriptor from the latest revision
73      * in the main branch.
74      *
75      * @param revisionDescriptors Node revision descriptors
76      */

77     NodeRevisionDescriptor retrieve
78         (SlideToken token, NodeRevisionDescriptors revisionDescriptors)
79         throws ObjectNotFoundException, AccessDeniedException,
80         LinkedObjectNotFoundException, ServiceAccessException,
81         RevisionDescriptorNotFoundException, ObjectLockedException, VetoException;
82     
83     
84     /**
85      * Retrieve revision descriptor from the latest revision
86      * of a branch.
87      * @param token The token to access slide
88      * @param revisionDescriptors Node revision descriptors
89      * @param branch The branch, that contains the revision.
90      */

91     NodeRevisionDescriptor retrieve
92         (SlideToken token, NodeRevisionDescriptors revisionDescriptors,
93          String JavaDoc branch)
94         throws ObjectNotFoundException, AccessDeniedException,
95         LinkedObjectNotFoundException, ServiceAccessException,
96         RevisionDescriptorNotFoundException, ObjectLockedException,
97         BranchNotFoundException, NodeNotVersionedException, VetoException;
98     
99     
100     /**
101      * Retrieve revision content.
102      *
103      * @param revisionDescriptors Node revision descriptors
104      * @param revisionDescriptor Node revision descriptor
105      */

106     NodeRevisionContent retrieve(SlideToken token,
107                                  NodeRevisionDescriptors revisionDescriptors,
108                                  NodeRevisionDescriptor revisionDescriptor)
109         throws ObjectNotFoundException, AccessDeniedException,
110         RevisionNotFoundException, LinkedObjectNotFoundException,
111         ServiceAccessException, RevisionContentNotFoundException,
112         ObjectLockedException, VetoException;
113     
114     
115     /**
116      * Retrieve revision content.
117      *
118      * @param strUri Uri
119      * @param revisionDescriptor Node revision descriptor
120      */

121     NodeRevisionContent retrieve(SlideToken token, String JavaDoc strUri,
122                                  NodeRevisionDescriptor revisionDescriptor)
123         throws ObjectNotFoundException, AccessDeniedException,
124         RevisionNotFoundException, LinkedObjectNotFoundException,
125         ServiceAccessException, RevisionContentNotFoundException,
126         ObjectLockedException, VetoException;
127     
128     
129     /**
130      * Create new revision descriptors.
131      *
132      * @param strUri Uri
133      * @param isVersioned true is the resource is versioned
134      */

135     public void create(SlideToken token, String JavaDoc strUri,
136                        boolean isVersioned)
137         throws ObjectNotFoundException, AccessDeniedException,
138         LinkedObjectNotFoundException, ServiceAccessException,
139         ObjectLockedException, VetoException;
140     
141     
142     /**
143      * Create new revision in main branch.
144      *
145      * @param strUri Uri
146      * @param revisionDescriptor New Node revision descriptor
147      * @param revisionContent New Node revision content
148      */

149     void create(SlideToken token, String JavaDoc strUri,
150                 NodeRevisionDescriptor revisionDescriptor,
151                 NodeRevisionContent revisionContent)
152         throws ObjectNotFoundException, AccessDeniedException,
153         RevisionAlreadyExistException, LinkedObjectNotFoundException,
154         ServiceAccessException, ObjectLockedException, VetoException;
155     
156     
157     /**
158      * Create new revision based on a previous revision.
159      *
160      * @param strUri Uri
161      * @param branch Branch in which to create the revision
162      * @param newRevisionDescriptor New revision descriptor
163      * @param revisionContent Node revision content
164      */

165     void create(SlideToken token, String JavaDoc strUri, String JavaDoc branch,
166                 NodeRevisionDescriptor newRevisionDescriptor,
167                 NodeRevisionContent revisionContent)
168         throws ObjectNotFoundException, AccessDeniedException,
169         RevisionAlreadyExistException, LinkedObjectNotFoundException,
170         ServiceAccessException, RevisionDescriptorNotFoundException,
171         ObjectLockedException, NodeNotVersionedException,
172         BranchNotFoundException, VetoException;
173     
174     
175     /**
176      * Create a branch based on specified revision.
177      *
178      * @param strUri Uri
179      * @param branchName Name of the new branch
180      * @param basedOnRevisionDescriptor Node revision descriptor of
181      * the revision on which the new branch
182      * is based on.
183      *
184      * @return the NodeRevisionNumber of the created revision.
185      */

186     NodeRevisionNumber fork(SlideToken token, String JavaDoc strUri, String JavaDoc branchName,
187               NodeRevisionDescriptor basedOnRevisionDescriptor)
188         throws ObjectNotFoundException, AccessDeniedException,
189         LinkedObjectNotFoundException, ServiceAccessException,
190         RevisionDescriptorNotFoundException, ObjectLockedException,
191         NodeNotVersionedException, RevisionAlreadyExistException, VetoException;
192     
193     
194     /**
195      * Create a branch based on specified revision.
196      *
197      * @param strUri Uri
198      * @param branchName Name of the new branch
199      * @param basedOnRevisionNumber Node revision number of
200      * the revision on which the new branch
201      * is based on.
202      *
203      * @return the NodeRevisionNumber of the created revision.
204      */

205     NodeRevisionNumber fork(SlideToken token, String JavaDoc strUri, String JavaDoc branchName,
206               NodeRevisionNumber basedOnRevisionNumber)
207         throws ObjectNotFoundException, AccessDeniedException,
208         LinkedObjectNotFoundException, ServiceAccessException,
209         RevisionDescriptorNotFoundException, ObjectLockedException,
210         NodeNotVersionedException, RevisionAlreadyExistException, VetoException;
211     
212     
213     /**
214      * Merge specified branches into a single branch.
215      *
216      * @param strUri Uri
217      * @param mainBranch Branch into which the other branch will be merged
218      * @param branch Branch to merge into main branch
219      * @param newRevisionDescriptor New revision descriptor
220      * @param revisionContent Node revision content
221      */

222     void merge(SlideToken token, String JavaDoc strUri,
223                NodeRevisionDescriptor mainBranch,
224                NodeRevisionDescriptor branch,
225                NodeRevisionDescriptor newRevisionDescriptor,
226                NodeRevisionContent revisionContent)
227         throws ObjectNotFoundException, AccessDeniedException,
228         LinkedObjectNotFoundException, ServiceAccessException,
229         RevisionDescriptorNotFoundException, ObjectLockedException,
230         NodeNotVersionedException, BranchNotFoundException,
231         RevisionAlreadyExistException, VetoException;
232     
233     
234     /**
235      * Merge specified branches into a single branch.
236      *
237      * @param strUri Uri
238      * @param mainBranch Branch into which the other branch will be merged
239      * @param branch Branch to merge into main branch
240      * @param newRevisionDescriptor New revision descriptor
241      * @param revisionContent Node revision content
242      */

243     void merge(SlideToken token, String JavaDoc strUri,
244                String JavaDoc mainBranch, String JavaDoc branch,
245                NodeRevisionDescriptor newRevisionDescriptor,
246                NodeRevisionContent revisionContent)
247         throws ObjectNotFoundException, AccessDeniedException,
248         LinkedObjectNotFoundException, ServiceAccessException,
249         RevisionDescriptorNotFoundException, ObjectLockedException,
250         NodeNotVersionedException, BranchNotFoundException,
251         RevisionAlreadyExistException, VetoException;
252     
253     
254     /**
255      * Update contents of an existing revision.
256      *
257      * @param strUri Uri
258      * @param revisionDescriptor Revision descriptor
259      * @param revisionContent Revision content
260      */

261     void store(SlideToken token, String JavaDoc strUri,
262                NodeRevisionDescriptor revisionDescriptor,
263                NodeRevisionContent revisionContent)
264         throws ObjectNotFoundException, AccessDeniedException,
265         LinkedObjectNotFoundException, ServiceAccessException,
266         RevisionDescriptorNotFoundException, ObjectLockedException,
267         RevisionNotFoundException, VetoException;
268     
269     
270     /**
271      * Remove all revisions at this Uri.
272      *
273      * @param revisionDescriptors Node revision descriptors
274      */

275     void remove(SlideToken token,
276                 NodeRevisionDescriptors revisionDescriptors)
277         throws ObjectNotFoundException, AccessDeniedException,
278         LinkedObjectNotFoundException, ServiceAccessException,
279         RevisionDescriptorNotFoundException, ObjectLockedException, VetoException;
280     
281     
282     /**
283      * Remove specified revision.
284      *
285      * @param strUri Uri
286      * @param revisionDescriptor Node revision descriptor
287      */

288     void remove(SlideToken token, String JavaDoc strUri,
289                 NodeRevisionDescriptor revisionDescriptor)
290         throws ObjectNotFoundException, AccessDeniedException,
291         LinkedObjectNotFoundException, ServiceAccessException,
292         RevisionDescriptorNotFoundException, ObjectLockedException, VetoException;
293     
294     
295     /**
296      * Remove specified revision.
297      *
298      * @param strUri Uri
299      * @param revisionNumber Revision number
300      */

301     void remove(SlideToken token, String JavaDoc strUri,
302                 NodeRevisionNumber revisionNumber)
303         throws ObjectNotFoundException, AccessDeniedException,
304         LinkedObjectNotFoundException, ServiceAccessException,
305         RevisionDescriptorNotFoundException, ObjectLockedException, VetoException;
306     
307 }
308
Popular Tags