directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1346958 - in /directory/apacheds/branches/apacheds-txns-merge: core-api/src/main/java/org/apache/directory/server/core/api/entry/ interceptors/authz/src/test/java/org/apache/directory/server/core/authz/support/ xdbm-partition/src/test/java...
Date Wed, 06 Jun 2012 15:52:30 GMT
Author: elecharny
Date: Wed Jun  6 15:52:29 2012
New Revision: 1346958

URL: http://svn.apache.org/viewvc?rev=1346958&view=rev
Log:
Applied rev 1300024

Modified:
    directory/apacheds/branches/apacheds-txns-merge/core-api/src/main/java/org/apache/directory/server/core/api/entry/TestServerEntryUtils.java
    directory/apacheds/branches/apacheds-txns-merge/interceptors/authz/src/test/java/org/apache/directory/server/core/authz/support/DummyAttributeTypeRegistry.java
    directory/apacheds/branches/apacheds-txns-merge/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java
    directory/apacheds/branches/apacheds-txns-merge/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java

Modified: directory/apacheds/branches/apacheds-txns-merge/core-api/src/main/java/org/apache/directory/server/core/api/entry/TestServerEntryUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns-merge/core-api/src/main/java/org/apache/directory/server/core/api/entry/TestServerEntryUtils.java?rev=1346958&r1=1346957&r2=1346958&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns-merge/core-api/src/main/java/org/apache/directory/server/core/api/entry/TestServerEntryUtils.java
(original)
+++ directory/apacheds/branches/apacheds-txns-merge/core-api/src/main/java/org/apache/directory/server/core/api/entry/TestServerEntryUtils.java
Wed Jun  6 15:52:29 2012
@@ -6,18 +6,19 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ * 
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ * 
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ * 
  */
 package org.apache.directory.server.core.api.entry;
+
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.shared.ldap.model.entry.BinaryValue;
 import org.apache.directory.shared.ldap.model.entry.StringValue;
@@ -27,6 +28,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.schema.LdapComparator;
 import org.apache.directory.shared.ldap.model.schema.LdapSyntax;
 import org.apache.directory.shared.ldap.model.schema.MatchingRule;
+import org.apache.directory.shared.ldap.model.schema.MutableAttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableMatchingRule;
 import org.apache.directory.shared.ldap.model.schema.Normalizer;
 import org.apache.directory.shared.ldap.model.schema.SyntaxChecker;
 import org.apache.directory.shared.ldap.model.schema.comparators.ByteArrayComparator;
@@ -55,7 +58,7 @@ public class TestServerEntryUtils
 
     public static MatchingRule matchingRuleFactory( String oid )
     {
-        MatchingRule matchingRule = new MatchingRule( oid );
+        MutableMatchingRule matchingRule = new MutableMatchingRule( oid );
         
         return matchingRule;
     }
@@ -92,12 +95,12 @@ public class TestServerEntryUtils
         }
     }
 
-    /* no protection*/ 
+    /* no protection*/
     //This will suppress PMD.AvoidUsingHardCodedIP warnings in this class
     @SuppressWarnings("PMD.AvoidUsingHardCodedIP")
     static AttributeType getCaseIgnoringAttributeNoNumbersType()
     {
-        AttributeType attributeType = new AttributeType( "1.1.3.1" );
+        MutableAttributeType attributeType = new MutableAttributeType( "1.1.3.1" );
         LdapSyntax syntax = new LdapSyntax( "1.1.1.1", "", true );
 
         syntax.setSyntaxChecker( new SyntaxChecker( "1.1.2.1" )
@@ -122,7 +125,7 @@ public class TestServerEntryUtils
             }
         } );
         
-        MatchingRule matchingRule = new MatchingRule( "1.1.2.1" );
+        MutableMatchingRule matchingRule = new MutableMatchingRule( "1.1.2.1" );
         matchingRule.setSyntax( syntax );
 
 
@@ -130,22 +133,22 @@ public class TestServerEntryUtils
         {
             public int compare( String o1, String o2 )
             {
-                return ( o1 == null ? 
+                return ( o1 == null ?
                     ( o2 == null ? 0 : -1 ) :
                     ( o2 == null ? 1 : o1.compareTo( o2 ) ) );
             }
 
             int getValue( String val )
             {
-                if ( val.equals( "LOW" ) ) 
+                if ( val.equals( "LOW" ) )
                 {
                     return 0;
                 }
-                else if ( val.equals( "MEDIUM" ) ) 
+                else if ( val.equals( "MEDIUM" ) )
                 {
                     return 1;
                 }
-                else if ( val.equals( "HIGH" ) ) 
+                else if ( val.equals( "HIGH" ) )
                 {
                     return 2;
                 }
@@ -184,7 +187,7 @@ public class TestServerEntryUtils
 
     /* no protection*/ static AttributeType getIA5StringAttributeType()
     {
-        AttributeType attributeType = new AttributeType( "1.1" );
+        MutableAttributeType attributeType = new MutableAttributeType( "1.1" );
         attributeType.addName( "1.1" );
         LdapSyntax syntax = new LdapSyntax( "1.1.1", "", true );
 
@@ -196,7 +199,7 @@ public class TestServerEntryUtils
             }
         } );
         
-        MatchingRule matchingRule = new MatchingRule( "1.1.2" );
+        MutableMatchingRule matchingRule = new MutableMatchingRule( "1.1.2" );
         matchingRule.setSyntax( syntax );
 
 
@@ -204,7 +207,7 @@ public class TestServerEntryUtils
         {
             public int compare( String o1, String o2 )
             {
-                return ( ( o1 == null ) ? 
+                return ( ( o1 == null ) ?
                     ( o2 == null ? 0 : -1 ) :
                     ( o2 == null ? 1 : o1.compareTo( o2 ) ) );
             }
@@ -221,7 +224,7 @@ public class TestServerEntryUtils
 
     /* No protection */ static AttributeType getBytesAttributeType()
     {
-        AttributeType attributeType = new AttributeType( "1.2" );
+        MutableAttributeType attributeType = new MutableAttributeType( "1.2" );
         LdapSyntax syntax = new LdapSyntax( "1.2.1", "", true );
 
         syntax.setSyntaxChecker( new SyntaxChecker( "1.2.1" )
@@ -232,7 +235,7 @@ public class TestServerEntryUtils
             }
         } );
 
-        MatchingRule matchingRule = new MatchingRule( "1.2.2" );
+        MutableMatchingRule matchingRule = new MutableMatchingRule( "1.2.2" );
         matchingRule.setSyntax( syntax );
 
         matchingRule.setLdapComparator( new ByteArrayComparator( "1.2.2" ) );
@@ -252,7 +255,7 @@ public class TestServerEntryUtils
                     
                     for ( byte b:val )
                     {
-                        newVal[i++] = (byte)(b & 0x007F); 
+                        newVal[i++] = (byte)(b & 0x007F);
                     }
                     
                     return new BinaryValue( Strings.trim(newVal) );

Modified: directory/apacheds/branches/apacheds-txns-merge/interceptors/authz/src/test/java/org/apache/directory/server/core/authz/support/DummyAttributeTypeRegistry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns-merge/interceptors/authz/src/test/java/org/apache/directory/server/core/authz/support/DummyAttributeTypeRegistry.java?rev=1346958&r1=1346957&r2=1346958&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns-merge/interceptors/authz/src/test/java/org/apache/directory/server/core/authz/support/DummyAttributeTypeRegistry.java
(original)
+++ directory/apacheds/branches/apacheds-txns-merge/interceptors/authz/src/test/java/org/apache/directory/server/core/authz/support/DummyAttributeTypeRegistry.java
Wed Jun  6 15:52:29 2012
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ * 
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ * 
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ * 
  */
 package org.apache.directory.server.core.authz.support;
 
@@ -28,7 +28,8 @@ import java.util.Set;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
 import org.apache.directory.shared.ldap.model.schema.LdapSyntax;
-import org.apache.directory.shared.ldap.model.schema.MatchingRule;
+import org.apache.directory.shared.ldap.model.schema.MutableAttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableMatchingRule;
 import org.apache.directory.shared.ldap.model.schema.Normalizer;
 import org.apache.directory.shared.ldap.model.schema.SchemaObjectType;
 import org.apache.directory.shared.ldap.model.schema.normalizers.DeepTrimToLowerNormalizer;
@@ -60,10 +61,10 @@ public class DummyAttributeTypeRegistry 
     {
         Normalizer normalizer = new DeepTrimToLowerNormalizer( "1.1.1" );
 
-        MatchingRule equality = new MatchingRule( "1.1.1" );
+        MutableMatchingRule equality = new MutableMatchingRule( "1.1.1" );
         equality.setNormalizer( normalizer );
 
-        AttributeType attributeType = new AttributeType( id );
+        MutableAttributeType attributeType = new MutableAttributeType( id );
         attributeType.setEquality( equality );
         attributeType.setSingleValued( false );
         attributeType.setCollective( false );

Modified: directory/apacheds/branches/apacheds-txns-merge/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns-merge/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java?rev=1346958&r1=1346957&r2=1346958&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns-merge/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java
(original)
+++ directory/apacheds/branches/apacheds-txns-merge/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java
Wed Jun  6 15:52:29 2012
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ * 
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ * 
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ * 
  */
 package org.apache.directory.server.xdbm.search.impl;
 
@@ -54,7 +54,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
 import org.apache.directory.shared.ldap.model.schema.LdapSyntax;
-import org.apache.directory.shared.ldap.model.schema.MatchingRule;
+import org.apache.directory.shared.ldap.model.schema.MutableAttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableMatchingRule;
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
 import org.apache.directory.shared.ldap.model.schema.comparators.StringComparator;
 import org.apache.directory.shared.ldap.model.schema.parsers.SyntaxCheckerDescription;
@@ -162,7 +163,7 @@ public class GreaterEqTest
     {
         if ( store != null )
         {
-            ((Partition)store).destroy();
+            store.destroy();
         }
 
         store = null;
@@ -704,7 +705,7 @@ public class GreaterEqTest
     public void testEvaluatorAttributeNoMatchingRule() throws Exception
     {
         LdapSyntax syntax = new BogusSyntax( 1 );
-        AttributeType at = new AttributeType( SchemaConstants.ATTRIBUTE_TYPES_AT_OID + ".2000"
);
+        MutableAttributeType at = new MutableAttributeType( SchemaConstants.ATTRIBUTE_TYPES_AT_OID
+ ".2000" );
         at.addName( "bogus" );
         at.setSchemaName( "other" );
         at.setSyntax( syntax );
@@ -729,11 +730,11 @@ public class GreaterEqTest
     public void testEvaluatorAttributeOrderingMatchingRule() throws Exception
     {
         LdapSyntax syntax = new BogusSyntax( 1 );
-        MatchingRule mr = new MatchingRule( "1.1" );
+        MutableMatchingRule mr = new MutableMatchingRule( "1.1" );
         mr.setSyntax( syntax );
         mr.setLdapComparator( new StringComparator( "1.1" ) );
 
-        AttributeType at = new AttributeType( SchemaConstants.ATTRIBUTE_TYPES_AT_OID + ".5000"
);
+        MutableAttributeType at = new MutableAttributeType( SchemaConstants.ATTRIBUTE_TYPES_AT_OID
+ ".5000" );
         at.addName( "bogus" );
         at.setSchemaName( "other" );
         at.setSyntax( syntax );

Modified: directory/apacheds/branches/apacheds-txns-merge/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns-merge/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java?rev=1346958&r1=1346957&r2=1346958&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns-merge/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java
(original)
+++ directory/apacheds/branches/apacheds-txns-merge/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java
Wed Jun  6 15:52:29 2012
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ * 
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ * 
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ * 
  */
 package org.apache.directory.server.xdbm.search.impl;
 
@@ -54,7 +54,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
 import org.apache.directory.shared.ldap.model.schema.LdapSyntax;
-import org.apache.directory.shared.ldap.model.schema.MatchingRule;
+import org.apache.directory.shared.ldap.model.schema.MutableAttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableMatchingRule;
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
 import org.apache.directory.shared.ldap.model.schema.comparators.StringComparator;
 import org.apache.directory.shared.ldap.model.schema.parsers.SyntaxCheckerDescription;
@@ -141,7 +142,7 @@ public class LessEqTest
 
         // initialize the store
         store = new AvlPartition( schemaManager, txnManagerFactory, executionManagerFactory
);
-        ((Partition)store).setId( "example" );
+        store.setId( "example" );
         ( ( Store ) store ).setCacheSize( 10 );
         ( ( Store ) store ).setPartitionPath( wkdir.toURI() );
         ( ( Store ) store ).setSyncOnWrite( false );
@@ -164,7 +165,7 @@ public class LessEqTest
     {
         if ( store != null )
         {
-            ((Partition)store).destroy();
+            store.destroy();
         }
 
         store = null;
@@ -730,7 +731,7 @@ public class LessEqTest
     public void testEvaluatorAttributeNoMatchingRule() throws Exception
     {
         LdapSyntax syntax = new BogusSyntax( 1 );
-        AttributeType at = new AttributeType( SchemaConstants.ATTRIBUTE_TYPES_AT_OID + ".2000"
);
+        MutableAttributeType at = new MutableAttributeType( SchemaConstants.ATTRIBUTE_TYPES_AT_OID
+ ".2000" );
         at.addName( "bogus" );
         at.setSchemaName( "other" );
         at.setSyntax( syntax );
@@ -757,11 +758,11 @@ public class LessEqTest
     {
         LdapSyntax syntax = new BogusSyntax( 2 );
 
-        MatchingRule mr = new MatchingRule( "1.1" );
+        MutableMatchingRule mr = new MutableMatchingRule( "1.1" );
         mr.setSyntax( syntax );
         mr.setLdapComparator( new StringComparator( "1.1" ) );
 
-        AttributeType at = new AttributeType( SchemaConstants.ATTRIBUTE_TYPES_AT_OID + ".3000"
);
+        MutableAttributeType at = new MutableAttributeType( SchemaConstants.ATTRIBUTE_TYPES_AT_OID
+ ".3000" );
         at.addName( "bogus" );
         at.setSchemaName( "other" );
         at.setSyntax( syntax );



Mime
View raw message