KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > jetspeed > services > cms > repository > slide > JetspeedSecurityDescriptorsStore


1 /* ====================================================================
2  * The Apache Software License, Version 1.1
3  *
4  * Copyright (c) 2001 The Apache Software Foundation. All rights
5  * reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  *
11  * 1. Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  *
14  * 2. Redistributions in binary form must reproduce the above copyright
15  * notice, this list of conditions and the following disclaimer in
16  * the documentation and/or other materials provided with the
17  * distribution.
18  *
19  * 3. The end-user documentation included with the redistribution,
20  * if any, must include the following acknowledgment:
21  * "This product includes software developed by the
22  * Apache Software Foundation (http://www.apache.org/)."
23  * Alternately, this acknowledgment may appear in the software itself,
24  * if and wherever such third-party acknowledgments normally appear.
25  *
26  * 4. The names "Apache" and "Apache Software Foundation" and
27  * "Apache Jetspeed" must not be used to endorse or promote products
28  * derived from this software without prior written permission. For
29  * written permission, please contact apache@apache.org.
30  *
31  * 5. Products derived from this software may not be called "Apache",
32  * "Apache Jetspeed", nor may "Apache" appear in their name, without
33  * prior written permission of the Apache Software Foundation.
34  *
35  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
36  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
37  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
38  * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
39  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
40  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
41  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
42  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
43  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
44  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
45  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
46  * SUCH DAMAGE.
47  * ====================================================================
48  *
49  * This software consists of voluntary contributions made by many
50  * individuals on behalf of the Apache Software Foundation. For more
51  * information on the Apache Software Foundation, please see
52  * <http://www.apache.org/>.
53  */

54
55 package org.apache.jetspeed.services.cms.repository.slide;
56
57 //JDK
58
import java.lang.reflect.Constructor JavaDoc;
59 import java.util.Hashtable JavaDoc;
60 import java.util.Enumeration JavaDoc;
61 import java.util.Vector JavaDoc;
62 import java.util.List JavaDoc;
63 import java.util.Iterator JavaDoc;
64 import java.util.Date JavaDoc;
65
66 // Slide
67
import org.apache.slide.common.AbstractSimpleService;
68 import org.apache.slide.common.ServiceConnectionFailedException;
69 import org.apache.slide.common.ServiceDisconnectionFailedException;
70 import org.apache.slide.common.NamespaceAccessToken;
71 import org.apache.slide.common.ServiceInitializationFailedException;
72 import org.apache.slide.common.ServiceResetFailedException;
73 import org.apache.slide.common.ServiceAccessException;
74 import org.apache.slide.common.Uri;
75 import org.apache.slide.common.ServiceParameterErrorException;
76 import org.apache.slide.common.ServiceParameterMissingException;
77
78 import org.apache.slide.store.LockStore;
79 import org.apache.slide.store.NodeStore;
80 import org.apache.slide.store.RevisionDescriptorsStore;
81 import org.apache.slide.store.RevisionDescriptorStore;
82 import org.apache.slide.store.SecurityStore;
83
84 import org.apache.slide.structure.ObjectNode;
85 import org.apache.slide.structure.ObjectNotFoundException;
86 import org.apache.slide.structure.ObjectAlreadyExistsException;
87
88 import org.apache.slide.security.NodePermission;
89
90 import org.apache.slide.lock.NodeLock;
91 import org.apache.slide.lock.LockTokenNotFoundException;
92
93 import org.apache.slide.content.NodeRevisionDescriptors;
94 import org.apache.slide.content.NodeRevisionDescriptor;
95 import org.apache.slide.content.RevisionContentNotFoundException;
96 import org.apache.slide.content.RevisionDescriptorNotFoundException;
97 import org.apache.slide.content.NodeRevisionNumber;
98
99 import javax.transaction.xa.XAException JavaDoc;
100 import javax.transaction.xa.Xid JavaDoc;
101
102 // Turbine
103

104 import org.apache.torque.util.Criteria;
105 import org.apache.turbine.services.TurbineServices;
106 import org.apache.turbine.util.Log;
107
108
109 // Jetspeed
110
import org.apache.jetspeed.services.security.JetspeedSecurityService;
111 import org.apache.jetspeed.services.security.GroupManagement;
112 import org.apache.jetspeed.om.security.turbine.TurbineUserGroupRole;
113 import org.apache.jetspeed.om.security.turbine.TurbineUserGroupRolePeer;
114 import org.apache.jetspeed.om.security.turbine.TurbineUserPeer;
115 import org.apache.jetspeed.om.security.turbine.TurbineUser;
116 import org.apache.jetspeed.om.security.turbine.TurbineGroup;
117 import org.apache.jetspeed.om.security.turbine.TurbineGroupPeer;
118 import org.apache.jetspeed.om.security.Group;
119 import org.apache.jetspeed.om.security.JetspeedUser;
120
121
122 /**
123  * Jetspeed security compliant store implementation.
124  *
125  * This Slide store is using only to retrieve jetspeed user/group info.
126  * It is not used to update a jetspeed user/group. You have to use the Jetspeed application
127  * for doing that
128  *
129  * TODO :
130  * + This class has to be review. Check if it possible to be more "Turbine independent".
131  * Use in this store the new Jetspeed security stuff.
132  * + Check if the interface NodeStore is not sufficient.
133  *
134  * @author <a HREF="mailto:christophe.lombart@skynet.be">Christophe Lombart</a>
135  */

136 public class JetspeedSecurityDescriptorsStore
137     extends AbstractSimpleService
138     implements
139         LockStore,
140         NodeStore,
141         RevisionDescriptorsStore,
142         RevisionDescriptorStore,
143         SecurityStore
144 {
145
146     // Structure descriptors
147

148     protected static final int OBJECTS_URI = 1;
149     protected static final int OBJECTS_CLASS = 2;
150
151     protected static final int CHILDREN_URI = 1;
152     protected static final int CHILDREN_CHILDURI = 2;
153
154     protected static final int LINKS_LINK = 1;
155     protected static final int LINKS_LINKTO = 2;
156
157     // Security descriptors
158

159     protected static final int PERMISSIONS_OBJECT = 1;
160     protected static final int PERMISSIONS_REVISION_NUMBER = 2;
161     protected static final int PERMISSIONS_SUBJECT = 3;
162     protected static final int PERMISSIONS_ACTION = 4;
163     protected static final int PERMISSIONS_INHERITABLE = 5;
164     protected static final int PERMISSIONS_NEGATIVE = 6;
165
166     // Lock descriptors
167

168     protected static final int LOCKS_ID = 1;
169     protected static final int LOCKS_OBJECT = 2;
170     protected static final int LOCKS_SUBJECT = 3;
171     protected static final int LOCKS_TYPE = 4;
172     protected static final int LOCKS_EXPIRATIONDATE = 5;
173     protected static final int LOCKS_INHERITABLE = 6;
174     protected static final int LOCKS_EXCLUSIVE = 7;
175
176     // Content descriptors
177

178     protected static final int REVISIONS_URI = 1;
179     protected static final int REVISIONS_ISVERSIONED = 2;
180     protected static final int REVISIONS_INITIALREVISION = 3;
181
182     protected static final int WORKINGREVISION_URI = 1;
183     protected static final int WORKINGREVISION_BASEREVISION = 2;
184     protected static final int WORKINGREVISION_NUMBER = 3;
185
186     protected static final int LATESTREVISIONS_URI = 1;
187     protected static final int LATESTREVISIONS_BRANCHNAME = 2;
188     protected static final int LATESTREVISIONS_NUMBER = 3;
189
190     protected static final int BRANCHES_URI = 1;
191     protected static final int BRANCHES_NUMBER = 2;
192     protected static final int BRANCHES_CHILDNUMBER = 3;
193
194     protected static final int REVISION_URI = 1;
195     protected static final int REVISION_NUMBER = 2;
196     protected static final int REVISION_BRANCHNAME = 3;
197
198     protected static final int LABEL_URI = 1;
199     protected static final int LABEL_NUMBER = 2;
200     protected static final int LABEL_LABEL = 3;
201
202     protected static final int PROPERTY_URI = 1;
203     protected static final int PROPERTY_NUMBER = 2;
204     protected static final int PROPERTY_NAME = 3;
205     protected static final int PROPERTY_VALUE = 4;
206     protected static final int PROPERTY_NAMESPACE = 5;
207     protected static final int PROPERTY_TYPE = 6;
208     protected static final int PROPERTY_PROTECTED = 7;
209
210
211     // ----------------------------------------------- DescriptorsStore Methods
212

213     /**
214      * Retrieve an object.
215      *
216      * @param uri Uri of the object we want to retrieve
217      * @exception ServiceAccessException Error accessing the Service
218      * @exception ObjectNotFoundException The object to retrieve was not found
219      */

220     public ObjectNode retrieveObject(Uri uri)
221         throws ServiceAccessException, ObjectNotFoundException
222     {
223
224         ObjectNode result = null;
225
226         try
227         {
228             // Check if parent uri name = the turbine group uri root
229
if (uri.getParentUri()
230                    .toString()
231                    .equals(Utility.getGroupParentUri()))
232             {
233                 String JavaDoc groupName = uri.toString().substring(uri.toString().lastIndexOf('/') + 1);
234                 GroupManagement groupService = (GroupManagement)TurbineServices.getInstance()
235                                                     .getService("GroupManagement");
236
237                 Criteria criteria = new Criteria();
238                 criteria.addJoin(
239                     TurbineGroupPeer.GROUP_ID,
240                     TurbineUserGroupRolePeer.GROUP_ID);
241                 criteria.addJoin(
242                     TurbineUserGroupRolePeer.USER_ID,
243                     TurbineUserPeer.USER_ID);
244                 criteria.add(TurbineGroupPeer.GROUP_NAME, groupName);
245                 criteria.setDistinct();
246                 List JavaDoc users = TurbineUserPeer.doSelectUsers(criteria);
247
248                 if (Log.getLogger().isDebugEnabled())
249                 {
250                     Log.debug("TurbineDescriptorStore - Group size : " + users.size());
251                 }
252                 Vector JavaDoc childrenVector = new Vector JavaDoc();
253                 Vector JavaDoc linksVector = new Vector JavaDoc();
254
255                 // Get users from the UserGroupRole info
256
Iterator JavaDoc iterator = users.iterator();
257                 while (iterator.hasNext())
258                 {
259                     JetspeedUser user = (JetspeedUser)iterator.next();
260                     childrenVector.addElement(
261                         Utility.getUserParentUri() + "/" + user.getUserName());
262                 }
263
264                 Class JavaDoc objclass =
265                     Class.forName("org.apache.slide.structure.GroupNode");
266
267                 Class JavaDoc[] argClasses =
268                     {
269                         Class.forName("java.lang.String"),
270                         Class.forName("java.util.Vector"),
271                         Class.forName("java.util.Vector")
272                     };
273                 Object JavaDoc[] arguments =
274                     {
275                         uri.toString(),
276                         childrenVector,
277                         linksVector
278                     };
279
280                 Constructor JavaDoc constructor = objclass.getConstructor(argClasses);
281
282                 result = (ObjectNode)constructor.newInstance(arguments);
283
284             // Check if parent uri name = the jetspeed user uri root
285
}
286             else if (uri.getParentUri()
287                         .toString()
288                         .equals(Utility.getUserParentUri()))
289             {
290
291                 // Retrieve Jetspeed users
292
String JavaDoc userName =
293                     uri.toString().substring(
294                         uri.toString().lastIndexOf('/') + 1);
295
296                 JetspeedSecurityService service = (JetspeedSecurityService) TurbineServices.getInstance().
297                                          getService(JetspeedSecurityService.SERVICE_NAME);
298                 JetspeedUser user = service.getUser(userName);
299
300                 // Create and populate a Slide ObjectNode for this user
301
Vector JavaDoc childrenVector = new Vector JavaDoc();
302                 Vector JavaDoc linksVector = new Vector JavaDoc();
303
304                 Class JavaDoc objclass = Class.forName("slideroles.basic.UserRoleImpl");
305
306                 Class JavaDoc[] argClasses =
307                     {
308                         Class.forName("java.lang.String"),
309                         Class.forName("java.util.Vector"),
310                         Class.forName("java.util.Vector")
311                     };
312                 Object JavaDoc[] arguments =
313                     {
314                         uri.toString(),
315                         childrenVector,
316                         linksVector
317                     };
318                 Constructor JavaDoc constructor = objclass.getConstructor(argClasses);
319                 result = (ObjectNode)constructor.newInstance(arguments);
320             }
321             else
322             {
323                 //if (uri.toString().equals(Utility.getUserParentUri())) {
324
// Slide engine ask first information on uri like '/users/turbine/' or
325
// 'users/turbine/users' or '/users/turbine/groups'
326
Vector JavaDoc childrenVector = new Vector JavaDoc();
327                 Vector JavaDoc linksVector = new Vector JavaDoc();
328
329                 Class JavaDoc objclass = Class.forName("slideroles.basic.UserRoleImpl");
330
331                 Class JavaDoc[] argClasses =
332                     {
333                         Class.forName("java.lang.String"),
334                         Class.forName("java.util.Vector"),
335                         Class.forName("java.util.Vector")
336                     };
337                 Object JavaDoc[] arguments =
338                     {
339                         uri.toString(),
340                         childrenVector,
341                         linksVector
342                     };
343                 Constructor JavaDoc constructor = objclass.getConstructor(argClasses);
344                 result = (ObjectNode)constructor.newInstance(arguments);
345             }
346         }
347         catch (Exception JavaDoc e)
348         {
349             //Log.debug("TurbineDescriptorStore Exception - retrieveObject : " +
350
// e.getMessage());
351
e.printStackTrace();
352             throw new ObjectNotFoundException(uri);
353         }
354
355         return result;
356     }
357
358 /*********************************************************************************
359  *
360  * OTHER METHODE ARE NOT USED IN THIS STORE
361  *
362  */

363
364
365
366     // -------------------------------------------------------- Service Methods
367

368     /**
369      * Initializes the data source with a set of parameters.
370      *
371      * @param parameters Hashtable containing the parameters' name
372      * and associated value
373      * @exception ServiceParameterErrorException Incorrect service parameter
374      * @exception ServiceParameterMissingException Service parameter missing
375      */

376     /*
377        public void setParameters(Hashtable parameters)
378            throws ServiceParameterErrorException,
379            ServiceParameterMissingException {
380
381
382        }
383
384     */

385     /**
386      * Connects to JDBC and creates the basic table structure.
387      *
388      * @exception ServiceConnectionFailedException Connection to the
389      * database failed
390      */

391     public synchronized void connect() throws ServiceConnectionFailedException
392     {
393         if (Log.getLogger().isDebugEnabled())
394         {
395             Log.debug("TurbineDescriptorStore - connect");
396         }
397     }
398
399     /**
400      * Disconnects from data source.
401      *
402      * @exception ServiceDisconnectionFailedException Disconnection
403      * from database failed
404      */

405     public void disconnect() throws ServiceDisconnectionFailedException
406     {
407         if (Log.getLogger().isDebugEnabled())
408         {
409             Log.debug("TurbineDescriptorStore - disconnect");
410         }
411     }
412
413     /**
414      * Initializes data source.
415      * <p/>
416      * Occurs in four steps :
417      * <li>Driver class is loaded</li>
418      * <li>Driver is intantiated</li>
419      * <li>Driver registration in the driver manager</li>
420      * <li>Creation of the basic tables, if they didn't exist before</li>
421      *
422      * @exception ServiceInitializationFailedException Throws an exception
423      * if the data source has already been initialized before
424      */

425     public synchronized void initialize(NamespaceAccessToken token)
426         throws ServiceInitializationFailedException
427     {
428         if (Log.getLogger().isDebugEnabled())
429         {
430             Log.debug("TurbineDescriptorStore - initialize");
431         }
432     }
433
434     /**
435      * Deletes data source. Should remove stored data if possible.
436      *
437      * @exception ServiceResetFailedException Reset failed
438      */

439     public synchronized void reset() throws ServiceResetFailedException
440     {
441         if (Log.getLogger().isDebugEnabled())
442         {
443             Log.debug("TurbineDescriptorStore - reset");
444         }
445     }
446
447     /**
448      * This function tells whether or not the data source is connected.
449      *
450      * @return boolean true if we are connected
451      * @exception ServiceAccessException Error accessing DataSource
452      */

453     public boolean isConnected() throws ServiceAccessException
454     {
455         if (Log.getLogger().isDebugEnabled())
456         {
457             Log.debug("TurbineDescriptorStore - isConnected : true");
458         }
459
460         return true;
461     }
462
463     // ----------------------------------------------------- XAResource Methods
464

465     /**
466      * Commit the global transaction specified by xid.
467      */

468     public void commit(Xid JavaDoc xid, boolean onePhase) throws XAException JavaDoc
469     {
470         if (Log.getLogger().isDebugEnabled())
471         {
472             Log.debug("TurbineDescriptorStore - commit");
473         }
474
475         // No Turbine user info update by using this descriptor store
476
/*
477                 super.commit(xid, onePhase);
478                 try {
479                     // --------------- Commit the Turbine user info
480
481                     connection.commit();
482                     connection.setAutoCommit(true);
483
484
485                 } catch (SQLException e) {
486                     throw new XAException(XAException.XA_RBCOMMFAIL);
487                 }
488            */

489     }
490
491     /**
492      * Inform the resource manager to roll back work done on behalf of a
493      * transaction branch.
494      */

495     public void rollback(Xid JavaDoc xid) throws XAException JavaDoc
496     {
497         if (Log.getLogger().isDebugEnabled())
498         {
499             Log.debug("TurbineDescriptorStore - rollback");
500         }
501         // No Turbine user info update by using this descriptor store
502
/*
503                super.rollback(xid);
504                try {
505                    // --------------- Commit the Turbine user info
506                    /*
507                    connection.rollback();
508                    connection.setAutoCommit(true);
509
510
511                } catch (SQLException e) {
512
513                    throw new XAException(XAException.XA_HEURCOM);
514                }
515                */

516     }
517
518     /**
519      * Start work on behalf of a transaction branch specified in xid.
520      */

521     public void start(Xid JavaDoc xid, int flags) throws XAException JavaDoc
522     {
523         if (Log.getLogger().isDebugEnabled())
524         {
525             Log.debug("TurbineDescriptorStore - start");
526         }
527         // No Turbine user info update by using this descriptor store
528
/*
529                 System.out.println("JDBDescriptorStore.start()");
530                 super.start(xid, flags);
531                 try {
532                     connection.setAutoCommit(false);
533                 } catch (SQLException e) {
534                     System.out.println("JDBDescriptorStore.start() hummm begin");
535                     throw new XAException(XAException.XAER_RMERR);
536
537                 }
538         */

539     }
540
541     /**
542      * Update an object.
543      *
544      * @param object Object to update
545      * @exception ServiceAccessException Error accessing the Service
546      * @exception ObjectNotFoundException The object to update was not found
547      */

548     public void storeObject(Uri uri, ObjectNode object)
549         throws ServiceAccessException, ObjectNotFoundException
550     {
551         if (Log.getLogger().isDebugEnabled())
552         {
553             Log.debug("TurbineDescriptorStore - storeObject :" + uri);
554         }
555     }
556
557     /**
558      * Create a new object.
559      *
560      * @param object ObjectNode
561      * @param uri Uri of the object we want to create
562      * @exception ServiceAccessException Error accessing the Service
563      * @exception ObjectAlreadyExistsException An object already exists
564      * at this Uri
565      */

566     public void createObject(Uri uri, ObjectNode object)
567         throws ServiceAccessException, ObjectAlreadyExistsException
568     {
569         if (Log.getLogger().isDebugEnabled())
570         {
571             Log.debug("TurbineDescriptorStore - createObject :" + uri);
572         }
573     }
574
575     /**
576      * Remove an object.
577      *
578      * @param object Object to remove
579      * @exception ServiceAccessException Error accessing the Service
580      * @exception ObjectNotFoundException The object to remove was not found
581      */

582     public void removeObject(Uri uri, ObjectNode object)
583         throws ServiceAccessException, ObjectNotFoundException
584     {
585         if (Log.getLogger().isDebugEnabled())
586         {
587             Log.debug("TurbineDescriptorStore - removeObject");
588         }
589     }
590
591     /**
592      * Grant a new permission.
593      *
594      * @param permission Permission we want to create
595      * @exception ServiceAccessException Error accessing the Service
596      */

597     public void grantPermission(Uri uri, NodePermission permission)
598         throws ServiceAccessException
599     {
600         if (Log.getLogger().isDebugEnabled())
601         {
602             Log.debug("TurbineDescriptorStore - grantPermission");
603         }
604     }
605
606     /**
607      * Revoke a permission.
608      *
609      * @param permission Permission we want to create
610      * @exception ServiceAccessException Error accessing the Service
611      */

612     public void revokePermission(Uri uri, NodePermission permission)
613         throws ServiceAccessException
614     {
615         if (Log.getLogger().isDebugEnabled())
616         {
617             Log.debug("TurbineDescriptorStore - revokePermission");
618         }
619     }
620
621     /**
622      * Revoke all the permissions on an object.
623      *
624      * @param permission Permission we want to create
625      * @exception ServiceAccessException Error accessing the Service
626      */

627     public void revokePermissions(Uri uri) throws ServiceAccessException
628     {
629         if (Log.getLogger().isDebugEnabled())
630         {
631             Log.debug("TurbineDescriptorStore - revokePermission");
632         }
633     }
634
635     /**
636      * Enumerate permissions on an object.
637      *
638      * @param permission Permission we want to create
639      * @exception ServiceAccessException Error accessing the Service
640      */

641     public Enumeration JavaDoc enumeratePermissions(Uri uri)
642         throws ServiceAccessException
643     {
644         //Vector permissionVector = new Vector();
645
if (Log.getLogger().isDebugEnabled())
646         {
647             Log.debug("TurbineDescriptorStore - enumeratePermission : " + uri);
648         }
649         /*NodePermission permission =
650             new NodePermission(
651                 uri.toString(),
652                 null,
653                 "/users/turbine",
654                 "/actions/read",
655                 true,
656                 false);
657         permissionVector.addElement(permission);
658         return permissionVector.elements();
659         */

660         return null;
661     }
662
663     /**
664      * Create a new lock.
665      *
666      * @param lock Lock token
667      * @exception ServiceAccessException Service access error
668      */

669     public void putLock(Uri uri, NodeLock lock) throws ServiceAccessException
670     {
671         if (Log.getLogger().isDebugEnabled())
672         {
673             Log.debug("TurbineDescriptorStore - putLock");
674         }
675     }
676
677     /**
678      * Renew a lock.
679      *
680      * @param lock Token to renew
681      * @exception ServiceAccessException Service access error
682      * @exception LockTokenNotFoundException Lock token was not found
683      */

684     public void renewLock(Uri uri, NodeLock lock)
685         throws ServiceAccessException, LockTokenNotFoundException
686     {
687         if (Log.getLogger().isDebugEnabled())
688         {
689             Log.debug("TurbineDescriptorStore - renewLock");
690         }
691     }
692
693     /**
694      * Unlock.
695      *
696      * @param lock Token to remove
697      * @exception ServiceAccessException Service access error
698      * @exception LockTokenNotFoundException Lock token was not found
699      */

700     public void removeLock(Uri uri, NodeLock lock)
701         throws ServiceAccessException, LockTokenNotFoundException
702     {
703         if (Log.getLogger().isDebugEnabled())
704         {
705             Log.debug("TurbineDescriptorStore - removeLock");
706         }
707     }
708
709     /**
710      * Kill a lock.
711      *
712      * @param lock Token to remove
713      * @exception ServiceAccessException Service access error
714      * @exception LockTokenNotFoundException Lock token was not found
715      */

716     public void killLock(Uri uri, NodeLock lock)
717         throws ServiceAccessException, LockTokenNotFoundException
718     {
719         if (Log.getLogger().isDebugEnabled())
720         {
721             Log.debug("TurbineDescriptorStore - KillLock");
722         }
723     }
724
725     /**
726      * Enumerate locks on an object.
727      *
728      * @param subject Subject
729      * @return Enumeration List of locks which have been put on the subject
730      * @exception ServiceAccessException Service access error
731      */

732     public Enumeration JavaDoc enumerateLocks(Uri uri) throws ServiceAccessException
733     {
734         if (Log.getLogger().isDebugEnabled())
735         {
736             Log.debug("TurbineDescriptorStore - enumerateLocks : " + uri);
737         }
738
739         return new Vector JavaDoc().elements();
740     }
741
742     /**
743      * Retrieve the revisions informations of an object.
744      *
745      * @param uri Uri
746      * @exception ServiceAccessException Service access error
747      * @exception RevisionDescriptorNotFoundException Revision descriptor
748      * was not found
749      */

750     public NodeRevisionDescriptors retrieveRevisionDescriptors(Uri uri)
751         throws ServiceAccessException, RevisionDescriptorNotFoundException
752     {
753         if (Log.getLogger().isDebugEnabled())
754         {
755             Log.debug("TurbineDescriptorStore - retrieveRevisionDescriptor");
756         }
757
758         return null;
759     }
760
761     /**
762      * Create a new revision information object.
763      *
764      * @param uri Uri
765      * @param revisionDescriptors Node revision descriptors
766      * @exception ServiceAccessException Service access error
767      */

768     public void createRevisionDescriptors(
769         Uri uri,
770         NodeRevisionDescriptors revisionDescriptors)
771         throws ServiceAccessException
772     {
773         if (Log.getLogger().isDebugEnabled())
774         {
775             Log.debug("TurbineDescriptorStore - createRevisionDescriptors");
776         }
777     }
778
779     /**
780      * Update revision information.
781      *
782      * @param uri Uri
783      * @param revisionDescriptors Node revision descriptors
784      * @exception ServiceAccessException Service access error
785      * @exception RevisionDescriptorNotFoundException Revision descriptor
786      * was not found
787      */

788     public void storeRevisionDescriptors(
789         Uri uri,
790         NodeRevisionDescriptors revisionDescriptors)
791         throws ServiceAccessException, RevisionDescriptorNotFoundException
792     {
793         if (Log.getLogger().isDebugEnabled())
794         {
795             Log.debug("TurbineDescriptorStore - storeRevisionDescriptors");
796         }
797     }
798
799     /**
800      * Remove revision information.
801      *
802      * @param uri Uri
803      * @exception ServiceAccessException Service access error
804      */

805     public void removeRevisionDescriptors(Uri uri)
806         throws ServiceAccessException
807     {
808         if (Log.getLogger().isDebugEnabled())
809         {
810             Log.debug("TurbineDescriptorStore - removeRevisionDescriptors");
811         }
812     }
813
814     /**
815      * Retrieve an individual object's revision descriptor.
816      *
817      * @param Uri uri
818      * @param revisionNumber Node revision number
819      */

820     public NodeRevisionDescriptor retrieveRevisionDescriptor(
821         Uri uri,
822         NodeRevisionNumber revisionNumber)
823         throws ServiceAccessException, RevisionDescriptorNotFoundException
824     {
825         if (Log.getLogger().isDebugEnabled())
826         {
827             Log.debug("TurbineDescriptorStore - retrieveRevisionDescriptor");
828         }
829
830         return null;
831     }
832
833     /**
834      * Create a new revision descriptor.
835      *
836      * @param uri Uri
837      * @param revisionDescriptor Node revision descriptor
838      * @exception ServiceAccessException Service access error
839      */

840     public void createRevisionDescriptor(
841         Uri uri,
842         NodeRevisionDescriptor revisionDescriptor)
843         throws ServiceAccessException
844     {
845         if (Log.getLogger().isDebugEnabled())
846         {
847             Log.debug("TurbineDescriptorStore - createRevisionDescriptor");
848         }
849
850         return;
851     }
852
853     /**
854      * Update a revision descriptor.
855      *
856      * @param uri Uri
857      * @param revisionDescriptors Node revision descriptor
858      * @exception ServiceAccessException Service access error
859      * @exception RevisionDescriptorNotFoundException Revision descriptor
860      * was not found
861      */

862     public void storeRevisionDescriptor(
863         Uri uri,
864         NodeRevisionDescriptor revisionDescriptor)
865         throws ServiceAccessException, RevisionDescriptorNotFoundException
866     {
867         if (Log.getLogger().isDebugEnabled())
868         {
869             Log.debug("TurbineDescriptorStore - storeRevisionDescriptor");
870         }
871     }
872
873     /**
874      * Remove a revision descriptor.
875      *
876      * @param uri Uri
877      * @param revisionNumber Revision number
878      * @exception ServiceAccessException Service access error
879      */

880     public void removeRevisionDescriptor(Uri uri, NodeRevisionNumber number)
881         throws ServiceAccessException
882     {
883         if (Log.getLogger().isDebugEnabled())
884         {
885             Log.debug("TurbineDescriptorStore - removeRevisionDescriptor");
886         }
887     }
888
889     /**
890      * Initializes the data source with a set of parameters.
891      *
892      * @param parameters Hashtable containing the parameters' name
893      * and associated value
894      * @exception ServiceParameterErrorException Incorrect service parameter
895      * @exception ServiceParameterMissingException Service parameter missing
896      */

897     public void setParameters(Hashtable JavaDoc parameters)
898         throws ServiceParameterErrorException, ServiceParameterMissingException
899     {
900         if (Log.getLogger().isDebugEnabled())
901         {
902             Log.debug("TurbineDescriptorStore - setParamters");
903         }
904     }
905 }
906
Popular Tags