KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > slide > store > impl > rdbms > RDBMSAdapter


1 /*
2  * $Header: /home/cvs/jakarta-slide/src/stores/org/apache/slide/store/impl/rdbms/RDBMSAdapter.java,v 1.4 2004/07/28 09:34:16 ib Exp $
3  * $Revision: 1.4 $
4  * $Date: 2004/07/28 09:34:16 $
5  *
6  * ====================================================================
7  *
8  * Copyright 1999-2003 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.store.impl.rdbms;
25
26 import java.sql.Connection JavaDoc;
27 import java.util.Enumeration JavaDoc;
28 import java.util.Hashtable JavaDoc;
29
30 import org.apache.slide.common.ServiceAccessException;
31 import org.apache.slide.common.ServiceParameterErrorException;
32 import org.apache.slide.common.ServiceParameterMissingException;
33 import org.apache.slide.common.Uri;
34 import org.apache.slide.content.NodeRevisionContent;
35 import org.apache.slide.content.NodeRevisionDescriptor;
36 import org.apache.slide.content.NodeRevisionDescriptors;
37 import org.apache.slide.content.NodeRevisionNumber;
38 import org.apache.slide.content.RevisionAlreadyExistException;
39 import org.apache.slide.content.RevisionDescriptorNotFoundException;
40 import org.apache.slide.content.RevisionNotFoundException;
41 import org.apache.slide.lock.LockTokenNotFoundException;
42 import org.apache.slide.lock.NodeLock;
43 import org.apache.slide.security.NodePermission;
44 import org.apache.slide.structure.ObjectAlreadyExistsException;
45 import org.apache.slide.structure.ObjectNode;
46 import org.apache.slide.structure.ObjectNotFoundException;
47 import org.apache.slide.util.logger.Logger;
48
49 /**
50  *
51  *
52  * @version $Revision: 1.4 $
53  */

54 public interface RDBMSAdapter {
55     
56     
57     // ---------------------------------------------------------------- Methods
58

59     public void setParameters(Hashtable JavaDoc parameters)
60             throws ServiceParameterErrorException,
61             ServiceParameterMissingException;
62     
63     public Logger getLogger();
64
65     /**
66      *
67      */

68     public ObjectNode retrieveObject(Connection JavaDoc conn, Uri uri)
69         throws ServiceAccessException, ObjectNotFoundException;
70     
71     
72     /**
73      *
74      */

75     public void storeObject(Connection JavaDoc conn, Uri uri, ObjectNode object)
76         throws ServiceAccessException, ObjectNotFoundException;
77     
78     
79     /**
80      *
81      */

82     public void createObject(Connection JavaDoc conn, Uri uri, ObjectNode object)
83         throws ServiceAccessException, ObjectAlreadyExistsException;
84     
85     
86     /**
87      *
88      */

89     public void removeObject(Connection JavaDoc conn, Uri uri, ObjectNode object)
90         throws ServiceAccessException, ObjectNotFoundException;
91     
92     
93     /**
94      *
95      */

96     public void grantPermission
97         (Connection JavaDoc conn, Uri uri, NodePermission permission)
98         throws ServiceAccessException;
99     
100     
101     /**
102      *
103      */

104     public void revokePermission
105         (Connection JavaDoc conn, Uri uri, NodePermission permission)
106         throws ServiceAccessException;
107     
108     
109     /**
110      *
111      */

112     public void revokePermissions(Connection JavaDoc conn, Uri uri)
113         throws ServiceAccessException;
114     
115     
116     /**
117      *
118      */

119     public Enumeration JavaDoc enumeratePermissions(Connection JavaDoc conn, Uri uri)
120         throws ServiceAccessException;
121     
122     
123     /**
124      *
125      */

126     public void putLock(Connection JavaDoc conn, Uri uri, NodeLock lock)
127         throws ServiceAccessException;
128     
129     
130     /**
131      *
132      */

133     public void renewLock(Connection JavaDoc conn, Uri uri, NodeLock lock)
134         throws ServiceAccessException, LockTokenNotFoundException;
135     
136     
137     /**
138      *
139      */

140     public void removeLock(Connection JavaDoc conn, Uri uri, NodeLock lock)
141         throws ServiceAccessException, LockTokenNotFoundException;
142     
143     
144     /**
145      *
146      */

147     public void killLock(Connection JavaDoc conn, Uri uri, NodeLock lock)
148         throws ServiceAccessException, LockTokenNotFoundException;
149     
150     
151     /**
152      *
153      */

154     public Enumeration JavaDoc enumerateLocks(Connection JavaDoc conn, Uri uri)
155         throws ServiceAccessException;
156     
157     
158     /**
159      *
160      */

161     public NodeRevisionDescriptors retrieveRevisionDescriptors
162         (Connection JavaDoc conn, Uri uri)
163         throws ServiceAccessException, RevisionDescriptorNotFoundException;
164     
165     
166     /**
167      *
168      */

169     public void createRevisionDescriptors
170         (Connection JavaDoc conn, Uri uri, NodeRevisionDescriptors revisionDescriptors)
171         throws ServiceAccessException;
172     
173     
174     /**
175      *
176      */

177     public void storeRevisionDescriptors
178         (Connection JavaDoc conn, Uri uri, NodeRevisionDescriptors revisionDescriptors)
179         throws ServiceAccessException, RevisionDescriptorNotFoundException;
180     
181     
182     /**
183      *
184      */

185     public void removeRevisionDescriptors(Connection JavaDoc conn, Uri uri)
186         throws ServiceAccessException;
187     
188     
189     /**
190      *
191      */

192     public NodeRevisionDescriptor retrieveRevisionDescriptor
193         (Connection JavaDoc conn, Uri uri, NodeRevisionNumber nrn)
194         throws ServiceAccessException, RevisionDescriptorNotFoundException;
195     
196     
197     /**
198      *
199      */

200     public void createRevisionDescriptor
201         (Connection JavaDoc conn, Uri uri, NodeRevisionDescriptor revisionDescriptor)
202         throws ServiceAccessException;
203     
204     
205     /**
206      *
207      */

208     public void storeRevisionDescriptor
209         (Connection JavaDoc conn, Uri uri, NodeRevisionDescriptor revisionDescriptor)
210         throws ServiceAccessException, RevisionDescriptorNotFoundException;
211     
212     
213     /**
214      *
215      */

216     public void removeRevisionDescriptor
217         (Connection JavaDoc conn, Uri uri, NodeRevisionNumber nrn)
218         throws ServiceAccessException;
219     
220     
221     /**
222      *
223      */

224     public NodeRevisionContent retrieveRevisionContent
225         (Connection JavaDoc conn, Uri uri, NodeRevisionDescriptor revisionDescriptor, boolean temporaryConnection)
226         throws ServiceAccessException, RevisionNotFoundException;
227     
228     
229     /**
230      *
231      */

232     public void createRevisionContent
233         (Connection JavaDoc conn, Uri uri, NodeRevisionDescriptor revisionDescriptor,
234          NodeRevisionContent revisionContent)
235         throws ServiceAccessException, RevisionAlreadyExistException;
236     
237     
238     /**
239      *
240      */

241     public void storeRevisionContent
242         (Connection JavaDoc conn, Uri uri, NodeRevisionDescriptor revisionDescriptor,
243          NodeRevisionContent revisionContent)
244         throws ServiceAccessException, RevisionNotFoundException;
245     
246     
247     /**
248      *
249      */

250     public void removeRevisionContent
251         (Connection JavaDoc conn, Uri uri, NodeRevisionDescriptor revisionDescriptor)
252         throws ServiceAccessException;
253     
254     
255 }
256
257
Popular Tags