tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/users MemoryGroup.java MemoryRole.java MemoryUser.java MemoryUserDatabase.java
Date Sun, 10 Feb 2002 03:20:17 GMT
craigmcc    02/02/09 19:20:17

  Modified:    catalina/src/share/org/apache/catalina/mbeans
                        MemoryUserDatabaseMBean.java mbeans-descriptors.xml
               catalina/src/share/org/apache/catalina/users
                        MemoryGroup.java MemoryRole.java MemoryUser.java
                        MemoryUserDatabase.java
  Log:
  Synch up the server-side changes required by the new admin functionality.
  
  Revision  Changes    Path
  1.4       +10 -9     jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MemoryUserDatabaseMBean.java
  
  Index: MemoryUserDatabaseMBean.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MemoryUserDatabaseMBean.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MemoryUserDatabaseMBean.java	3 Feb 2002 00:56:57 -0000	1.3
  +++ MemoryUserDatabaseMBean.java	10 Feb 2002 03:20:17 -0000	1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MemoryUserDatabaseMBean.java,v
1.3 2002/02/03 00:56:57 craigmcc Exp $
  - * $Revision: 1.3 $
  - * $Date: 2002/02/03 00:56:57 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MemoryUserDatabaseMBean.java,v
1.4 2002/02/10 03:20:17 craigmcc Exp $
  + * $Revision: 1.4 $
  + * $Date: 2002/02/10 03:20:17 $
    *
    * ====================================================================
    *
  @@ -85,7 +85,7 @@
    * <code>org.apache.catalina.users.MemoryUserDatabase</code> component.</p>
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.3 $ $Date: 2002/02/03 00:56:57 $
  + * @version $Revision: 1.4 $ $Date: 2002/02/10 03:20:17 $
    */
   
   public class MemoryUserDatabaseMBean extends BaseModelMBean {
  @@ -216,13 +216,12 @@
        *
        * @param groupname Group name of the new group
        * @param description Description of the new group
  -     * @param roles Roles list for the new group
        */
  -    public String createGroup(String groupname, String description,
  -                              String roles[]) {
  +    public String createGroup(String groupname, String description) {
   
           UserDatabase database = (UserDatabase) this.resource;
           Group group = database.createGroup(groupname, description);
  +        /*
           if (roles != null) {
               for (int i = 0; i < roles.length; i++) {
                   Role role = database.findRole(roles[i]);
  @@ -233,6 +232,7 @@
                   group.addRole(role);
               }
           }
  +        */
           try {
               MBeanUtils.createMBean(group);
           } catch (Exception e) {
  @@ -271,13 +271,13 @@
        * @param username User name of the new user
        * @param password Password for the new user
        * @param fullName Full name for the new user
  -     * @param roles Roles list for the new user
        */
       public String createUser(String username, String password,
  -                             String fullName, String roles[]) {
  +                             String fullName) {
   
           UserDatabase database = (UserDatabase) this.resource;
           User user = database.createUser(username, password, fullName);
  +        /*
           if (roles != null) {
               for (int i = 0; i < roles.length; i++) {
                   Role role = database.findRole(roles[i]);
  @@ -288,6 +288,7 @@
                   user.addRole(role);
               }
           }
  +        */
           try {
               MBeanUtils.createMBean(user);
           } catch (Exception e) {
  
  
  
  1.27      +2 -8      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml
  
  Index: mbeans-descriptors.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- mbeans-descriptors.xml	3 Feb 2002 00:56:57 -0000	1.26
  +++ mbeans-descriptors.xml	10 Feb 2002 03:20:17 -0000	1.27
  @@ -6,7 +6,7 @@
   <!--
        Descriptions of JMX MBeans for Catalina
   
  -     $Id: mbeans-descriptors.xml,v 1.26 2002/02/03 00:56:57 craigmcc Exp $
  +     $Id: mbeans-descriptors.xml,v 1.27 2002/02/10 03:20:17 craigmcc Exp $
    -->
   
   <mbeans-descriptors>
  @@ -700,9 +700,6 @@
         <parameter name="description"
             description="Description of the new group"
                    type="java.lang.String"/>
  -      <parameter name="roles"
  -          description="Roles list for the new group"
  -                 type="java.lang.String[]"/>
       </operation>
   
       <operation   name="createRole"
  @@ -722,7 +719,7 @@
                  impact="ACTION"
              returnType="java.lang.String">
         <parameter name="username"
  -          description="User name of the new group"
  +          description="User name of the new user"
                    type="java.lang.String"/>
         <parameter name="password"
             description="Password of the new user"
  @@ -730,9 +727,6 @@
         <parameter name="fullName"
             description="Full name of the new user"
                    type="java.lang.String"/>
  -      <parameter name="roles"
  -          description="Roles list for the new user"
  -                 type="java.lang.String[]"/>
       </operation>
   
       <operation   name="findGroup"
  
  
  
  1.4       +10 -10    jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/users/MemoryGroup.java
  
  Index: MemoryGroup.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/users/MemoryGroup.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MemoryGroup.java	3 Feb 2002 00:56:58 -0000	1.3
  +++ MemoryGroup.java	10 Feb 2002 03:20:17 -0000	1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/users/MemoryGroup.java,v
1.3 2002/02/03 00:56:58 craigmcc Exp $
  - * $Revision: 1.3 $
  - * $Date: 2002/02/03 00:56:58 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/users/MemoryGroup.java,v
1.4 2002/02/10 03:20:17 craigmcc Exp $
  + * $Revision: 1.4 $
  + * $Date: 2002/02/10 03:20:17 $
    *
    * ====================================================================
    * The Apache Software License, Version 1.1
  @@ -77,7 +77,7 @@
    * {@link MemoryUserDatabase} implementation of {@link UserDatabase}.</p>
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.3 $ $Date: 2002/02/03 00:56:58 $
  + * @version $Revision: 1.4 $ $Date: 2002/02/10 03:20:17 $
    * @since 4.1
    */
   
  @@ -216,17 +216,17 @@
        */
       public String toString() {
   
  -        StringBuffer sb = new StringBuffer("<group groupname='");
  +        StringBuffer sb = new StringBuffer("<group groupname=\"");
           sb.append(groupname);
  -        sb.append("'");
  +        sb.append("\"");
           if (description != null) {
  -            sb.append(" description='");
  +            sb.append(" description=\"");
               sb.append(description);
  -            sb.append("'");
  +            sb.append("\"");
           }
           synchronized (roles) {
               if (roles.size() > 0) {
  -                sb.append(" roles='");
  +                sb.append(" roles=\"");
                   int n = 0;
                   Iterator values = roles.iterator();
                   while (values.hasNext()) {
  @@ -236,7 +236,7 @@
                       n++;
                       sb.append((String) ((Role) values.next()).getRolename());
                   }
  -                sb.append("'");
  +                sb.append("\"");
               }
           }
           sb.append("/>");
  
  
  
  1.2       +8 -8      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/users/MemoryRole.java
  
  Index: MemoryRole.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/users/MemoryRole.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MemoryRole.java	3 Feb 2002 00:56:58 -0000	1.1
  +++ MemoryRole.java	10 Feb 2002 03:20:17 -0000	1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/users/MemoryRole.java,v
1.1 2002/02/03 00:56:58 craigmcc Exp $
  - * $Revision: 1.1 $
  - * $Date: 2002/02/03 00:56:58 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/users/MemoryRole.java,v
1.2 2002/02/10 03:20:17 craigmcc Exp $
  + * $Revision: 1.2 $
  + * $Date: 2002/02/10 03:20:17 $
    *
    * ====================================================================
    * The Apache Software License, Version 1.1
  @@ -77,7 +77,7 @@
    * {@link MemoryUserDatabase} implementation of {@link UserDatabase}.</p>
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.1 $ $Date: 2002/02/03 00:56:58 $
  + * @version $Revision: 1.2 $ $Date: 2002/02/10 03:20:17 $
    * @since 4.1
    */
   
  @@ -136,13 +136,13 @@
        */
       public String toString() {
   
  -        StringBuffer sb = new StringBuffer("<role rolename='");
  +        StringBuffer sb = new StringBuffer("<role rolename=\"");
           sb.append(rolename);
  -        sb.append("'");
  +        sb.append("\"");
           if (description != null) {
  -            sb.append(" description='");
  +            sb.append(" description=\"");
               sb.append(description);
  -            sb.append("'");
  +            sb.append("\"");
           }
           sb.append("/>");
           return (sb.toString());
  
  
  
  1.4       +13 -13    jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/users/MemoryUser.java
  
  Index: MemoryUser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/users/MemoryUser.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MemoryUser.java	3 Feb 2002 00:56:58 -0000	1.3
  +++ MemoryUser.java	10 Feb 2002 03:20:17 -0000	1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/users/MemoryUser.java,v
1.3 2002/02/03 00:56:58 craigmcc Exp $
  - * $Revision: 1.3 $
  - * $Date: 2002/02/03 00:56:58 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/users/MemoryUser.java,v
1.4 2002/02/10 03:20:17 craigmcc Exp $
  + * $Revision: 1.4 $
  + * $Date: 2002/02/10 03:20:17 $
    *
    * ====================================================================
    * The Apache Software License, Version 1.1
  @@ -77,7 +77,7 @@
    * {@link MemoryUserDatabase} implementation of {@link UserDatabase}.</p>
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.3 $ $Date: 2002/02/03 00:56:58 $
  + * @version $Revision: 1.4 $ $Date: 2002/02/10 03:20:17 $
    * @since 4.1
    */
   
  @@ -269,19 +269,19 @@
        */
       public String toString() {
   
  -        StringBuffer sb = new StringBuffer("<user username='");
  +        StringBuffer sb = new StringBuffer("<user username=\"");
           sb.append(username);
  -        sb.append("' password='");
  +        sb.append("\" password=\"");
           sb.append(password);
  -        sb.append("'");
  +        sb.append("\"");
           if (fullName != null) {
  -            sb.append(" fullname='");
  +            sb.append(" fullName=\"");
               sb.append(fullName);
  -            sb.append("'");
  +            sb.append("\"");
           }
           synchronized (groups) {
               if (groups.size() > 0) {
  -                sb.append(" groups='");
  +                sb.append(" groups=\"");
                   int n = 0;
                   Iterator values = groups.iterator();
                   while (values.hasNext()) {
  @@ -291,12 +291,12 @@
                       n++;
                       sb.append(((Group) values.next()).getGroupname());
                   }
  -                sb.append("'");
  +                sb.append("\"");
               }
           }
           synchronized (roles) {
               if (roles.size() > 0) {
  -                sb.append(" roles='");
  +                sb.append(" roles=\"");
                   int n = 0;
                   Iterator values = roles.iterator();
                   while (values.hasNext()) {
  @@ -306,7 +306,7 @@
                       n++;
                       sb.append(((Role) values.next()).getRolename());
                   }
  -                sb.append("'");
  +                sb.append("\"");
               }
           }
           sb.append("/>");
  
  
  
  1.6       +8 -5      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/users/MemoryUserDatabase.java
  
  Index: MemoryUserDatabase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/users/MemoryUserDatabase.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- MemoryUserDatabase.java	3 Feb 2002 00:56:58 -0000	1.5
  +++ MemoryUserDatabase.java	10 Feb 2002 03:20:17 -0000	1.6
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/users/MemoryUserDatabase.java,v
1.5 2002/02/03 00:56:58 craigmcc Exp $
  - * $Revision: 1.5 $
  - * $Date: 2002/02/03 00:56:58 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/users/MemoryUserDatabase.java,v
1.6 2002/02/10 03:20:17 craigmcc Exp $
  + * $Revision: 1.6 $
  + * $Date: 2002/02/10 03:20:17 $
    *
    * ====================================================================
    * The Apache Software License, Version 1.1
  @@ -88,7 +88,7 @@
    * and uses a specified XML file for its persistent storage.</p>
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.5 $ $Date: 2002/02/03 00:56:58 $
  + * @version $Revision: 1.6 $ $Date: 2002/02/10 03:20:17 $
    * @since 4.1
    */
   
  @@ -726,7 +726,10 @@
               username = attributes.getValue("name");
           }
           String password = attributes.getValue("password");
  -        String fullName = attributes.getValue("fullname");
  +        String fullName = attributes.getValue("fullName");
  +        if (fullName == null) {
  +            fullName = attributes.getValue("fullname");
  +        }
           String groups = attributes.getValue("groups");
           String roles = attributes.getValue("roles");
           User user = database.createUser(username, password, fullName);
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message