You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2007/01/23 00:25:59 UTC
svn commit: r498848 [3/4] - in /directory/apacheds/branches/1.0:
core-unit/src/main/java/org/apache/directory/server/core/unit/
core-unit/src/test/java/org/apache/directory/server/core/
core-unit/src/test/java/org/apache/directory/server/core/authn/ co...
Modified: directory/apacheds/branches/1.0/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/AttributesSerializerTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/1.0/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/AttributesSerializerTest.java?view=diff&rev=498848&r1=498847&r2=498848
==============================================================================
--- directory/apacheds/branches/1.0/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/AttributesSerializerTest.java (original)
+++ directory/apacheds/branches/1.0/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/AttributesSerializerTest.java Mon Jan 22 15:25:45 2007
@@ -22,8 +22,8 @@
import java.io.IOException;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
import org.apache.directory.shared.ldap.util.ArrayUtils;
import junit.framework.TestCase;
@@ -39,13 +39,13 @@
{
public void testFullCycle() throws IOException
{
- AttributesImpl attrs = new AttributesImpl();
- AttributeImpl attr0 = new AttributeImpl( "attr0" );
+ LockableAttributesImpl attrs = new LockableAttributesImpl();
+ LockableAttributeImpl attr0 = new LockableAttributeImpl( "attr0" );
attr0.add( "value0" );
attr0.add( "val1" );
attr0.add( "anything over here!" );
- AttributeImpl attr1 = new AttributeImpl( "attr1" );
+ LockableAttributeImpl attr1 = new LockableAttributeImpl( "attr1" );
byte[] ba0 = new byte[2];
ba0[0] = 7;
ba0[1] = 23;
@@ -60,14 +60,14 @@
attrs.put( attr1 );
AttributesSerializer serializer = new AttributesSerializer();
byte[] buf = serializer.serialize( attrs );
- AttributesImpl deserialized = ( AttributesImpl ) serializer.deserialize( buf );
+ LockableAttributesImpl deserialized = ( LockableAttributesImpl ) serializer.deserialize( buf );
- AttributeImpl attrDeserialized0 = ( AttributeImpl ) deserialized.get( "attr0" );
+ LockableAttributeImpl attrDeserialized0 = ( LockableAttributeImpl ) deserialized.get( "attr0" );
assertEquals( "value0", attrDeserialized0.get() );
assertEquals( "val1", attrDeserialized0.get( 1 ) );
assertEquals( "anything over here!", attrDeserialized0.get( 2 ) );
- AttributeImpl attrDeserialized1 = ( AttributeImpl ) deserialized.get( "attr1" );
+ LockableAttributeImpl attrDeserialized1 = ( LockableAttributeImpl ) deserialized.get( "attr1" );
ArrayUtils.isEquals( ba0, ( byte[] ) attrDeserialized1.get() );
ArrayUtils.isEquals( ba1, ( byte[] ) attrDeserialized1.get( 1 ) );
}
Modified: directory/apacheds/branches/1.0/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/1.0/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java?view=diff&rev=498848&r1=498847&r2=498848
==============================================================================
--- directory/apacheds/branches/1.0/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java (original)
+++ directory/apacheds/branches/1.0/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java Mon Jan 22 15:25:45 2007
@@ -32,8 +32,8 @@
import org.apache.directory.server.core.schema.SchemaChecker;
import org.apache.directory.server.core.schema.bootstrap.*;
import org.apache.directory.shared.ldap.exception.LdapSchemaViolationException;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
import org.apache.directory.shared.ldap.message.ResultCodeEnum;
import org.apache.directory.shared.ldap.name.LdapDN;
import org.apache.directory.shared.ldap.util.StringTools;
@@ -124,8 +124,8 @@
{
LdapDN name = new LdapDN( "uid=akarasulu,ou=users,dc=example,dc=com" );
int mod = DirContext.REPLACE_ATTRIBUTE;
- Attributes modifyAttributes = new AttributesImpl( true );
- modifyAttributes.put( new AttributeImpl( "cn" ) );
+ Attributes modifyAttributes = new LockableAttributesImpl( true );
+ modifyAttributes.put( new LockableAttributeImpl( "cn" ) );
ObjectClassRegistry ocRegistry = registries.getObjectClassRegistry();
@@ -134,14 +134,14 @@
// this should succeed since person is still in replaced set and is structural
modifyAttributes.remove( "cn" );
- Attribute objectClassesReplaced = new AttributeImpl( "objectClass" );
+ Attribute objectClassesReplaced = new LockableAttributeImpl( "objectClass" );
objectClassesReplaced.add( "top" );
objectClassesReplaced.add( "person" );
modifyAttributes.put( objectClassesReplaced );
SchemaChecker.preventStructuralClassRemovalOnModifyReplace( ocRegistry, name, mod, modifyAttributes );
// this should fail since only top is left
- objectClassesReplaced = new AttributeImpl( "objectClass" );
+ objectClassesReplaced = new LockableAttributeImpl( "objectClass" );
objectClassesReplaced.add( "top" );
modifyAttributes.put( objectClassesReplaced );
try
@@ -157,7 +157,7 @@
// this should fail since the modify operation tries to delete all
// objectClass attribute values
modifyAttributes.remove( "cn" );
- objectClassesReplaced = new AttributeImpl( "objectClass" );
+ objectClassesReplaced = new LockableAttributeImpl( "objectClass" );
modifyAttributes.put( objectClassesReplaced );
try
{
@@ -179,12 +179,12 @@
{
LdapDN name = new LdapDN( "uid=akarasulu,ou=users,dc=example,dc=com" );
int mod = DirContext.REMOVE_ATTRIBUTE;
- Attributes modifyAttributes = new AttributesImpl( true );
- Attribute entryObjectClasses = new AttributeImpl( "objectClass" );
+ Attributes modifyAttributes = new LockableAttributesImpl( true );
+ Attribute entryObjectClasses = new LockableAttributeImpl( "objectClass" );
entryObjectClasses.add( "top" );
entryObjectClasses.add( "person" );
entryObjectClasses.add( "organizationalPerson" );
- modifyAttributes.put( new AttributeImpl( "cn" ) );
+ modifyAttributes.put( new LockableAttributeImpl( "cn" ) );
ObjectClassRegistry ocRegistry = registries.getObjectClassRegistry();
@@ -194,7 +194,7 @@
// this should succeed since person is left and is structural
modifyAttributes.remove( "cn" );
- Attribute objectClassesRemoved = new AttributeImpl( "objectClass" );
+ Attribute objectClassesRemoved = new LockableAttributeImpl( "objectClass" );
objectClassesRemoved.add( "person" );
modifyAttributes.put( objectClassesRemoved );
SchemaChecker.preventStructuralClassRemovalOnModifyRemove( ocRegistry, name, mod, modifyAttributes,
@@ -202,7 +202,7 @@
// this should fail since only top is left
modifyAttributes.remove( "cn" );
- objectClassesRemoved = new AttributeImpl( "objectClass" );
+ objectClassesRemoved = new LockableAttributeImpl( "objectClass" );
objectClassesRemoved.add( "person" );
objectClassesRemoved.add( "organizationalPerson" );
modifyAttributes.put( objectClassesRemoved );
@@ -220,7 +220,7 @@
// this should fail since the modify operation tries to delete all
// objectClass attribute values
modifyAttributes.remove( "cn" );
- objectClassesRemoved = new AttributeImpl( "objectClass" );
+ objectClassesRemoved = new LockableAttributeImpl( "objectClass" );
modifyAttributes.put( objectClassesRemoved );
try
{
@@ -243,14 +243,14 @@
{
int mod = DirContext.REMOVE_ATTRIBUTE;
LdapDN name = new LdapDN( "ou=user,dc=example,dc=com" );
- Attributes attributes = new AttributesImpl( true );
+ Attributes attributes = new LockableAttributesImpl( true );
attributes.put( "cn", "does not matter" );
// postive test which should pass
SchemaChecker.preventRdnChangeOnModifyRemove( name, mod, attributes, registries.getOidRegistry() );
// test should fail since we are removing the ou attribute
- attributes.put( new AttributeImpl( "ou" ) );
+ attributes.put( new LockableAttributeImpl( "ou" ) );
try
{
SchemaChecker.preventRdnChangeOnModifyRemove( name, mod, attributes, registries.getOidRegistry() );
@@ -263,12 +263,12 @@
// test success using more than one attribute for the Rdn but not modifying rdn attribute
name = new LdapDN( "ou=users+cn=system users,dc=example,dc=com" );
- attributes = new AttributesImpl( true );
+ attributes = new LockableAttributesImpl( true );
attributes.put( "sn", "does not matter" );
SchemaChecker.preventRdnChangeOnModifyRemove( name, mod, attributes, registries.getOidRegistry() );
// test for failure when modifying Rdn attribute in multi attribute Rdn
- attributes.put( new AttributeImpl( "cn" ) );
+ attributes.put( new LockableAttributeImpl( "cn" ) );
try
{
SchemaChecker.preventRdnChangeOnModifyRemove( name, mod, attributes, registries.getOidRegistry() );
@@ -281,12 +281,12 @@
// should succeed since the value being deleted from the rdn attribute is
// is not used when composing the Rdn
- attributes = new AttributesImpl( true );
+ attributes = new LockableAttributesImpl( true );
attributes.put( "ou", "container" );
SchemaChecker.preventRdnChangeOnModifyRemove( name, mod, attributes, registries.getOidRegistry() );
// now let's make it fail again just by providing the right value for ou (users)
- attributes = new AttributesImpl( true );
+ attributes = new LockableAttributesImpl( true );
attributes.put( "ou", "users" );
try
{
@@ -308,14 +308,14 @@
{
int mod = DirContext.REPLACE_ATTRIBUTE;
LdapDN name = new LdapDN( "ou=user,dc=example,dc=com" );
- Attributes attributes = new AttributesImpl( true );
+ Attributes attributes = new LockableAttributesImpl( true );
attributes.put( "cn", "does not matter" );
// postive test which should pass
SchemaChecker.preventRdnChangeOnModifyReplace( name, mod, attributes, registries.getOidRegistry() );
// test should fail since we are removing the ou attribute
- attributes.put( new AttributeImpl( "ou" ) );
+ attributes.put( new LockableAttributeImpl( "ou" ) );
try
{
SchemaChecker.preventRdnChangeOnModifyReplace( name, mod, attributes, registries.getOidRegistry() );
@@ -328,12 +328,12 @@
// test success using more than one attribute for the Rdn but not modifying rdn attribute
name = new LdapDN( "ou=users+cn=system users,dc=example,dc=com" );
- attributes = new AttributesImpl( true );
+ attributes = new LockableAttributesImpl( true );
attributes.put( "sn", "does not matter" );
SchemaChecker.preventRdnChangeOnModifyReplace( name, mod, attributes, registries.getOidRegistry() );
// test for failure when modifying Rdn attribute in multi attribute Rdn
- attributes.put( new AttributeImpl( "cn" ) );
+ attributes.put( new LockableAttributeImpl( "cn" ) );
try
{
SchemaChecker.preventRdnChangeOnModifyReplace( name, mod, attributes, registries.getOidRegistry() );
@@ -346,13 +346,13 @@
// should succeed since the values being replaced from the rdn attribute is
// is includes the old Rdn attribute value
- attributes = new AttributesImpl( true );
+ attributes = new LockableAttributesImpl( true );
attributes.put( "ou", "container" );
attributes.put( "ou", "users" );
SchemaChecker.preventRdnChangeOnModifyReplace( name, mod, attributes, registries.getOidRegistry() );
// now let's make it fail by not including the old value for ou (users)
- attributes = new AttributesImpl( true );
+ attributes = new LockableAttributesImpl( true );
attributes.put( "ou", "container" );
try
{
@@ -381,16 +381,16 @@
// this should pass
LdapDN name = new LdapDN( "uid=akarasulu,ou=users,dc=example,dc=com" );
int mod = DirContext.REPLACE_ATTRIBUTE;
- SchemaChecker.preventStructuralClassRemovalOnModifyReplace( ocRegistry, name, mod, new AttributeImpl( "cn" ) );
+ SchemaChecker.preventStructuralClassRemovalOnModifyReplace( ocRegistry, name, mod, new LockableAttributeImpl( "cn" ) );
// this should succeed since person is still in replaced set and is structural
- Attribute objectClassesReplaced = new AttributeImpl( "objectClass" );
+ Attribute objectClassesReplaced = new LockableAttributeImpl( "objectClass" );
objectClassesReplaced.add( "top" );
objectClassesReplaced.add( "person" );
SchemaChecker.preventStructuralClassRemovalOnModifyReplace( ocRegistry, name, mod, objectClassesReplaced );
// this should fail since only top is left
- objectClassesReplaced = new AttributeImpl( "objectClass" );
+ objectClassesReplaced = new LockableAttributeImpl( "objectClass" );
objectClassesReplaced.add( "top" );
try
{
@@ -404,7 +404,7 @@
// this should fail since the modify operation tries to delete all
// objectClass attribute values
- objectClassesReplaced = new AttributeImpl( "objectClass" );
+ objectClassesReplaced = new LockableAttributeImpl( "objectClass" );
try
{
SchemaChecker.preventStructuralClassRemovalOnModifyReplace( ocRegistry, name, mod, objectClassesReplaced );
@@ -425,7 +425,7 @@
{
LdapDN name = new LdapDN( "uid=akarasulu,ou=users,dc=example,dc=com" );
int mod = DirContext.REMOVE_ATTRIBUTE;
- Attribute entryObjectClasses = new AttributeImpl( "objectClass" );
+ Attribute entryObjectClasses = new LockableAttributeImpl( "objectClass" );
entryObjectClasses.add( "top" );
entryObjectClasses.add( "person" );
entryObjectClasses.add( "organizationalPerson" );
@@ -433,17 +433,17 @@
ObjectClassRegistry ocRegistry = registries.getObjectClassRegistry();
// this should pass
- SchemaChecker.preventStructuralClassRemovalOnModifyRemove( ocRegistry, name, mod, new AttributeImpl( "cn" ),
+ SchemaChecker.preventStructuralClassRemovalOnModifyRemove( ocRegistry, name, mod, new LockableAttributeImpl( "cn" ),
entryObjectClasses );
// this should succeed since person is left and is structural
- Attribute objectClassesRemoved = new AttributeImpl( "objectClass" );
+ Attribute objectClassesRemoved = new LockableAttributeImpl( "objectClass" );
objectClassesRemoved.add( "person" );
SchemaChecker.preventStructuralClassRemovalOnModifyRemove( ocRegistry, name, mod, objectClassesRemoved,
entryObjectClasses );
// this should fail since only top is left
- objectClassesRemoved = new AttributeImpl( "objectClass" );
+ objectClassesRemoved = new LockableAttributeImpl( "objectClass" );
objectClassesRemoved.add( "person" );
objectClassesRemoved.add( "organizationalPerson" );
try
@@ -459,7 +459,7 @@
// this should fail since the modify operation tries to delete all
// objectClass attribute values
- objectClassesRemoved = new AttributeImpl( "objectClass" );
+ objectClassesRemoved = new LockableAttributeImpl( "objectClass" );
try
{
SchemaChecker.preventStructuralClassRemovalOnModifyRemove( ocRegistry, name, mod, objectClassesRemoved,
@@ -485,12 +485,12 @@
// postive test which should pass
SchemaChecker.preventRdnChangeOnModifyRemove( name, mod,
- new AttributeImpl( "cn", "does not matter" ), registry );
+ new LockableAttributeImpl( "cn", "does not matter" ), registry );
// test should fail since we are removing the ou attribute
try
{
- SchemaChecker.preventRdnChangeOnModifyRemove( name, mod, new AttributeImpl( "ou" ), registry );
+ SchemaChecker.preventRdnChangeOnModifyRemove( name, mod, new LockableAttributeImpl( "ou" ), registry );
fail( "should never get here due to a LdapSchemaViolationException being thrown" );
}
catch ( LdapSchemaViolationException e )
@@ -501,12 +501,12 @@
// test success using more than one attribute for the Rdn but not modifying rdn attribute
name = new LdapDN( "ou=users+cn=system users,dc=example,dc=com" );
SchemaChecker.preventRdnChangeOnModifyRemove( name, mod,
- new AttributeImpl( "sn", "does not matter" ), registry );
+ new LockableAttributeImpl( "sn", "does not matter" ), registry );
// test for failure when modifying Rdn attribute in multi attribute Rdn
try
{
- SchemaChecker.preventRdnChangeOnModifyRemove( name, mod, new AttributeImpl( "cn" ), registry );
+ SchemaChecker.preventRdnChangeOnModifyRemove( name, mod, new LockableAttributeImpl( "cn" ), registry );
fail( "should never get here due to a LdapSchemaViolationException being thrown" );
}
catch ( LdapSchemaViolationException e )
@@ -516,12 +516,12 @@
// should succeed since the value being deleted from the rdn attribute is
// is not used when composing the Rdn
- SchemaChecker.preventRdnChangeOnModifyRemove( name, mod, new AttributeImpl( "ou", "container" ), registry );
+ SchemaChecker.preventRdnChangeOnModifyRemove( name, mod, new LockableAttributeImpl( "ou", "container" ), registry );
// now let's make it fail again just by providing the right value for ou (users)
try
{
- SchemaChecker.preventRdnChangeOnModifyRemove( name, mod, new AttributeImpl( "ou", "users" ), registry );
+ SchemaChecker.preventRdnChangeOnModifyRemove( name, mod, new LockableAttributeImpl( "ou", "users" ), registry );
fail( "should never get here due to a LdapSchemaViolationException being thrown" );
}
catch ( LdapSchemaViolationException e )
Modified: directory/apacheds/branches/1.0/core/src/test/java/org/apache/directory/server/core/schema/SchemaServiceTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/1.0/core/src/test/java/org/apache/directory/server/core/schema/SchemaServiceTest.java?view=diff&rev=498848&r1=498847&r2=498848
==============================================================================
--- directory/apacheds/branches/1.0/core/src/test/java/org/apache/directory/server/core/schema/SchemaServiceTest.java (original)
+++ directory/apacheds/branches/1.0/core/src/test/java/org/apache/directory/server/core/schema/SchemaServiceTest.java Mon Jan 22 15:25:45 2007
@@ -36,7 +36,7 @@
import org.apache.directory.server.core.schema.bootstrap.InetorgpersonSchema;
import org.apache.directory.server.core.schema.bootstrap.SystemSchema;
import org.apache.directory.shared.ldap.exception.LdapNamingException;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
import org.apache.directory.shared.ldap.message.ResultCodeEnum;
import org.apache.directory.shared.ldap.schema.AttributeType;
@@ -92,7 +92,7 @@
/*
public void testAlterObjectClassesBogusAttr() throws NamingException
{
- Attribute attr = new AttributeImpl( "blah", "blah" );
+ Attribute attr = new LockableAttributeImpl( "blah", "blah" );
try
{
@@ -104,7 +104,7 @@
assertEquals( ResultCodeEnum.OPERATIONSERROR, e.getResultCode() );
}
- attr = new AttributeImpl( "objectClass" );
+ attr = new LockableAttributeImpl( "objectClass" );
SchemaService.alterObjectClasses( attr, registries.getObjectClassRegistry() );
assertEquals( 0, attr.size() );
}
@@ -112,7 +112,7 @@
public void testAlterObjectClassesNoAttrValue() throws NamingException
{
- Attribute attr = new AttributeImpl( "objectClass" );
+ Attribute attr = new LockableAttributeImpl( "objectClass" );
SchemaService.alterObjectClasses( attr, registries.getObjectClassRegistry() );
assertEquals( 0, attr.size() );
}
@@ -120,7 +120,7 @@
public void testAlterObjectClassesTopAttrValue() throws NamingException
{
- Attribute attr = new AttributeImpl( "objectClass", "top" );
+ Attribute attr = new LockableAttributeImpl( "objectClass", "top" );
SchemaService.alterObjectClasses( attr, registries.getObjectClassRegistry() );
assertEquals( 0, attr.size() );
}
@@ -128,7 +128,7 @@
public void testAlterObjectClassesInetOrgPersonAttrValue() throws NamingException
{
- Attribute attr = new AttributeImpl( "objectClass", "inetOrgPerson" );
+ Attribute attr = new LockableAttributeImpl( "objectClass", "inetOrgPerson" );
SchemaService.alterObjectClasses( attr, registries.getObjectClassRegistry() );
assertEquals( 3, attr.size() );
assertTrue( attr.contains( "person" ) );
@@ -139,7 +139,7 @@
public void testAlterObjectClassesOverlapping() throws NamingException
{
- Attribute attr = new AttributeImpl( "objectClass", "inetOrgPerson" );
+ Attribute attr = new LockableAttributeImpl( "objectClass", "inetOrgPerson" );
attr.add( "residentialPerson" );
SchemaService.alterObjectClasses( attr, registries.getObjectClassRegistry() );
assertEquals( 4, attr.size() );
@@ -152,7 +152,7 @@
public void testAlterObjectClassesOverlappingAndDsa() throws NamingException
{
- Attribute attr = new AttributeImpl( "objectClass", "inetOrgPerson" );
+ Attribute attr = new LockableAttributeImpl( "objectClass", "inetOrgPerson" );
attr.add( "residentialPerson" );
attr.add( "dSA" );
SchemaService.alterObjectClasses( attr, registries.getObjectClassRegistry() );
Modified: directory/apacheds/branches/1.0/core/src/test/java/org/apache/directory/server/core/subtree/RefinementEvaluatorTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/1.0/core/src/test/java/org/apache/directory/server/core/subtree/RefinementEvaluatorTest.java?view=diff&rev=498848&r1=498847&r2=498848
==============================================================================
--- directory/apacheds/branches/1.0/core/src/test/java/org/apache/directory/server/core/subtree/RefinementEvaluatorTest.java (original)
+++ directory/apacheds/branches/1.0/core/src/test/java/org/apache/directory/server/core/subtree/RefinementEvaluatorTest.java Mon Jan 22 15:25:45 2007
@@ -36,7 +36,7 @@
import org.apache.directory.shared.ldap.filter.FilterParserImpl;
import org.apache.directory.shared.ldap.filter.LeafNode;
import org.apache.directory.shared.ldap.filter.SimpleNode;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
import java.util.Set;
import java.util.HashSet;
@@ -107,7 +107,7 @@
{
try
{
- assertFalse( evaluator.evaluate( null, new AttributeImpl( "objectClass" ) ) );
+ assertFalse( evaluator.evaluate( null, new LockableAttributeImpl( "objectClass" ) ) );
fail( "should never get here due to an IAE" );
}
catch ( IllegalArgumentException iae )
@@ -125,7 +125,7 @@
try
{
- assertFalse( evaluator.evaluate( new SimpleNode( "", "", LeafNode.EQUALITY ), new AttributeImpl( "blah" ) ) );
+ assertFalse( evaluator.evaluate( new SimpleNode( "", "", LeafNode.EQUALITY ), new LockableAttributeImpl( "blah" ) ) );
fail( "should never get here due to an IAE" );
}
catch ( IllegalArgumentException iae )
@@ -139,19 +139,19 @@
Attribute objectClasses = null;
// positive test
- objectClasses = new AttributeImpl( "objectClass", "person" );
+ objectClasses = new LockableAttributeImpl( "objectClass", "person" );
assertTrue( evaluator.evaluate( new SimpleNode( "objectClass", "person", LeafNode.EQUALITY ), objectClasses ) );
- objectClasses = new AttributeImpl( "objectClass" );
+ objectClasses = new LockableAttributeImpl( "objectClass" );
objectClasses.add( "person" );
objectClasses.add( "blah" );
assertTrue( evaluator.evaluate( new SimpleNode( "objectClass", "person", LeafNode.EQUALITY ), objectClasses ) );
// negative tests
- objectClasses = new AttributeImpl( "objectClass", "person" );
+ objectClasses = new LockableAttributeImpl( "objectClass", "person" );
assertFalse( evaluator.evaluate( new SimpleNode( "objectClass", "blah", LeafNode.EQUALITY ), objectClasses ) );
- objectClasses = new AttributeImpl( "objectClass", "blah" );
+ objectClasses = new LockableAttributeImpl( "objectClass", "blah" );
assertFalse( evaluator.evaluate( new SimpleNode( "objectClass", "person", LeafNode.EQUALITY ), objectClasses ) );
}
@@ -161,19 +161,19 @@
Attribute objectClasses = null;
// positive test
- objectClasses = new AttributeImpl( "objectClass", "person" );
+ objectClasses = new LockableAttributeImpl( "objectClass", "person" );
assertTrue( evaluator.evaluate( new SimpleNode( "objectClass", "2.5.6.6", LeafNode.EQUALITY ), objectClasses ) );
- objectClasses = new AttributeImpl( "objectClass" );
+ objectClasses = new LockableAttributeImpl( "objectClass" );
objectClasses.add( "person" );
objectClasses.add( "blah" );
assertTrue( evaluator.evaluate( new SimpleNode( "objectClass", "2.5.6.6", LeafNode.EQUALITY ), objectClasses ) );
// negative tests
- objectClasses = new AttributeImpl( "objectClass", "person" );
+ objectClasses = new LockableAttributeImpl( "objectClass", "person" );
assertFalse( evaluator.evaluate( new SimpleNode( "objectClass", "2.5.6.5", LeafNode.EQUALITY ), objectClasses ) );
- objectClasses = new AttributeImpl( "objectClass", "blah" );
+ objectClasses = new LockableAttributeImpl( "objectClass", "blah" );
assertFalse( evaluator.evaluate( new SimpleNode( "objectClass", "2.5.6.5", LeafNode.EQUALITY ), objectClasses ) );
}
@@ -181,15 +181,15 @@
public void testComplexOrRefinement() throws Exception
{
ExprNode refinement = null;
- Attribute objectClasses = new AttributeImpl( "objectClass", "person" );
+ Attribute objectClasses = new LockableAttributeImpl( "objectClass", "person" );
FilterParser parser = new FilterParserImpl();
String refStr = "(| (objectClass=person) (objectClass=organizationalUnit) )";
refinement = parser.parse( refStr );
assertTrue( evaluator.evaluate( refinement, objectClasses ) );
- objectClasses = new AttributeImpl( "objectClass", "organizationalUnit" );
+ objectClasses = new LockableAttributeImpl( "objectClass", "organizationalUnit" );
assertTrue( evaluator.evaluate( refinement, objectClasses ) );
- objectClasses = new AttributeImpl( "objectClass", "domain" );
+ objectClasses = new LockableAttributeImpl( "objectClass", "domain" );
assertFalse( evaluator.evaluate( refinement, objectClasses ) );
}
@@ -197,18 +197,18 @@
public void testComplexAndRefinement() throws Exception
{
ExprNode refinement = null;
- Attribute objectClasses = new AttributeImpl( "objectClass", "person" );
+ Attribute objectClasses = new LockableAttributeImpl( "objectClass", "person" );
objectClasses.add( "organizationalUnit" );
FilterParser parser = new FilterParserImpl();
String refStr = "(& (objectClass=person) (objectClass=organizationalUnit) )";
refinement = parser.parse( refStr );
assertTrue( evaluator.evaluate( refinement, objectClasses ) );
- objectClasses = new AttributeImpl( "objectClass", "organizationalUnit" );
+ objectClasses = new LockableAttributeImpl( "objectClass", "organizationalUnit" );
assertFalse( evaluator.evaluate( refinement, objectClasses ) );
- objectClasses = new AttributeImpl( "objectClass", "person" );
+ objectClasses = new LockableAttributeImpl( "objectClass", "person" );
assertFalse( evaluator.evaluate( refinement, objectClasses ) );
- objectClasses = new AttributeImpl( "objectClass", "domain" );
+ objectClasses = new LockableAttributeImpl( "objectClass", "domain" );
assertFalse( evaluator.evaluate( refinement, objectClasses ) );
}
@@ -216,20 +216,20 @@
public void testComplexNotRefinement() throws Exception
{
ExprNode refinement = null;
- Attribute objectClasses = new AttributeImpl( "objectClass", "person" );
+ Attribute objectClasses = new LockableAttributeImpl( "objectClass", "person" );
FilterParser parser = new FilterParserImpl();
String refStr = "(! (objectClass=person) )";
refinement = parser.parse( refStr );
assertFalse( evaluator.evaluate( refinement, objectClasses ) );
- objectClasses = new AttributeImpl( "objectClass", "organizationalUnit" );
+ objectClasses = new LockableAttributeImpl( "objectClass", "organizationalUnit" );
assertTrue( evaluator.evaluate( refinement, objectClasses ) );
- objectClasses = new AttributeImpl( "objectClass", "domain" );
+ objectClasses = new LockableAttributeImpl( "objectClass", "domain" );
assertTrue( evaluator.evaluate( refinement, objectClasses ) );
try
{
- assertFalse( evaluator.evaluate( new BranchNode( 1000 ), new AttributeImpl( "objectClass" ) ) );
+ assertFalse( evaluator.evaluate( new BranchNode( 1000 ), new LockableAttributeImpl( "objectClass" ) ) );
fail( "should never get here due to an IAE" );
}
catch ( IllegalArgumentException iae )
@@ -238,7 +238,7 @@
try
{
- assertFalse( evaluator.evaluate( new BranchNode( BranchNode.NOT ), new AttributeImpl( "objectClass" ) ) );
+ assertFalse( evaluator.evaluate( new BranchNode( BranchNode.NOT ), new LockableAttributeImpl( "objectClass" ) ) );
fail( "should never get here due to an IAE" );
}
catch ( IllegalArgumentException iae )
Modified: directory/apacheds/branches/1.0/core/src/test/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluatorTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/1.0/core/src/test/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluatorTest.java?view=diff&rev=498848&r1=498847&r2=498848
==============================================================================
--- directory/apacheds/branches/1.0/core/src/test/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluatorTest.java (original)
+++ directory/apacheds/branches/1.0/core/src/test/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluatorTest.java Mon Jan 22 15:25:45 2007
@@ -31,7 +31,7 @@
import org.apache.directory.server.core.subtree.RefinementLeafEvaluator;
import org.apache.directory.shared.ldap.filter.LeafNode;
import org.apache.directory.shared.ldap.filter.SimpleNode;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
import java.util.Set;
import java.util.HashSet;
@@ -139,7 +139,7 @@
try
{
- objectClasses = new AttributeImpl( "incorrectAttrId" );
+ objectClasses = new LockableAttributeImpl( "incorrectAttrId" );
assertFalse( evaluator.evaluate( new SimpleNode( "objectClass", "", LeafNode.EQUALITY ), objectClasses ) );
fail( "should never get here due to an IAE" );
}
@@ -154,19 +154,19 @@
Attribute objectClasses = null;
// positive test
- objectClasses = new AttributeImpl( "objectClass", "person" );
+ objectClasses = new LockableAttributeImpl( "objectClass", "person" );
assertTrue( evaluator.evaluate( new SimpleNode( "objectClass", "person", LeafNode.EQUALITY ), objectClasses ) );
- objectClasses = new AttributeImpl( "objectClass" );
+ objectClasses = new LockableAttributeImpl( "objectClass" );
objectClasses.add( "person" );
objectClasses.add( "blah" );
assertTrue( evaluator.evaluate( new SimpleNode( "objectClass", "person", LeafNode.EQUALITY ), objectClasses ) );
// negative tests
- objectClasses = new AttributeImpl( "objectClass", "person" );
+ objectClasses = new LockableAttributeImpl( "objectClass", "person" );
assertFalse( evaluator.evaluate( new SimpleNode( "objectClass", "blah", LeafNode.EQUALITY ), objectClasses ) );
- objectClasses = new AttributeImpl( "objectClass", "blah" );
+ objectClasses = new LockableAttributeImpl( "objectClass", "blah" );
assertFalse( evaluator.evaluate( new SimpleNode( "objectClass", "person", LeafNode.EQUALITY ), objectClasses ) );
}
@@ -176,19 +176,19 @@
Attribute objectClasses = null;
// positive test
- objectClasses = new AttributeImpl( "objectClass", "person" );
+ objectClasses = new LockableAttributeImpl( "objectClass", "person" );
assertTrue( evaluator.evaluate( new SimpleNode( "objectClass", "2.5.6.6", LeafNode.EQUALITY ), objectClasses ) );
- objectClasses = new AttributeImpl( "objectClass" );
+ objectClasses = new LockableAttributeImpl( "objectClass" );
objectClasses.add( "person" );
objectClasses.add( "blah" );
assertTrue( evaluator.evaluate( new SimpleNode( "objectClass", "2.5.6.6", LeafNode.EQUALITY ), objectClasses ) );
// negative tests
- objectClasses = new AttributeImpl( "objectClass", "person" );
+ objectClasses = new LockableAttributeImpl( "objectClass", "person" );
assertFalse( evaluator.evaluate( new SimpleNode( "objectClass", "2.5.6.5", LeafNode.EQUALITY ), objectClasses ) );
- objectClasses = new AttributeImpl( "objectClass", "blah" );
+ objectClasses = new LockableAttributeImpl( "objectClass", "blah" );
assertFalse( evaluator.evaluate( new SimpleNode( "objectClass", "2.5.6.5", LeafNode.EQUALITY ), objectClasses ) );
}
}
Modified: directory/apacheds/branches/1.0/core/src/test/java/org/apache/directory/server/core/subtree/SubtreeEvaluatorTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/1.0/core/src/test/java/org/apache/directory/server/core/subtree/SubtreeEvaluatorTest.java?view=diff&rev=498848&r1=498847&r2=498848
==============================================================================
--- directory/apacheds/branches/1.0/core/src/test/java/org/apache/directory/server/core/subtree/SubtreeEvaluatorTest.java (original)
+++ directory/apacheds/branches/1.0/core/src/test/java/org/apache/directory/server/core/subtree/SubtreeEvaluatorTest.java Mon Jan 22 15:25:45 2007
@@ -29,7 +29,7 @@
import org.apache.directory.shared.ldap.filter.ExprNode;
import org.apache.directory.shared.ldap.filter.FilterParser;
import org.apache.directory.shared.ldap.filter.FilterParserImpl;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
import org.apache.directory.shared.ldap.name.LdapDN;
import org.apache.directory.shared.ldap.subtree.SubtreeSpecification;
import org.apache.directory.shared.ldap.subtree.SubtreeSpecificationModifier;
@@ -91,7 +91,7 @@
SubtreeSpecification ss = modifier.getSubtreeSpecification();
Name apDn = new LdapDN( "ou=system" );
Name entryDn = new LdapDN( "ou=users,ou=system" );
- Attribute objectClasses = new AttributeImpl( "objectClass" );
+ Attribute objectClasses = new LockableAttributeImpl( "objectClass" );
assertTrue( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
@@ -110,7 +110,7 @@
SubtreeSpecification ss = modifier.getSubtreeSpecification();
Name apDn = new LdapDN( "ou=system" );
Name entryDn = new LdapDN( "ou=users,ou=system" );
- Attribute objectClasses = new AttributeImpl( "objectClass" );
+ Attribute objectClasses = new LockableAttributeImpl( "objectClass" );
assertTrue( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
@@ -131,7 +131,7 @@
SubtreeSpecification ss = modifier.getSubtreeSpecification();
Name apDn = new LdapDN( "ou=system" );
Name entryDn = new LdapDN( "ou=users,ou=system" );
- Attribute objectClasses = new AttributeImpl( "objectClass" );
+ Attribute objectClasses = new LockableAttributeImpl( "objectClass" );
assertFalse( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
@@ -165,7 +165,7 @@
SubtreeSpecification ss = modifier.getSubtreeSpecification();
Name apDn = new LdapDN( "ou=system" );
Name entryDn = new LdapDN( "ou=users,ou=system" );
- Attribute objectClasses = new AttributeImpl( "objectClass" );
+ Attribute objectClasses = new LockableAttributeImpl( "objectClass" );
assertFalse( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
@@ -199,7 +199,7 @@
SubtreeSpecification ss = modifier.getSubtreeSpecification();
Name apDn = new LdapDN( "ou=system" );
Name entryDn = new LdapDN( "ou=users,ou=system" );
- Attribute objectClasses = new AttributeImpl( "objectClass" );
+ Attribute objectClasses = new LockableAttributeImpl( "objectClass" );
assertFalse( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
@@ -233,7 +233,7 @@
SubtreeSpecification ss = modifier.getSubtreeSpecification();
Name apDn = new LdapDN( "ou=system" );
Name entryDn = new LdapDN( "ou=users,ou=system" );
- Attribute objectClasses = new AttributeImpl( "objectClass", "person" );
+ Attribute objectClasses = new LockableAttributeImpl( "objectClass", "person" );
assertFalse( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
@@ -253,7 +253,7 @@
assertFalse( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
// now change the refinement so the entry is rejected
- objectClasses = new AttributeImpl( "objectClass", "organizationalUnit" );
+ objectClasses = new LockableAttributeImpl( "objectClass", "organizationalUnit" );
assertFalse( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
Modified: directory/apacheds/branches/1.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/ChangePassword.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/1.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/ChangePassword.java?view=diff&rev=498848&r1=498847&r2=498848
==============================================================================
--- directory/apacheds/branches/1.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/ChangePassword.java (original)
+++ directory/apacheds/branches/1.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/ChangePassword.java Mon Jan 22 15:25:45 2007
@@ -35,8 +35,8 @@
import org.apache.directory.server.kerberos.shared.store.KerberosAttribute;
import org.apache.directory.server.protocol.shared.store.ContextOperation;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
import org.apache.directory.shared.ldap.message.ModificationItemImpl;
@@ -74,7 +74,7 @@
}
ModificationItemImpl[] mods = new ModificationItemImpl[1];
- Attribute newKeyAttribute = new AttributeImpl( "krb5key", newKey.getEncoded() );
+ Attribute newKeyAttribute = new LockableAttributeImpl( "krb5key", newKey.getEncoded() );
mods[0] = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, newKeyAttribute );
String dn = null;
@@ -99,8 +99,8 @@
String[] attrIDs =
{ KerberosAttribute.PRINCIPAL, KerberosAttribute.VERSION, KerberosAttribute.TYPE, KerberosAttribute.KEY };
- Attributes matchAttrs = new AttributesImpl( false ); // case-sensitive
- matchAttrs.put( new AttributeImpl( KerberosAttribute.PRINCIPAL, principal ) );
+ Attributes matchAttrs = new LockableAttributesImpl( false ); // case-sensitive
+ matchAttrs.put( new LockableAttributeImpl( KerberosAttribute.PRINCIPAL, principal ) );
NamingEnumeration answer = ctx.search( "", matchAttrs, attrIDs );
Modified: directory/apacheds/branches/1.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/DeletePrincipal.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/1.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/DeletePrincipal.java?view=diff&rev=498848&r1=498847&r2=498848
==============================================================================
--- directory/apacheds/branches/1.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/DeletePrincipal.java (original)
+++ directory/apacheds/branches/1.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/DeletePrincipal.java Mon Jan 22 15:25:45 2007
@@ -34,8 +34,8 @@
import org.apache.directory.server.kerberos.shared.store.KerberosAttribute;
import org.apache.directory.server.protocol.shared.store.ContextOperation;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
/**
@@ -91,8 +91,8 @@
String[] attrIDs =
{ KerberosAttribute.PRINCIPAL, KerberosAttribute.VERSION, KerberosAttribute.TYPE, KerberosAttribute.KEY };
- Attributes matchAttrs = new AttributesImpl( false ); // case-sensitive
- matchAttrs.put( new AttributeImpl( KerberosAttribute.PRINCIPAL, principal ) );
+ Attributes matchAttrs = new LockableAttributesImpl( false ); // case-sensitive
+ matchAttrs.put( new LockableAttributeImpl( KerberosAttribute.PRINCIPAL, principal ) );
// Search for objects that have those matching attributes
NamingEnumeration answer = ctx.search( searchBaseDn, matchAttrs, attrIDs );
Modified: directory/apacheds/branches/1.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetPrincipal.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/1.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetPrincipal.java?view=diff&rev=498848&r1=498847&r2=498848
==============================================================================
--- directory/apacheds/branches/1.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetPrincipal.java (original)
+++ directory/apacheds/branches/1.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetPrincipal.java Mon Jan 22 15:25:45 2007
@@ -37,8 +37,8 @@
import org.apache.directory.server.kerberos.shared.store.PrincipalStoreEntry;
import org.apache.directory.server.kerberos.shared.store.PrincipalStoreEntryModifier;
import org.apache.directory.server.protocol.shared.store.ContextOperation;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
/**
@@ -80,8 +80,8 @@
KerberosAttribute.SAM_TYPE, KerberosAttribute.ACCOUNT_DISABLED,
KerberosAttribute.ACCOUNT_EXPIRATION_TIME, KerberosAttribute.ACCOUNT_LOCKEDOUT };
- Attributes matchAttrs = new AttributesImpl( false ); // case-sensitive
- matchAttrs.put( new AttributeImpl( KerberosAttribute.PRINCIPAL, principal.getName() ) );
+ Attributes matchAttrs = new LockableAttributesImpl( false ); // case-sensitive
+ matchAttrs.put( new LockableAttributeImpl( KerberosAttribute.PRINCIPAL, principal.getName() ) );
PrincipalStoreEntry entry = null;
Modified: directory/apacheds/branches/1.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/PrincipalStateFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/1.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/PrincipalStateFactory.java?view=diff&rev=498848&r1=498847&r2=498848
==============================================================================
--- directory/apacheds/branches/1.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/PrincipalStateFactory.java (original)
+++ directory/apacheds/branches/1.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/PrincipalStateFactory.java Mon Jan 22 15:25:45 2007
@@ -33,8 +33,8 @@
import org.apache.directory.server.kerberos.shared.store.KerberosAttribute;
import org.apache.directory.server.kerberos.shared.store.PrincipalStoreEntry;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
/**
@@ -54,7 +54,7 @@
Attributes outAttrs;
if ( inAttrs == null )
{
- outAttrs = new AttributesImpl( true );
+ outAttrs = new LockableAttributesImpl( true );
}
else
{
@@ -66,7 +66,7 @@
if ( oc == null )
{
- oc = new AttributeImpl( "objectClass" );
+ oc = new LockableAttributeImpl( "objectClass" );
outAttrs.put( oc );
}
Modified: directory/apacheds/branches/1.0/protocol-dns/src/main/java/org/apache/directory/server/dns/store/operations/GetFlatRecord.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/1.0/protocol-dns/src/main/java/org/apache/directory/server/dns/store/operations/GetFlatRecord.java?view=diff&rev=498848&r1=498847&r2=498848
==============================================================================
--- directory/apacheds/branches/1.0/protocol-dns/src/main/java/org/apache/directory/server/dns/store/operations/GetFlatRecord.java (original)
+++ directory/apacheds/branches/1.0/protocol-dns/src/main/java/org/apache/directory/server/dns/store/operations/GetFlatRecord.java Mon Jan 22 15:25:45 2007
@@ -35,8 +35,8 @@
import org.apache.directory.server.dns.messages.ResourceRecordModifier;
import org.apache.directory.server.dns.store.DnsAttribute;
import org.apache.directory.server.protocol.shared.store.ContextOperation;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
/**
@@ -73,11 +73,11 @@
return null;
}
- Attributes matchAttrs = new AttributesImpl( true );
+ Attributes matchAttrs = new LockableAttributesImpl( true );
- matchAttrs.put( new AttributeImpl( DnsAttribute.NAME, question.getDomainName() ) );
- matchAttrs.put( new AttributeImpl( DnsAttribute.TYPE, question.getRecordType().getCode() ) );
- matchAttrs.put( new AttributeImpl( DnsAttribute.CLASS, question.getRecordClass().getCode() ) );
+ matchAttrs.put( new LockableAttributeImpl( DnsAttribute.NAME, question.getDomainName() ) );
+ matchAttrs.put( new LockableAttributeImpl( DnsAttribute.TYPE, question.getRecordType().getCode() ) );
+ matchAttrs.put( new LockableAttributeImpl( DnsAttribute.CLASS, question.getRecordClass().getCode() ) );
ResourceRecord record = null;
Modified: directory/apacheds/branches/1.0/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/AbstractBackingStoreTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/1.0/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/AbstractBackingStoreTest.java?view=diff&rev=498848&r1=498847&r2=498848
==============================================================================
--- directory/apacheds/branches/1.0/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/AbstractBackingStoreTest.java (original)
+++ directory/apacheds/branches/1.0/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/AbstractBackingStoreTest.java Mon Jan 22 15:25:45 2007
@@ -62,8 +62,8 @@
import org.apache.directory.server.protocol.shared.store.KerberosAttribute;
import org.apache.directory.shared.ldap.ldif.Entry;
import org.apache.directory.shared.ldap.ldif.LdifReader;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -182,8 +182,8 @@
partConfig.setSuffix( "dc=example, dc=com" );
- AttributesImpl attrs = new AttributesImpl();
- AttributeImpl objectClass = new AttributeImpl( "objectClass" );
+ LockableAttributesImpl attrs = new LockableAttributesImpl();
+ LockableAttributeImpl objectClass = new LockableAttributeImpl( "objectClass" );
objectClass.add( "top" );
objectClass.add( "domain" );
attrs.put( objectClass );
@@ -209,8 +209,8 @@
partConfig.setSuffix( "dc=apache, dc=org" );
- AttributesImpl attrs = new AttributesImpl();
- AttributeImpl objectClass = new AttributeImpl( "objectClass" );
+ LockableAttributesImpl attrs = new LockableAttributesImpl();
+ LockableAttributeImpl objectClass = new LockableAttributeImpl( "objectClass" );
objectClass.add( "top" );
objectClass.add( "domain" );
attrs.put( objectClass );
Modified: directory/apacheds/branches/1.0/protocol-shared/src/test/java/org/apache/directory/server/protocol/shared/kerberos/KerberosTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/1.0/protocol-shared/src/test/java/org/apache/directory/server/protocol/shared/kerberos/KerberosTest.java?view=diff&rev=498848&r1=498847&r2=498848
==============================================================================
--- directory/apacheds/branches/1.0/protocol-shared/src/test/java/org/apache/directory/server/protocol/shared/kerberos/KerberosTest.java (original)
+++ directory/apacheds/branches/1.0/protocol-shared/src/test/java/org/apache/directory/server/protocol/shared/kerberos/KerberosTest.java Mon Jan 22 15:25:45 2007
@@ -28,8 +28,8 @@
import javax.naming.directory.DirContext;
import org.apache.directory.server.protocol.shared.AbstractBackingStoreTest;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
/**
@@ -60,8 +60,8 @@
env.put( Context.PROVIDER_URL, "dc=example,dc=com" );
DirContext ctx = ( DirContext ) factory.getInitialContext( env );
- Attributes matchAttrs = new AttributesImpl( true );
- matchAttrs.put( new AttributeImpl( "krb5PrincipalName", "kadmin/changepw@EXAMPLE.COM" ) );
+ Attributes matchAttrs = new LockableAttributesImpl( true );
+ matchAttrs.put( new LockableAttributeImpl( "krb5PrincipalName", "kadmin/changepw@EXAMPLE.COM" ) );
Attributes attributes = ctx.getAttributes( "ou=users" );
System.out.println( attributes );
Modified: directory/apacheds/branches/1.0/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/1.0/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java?view=diff&rev=498848&r1=498847&r2=498848
==============================================================================
--- directory/apacheds/branches/1.0/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java (original)
+++ directory/apacheds/branches/1.0/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java Mon Jan 22 15:25:45 2007
@@ -54,7 +54,7 @@
import org.apache.directory.server.protocol.shared.store.LdifFileLoader;
import org.apache.directory.shared.ldap.exception.LdapConfigurationException;
import org.apache.directory.shared.ldap.exception.LdapNamingException;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
import org.apache.directory.shared.ldap.message.extended.NoticeOfDisconnect;
import org.apache.mina.common.DefaultIoFilterChainBuilder;
import org.apache.mina.common.ExecutorThreadModel;
@@ -219,7 +219,7 @@
private void ensureLdifFileBase( DirContext root )
{
- Attributes entry = new AttributesImpl( "ou", "loadedLdifFiles", true );
+ Attributes entry = new LockableAttributesImpl( "ou", "loadedLdifFiles", true );
entry.put( "objectClass", "top" );
entry.get( "objectClass" ).add( "organizationalUnit" );
try
@@ -250,7 +250,7 @@
buf.append( "," );
buf.append( LDIF_FILES_DN );
- Attributes entry = new AttributesImpl( rdnAttr, getCanonical( ldif ), true );
+ Attributes entry = new LockableAttributesImpl( rdnAttr, getCanonical( ldif ), true );
entry.put( "objectClass", "top" );
entry.get( "objectClass" ).add( oc );
root.createSubcontext( buf.toString(), entry );
Modified: directory/apacheds/branches/1.0/server-ssl/src/test/java/org/apache/directory/server/ssl/LdapsITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/1.0/server-ssl/src/test/java/org/apache/directory/server/ssl/LdapsITest.java?view=diff&rev=498848&r1=498847&r2=498848
==============================================================================
--- directory/apacheds/branches/1.0/server-ssl/src/test/java/org/apache/directory/server/ssl/LdapsITest.java (original)
+++ directory/apacheds/branches/1.0/server-ssl/src/test/java/org/apache/directory/server/ssl/LdapsITest.java Mon Jan 22 15:25:45 2007
@@ -32,8 +32,8 @@
import org.apache.directory.server.ssl.support.SSLSocketFactory;
import org.apache.directory.server.unit.AbstractServerTest;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
import org.apache.mina.util.AvailablePortFinder;
@@ -115,8 +115,8 @@
public void testSetUpTearDown() throws NamingException
{
// Create a person
- Attributes attributes = new AttributesImpl( true );
- Attribute attribute = new AttributeImpl( "objectClass" );
+ Attributes attributes = new LockableAttributesImpl( true );
+ Attribute attribute = new LockableAttributeImpl( "objectClass" );
attribute.add( "top" );
attribute.add( "person" );
attributes.put( attribute );
Modified: directory/apacheds/branches/1.0/server-tools/src/main/java/org/apache/directory/server/tools/CapacityTestCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/1.0/server-tools/src/main/java/org/apache/directory/server/tools/CapacityTestCommand.java?view=diff&rev=498848&r1=498847&r2=498848
==============================================================================
--- directory/apacheds/branches/1.0/server-tools/src/main/java/org/apache/directory/server/tools/CapacityTestCommand.java (original)
+++ directory/apacheds/branches/1.0/server-tools/src/main/java/org/apache/directory/server/tools/CapacityTestCommand.java Mon Jan 22 15:25:45 2007
@@ -36,7 +36,7 @@
import org.apache.commons.cli.Options;
import org.apache.commons.lang.RandomStringUtils;
import org.apache.directory.daemon.AvailablePortFinder;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
@@ -135,7 +135,7 @@
private boolean createBase( LdapContext ctx ) throws NamingException
{
- Attributes attrs = new AttributesImpl( "objectClass", "organizationalUnit", true );
+ Attributes attrs = new LockableAttributesImpl( "objectClass", "organizationalUnit", true );
attrs.put( "ou", "users" );
try
@@ -152,7 +152,7 @@
private Attributes generateLdif( int counter )
{
- Attributes attrs = new AttributesImpl( "objectClass", "top", true );
+ Attributes attrs = new LockableAttributesImpl( "objectClass", "top", true );
Attribute oc = attrs.get( "objectClass" );
oc.add( "person" );
oc.add( "organizationalPerson" );
Modified: directory/apacheds/branches/1.0/server-unit/src/test/java/org/apache/directory/server/AddITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/1.0/server-unit/src/test/java/org/apache/directory/server/AddITest.java?view=diff&rev=498848&r1=498847&r2=498848
==============================================================================
--- directory/apacheds/branches/1.0/server-unit/src/test/java/org/apache/directory/server/AddITest.java (original)
+++ directory/apacheds/branches/1.0/server-unit/src/test/java/org/apache/directory/server/AddITest.java Mon Jan 22 15:25:45 2007
@@ -38,8 +38,8 @@
import netscape.ldap.LDAPException;
import org.apache.directory.server.unit.AbstractServerTest;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
import java.util.Hashtable;
@@ -73,8 +73,8 @@
ctx = new InitialDirContext( env );
// Create a person
- Attributes attributes = new AttributesImpl( true );
- Attribute attribute = new AttributeImpl( "objectClass" );
+ Attributes attributes = new LockableAttributesImpl( true );
+ Attribute attribute = new LockableAttributeImpl( "objectClass" );
attribute.add( "top" );
attribute.add( "person" );
attributes.put( attribute );
@@ -134,8 +134,8 @@
{
// modify object classes, add two more
- Attributes attributes = new AttributesImpl( true );
- Attribute ocls = new AttributeImpl( "objectClass" );
+ Attributes attributes = new LockableAttributesImpl( true );
+ Attribute ocls = new LockableAttributeImpl( "objectClass" );
ocls.add( "organizationalPerson" );
ocls.add( "inetOrgPerson" );
attributes.put( ocls );
@@ -168,8 +168,8 @@
String newDescription = "More info on the user ...";
// modify object classes, add two more
- Attributes attributes = new AttributesImpl( true );
- Attribute desc = new AttributeImpl( "description", newDescription );
+ Attributes attributes = new LockableAttributesImpl( true );
+ Attribute desc = new LockableAttributeImpl( "description", newDescription );
attributes.put( desc );
DirContext person = ( DirContext ) ctx.lookup( RDN );
@@ -190,8 +190,8 @@
public void testAddWithMissingRequiredAttributes() throws NamingException
{
// person without sn
- Attributes attrs = new AttributesImpl();
- Attribute ocls = new AttributeImpl( "objectClass" );
+ Attributes attrs = new LockableAttributesImpl();
+ Attribute ocls = new LockableAttributeImpl( "objectClass" );
ocls.add( "top" );
ocls.add( "person" );
attrs.put( ocls );
@@ -344,14 +344,14 @@
public void testAddWithInvalidNumberOfAttributeValues() throws NamingException
{
// add inetOrgPerson with two displayNames
- Attributes attrs = new AttributesImpl();
- Attribute ocls = new AttributeImpl( "objectClass" );
+ Attributes attrs = new LockableAttributesImpl();
+ Attribute ocls = new LockableAttributeImpl( "objectClass" );
ocls.add( "top" );
ocls.add( "inetOrgPerson" );
attrs.put( ocls );
attrs.put( "cn", "Fiona Apple" );
attrs.put( "sn", "Apple" );
- Attribute displayName = new AttributeImpl( "displayName" );
+ Attribute displayName = new LockableAttributeImpl( "displayName" );
displayName.add( "Fiona" );
displayName.add( "Fiona A." );
attrs.put( displayName );
@@ -375,8 +375,8 @@
{
// Create entry
- Attributes entry = new AttributesImpl();
- Attribute entryOcls = new AttributeImpl( "objectclass" );
+ Attributes entry = new LockableAttributesImpl();
+ Attribute entryOcls = new LockableAttributeImpl( "objectclass" );
entryOcls.add( "top" );
entryOcls.add( "organizationalUnit" );
entry.put( entryOcls );
@@ -386,8 +386,8 @@
// Create Alias
String aliasedObjectName = entryRdn + "," + ctx.getNameInNamespace();
- Attributes alias = new AttributesImpl();
- Attribute aliasOcls = new AttributeImpl( "objectclass" );
+ Attributes alias = new LockableAttributesImpl();
+ Attribute aliasOcls = new LockableAttributeImpl( "objectclass" );
aliasOcls.add( "top" );
aliasOcls.add( "organizationalUnit" );
aliasOcls.add( "alias" );
@@ -411,8 +411,8 @@
{
// Create container
- Attributes container = new AttributesImpl();
- Attribute containerOcls = new AttributeImpl( "objectclass" );
+ Attributes container = new LockableAttributesImpl();
+ Attribute containerOcls = new LockableAttributeImpl( "objectclass" );
containerOcls.add( "top" );
containerOcls.add( "organizationalUnit" );
container.put( containerOcls );
@@ -421,8 +421,8 @@
DirContext containerCtx = ctx.createSubcontext( containerRdn, container );
// Create entry
- Attributes entry = new AttributesImpl();
- Attribute entryOcls = new AttributeImpl( "objectclass" );
+ Attributes entry = new LockableAttributesImpl();
+ Attribute entryOcls = new LockableAttributeImpl( "objectclass" );
entryOcls.add( "top" );
entryOcls.add( "organizationalUnit" );
entry.put( entryOcls );
@@ -432,8 +432,8 @@
// Create alias ou=bestFruit,ou=Fruits to entry ou=favorite,ou=Fruits
String aliasedObjectName = entryRdn + "," + containerCtx.getNameInNamespace();
- Attributes alias = new AttributesImpl();
- Attribute aliasOcls = new AttributeImpl( "objectclass" );
+ Attributes alias = new LockableAttributesImpl();
+ Attribute aliasOcls = new LockableAttributeImpl( "objectclass" );
aliasOcls.add( "top" );
aliasOcls.add( "organizationalUnit" );
aliasOcls.add( "alias" );
Modified: directory/apacheds/branches/1.0/server-unit/src/test/java/org/apache/directory/server/AddingEntriesWithSpecialCharactersInRDNTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/1.0/server-unit/src/test/java/org/apache/directory/server/AddingEntriesWithSpecialCharactersInRDNTest.java?view=diff&rev=498848&r1=498847&r2=498848
==============================================================================
--- directory/apacheds/branches/1.0/server-unit/src/test/java/org/apache/directory/server/AddingEntriesWithSpecialCharactersInRDNTest.java (original)
+++ directory/apacheds/branches/1.0/server-unit/src/test/java/org/apache/directory/server/AddingEntriesWithSpecialCharactersInRDNTest.java Mon Jan 22 15:25:45 2007
@@ -32,8 +32,8 @@
import javax.naming.directory.SearchResult;
import org.apache.directory.server.unit.AbstractServerTest;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
/**
@@ -74,8 +74,8 @@
protected Attributes getPersonAttributes(String sn, String cn) {
- Attributes attrs = new AttributesImpl();
- Attribute ocls = new AttributeImpl("objectClass");
+ Attributes attrs = new LockableAttributesImpl();
+ Attribute ocls = new LockableAttributeImpl("objectClass");
ocls.add("top");
ocls.add("person");
attrs.put(ocls);
@@ -87,8 +87,8 @@
protected Attributes getOrgUnitAttributes(String ou) {
- Attributes attrs = new AttributesImpl();
- Attribute ocls = new AttributeImpl("objectClass");
+ Attributes attrs = new LockableAttributesImpl();
+ Attribute ocls = new LockableAttributeImpl("objectClass");
ocls.add("top");
ocls.add("organizationalUnit");
attrs.put(ocls);
Modified: directory/apacheds/branches/1.0/server-unit/src/test/java/org/apache/directory/server/BinarySearchTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/1.0/server-unit/src/test/java/org/apache/directory/server/BinarySearchTest.java?view=diff&rev=498848&r1=498847&r2=498848
==============================================================================
--- directory/apacheds/branches/1.0/server-unit/src/test/java/org/apache/directory/server/BinarySearchTest.java (original)
+++ directory/apacheds/branches/1.0/server-unit/src/test/java/org/apache/directory/server/BinarySearchTest.java Mon Jan 22 15:25:45 2007
@@ -31,8 +31,8 @@
import javax.naming.ldap.LdapContext;
import org.apache.directory.server.unit.AbstractServerTest;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
/**
@@ -52,8 +52,8 @@
*/
protected Attributes getPersonAttributes( String sn, String cn )
{
- Attributes attributes = new AttributesImpl();
- Attribute attribute = new AttributeImpl( "objectClass" );
+ Attributes attributes = new LockableAttributesImpl();
+ Attribute attribute = new LockableAttributeImpl( "objectClass" );
attribute.add( "top" );
attribute.add( "person" );
attributes.put( attribute );
Modified: directory/apacheds/branches/1.0/server-unit/src/test/java/org/apache/directory/server/DefaultAuthorizationTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/1.0/server-unit/src/test/java/org/apache/directory/server/DefaultAuthorizationTest.java?view=diff&rev=498848&r1=498847&r2=498848
==============================================================================
--- directory/apacheds/branches/1.0/server-unit/src/test/java/org/apache/directory/server/DefaultAuthorizationTest.java (original)
+++ directory/apacheds/branches/1.0/server-unit/src/test/java/org/apache/directory/server/DefaultAuthorizationTest.java Mon Jan 22 15:25:45 2007
@@ -32,8 +32,8 @@
import javax.naming.ldap.LdapContext;
import org.apache.directory.server.unit.AbstractServerTest;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
/**
* Simple test for DefaultAuthorizationService. Adds two users emtries below
@@ -60,8 +60,8 @@
*/
protected Attributes getPersonAttributes(String sn, String cn)
{
- Attributes attributes = new AttributesImpl();
- Attribute attribute = new AttributeImpl( "objectClass" );
+ Attributes attributes = new LockableAttributesImpl();
+ Attribute attribute = new LockableAttributeImpl( "objectClass" );
attribute.add( "top" );
attribute.add( "person" );
attributes.put( attribute );
Modified: directory/apacheds/branches/1.0/server-unit/src/test/java/org/apache/directory/server/MatchingRuleCompareTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/1.0/server-unit/src/test/java/org/apache/directory/server/MatchingRuleCompareTest.java?view=diff&rev=498848&r1=498847&r2=498848
==============================================================================
--- directory/apacheds/branches/1.0/server-unit/src/test/java/org/apache/directory/server/MatchingRuleCompareTest.java (original)
+++ directory/apacheds/branches/1.0/server-unit/src/test/java/org/apache/directory/server/MatchingRuleCompareTest.java Mon Jan 22 15:25:45 2007
@@ -32,8 +32,8 @@
import javax.naming.ldap.LdapContext;
import org.apache.directory.server.unit.AbstractServerTest;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
/**
@@ -60,8 +60,8 @@
protected Attributes getPersonAttributes( String sn, String cn )
{
- Attributes attributes = new AttributesImpl();
- Attribute attribute = new AttributeImpl( "objectClass" );
+ Attributes attributes = new LockableAttributesImpl();
+ Attribute attribute = new LockableAttributeImpl( "objectClass" );
attribute.add( "top" );
attribute.add( "person" );
attributes.put( attribute );
@@ -74,8 +74,8 @@
protected Attributes getGroupOfNamesAttributes( String cn, String member )
{
- Attributes attributes = new AttributesImpl();
- Attribute attribute = new AttributeImpl( "objectClass" );
+ Attributes attributes = new LockableAttributesImpl();
+ Attribute attribute = new LockableAttributeImpl( "objectClass" );
attribute.add( "top" );
attribute.add( "groupOfNames" );
attributes.put( attribute );
Modified: directory/apacheds/branches/1.0/server-unit/src/test/java/org/apache/directory/server/MiscTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/1.0/server-unit/src/test/java/org/apache/directory/server/MiscTest.java?view=diff&rev=498848&r1=498847&r2=498848
==============================================================================
--- directory/apacheds/branches/1.0/server-unit/src/test/java/org/apache/directory/server/MiscTest.java (original)
+++ directory/apacheds/branches/1.0/server-unit/src/test/java/org/apache/directory/server/MiscTest.java Mon Jan 22 15:25:45 2007
@@ -27,8 +27,8 @@
import org.apache.directory.server.core.configuration.MutablePartitionConfiguration;
import org.apache.directory.server.unit.AbstractServerTest;
import org.apache.directory.shared.asn1.util.Asn1StringUtils;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
import org.apache.directory.shared.ldap.message.Control;
import org.apache.directory.shared.ldap.util.ArrayUtils;
import org.apache.directory.shared.ldap.util.EmptyEnumeration;
@@ -89,8 +89,8 @@
partitions.addAll( configuration.getContextPartitionConfigurations() );
MutablePartitionConfiguration partition = new MutablePartitionConfiguration();
partition.setSuffix( "dc=aPache,dc=org" );
- Attributes entry = new AttributesImpl( "dc", "aPache", true );
- Attribute oc = new AttributeImpl( "objectClass" );
+ Attributes entry = new LockableAttributesImpl( "dc", "aPache", true );
+ Attribute oc = new LockableAttributeImpl( "objectClass" );
entry.put( oc );
oc.add( "top" );
oc.add( "domain" );
@@ -110,8 +110,8 @@
partitions.addAll( configuration.getContextPartitionConfigurations() );
MutablePartitionConfiguration partition = new MutablePartitionConfiguration();
partition.setSuffix( "dc=apache,dc=org" );
- Attributes entry = new AttributesImpl( "dc", "apache", true );
- Attribute oc = new AttributeImpl( "objectClass" );
+ Attributes entry = new LockableAttributesImpl( "dc", "apache", true );
+ Attribute oc = new LockableAttributeImpl( "objectClass" );
entry.put( oc );
oc.add( "top" );
oc.add( "domain" );
@@ -181,8 +181,8 @@
{
}
- Attributes attrs = new AttributesImpl( true );
- Attribute oc = new AttributeImpl( "objectClass" );
+ Attributes attrs = new LockableAttributesImpl( true );
+ Attribute oc = new LockableAttributeImpl( "objectClass" );
attrs.put( oc );
oc.add( "top" );
oc.add( "organizationalUnit" );
@@ -279,8 +279,8 @@
env.put( "java.naming.ldap.version", "3" );
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
- Attributes attributes = new AttributesImpl();
- Attribute objectClass = new AttributeImpl( "objectClass" );
+ Attributes attributes = new LockableAttributesImpl();
+ Attribute objectClass = new LockableAttributeImpl( "objectClass" );
objectClass.add( "top" );
objectClass.add( "organizationalUnit" );
attributes.put( objectClass );
@@ -318,8 +318,8 @@
Attributes attrs = ctx.getAttributes( "" );
assertTrue( attrs.get( "dc" ).get().equals( "aPache" ) );
- Attributes user = new AttributesImpl( "cn", "Kate Bush", true );
- Attribute oc = new AttributeImpl( "objectClass" );
+ Attributes user = new LockableAttributesImpl( "cn", "Kate Bush", true );
+ Attribute oc = new LockableAttributeImpl( "objectClass" );
oc.add( "top" );
oc.add( "person" );
oc.add( "organizationalPerson" );
@@ -431,8 +431,8 @@
env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
InitialLdapContext ctx = new InitialLdapContext( env, null );
- Attributes user = new AttributesImpl( "cn", "Kate Bush", true );
- Attribute oc = new AttributeImpl( "objectClass" );
+ Attributes user = new LockableAttributesImpl( "cn", "Kate Bush", true );
+ Attribute oc = new LockableAttributeImpl( "objectClass" );
oc.add( "top" );
oc.add( "person" );
oc.add( "organizationalPerson" );
Modified: directory/apacheds/branches/1.0/server-unit/src/test/java/org/apache/directory/server/ModifyAddTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/1.0/server-unit/src/test/java/org/apache/directory/server/ModifyAddTest.java?view=diff&rev=498848&r1=498847&r2=498848
==============================================================================
--- directory/apacheds/branches/1.0/server-unit/src/test/java/org/apache/directory/server/ModifyAddTest.java (original)
+++ directory/apacheds/branches/1.0/server-unit/src/test/java/org/apache/directory/server/ModifyAddTest.java Mon Jan 22 15:25:45 2007
@@ -36,8 +36,8 @@
import javax.naming.ldap.LdapContext;
import org.apache.directory.server.unit.AbstractServerTest;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
import org.apache.directory.shared.ldap.message.ModificationItemImpl;
@@ -61,8 +61,8 @@
*/
protected Attributes getPersonAttributes( String sn, String cn )
{
- Attributes attributes = new AttributesImpl();
- Attribute attribute = new AttributeImpl( "objectClass" );
+ Attributes attributes = new LockableAttributesImpl();
+ Attribute attribute = new LockableAttributeImpl( "objectClass" );
attribute.add( "top" );
attribute.add( "person" );
attributes.put( attribute );
@@ -119,7 +119,7 @@
{
// Add telephoneNumber attribute
String newValue = "1234567890";
- Attributes attrs = new AttributesImpl( "telephoneNumber", newValue );
+ Attributes attrs = new LockableAttributesImpl( "telephoneNumber", newValue );
ctx.modifyAttributes( RDN, DirContext.ADD_ATTRIBUTE, attrs );
// Verify, that attribute value is added
@@ -141,10 +141,10 @@
// Add telephoneNumber attribute
String[] newValues =
{ "1234567890", "999999999" };
- Attribute attr = new AttributeImpl( "telephoneNumber" );
+ Attribute attr = new LockableAttributeImpl( "telephoneNumber" );
attr.add( newValues[0] );
attr.add( newValues[1] );
- Attributes attrs = new AttributesImpl();
+ Attributes attrs = new LockableAttributesImpl();
attrs.put( attr );
ctx.modifyAttributes( RDN, DirContext.ADD_ATTRIBUTE, attrs );
@@ -168,7 +168,7 @@
// A new description attribute value
String newValue = "A new description for this person";
assertFalse( newValue.equals( PERSON_DESCRIPTION ) );
- Attributes attrs = new AttributesImpl( "description", newValue );
+ Attributes attrs = new LockableAttributesImpl( "description", newValue );
ctx.modifyAttributes( RDN, DirContext.ADD_ATTRIBUTE, attrs );
@@ -195,7 +195,7 @@
public void testAddExistingAttributeValue() throws NamingException
{
// Change description attribute
- Attributes attrs = new AttributesImpl( "description", PERSON_DESCRIPTION );
+ Attributes attrs = new LockableAttributesImpl( "description", PERSON_DESCRIPTION );
try
{
@@ -230,23 +230,23 @@
public void testAddExistingNthAttributesDirServer664() throws NamingException
{
// Change description attribute
- Attributes attrs = new AttributesImpl( true );
- attrs.put( new AttributeImpl( "attr1", "attr 1" ) );
- attrs.put( new AttributeImpl( "attr2", "attr 2" ) );
- attrs.put( new AttributeImpl( "attr3", "attr 3" ) );
- attrs.put( new AttributeImpl( "attr4", "attr 4" ) );
- attrs.put( new AttributeImpl( "attr5", "attr 5" ) );
- attrs.put( new AttributeImpl( "attr6", "attr 6" ) );
- attrs.put( new AttributeImpl( "attr7", "attr 7" ) );
- attrs.put( new AttributeImpl( "attr8", "attr 8" ) );
- attrs.put( new AttributeImpl( "attr9", "attr 9" ) );
- attrs.put( new AttributeImpl( "attr10", "attr 10" ) );
- attrs.put( new AttributeImpl( "attr11", "attr 11" ) );
- attrs.put( new AttributeImpl( "attr12", "attr 12" ) );
- attrs.put( new AttributeImpl( "attr13", "attr 13" ) );
- attrs.put( new AttributeImpl( "attr14", "attr 14" ) );
+ Attributes attrs = new LockableAttributesImpl( true );
+ attrs.put( new LockableAttributeImpl( "attr1", "attr 1" ) );
+ attrs.put( new LockableAttributeImpl( "attr2", "attr 2" ) );
+ attrs.put( new LockableAttributeImpl( "attr3", "attr 3" ) );
+ attrs.put( new LockableAttributeImpl( "attr4", "attr 4" ) );
+ attrs.put( new LockableAttributeImpl( "attr5", "attr 5" ) );
+ attrs.put( new LockableAttributeImpl( "attr6", "attr 6" ) );
+ attrs.put( new LockableAttributeImpl( "attr7", "attr 7" ) );
+ attrs.put( new LockableAttributeImpl( "attr8", "attr 8" ) );
+ attrs.put( new LockableAttributeImpl( "attr9", "attr 9" ) );
+ attrs.put( new LockableAttributeImpl( "attr10", "attr 10" ) );
+ attrs.put( new LockableAttributeImpl( "attr11", "attr 11" ) );
+ attrs.put( new LockableAttributeImpl( "attr12", "attr 12" ) );
+ attrs.put( new LockableAttributeImpl( "attr13", "attr 13" ) );
+ attrs.put( new LockableAttributeImpl( "attr14", "attr 14" ) );
- Attribute attr = new AttributeImpl( "description", PERSON_DESCRIPTION );
+ Attribute attr = new LockableAttributeImpl( "description", PERSON_DESCRIPTION );
attrs.put( attr );
@@ -276,8 +276,8 @@
public void testTwoDescriptionDirServer643() throws NamingException
{
// Change description attribute
- Attributes attrs = new AttributesImpl( true );
- Attribute attr = new AttributeImpl( "description", "a British singer-songwriter with an expressive four-octave voice" );
+ Attributes attrs = new LockableAttributesImpl( true );
+ Attribute attr = new LockableAttributeImpl( "description", "a British singer-songwriter with an expressive four-octave voice" );
attr.add( "one of the most influential female artists of the twentieth century" );
attrs.put( attr );
@@ -304,7 +304,7 @@
public void testAddDuplicateValueToExistingAttribute() throws NamingException
{
// modify object classes, add a new value twice
- Attribute ocls = new AttributeImpl( "objectClass", "organizationalPerson" );
+ Attribute ocls = new LockableAttributeImpl( "objectClass", "organizationalPerson" );
ModificationItemImpl[] modItems = new ModificationItemImpl[2];
modItems[0] = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, ocls );
modItems[1] = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, ocls );
@@ -336,7 +336,7 @@
public void testAddDuplicateValueToNewAttribute() throws NamingException
{
// add the same description value twice
- Attribute desc = new AttributeImpl( "description", "another description value besides songwriter" );
+ Attribute desc = new LockableAttributeImpl( "description", "another description value besides songwriter" );
ModificationItemImpl[] modItems = new ModificationItemImpl[2];
modItems[0] = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, desc );
modItems[1] = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, desc );
@@ -399,7 +399,7 @@
{
// Add a not existing attribute
String newValue = "unbelievable";
- Attributes attrs = new AttributesImpl( "voice", newValue );
+ Attributes attrs = new LockableAttributesImpl( "voice", newValue );
try
{
@@ -431,14 +431,14 @@
String[] descriptions = {
"Kate Bush is a British singer-songwriter.",
"She has become one of the most influential female artists of the twentieth century." };
- Attribute desc1 = new AttributeImpl("description");
+ Attribute desc1 = new LockableAttributeImpl("description");
desc1.add(descriptions[0]);
desc1.add(descriptions[1]);
ModificationItemImpl addModOp = new ModificationItemImpl(
DirContext.ADD_ATTRIBUTE, desc1);
- Attribute desc2 = new AttributeImpl("description");
+ Attribute desc2 = new LockableAttributeImpl("description");
desc2.add(descriptions[1]);
ModificationItemImpl delModOp = new ModificationItemImpl(
DirContext.REMOVE_ATTRIBUTE, desc2);
@@ -518,8 +518,8 @@
*/
public void testModifyAddWithInvalidNumberOfAttributeValues() throws NamingException
{
- Attributes attrs = new AttributesImpl();
- Attribute ocls = new AttributeImpl( "objectClass" );
+ Attributes attrs = new LockableAttributesImpl();
+ Attribute ocls = new LockableAttributeImpl( "objectClass" );
ocls.add( "top" );
ocls.add( "inetOrgPerson" );
attrs.put( ocls );
@@ -528,8 +528,8 @@
ctx.createSubcontext( "cn=Fiona Apple", attrs );
// add two displayNames to an inetOrgPerson
- attrs = new AttributesImpl();
- Attribute displayName = new AttributeImpl( "displayName" );
+ attrs = new LockableAttributesImpl();
+ Attribute displayName = new LockableAttributeImpl( "displayName" );
displayName.add( "Fiona" );
displayName.add( "Fiona A." );
attrs.put( displayName );
Modified: directory/apacheds/branches/1.0/server-unit/src/test/java/org/apache/directory/server/ModifyRdnTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/1.0/server-unit/src/test/java/org/apache/directory/server/ModifyRdnTest.java?view=diff&rev=498848&r1=498847&r2=498848
==============================================================================
--- directory/apacheds/branches/1.0/server-unit/src/test/java/org/apache/directory/server/ModifyRdnTest.java (original)
+++ directory/apacheds/branches/1.0/server-unit/src/test/java/org/apache/directory/server/ModifyRdnTest.java Mon Jan 22 15:25:45 2007
@@ -31,8 +31,8 @@
import javax.naming.ldap.LdapContext;
import org.apache.directory.server.unit.AbstractServerTest;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
/**
@@ -53,8 +53,8 @@
*/
protected Attributes getPersonAttributes( String sn, String cn )
{
- Attributes attributes = new AttributesImpl();
- Attribute attribute = new AttributeImpl( "objectClass" );
+ Attributes attributes = new LockableAttributesImpl();
+ Attribute attribute = new LockableAttributeImpl( "objectClass" );
attribute.add( "top" );
attribute.add( "person" );
attributes.put( attribute );