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/08 20:40:10 UTC
svn commit: r494167 -
/directory/trunks/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
Author: elecharny
Date: Mon Jan 8 11:40:09 2007
New Revision: 494167
URL: http://svn.apache.org/viewvc?view=rev&rev=494167
Log:
Patch for DIRSERVER-783.
- No more BasicAttribute and BasicAttributes. Use AttributeImpl and AttributesImpl now.
- No more ModificationItem. use ModificationItemImpl now
- lot of refactoring of imports : no more import xxx.*;
Modified:
directory/trunks/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
Modified: directory/trunks/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java?view=diff&rev=494167&r1=494166&r2=494167
==============================================================================
--- directory/trunks/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java (original)
+++ directory/trunks/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java Mon Jan 8 11:40:09 2007
@@ -35,7 +35,6 @@
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
import javax.naming.directory.DirContext;
-import javax.naming.directory.ModificationItem;
import jdbm.RecordManager;
import jdbm.helper.MRU;
@@ -55,8 +54,9 @@
import org.apache.directory.server.schema.registries.Registries;
import org.apache.directory.shared.ldap.exception.LdapNameNotFoundException;
import org.apache.directory.shared.ldap.exception.LdapSchemaViolationException;
-import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
-import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.message.ModificationItemImpl;
import org.apache.directory.shared.ldap.message.ResultCodeEnum;
import org.apache.directory.shared.ldap.name.LdapDN;
import org.apache.directory.shared.ldap.schema.AttributeType;
@@ -1200,7 +1200,7 @@
public Attributes getIndices( BigInteger id ) throws NamingException
{
- Attributes attributes = new LockableAttributesImpl();
+ Attributes attributes = new AttributesImpl();
// Get the distinguishedName to id mapping
attributes.put( "_nDn", getEntryDn( id ) );
@@ -1221,7 +1221,7 @@
Attribute attr = attributes.get( attrId );
if ( attr == null )
{
- attr = new LockableAttributeImpl( attrId );
+ attr = new AttributeImpl( attrId );
}
attr.add( val );
attributes.put( attr );
@@ -1243,7 +1243,7 @@
Attribute attr = attributes.get( valStr );
if ( attr == null )
{
- attr = new LockableAttributeImpl( valStr );
+ attr = new AttributeImpl( valStr );
}
attr.add( rec.getEntryId() );
attributes.put( attr );
@@ -1253,7 +1253,7 @@
// Get all parent child mappings for this entry as the parent using the
// key 'child' with many entries following it.
list = hierarchyIdx.listIndices( id );
- Attribute childAttr = new LockableAttributeImpl( "_child" );
+ Attribute childAttr = new AttributeImpl( "_child" );
attributes.put( childAttr );
while ( list.hasMore() )
{
@@ -1298,7 +1298,7 @@
if ( entryAttrToAddTo == null )
{
- entryAttrToAddTo = new LockableAttributeImpl( mods.getID() );
+ entryAttrToAddTo = new AttributeImpl( mods.getID() );
entry.put( entryAttrToAddTo );
}
@@ -1495,7 +1495,7 @@
}
- public void modify( LdapDN dn, ModificationItem[] mods ) throws NamingException
+ public void modify( LdapDN dn, ModificationItemImpl[] mods ) throws NamingException
{
BigInteger id = getEntryId( dn.toString() );
Attributes entry = master.get( id );
@@ -1568,7 +1568,7 @@
Attribute rdnAttr = ServerUtils.getAttribute( newRdnAttrType, entry );
if ( rdnAttr == null )
{
- rdnAttr = new LockableAttributeImpl( newRdnAttr );
+ rdnAttr = new AttributeImpl( newRdnAttr );
}
// add the new Rdn value only if it is not already present in the entry