taylor      2002/06/20 16:58:17

  Modified:    build/torque/schema Tag: security_14 dbpsml-schema.xml
                        security-schema.xml
               src/java/org/apache/jetspeed/services/psmlmanager/db Tag:
                        security_14 DatabasePsmlManagerService.java
               webapp/WEB-INF/conf Tag: security_14
                        JetspeedSecurity.properties
  Removed:     src/java/org/apache/jetspeed/om/dbpsml Tag: security_14
                        BaseJetspeedAnonProfile.java
                        BaseJetspeedAnonProfilePeer.java
                        JetspeedAnonProfile.java
                        JetspeedAnonProfilePeer.java
  Log:
  Removed Anonymous tables from DB PSML. Treat anon user as any other user
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.3.2.1   +0 -19     jakarta-jetspeed/build/torque/schema/dbpsml-schema.xml
  
  Index: dbpsml-schema.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/build/torque/schema/dbpsml-schema.xml,v
  retrieving revision 1.3
  retrieving revision 1.3.2.1
  diff -u -r1.3 -r1.3.2.1
  --- dbpsml-schema.xml 5 Apr 2002 23:03:27 -0000       1.3
  +++ dbpsml-schema.xml 20 Jun 2002 23:58:17 -0000      1.3.2.1
  @@ -77,24 +77,5 @@
   
     </table>
   
  -  <table name="JETSPEED_ANON_PROFILE" idMethod="idbroker" >
  -    
  -    <column name="PSML_ID" required="true" primaryKey="true" 
  -            autoIncrement="true" type="INTEGER"/>
  -    <column name="MEDIA_TYPE" size="99" type="VARCHAR"/>
  -    <column name="LANGUAGE" size="2" type="VARCHAR"/>
  -    <column name="COUNTRY" size="2" type="VARCHAR"/>
  -    <column name="PAGE" size="99" type="VARCHAR"/>
  -    <column name="PROFILE" type="VARBINARY"/>
  -
  -    <unique name="JETSPEED_ANON_PROFILE_UNIQUE">
  -      <unique-column name="MEDIA_TYPE" />
  -      <unique-column name="LANGUAGE" />
  -      <unique-column name="COUNTRY" />
  -      <unique-column name="PAGE" />
  -    </unique>
  -
  -  </table>
  -
   </database>  
   
  
  
  
  1.1.2.9   +64 -1     jakarta-jetspeed/build/torque/schema/Attic/security-schema.xml
  
  Index: security-schema.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/build/torque/schema/Attic/security-schema.xml,v
  retrieving revision 1.1.2.8
  retrieving revision 1.1.2.9
  diff -u -r1.1.2.8 -r1.1.2.9
  --- security-schema.xml       20 Jun 2002 05:14:45 -0000      1.1.2.8
  +++ security-schema.xml       20 Jun 2002 23:58:17 -0000      1.1.2.9
  @@ -102,5 +102,68 @@
       </foreign-key>
     </table>
   
  +  <table name="JETSPEED_USER_PROFILE" idMethod="idbroker" >
  +    
  +    <column name="PSML_ID" required="true" primaryKey="true" 
  +            autoIncrement="true" type="INTEGER"/>   
  +    <column name="USER_NAME" required="true" size="32" type="VARCHAR"/>
  +    <column name="MEDIA_TYPE" size="99" type="VARCHAR"/>
  +    <column name="LANGUAGE" size="2" type="VARCHAR"/>
  +    <column name="COUNTRY" size="2" type="VARCHAR"/>
  +    <column name="PAGE" size="99" type="VARCHAR"/>
  +    <column name="PROFILE" type="VARBINARY"/>
  +
  +    <unique name="JETSPEED_USER_PROFILE_UNIQUE">
  +      <unique-column name="USER_NAME" />
  +      <unique-column name="MEDIA_TYPE" />
  +      <unique-column name="LANGUAGE" />
  +      <unique-column name="COUNTRY" />
  +      <unique-column name="PAGE" />
  +    </unique>
  +
  +  </table>
  +
  +  <table name="JETSPEED_GROUP_PROFILE" idMethod="idbroker" >
  +    
  +    <column name="PSML_ID" required="true" primaryKey="true" 
  +            autoIncrement="true" type="INTEGER"/>
  +    <column name="GROUP_NAME" required="true" size="99" type="VARCHAR"/>
  +    <column name="MEDIA_TYPE" size="99" type="VARCHAR"/>
  +    <column name="LANGUAGE" size="2" type="VARCHAR"/>
  +    <column name="COUNTRY" size="2" type="VARCHAR"/>
  +    <column name="PAGE" size="99" type="VARCHAR"/>
  +    <column name="PROFILE"  type="VARBINARY"/>
  +
  +    <unique name="JETSPEED_GROUP_PROFILE_UNIQUE">
  +      <unique-column name="GROUP_NAME" />
  +      <unique-column name="MEDIA_TYPE" />
  +      <unique-column name="LANGUAGE" />
  +      <unique-column name="COUNTRY" />
  +      <unique-column name="PAGE" />
  +    </unique>
  +
  +  </table>
  +
  +  <table name="JETSPEED_ROLE_PROFILE" idMethod="idbroker" >
  +    
  +    <column name="PSML_ID" required="true" primaryKey="true" 
  +            autoIncrement="true" type="INTEGER"/>
  +    <column name="ROLE_NAME" required="true" size="99" type="VARCHAR"/>
  +    <column name="MEDIA_TYPE" size="99" type="VARCHAR"/>
  +    <column name="LANGUAGE" size="2" type="VARCHAR"/>
  +    <column name="COUNTRY" size="2" type="VARCHAR"/>
  +    <column name="PAGE" size="99" type="VARCHAR"/>
  +    <column name="PROFILE" type="VARBINARY"/>
  +
  +    <unique name="JETSPEED_ROLE_PROFILE_UNIQUE">
  +      <unique-column name="ROLE_NAME" />
  +      <unique-column name="MEDIA_TYPE" />
  +      <unique-column name="LANGUAGE" />
  +      <unique-column name="COUNTRY" />
  +      <unique-column name="PAGE" />
  +    </unique>
  +
  +  </table>
  +
   </database>
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.15.2.2  +9 -67     
jakarta-jetspeed/src/java/org/apache/jetspeed/services/psmlmanager/db/DatabasePsmlManagerService.java
  
  Index: DatabasePsmlManagerService.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/psmlmanager/db/DatabasePsmlManagerService.java,v
  retrieving revision 1.15.2.1
  retrieving revision 1.15.2.2
  diff -u -r1.15.2.1 -r1.15.2.2
  --- DatabasePsmlManagerService.java   17 Jun 2002 21:27:03 -0000      1.15.2.1
  +++ DatabasePsmlManagerService.java   20 Jun 2002 23:58:17 -0000      1.15.2.2
  @@ -100,8 +100,6 @@
   import org.apache.jetspeed.om.dbpsml.JetspeedRoleProfilePeer;
   import org.apache.jetspeed.om.dbpsml.JetspeedGroupProfile;
   import org.apache.jetspeed.om.dbpsml.JetspeedGroupProfilePeer;
  -import org.apache.jetspeed.om.dbpsml.JetspeedAnonProfile;
  -import org.apache.jetspeed.om.dbpsml.JetspeedAnonProfilePeer;
   import org.apache.jetspeed.services.psmlmanager.PsmlImporter;
   
   //standard java stuff
  @@ -358,7 +356,6 @@
           JetspeedUser user = locator.getUser();
           Role role = locator.getRole();
           Group group = locator.getGroup();
  -        boolean anonymous = locator.getAnonymous();
           String name = locator.getName();
           String mediaType = locator.getMediaType();
           String country = locator.getCountry();
  @@ -366,7 +363,7 @@
      
          synchronized (this)
          {
  -            if (user != null && !anonymous)
  +            if (user != null)
               {
                   keybuf.append("User:").append(user.getUserName());
              }
  @@ -378,10 +375,6 @@
               {
                   keybuf.append("Role:").append(role.getName());
               }
  -            else if (anonymous)
  -            {
  -                keybuf.append("Anon:").append("Anon");
  -            }
    
               if (name != null)
               {
  @@ -435,10 +428,6 @@
                   entity = colonTokens.nextToken().trim();
                   locator.setRole(JetspeedSecurity.getRole(entity));
               }
  -            else if (colonToken.equals("Anon"))
  -            {
  -                locator.setAnonymous(true);
  -            }
               else if (colonToken.equals("Page"))
               {
                   entity = colonTokens.nextToken().trim();
  @@ -570,12 +559,11 @@
           JetspeedUser user = profile.getUser();
           Role role = profile.getRole();
           Group group = profile.getGroup();
  -        boolean anonymous = profile.getAnonymous();
           String tableName = null;
   
           try 
           {
  -            if (user != null && !anonymous)
  +            if (user != null)
               {                 
                   tableName = "JETSPEED_USER_PROFILE";
                   if (operation == INSERT) 
  @@ -611,18 +599,7 @@
                       new JetspeedGroupProfilePeer().update(profile);
                   }
               }   
  -            else  // it will be anonymous access
  -            {
  -                tableName = "JETSPEED_ANON_PROFILE";
  -                if (operation == INSERT) 
  -                {
  -                    new JetspeedAnonProfilePeer().insert(profile);
  -                }
  -                else if (operation == UPDATE)
  -                {
  -                    new JetspeedAnonProfilePeer().update(profile);
  -                }
  -            } 
  +            
               // insert successful
               synchronized (psmlCache)
               {
  @@ -658,11 +635,10 @@
           Role role = locator.getRole();
           Group group = locator.getGroup();
           String tableName = null;
  -        boolean anonymous = locator.getAnonymous();
   
           try 
           {  
  -            if (user != null && !anonymous)
  +            if (user != null)
               {   
                   new JetspeedUserProfilePeer().delete(locator);
                   tableName = "JETSPEED_USER_PROFILE";
  @@ -677,11 +653,7 @@
                   new JetspeedGroupProfilePeer().delete(locator);
                   tableName = "JETSPEED_GROUP_PROFILE";
               }  
  -            else  // it will be anonymous access
  -            { 
  -                new JetspeedAnonProfilePeer().delete(locator);
  -                tableName = "JETSPEED_ANON_PROFILE";
  -            }
  +            
               // Delete successful
               synchronized (psmlCache)
               {
  @@ -717,7 +689,6 @@
               Vector userData = null;
               Vector groupData = null;
               Vector roleData = null;
  -            Vector anonData = null;
    
               int queryMode = locator.getQueryMode();
               
  @@ -749,13 +720,6 @@
                       }
                       break;
    
  -                case QueryLocator.QUERY_ANON:    
  -                    anonData = new JetspeedAnonProfilePeer().select(locator);
  -                    if (anonData != null)
  -                    {
  -                        list = getProfiles(anonData);
  -                    }
  -                    break;
   
                   default:  //QUERY_ALL
                       userData = new JetspeedUserProfilePeer().select(locator);
  @@ -776,11 +740,6 @@
                           list.addAll(getProfiles(roleData));
                       }
   
  -                    anonData = new JetspeedAnonProfilePeer().select(locator);
  -                    if (anonData != null)
  -                    {
  -                        list.addAll(getProfiles(anonData));
  -                    }
                      break;
               }
               
  @@ -799,7 +758,7 @@
        * Get profile iterator from given vector of objects.
        *
        * @param data Vector of JetspeedUserProfile, JetspeedGroupProfile, 
  -     * JetspeedRoleProfile, JetspeedAnonProfile objects
  +     * JetspeedRoleProfile, objects
        * @return List of profiles
        */
       private List getProfiles(Vector data)
  @@ -825,10 +784,6 @@
                   portlets = 
DBUtils.bytesToPortlets(((JetspeedRoleProfile)obj).getProfile(), this.mapping);
    
               }
  -            else if (obj instanceof JetspeedAnonProfile) 
  -            {
  -                portlets = 
DBUtils.bytesToPortlets(((JetspeedAnonProfile)obj).getProfile(), this.mapping);
  -            }
    
               list.add(portlets);
           }
  @@ -907,11 +862,10 @@
           Portlets portlets = null;
           PSMLDocument psmldoc = null;
           String page = null;
  -        boolean anonymous = locator.getAnonymous();
   
           try
           {
  -            if (user != null && !anonymous)
  +            if (user != null)
               {
                   tableName = "JETSPEED_USER_PROFILE";
                   records = new JetspeedUserProfilePeer().select(locator);
  @@ -950,19 +904,7 @@
                       portlets = DBUtils.bytesToPortlets(gprofile.getProfile(), 
this.mapping);
                   }
               }  
  -            else  // it will be anonymous access
  -            { 
  -                tableName = "JETSPEED_ANON_PROFILE";
  -                records = new JetspeedAnonProfilePeer().select(locator);
  -                Iterator iterator = records.iterator(); 
  -                while (iterator.hasNext())
  -                {
  -                    JetspeedAnonProfile aprofile = 
  -                                       (JetspeedAnonProfile)iterator.next();
  -                    page = aprofile.getPage();
  -                    portlets = DBUtils.bytesToPortlets(aprofile.getProfile(), 
this.mapping);
  -                }
  -            }
  +
               if (page != null && portlets != null) 
               {
                   psmldoc = getPSMLDocument(page, portlets);
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.22  +0 -0      
jakarta-jetspeed/webapp/WEB-INF/conf/Attic/JetspeedSecurity.properties
  
  Index: JetspeedSecurity.properties
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed/webapp/WEB-INF/conf/Attic/JetspeedSecurity.properties,v
  retrieving revision 1.1.2.21
  retrieving revision 1.1.2.22
  diff -u -r1.1.2.21 -r1.1.2.22
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to