KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > infoglue > cms > security > InfoGlueJDBCAuthorizationModule


1 /* ===============================================================================
2  *
3  * Part of the InfoGlue Content Management Platform (www.infoglue.org)
4  *
5  * ===============================================================================
6  *
7  * Copyright (C)
8  *
9  * This program is free software; you can redistribute it and/or modify it under
10  * the terms of the GNU General Public License version 2, as published by the
11  * Free Software Foundation. See the file LICENSE.html for more information.
12  *
13  * This program is distributed in the hope that it will be useful, but WITHOUT
14  * ANY WARRANTY, including the implied warranty of MERCHANTABILITY or FITNESS
15  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along with
18  * this program; if not, write to the Free Software Foundation, Inc. / 59 Temple
19  * Place, Suite 330 / Boston, MA 02111-1307 / USA.
20  *
21  * ===============================================================================
22  */

23
24 package org.infoglue.cms.security;
25
26 import java.io.Serializable JavaDoc;
27 import java.sql.Connection JavaDoc;
28 import java.sql.Driver JavaDoc;
29 import java.sql.PreparedStatement JavaDoc;
30 import java.sql.ResultSet JavaDoc;
31 import java.sql.SQLException JavaDoc;
32 import java.util.ArrayList JavaDoc;
33 import java.util.Collection JavaDoc;
34 import java.util.Iterator JavaDoc;
35 import java.util.List JavaDoc;
36 import java.util.Properties JavaDoc;
37
38 import org.apache.log4j.Logger;
39 import org.exolab.castor.jdo.Database;
40 import org.infoglue.cms.controllers.kernel.impl.simple.BaseController;
41 import org.infoglue.cms.controllers.kernel.impl.simple.CastorDatabaseService;
42 import org.infoglue.cms.controllers.kernel.impl.simple.GroupController;
43 import org.infoglue.cms.controllers.kernel.impl.simple.RoleController;
44 import org.infoglue.cms.controllers.kernel.impl.simple.SystemUserController;
45 import org.infoglue.cms.entities.kernel.BaseEntityVO;
46 import org.infoglue.cms.entities.management.Group;
47 import org.infoglue.cms.entities.management.GroupVO;
48 import org.infoglue.cms.entities.management.Role;
49 import org.infoglue.cms.entities.management.RoleVO;
50 import org.infoglue.cms.entities.management.SystemUser;
51 import org.infoglue.cms.entities.management.SystemUserVO;
52 import org.infoglue.cms.exception.SystemException;
53 import org.infoglue.cms.util.CmsPropertyHandler;
54
55 /**
56  * @author Mattias Bogeblad
57  *
58  * This authentication module authenticates an user against the ordinary infoglue database.
59  */

60
61 public class InfoGlueJDBCAuthorizationModule extends BaseController implements AuthorizationModule, Serializable JavaDoc
62 {
63     private final static Logger logger = Logger.getLogger(InfoGlueJDBCAuthorizationModule.class.getName());
64
65     private Properties JavaDoc extraProperties = null;
66     private transient Database transactionObject = null;
67
68     protected String JavaDoc connectionName = null;
69     protected String JavaDoc connectionPassword = null;
70     protected String JavaDoc connectionURL = null;
71     protected Driver JavaDoc driver = null;
72     protected String JavaDoc driverName = null;
73
74     /**
75      * Gets is the implementing class can update as well as read
76      */

77     
78     public boolean getSupportUpdate()
79     {
80         return false;
81     }
82
83     /**
84      * Gets is the implementing class can delete as well as read
85      */

86     
87     public boolean getSupportDelete()
88     {
89         return false;
90     }
91     
92     /**
93      * Gets is the implementing class can create as well as read
94      */

95     
96     public boolean getSupportCreate()
97     {
98         return false;
99     }
100
101     /**
102      * Open (if necessary) and return a database connection for use by
103      * this class.
104      *
105      * @exception SQLException if a database error occurs
106      */

107     protected Connection JavaDoc getConnection() throws SQLException JavaDoc
108     {
109         if(connectionURL == null)
110             connectionURL = this.extraProperties.getProperty("jdbc.connectionURL");
111         
112         if(connectionName == null)
113             connectionName = this.extraProperties.getProperty("jdbc.connectionName");
114         
115         if(connectionPassword == null)
116             connectionPassword = this.extraProperties.getProperty("jdbc.connectionPassword");
117
118         if(driverName == null)
119             driverName = this.extraProperties.getProperty("jdbc.driverName");
120         
121         Connection JavaDoc conn = null;
122         
123         // Instantiate our database driver if necessary
124
if (driver == null)
125         {
126             try
127             {
128                 Class JavaDoc clazz = Class.forName(driverName);
129                 driver = (Driver JavaDoc) clazz.newInstance();
130             }
131             catch (Throwable JavaDoc e)
132             {
133                 throw new SQLException JavaDoc(e.getMessage());
134             }
135         }
136
137         // Open a new connection
138
Properties JavaDoc props = new Properties JavaDoc();
139         if (connectionName != null)
140             props.put("user", connectionName);
141         
142         if (connectionPassword != null)
143             props.put("password", connectionPassword);
144         
145         conn = driver.connect(connectionURL, props);
146         conn.setAutoCommit(false);
147         
148         return (conn);
149
150     }
151
152     /**
153      * Gets an authorized InfoGluePrincipal. If the user has logged in with the root-account
154      * we immediately return - otherwise we populate it.
155      */

156     
157     public InfoGluePrincipal getAuthorizedInfoGluePrincipal(String JavaDoc userName) throws Exception JavaDoc
158     {
159         logger.info("getAuthorizedInfoGluePrincipal with userName:" + userName);
160         
161         if(userName == null || userName.equals(""))
162         {
163             logger.warn("userName was null or empty - fix your templates:" + userName);
164             return null;
165         }
166         
167         InfoGluePrincipal infogluePrincipal = null;
168         
169         String JavaDoc administratorUserName = CmsPropertyHandler.getAdministratorUserName();
170         String JavaDoc administratorEmail = CmsPropertyHandler.getAdministratorEmail();
171         
172         final boolean isAdministrator = (userName != null && userName.equalsIgnoreCase(administratorUserName)) ? true : false;
173         if(isAdministrator)
174         {
175             infogluePrincipal = new InfoGluePrincipal(userName, "System", "Administrator", administratorEmail, new ArrayList JavaDoc(), new ArrayList JavaDoc(), isAdministrator, this);
176         }
177         else
178         {
179             List JavaDoc roles = new ArrayList JavaDoc();
180             List JavaDoc groups = new ArrayList JavaDoc();
181             
182             ResultSet JavaDoc rs = null;
183             Connection JavaDoc conn = null;
184             PreparedStatement JavaDoc ps = null;
185             
186             try
187             {
188                 String JavaDoc userFirstNameColumn = this.extraProperties.getProperty("jdbc.userFirstNameColumn");
189                 if(userFirstNameColumn == null || userFirstNameColumn.equals(""))
190                     userFirstNameColumn = "USER_FIRSTNAME";
191
192                 String JavaDoc userLastNameColumn = this.extraProperties.getProperty("jdbc.userLastNameColumn");
193                 if(userLastNameColumn == null || userLastNameColumn.equals(""))
194                     userLastNameColumn = "USER_LASTNAME";
195
196                 String JavaDoc userEmailColumn = this.extraProperties.getProperty("jdbc.userEmailColumn");
197                 if(userEmailColumn == null || userEmailColumn.equals(""))
198                     userEmailColumn = "USER_EMAIL";
199
200                 String JavaDoc roleNameColumn = this.extraProperties.getProperty("jdbc.roleNameColumn");
201                 if(roleNameColumn == null || roleNameColumn.equals(""))
202                     roleNameColumn = "ROLE_NAME";
203                 
204                 String JavaDoc roleDescriptionColumn = this.extraProperties.getProperty("jdbc.roleDescriptionColumn");
205                 if(roleDescriptionColumn == null || roleDescriptionColumn.equals(""))
206                     roleDescriptionColumn = "ROLE_DESCRIPTION";
207                 
208                 String JavaDoc sql = this.extraProperties.getProperty("jdbc.userRolesSQL");
209                 if(sql == null || sql.equals(""))
210                     sql = "SELECT * from USER, ROLE_USER, ROLE where ROLE_USER.USER = USER.ID AND ROLE_USER.ROLE = ROLE.ID AND USER.USER_NAME = ?";
211                 
212                 conn = getConnection();
213                 
214                 ps = conn.prepareStatement(sql);
215                 ps.setString(1, userName);
216                 
217                 rs = ps.executeQuery();
218                 while(rs.next())
219                 {
220                     logger.info("infoGluePrincipal:" + infogluePrincipal);
221                     if(infogluePrincipal != null)
222                     {
223                         String JavaDoc roleName = rs.getString(roleNameColumn);
224                         String JavaDoc description = rs.getString(roleDescriptionColumn);
225                     
226                         InfoGlueRole infoGlueRole = new InfoGlueRole(roleName, description, this);
227                         infogluePrincipal.getRoles().add(infoGlueRole);
228                         logger.info("Added role:" + infoGlueRole.getName());
229                     }
230                     else
231                     {
232                         String JavaDoc userFirstName = rs.getString(userFirstNameColumn);
233                         String JavaDoc userLastName = rs.getString(userLastNameColumn);
234                         String JavaDoc userEmail = rs.getString(userEmailColumn);
235
236                         if(userFirstName == null)
237                             userFirstName = userName;
238
239                         if(userLastName == null)
240                             userLastName = userName;
241
242                         if(userEmail == null)
243                             userEmail = userName;
244                         
245                         String JavaDoc roleName = rs.getString(roleNameColumn);
246                         String JavaDoc description = rs.getString(roleDescriptionColumn);
247
248                         InfoGlueRole infoGlueRole = new InfoGlueRole(roleName, description, this);
249                         
250                         infogluePrincipal = new InfoGluePrincipal(userName, userFirstName, userLastName, userEmail, new ArrayList JavaDoc(), groups, false, this);
251                         infogluePrincipal.getRoles().add(infoGlueRole);
252                                             
253                         logger.info("User read:" + infogluePrincipal.getName());
254                     }
255                     
256                 }
257
258             }
259             catch (Exception JavaDoc e)
260             {
261                 e.printStackTrace();
262                 logger.info("An error occurred trying to get jdbc user for " + userName + ":" + e);
263                 throw new SystemException(e.getMessage());
264             }
265             finally
266             {
267                 if (rs != null)
268                 {
269                     try
270                     {
271                         rs.close();
272                     }
273                     catch (SQLException JavaDoc e) {}
274                 }
275                 if (ps != null)
276                 {
277                     try
278                     {
279                         ps.close();
280                     }
281                     catch (SQLException JavaDoc e) {}
282                 }
283                 if (conn != null)
284                 {
285                     try
286                     {
287                         conn.close();
288                     }
289                     catch (Exception JavaDoc ex) {}
290                 }
291             }
292
293             logger.info("returning from getAuthorizedInfoGluePrincipal with userName:" + userName);
294         }
295
296         return infogluePrincipal;
297     }
298
299     /**
300      * Gets an authorized InfoGlueRole.
301      */

302     
303     public InfoGlueRole getAuthorizedInfoGlueRole(String JavaDoc roleName) throws Exception JavaDoc
304     {
305         InfoGlueRole infoglueRole = null;
306
307         ResultSet JavaDoc rs = null;
308         Connection JavaDoc conn = null;
309         PreparedStatement JavaDoc ps = null;
310         
311         try
312         {
313             String JavaDoc roleDescriptionColumn = this.extraProperties.getProperty("jdbc.roleDescriptionColumn");
314             if(roleDescriptionColumn == null || roleDescriptionColumn.equals(""))
315                 roleDescriptionColumn = "ROLE_DESCRIPTION";
316
317             String JavaDoc sql = this.extraProperties.getProperty("jdbc.roleSQL");
318             if(sql == null || sql.equals(""))
319                 sql = "SELECT * from ROLE where ROLE.ROLE_NAME = ?";
320
321             conn = getConnection();
322             
323             ps = conn.prepareStatement(sql);
324             ps.setString(1, roleName);
325             
326             rs = ps.executeQuery();
327             while(rs.next())
328             {
329                 String JavaDoc description = rs.getString(roleDescriptionColumn);
330                 
331                 infoglueRole = new InfoGlueRole(roleName, description, this);
332             }
333             
334             logger.info("Role created:" + infoglueRole.getName());
335         }
336         catch (Exception JavaDoc e)
337         {
338             logger.info("An error occurred trying to get jdbc user for " + roleName + ":" + e);
339             throw new SystemException(e.getMessage());
340         }
341         finally
342         {
343             if (rs != null)
344             {
345                 try
346                 {
347                     rs.close();
348                 }
349                 catch (SQLException JavaDoc e) {}
350             }
351             if (ps != null)
352             {
353                 try
354                 {
355                     ps.close();
356                 }
357                 catch (SQLException JavaDoc e) {}
358             }
359             if (conn != null)
360             {
361                 try
362                 {
363                     conn.close();
364                 }
365                 catch (Exception JavaDoc ex) {}
366             }
367         }
368                 
369         return infoglueRole;
370     }
371
372     /**
373      * Gets an authorized InfoGlueGroup.
374      */

375     
376     public InfoGlueGroup getAuthorizedInfoGlueGroup(String JavaDoc groupName) throws Exception JavaDoc
377     {
378         InfoGlueGroup infoglueGroup = null;
379                 
380         return infoglueGroup;
381     }
382
383     
384     /**
385      * This method gets a users roles
386      */

387     
388     public List JavaDoc authorizeUser(String JavaDoc userName) throws Exception JavaDoc
389     {
390         List JavaDoc roles = new ArrayList JavaDoc();
391         List JavaDoc groups = new ArrayList JavaDoc();
392         
393         String JavaDoc administratorUserName = CmsPropertyHandler.getAdministratorUserName();
394         
395         boolean isAdministrator = userName.equalsIgnoreCase(administratorUserName) ? true : false;
396         if(isAdministrator)
397             return roles;
398         
399         if(transactionObject == null)
400         {
401             List JavaDoc roleVOList = RoleController.getController().getRoleVOList(userName);
402             Iterator JavaDoc roleVOListIterator = roleVOList.iterator();
403             while(roleVOListIterator.hasNext())
404             {
405                 RoleVO roleVO = (RoleVO)roleVOListIterator.next();
406                 InfoGlueRole infoGlueRole = new InfoGlueRole(roleVO.getRoleName(), roleVO.getDescription(), this);
407                 roles.add(infoGlueRole);
408             }
409     
410             List JavaDoc groupVOList = GroupController.getController().getGroupVOList(userName);
411             Iterator JavaDoc groupVOListIterator = groupVOList.iterator();
412             while(groupVOListIterator.hasNext())
413             {
414                 GroupVO groupVO = (GroupVO)groupVOListIterator.next();
415                 InfoGlueGroup infoGlueGroup = new InfoGlueGroup(groupVO.getGroupName(), groupVO.getDescription(), this);
416                 groups.add(infoGlueGroup);
417             }
418         }
419         else
420         {
421             Collection JavaDoc roleList = RoleController.getController().getRoleList(userName, transactionObject);
422             Iterator JavaDoc roleListIterator = roleList.iterator();
423             while(roleListIterator.hasNext())
424             {
425                 Role role = (Role)roleListIterator.next();
426                 InfoGlueRole infoGlueRole = new InfoGlueRole(role.getRoleName(), role.getDescription(), this);
427                 roles.add(infoGlueRole);
428             }
429     
430             Collection JavaDoc groupList = GroupController.getController().getGroupList(userName, transactionObject);
431             Iterator JavaDoc groupListIterator = groupList.iterator();
432             while(groupListIterator.hasNext())
433             {
434                 Group group = (Group)groupListIterator.next();
435                 InfoGlueGroup infoGlueGroup = new InfoGlueGroup(group.getGroupName(), group.getDescription(), this);
436                 groups.add(infoGlueGroup);
437             }
438         }
439         
440         return groups;
441     }
442
443     /**
444      * This method gets a list of roles
445      */

446     
447     public List JavaDoc getRoles() throws Exception JavaDoc
448     {
449         List JavaDoc roles = new ArrayList JavaDoc();
450         
451         ResultSet JavaDoc rs = null;
452         Connection JavaDoc conn = null;
453         PreparedStatement JavaDoc ps = null;
454         
455         try
456         {
457             String JavaDoc roleNameColumn = this.extraProperties.getProperty("jdbc.roleNameColumn");
458             if(roleNameColumn == null || roleNameColumn.equals(""))
459                 roleNameColumn = "ROLE_NAME";
460
461             String JavaDoc roleDescriptionColumn = this.extraProperties.getProperty("jdbc.roleDescriptionColumn");
462             if(roleDescriptionColumn == null || roleDescriptionColumn.equals(""))
463                 roleDescriptionColumn = "ROLE_DESCRIPTION";
464
465             String JavaDoc sql = this.extraProperties.getProperty("jdbc.rolesSQL");
466             if(sql == null || sql.equals(""))
467                 sql = "SELECT * from ROLE ORDER BY ROLE_NAME";
468
469             conn = getConnection();
470             
471             ps = conn.prepareStatement(sql);
472             
473             rs = ps.executeQuery();
474             while(rs.next())
475             {
476                 String JavaDoc roleName = rs.getString(roleNameColumn);
477                 String JavaDoc description = rs.getString(roleDescriptionColumn);
478                 
479                 InfoGlueRole infoGlueRole = new InfoGlueRole(roleName, description, this);
480                 roles.add(infoGlueRole);
481                 
482                 logger.info("Role created:" + infoGlueRole.getName());
483             }
484         }
485         catch (Exception JavaDoc e)
486         {
487             logger.info("An error occurred trying to get all roles:" + e);
488             throw new SystemException(e.getMessage());
489         }
490         finally
491         {
492             if (rs != null)
493             {
494                 try
495                 {
496                     rs.close();
497                 }
498                 catch (SQLException JavaDoc e) {}
499             }
500             if (ps != null)
501             {
502                 try
503                 {
504                     ps.close();
505                 }
506                 catch (SQLException JavaDoc e) {}
507             }
508             if (conn != null)
509             {
510                 try
511                 {
512                     conn.close();
513                 }
514                 catch (Exception JavaDoc ex) {}
515             }
516         }
517         
518         return roles;
519     }
520
521     public List JavaDoc getGroups() throws Exception JavaDoc
522     {
523         List JavaDoc groups = new ArrayList JavaDoc();
524                     
525         return groups;
526     }
527
528     
529     /**
530      * This method gets a list of users
531      */

532     
533     public List JavaDoc getUsers() throws Exception JavaDoc
534     {
535         List JavaDoc users = new ArrayList JavaDoc();
536         
537         ResultSet JavaDoc rs = null;
538         Connection JavaDoc conn = null;
539         PreparedStatement JavaDoc ps = null;
540         
541         try
542         {
543             String JavaDoc userNameColumn = this.extraProperties.getProperty("jdbc.userNameColumn");
544             if(userNameColumn == null || userNameColumn.equals(""))
545                 userNameColumn = "USER_NAME";
546
547             String JavaDoc userFirstNameColumn = this.extraProperties.getProperty("jdbc.userFirstNameColumn");
548             if(userFirstNameColumn == null || userFirstNameColumn.equals(""))
549                 userFirstNameColumn = "USER_FIRSTNAME";
550
551             String JavaDoc userLastNameColumn = this.extraProperties.getProperty("jdbc.userLastNameColumn");
552             if(userLastNameColumn == null || userLastNameColumn.equals(""))
553                 userLastNameColumn = "USER_LASTNAME";
554
555             String JavaDoc userEmailColumn = this.extraProperties.getProperty("jdbc.userEmailColumn");
556             if(userEmailColumn == null || userEmailColumn.equals(""))
557                 userEmailColumn = "USER_EMAIL";
558
559             String JavaDoc roleNameColumn = this.extraProperties.getProperty("jdbc.roleNameColumn");
560             if(roleNameColumn == null || roleNameColumn.equals(""))
561                 roleNameColumn = "ROLE_NAME";
562
563             String JavaDoc roleDescriptionColumn = this.extraProperties.getProperty("jdbc.roleDescriptionColumn");
564             if(roleDescriptionColumn == null || roleDescriptionColumn.equals(""))
565                 roleDescriptionColumn = "ROLE_DESCRIPTION";
566
567             String JavaDoc sql = this.extraProperties.getProperty("jdbc.usersRolesSQL");
568             if(sql == null || sql.equals(""))
569                 sql = "SELECT * from USER, ROLE_USER, ROLE where ROLE_USER.USER = USER.ID AND ROLE_USER.ROLE = ROLE.ID ORDER BY USER.USER_NAME";
570
571             conn = getConnection();
572             
573             ps = conn.prepareStatement(sql);
574             
575             String JavaDoc oldUserName = "";
576             
577             List JavaDoc roles = new ArrayList JavaDoc();
578             List JavaDoc groups = new ArrayList JavaDoc();
579             
580             String JavaDoc userFirstName = null;
581             String JavaDoc userLastName = null;
582             String JavaDoc userEmail = null;
583
584             InfoGluePrincipal infoGluePrincipal = null;
585             
586             rs = ps.executeQuery();
587             while(rs.next())
588             {
589                 String JavaDoc userName = rs.getString(userNameColumn);
590
591                 logger.info("userName:" + userName);
592                 logger.info("oldUserName:" + oldUserName);
593                 if(userName.equals(oldUserName))
594                 {
595                     String JavaDoc roleName = rs.getString(roleNameColumn);
596                     String JavaDoc description = rs.getString(roleDescriptionColumn);
597                 
598                     InfoGlueRole infoGlueRole = new InfoGlueRole(roleName, description, this);
599                     infoGluePrincipal.getRoles().add(infoGlueRole);
600                 }
601                 else
602                 {
603                     userFirstName = rs.getString(userFirstNameColumn);
604                     userLastName = rs.getString(userLastNameColumn);
605                     userEmail = rs.getString(userEmailColumn);
606
607                     //if(oldUserName == null)
608
// oldUserName = userName;
609

610                     if(userFirstName == null)
611                         userFirstName = userName;
612
613                     if(userLastName == null)
614                         userLastName = userName;
615
616                     if(userEmail == null)
617                         userEmail = userName;
618                     
619                     String JavaDoc roleName = rs.getString(roleNameColumn);
620                     String JavaDoc description = rs.getString(roleDescriptionColumn);
621
622                     InfoGlueRole infoGlueRole = new InfoGlueRole(roleName, description, this);
623                     
624                     infoGluePrincipal = new InfoGluePrincipal(userName, userFirstName, userLastName, userEmail, new ArrayList JavaDoc(), groups, false, this);
625                     infoGluePrincipal.getRoles().add(infoGlueRole);
626                     users.add(infoGluePrincipal);
627                                         
628                     logger.info("User read:" + infoGluePrincipal.getName());
629                 }
630                 
631                 oldUserName = userName;
632             }
633
634         }
635         catch (Exception JavaDoc e)
636         {
637             logger.info("An error occurred trying to get all roles:" + e);
638             throw new SystemException(e.getMessage());
639         }
640         finally
641         {
642             if (rs != null)
643             {
644                 try
645                 {
646                     rs.close();
647                 }
648                 catch (SQLException JavaDoc e) {}
649             }
650             if (ps != null)
651             {
652                 try
653                 {
654                     ps.close();
655                 }
656                 catch (SQLException JavaDoc e) {}
657             }
658             if (conn != null)
659             {
660                 try
661                 {
662                     conn.close();
663                 }
664                 catch (Exception JavaDoc ex) {}
665             }
666         }
667         
668         return users;
669     }
670
671     public List JavaDoc getFilteredUsers(String JavaDoc firstName, String JavaDoc lastName, String JavaDoc userName, String JavaDoc email, String JavaDoc[] roleIds) throws Exception JavaDoc
672     {
673         return getUsers();
674     }
675     
676     public List JavaDoc getUsers(String JavaDoc roleName) throws Exception JavaDoc
677     {
678         return getRoleUsers(roleName);
679     }
680
681     public List JavaDoc getRoleUsers(String JavaDoc roleName) throws Exception JavaDoc
682     {
683         logger.info("roleName:" + roleName);
684         List JavaDoc users = new ArrayList JavaDoc();
685                 
686         return users;
687     }
688
689     public List JavaDoc getGroupUsers(String JavaDoc groupName) throws Exception JavaDoc
690     {
691         logger.info("groupName:" + groupName);
692         List JavaDoc users = new ArrayList JavaDoc();
693         
694         return users;
695     }
696
697     public void createInfoGluePrincipal(SystemUserVO systemUserVO) throws Exception JavaDoc
698     {
699         throw new SystemException("The JDBC BASIC Authorization module does not support creation of users yet...");
700     }
701
702     public void updateInfoGluePrincipal(SystemUserVO systemUserVO, String JavaDoc[] roleNames) throws Exception JavaDoc
703     {
704         throw new SystemException("The JDBC BASIC Authorization module does not support updating of users yet...");
705     }
706
707     public void updateInfoGluePrincipalPassword(String JavaDoc userName) throws Exception JavaDoc
708     {
709         throw new SystemException("The JDBC BASIC Authorization module does not support updates of users yet...");
710     }
711
712     public void updateInfoGluePrincipalPassword(String JavaDoc userName, String JavaDoc oldPassword, String JavaDoc newPassword) throws Exception JavaDoc
713     {
714         throw new SystemException("The JDBC BASIC Authorization module does not support updates of user password yet...");
715     }
716     
717     public void deleteInfoGluePrincipal(String JavaDoc userName) throws Exception JavaDoc
718     {
719         throw new SystemException("The JDBC BASIC Authorization module does not support deletion of users yet...");
720     }
721     
722     public void createInfoGlueRole(RoleVO roleVO) throws Exception JavaDoc
723     {
724         throw new SystemException("The JDBC BASIC Authorization module does not support creation of users yet...");
725     }
726
727     public void updateInfoGlueRole(RoleVO roleVO, String JavaDoc[] userNames) throws Exception JavaDoc
728     {
729         throw new SystemException("The JDBC BASIC Authorization module does not support updates of users yet...");
730     }
731
732     public void deleteInfoGlueRole(String JavaDoc roleName) throws Exception JavaDoc
733     {
734         throw new SystemException("The JDBC BASIC Authorization module does not support deletion of roles yet...");
735     }
736
737     public void updateInfoGluePrincipal(SystemUserVO systemUserVO, String JavaDoc[] roleNames, String JavaDoc[] groupNames) throws Exception JavaDoc
738     {
739         throw new SystemException("The JDBC BASIC Authorization module does not support deletion of roles yet...");
740     }
741
742     public void createInfoGlueGroup(GroupVO groupVO) throws Exception JavaDoc
743     {
744         throw new SystemException("The JDBC BASIC Authorization module does not support deletion of roles yet...");
745     }
746
747     public void updateInfoGlueGroup(GroupVO roleVO, String JavaDoc[] userNames) throws Exception JavaDoc
748     {
749         throw new SystemException("The JDBC BASIC Authorization module does not support deletion of roles yet...");
750     }
751
752     public void deleteInfoGlueGroup(String JavaDoc groupName) throws Exception JavaDoc
753     {
754         throw new SystemException("The JDBC BASIC Authorization module does not support deletion of roles yet...");
755     }
756
757     public Properties JavaDoc getExtraProperties()
758     {
759         return extraProperties;
760     }
761
762     public void setExtraProperties(Properties JavaDoc extraProperties)
763     {
764         this.extraProperties = extraProperties;
765     }
766     
767     public Object JavaDoc getTransactionObject()
768     {
769         return this.transactionObject;
770     }
771
772     public void setTransactionObject(Object JavaDoc transactionObject)
773     {
774         this.transactionObject = (Database)transactionObject;
775     }
776
777     public BaseEntityVO getNewVO()
778     {
779         return null;
780     }
781
782
783 }
784
Popular Tags