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:41:50 UTC
svn commit: r494169 [2/3] - in /directory/trunks/apacheds/core/src:
main/java/org/apache/directory/server/core/
main/java/org/apache/directory/server/core/authn/
main/java/org/apache/directory/server/core/authz/
main/java/org/apache/directory/server/co...
Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/prefs/ServerSystemPreferences.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/prefs/ServerSystemPreferences.java?view=diff&rev=494169&r1=494168&r2=494169
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/prefs/ServerSystemPreferences.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/prefs/ServerSystemPreferences.java Mon Jan 8 11:41:45 2007
@@ -35,9 +35,7 @@
import javax.naming.NamingException;
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
-import javax.naming.directory.BasicAttribute;
import javax.naming.directory.DirContext;
-import javax.naming.directory.ModificationItem;
import javax.naming.ldap.InitialLdapContext;
import javax.naming.ldap.LdapContext;
@@ -45,8 +43,9 @@
import org.apache.directory.server.core.configuration.ShutdownConfiguration;
import org.apache.directory.server.core.jndi.CoreContextFactory;
-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.util.PreferencesDictionary;
@@ -61,7 +60,7 @@
public class ServerSystemPreferences extends AbstractPreferences
{
/** an empty array of ModificationItems used to get array from list */
- private static final ModificationItem[] EMPTY_MODS = new ModificationItem[0];
+ private static final ModificationItemImpl[] EMPTY_MODS = new ModificationItemImpl[0];
/** an empty array of Strings used to get array from list */
private static final String[] EMPTY_STRINGS = new String[0];
@@ -191,13 +190,13 @@
*/
private void setUpNode( String name ) throws NamingException
{
- Attributes attrs = new LockableAttributesImpl();
- Attribute attr = new LockableAttributeImpl( "objectClass" );
+ Attributes attrs = new AttributesImpl();
+ Attribute attr = new AttributeImpl( "objectClass" );
attr.add( "top" );
attr.add( "prefNode" );
attr.add( "extensibleObject" );
attrs.put( attr );
- attr = new LockableAttributeImpl( "prefNodeName" );
+ attr = new AttributeImpl( "prefNodeName" );
attr.add( name );
attrs.put( attr );
@@ -226,7 +225,7 @@
try
{
- ctx.modifyAttributes( "", ( ModificationItem[] ) changes.toArray( EMPTY_MODS ) );
+ ctx.modifyAttributes( "", ( ModificationItemImpl[] ) changes.toArray( EMPTY_MODS ) );
}
catch ( NamingException e )
{
@@ -269,7 +268,7 @@
try
{
- ctx.modifyAttributes( "", ( ModificationItem[] ) changes.toArray( EMPTY_MODS ) );
+ ctx.modifyAttributes( "", ( ModificationItemImpl[] ) changes.toArray( EMPTY_MODS ) );
}
catch ( NamingException e )
{
@@ -335,13 +334,13 @@
protected void removeSpi( String key )
{
- Attribute attr = new BasicAttribute( key );
- ModificationItem mi = new ModificationItem( DirContext.REMOVE_ATTRIBUTE, attr );
+ Attribute attr = new AttributeImpl( key );
+ ModificationItemImpl mi = new ModificationItemImpl( DirContext.REMOVE_ATTRIBUTE, attr );
addDelta( mi );
}
- private void addDelta( ModificationItem mi )
+ private void addDelta( ModificationItemImpl mi )
{
String key = mi.getAttribute().getID();
List deltas = null;
@@ -372,7 +371,7 @@
List mods = ( List ) keyToChange.get( key );
for ( int ii = 0; ii < mods.size(); ii++ )
{
- ModificationItem mi = ( ModificationItem ) mods.get( ii );
+ ModificationItemImpl mi = ( ModificationItemImpl ) mods.get( ii );
if ( mi.getModificationOp() == DirContext.REMOVE_ATTRIBUTE )
{
attr = null;
@@ -402,9 +401,9 @@
protected void putSpi( String key, String value )
{
- Attribute attr = new BasicAttribute( key );
+ Attribute attr = new AttributeImpl( key );
attr.add( value );
- ModificationItem mi = new ModificationItem( DirContext.REPLACE_ATTRIBUTE, attr );
+ ModificationItemImpl mi = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, attr );
addDelta( mi );
}
Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java?view=diff&rev=494169&r1=494168&r2=494169
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java Mon Jan 8 11:41:45 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 javax.naming.directory.SearchControls;
import javax.naming.directory.SearchResult;
@@ -65,6 +64,7 @@
import org.apache.directory.shared.ldap.filter.AssertionEnum;
import org.apache.directory.shared.ldap.filter.ExprNode;
import org.apache.directory.shared.ldap.filter.SimpleNode;
+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;
@@ -701,7 +701,7 @@
}
- private void checkModify( LdapDN name, ModificationItem[] mods ) throws NamingException
+ private void checkModify( LdapDN name, ModificationItemImpl[] mods ) throws NamingException
{
boolean isTargetReferral = lut.isReferral( name );
@@ -765,7 +765,7 @@
}
- public void modify( NextInterceptor next, LdapDN name, ModificationItem[] mods ) throws NamingException
+ public void modify( NextInterceptor next, LdapDN name, ModificationItemImpl[] mods ) throws NamingException
{
Invocation invocation = InvocationStack.getInstance().peek();
ServerLdapContext caller = ( ServerLdapContext ) invocation.getCaller();
Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaComparatorHandler.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaComparatorHandler.java?view=diff&rev=494169&r1=494168&r2=494169
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaComparatorHandler.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaComparatorHandler.java Mon Jan 8 11:41:45 2007
@@ -25,7 +25,6 @@
import javax.naming.NamingException;
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
-import javax.naming.directory.ModificationItem;
import org.apache.directory.server.constants.MetaSchemaConstants;
import org.apache.directory.server.core.ServerUtils;
@@ -35,6 +34,7 @@
import org.apache.directory.server.schema.registries.Registries;
import org.apache.directory.shared.ldap.exception.LdapInvalidNameException;
import org.apache.directory.shared.ldap.exception.LdapOperationNotSupportedException;
+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.name.Rdn;
@@ -111,7 +111,7 @@
}
- public void modify( LdapDN name, ModificationItem[] mods, Attributes entry, Attributes targetEntry )
+ public void modify( LdapDN name, ModificationItemImpl[] mods, Attributes entry, Attributes targetEntry )
throws NamingException
{
modify( name, entry, targetEntry );
Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaNormalizerHandler.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaNormalizerHandler.java?view=diff&rev=494169&r1=494168&r2=494169
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaNormalizerHandler.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaNormalizerHandler.java Mon Jan 8 11:41:45 2007
@@ -23,7 +23,6 @@
import javax.naming.NamingException;
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
-import javax.naming.directory.ModificationItem;
import org.apache.directory.server.constants.MetaSchemaConstants;
import org.apache.directory.server.core.ServerUtils;
@@ -33,6 +32,7 @@
import org.apache.directory.server.schema.registries.Registries;
import org.apache.directory.shared.ldap.exception.LdapInvalidNameException;
import org.apache.directory.shared.ldap.exception.LdapOperationNotSupportedException;
+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.name.Rdn;
@@ -110,7 +110,7 @@
}
- public void modify( LdapDN name, ModificationItem[] mods, Attributes entry, Attributes targetEntry )
+ public void modify( LdapDN name, ModificationItemImpl[] mods, Attributes entry, Attributes targetEntry )
throws NamingException
{
modify( name, entry, targetEntry );
Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaSchemaHandler.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaSchemaHandler.java?view=diff&rev=494169&r1=494168&r2=494169
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaSchemaHandler.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaSchemaHandler.java Mon Jan 8 11:41:45 2007
@@ -24,7 +24,6 @@
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
import javax.naming.directory.DirContext;
-import javax.naming.directory.ModificationItem;
import org.apache.directory.server.constants.MetaSchemaConstants;
import org.apache.directory.server.core.ServerUtils;
@@ -32,6 +31,7 @@
import org.apache.directory.server.schema.registries.OidRegistry;
import org.apache.directory.server.schema.registries.Registries;
import org.apache.directory.shared.ldap.NotImplementedException;
+import org.apache.directory.shared.ldap.message.ModificationItemImpl;
import org.apache.directory.shared.ldap.name.LdapDN;
import org.apache.directory.shared.ldap.schema.AttributeType;
@@ -155,7 +155,7 @@
}
- public void modify( LdapDN name, ModificationItem[] mods, Attributes entry, Attributes targetEntry )
+ public void modify( LdapDN name, ModificationItemImpl[] mods, Attributes entry, Attributes targetEntry )
throws NamingException
{
OidRegistry registry = globalRegistries.getOidRegistry();
Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandler.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandler.java?view=diff&rev=494169&r1=494168&r2=494169
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandler.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandler.java Mon Jan 8 11:41:45 2007
@@ -23,7 +23,6 @@
import javax.naming.NamingException;
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
-import javax.naming.directory.ModificationItem;
import org.apache.directory.server.constants.MetaSchemaConstants;
import org.apache.directory.server.core.ServerUtils;
@@ -33,7 +32,8 @@
import org.apache.directory.server.schema.registries.SyntaxRegistry;
import org.apache.directory.shared.ldap.exception.LdapInvalidNameException;
import org.apache.directory.shared.ldap.exception.LdapOperationNotSupportedException;
-import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+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.name.Rdn;
@@ -111,7 +111,7 @@
}
- public void modify( LdapDN name, ModificationItem[] mods, Attributes entry, Attributes targetEntry )
+ public void modify( LdapDN name, ModificationItemImpl[] mods, Attributes entry, Attributes targetEntry )
throws NamingException
{
modify( name, entry, targetEntry );
@@ -169,7 +169,7 @@
Schema schema = getSchema( name );
Attributes targetEntry = ( Attributes ) entry.clone();
String newOid = NamespaceTools.getRdnValue( newRdn );
- targetEntry.put( new LockableAttributeImpl( MetaSchemaConstants.M_OID_AT, newOid ) );
+ targetEntry.put( new AttributeImpl( MetaSchemaConstants.M_OID_AT, newOid ) );
if ( ! schema.isDisabled() )
{
SyntaxChecker syntaxChecker = factory.getSyntaxChecker( targetEntry, targetRegistries );
@@ -197,7 +197,7 @@
Schema newSchema = getSchema( newParentName );
Attributes targetEntry = ( Attributes ) entry.clone();
String newOid = NamespaceTools.getRdnValue( newRn );
- targetEntry.put( new LockableAttributeImpl( MetaSchemaConstants.M_OID_AT, newOid ) );
+ targetEntry.put( new AttributeImpl( MetaSchemaConstants.M_OID_AT, newOid ) );
SyntaxChecker syntaxChecker = factory.getSyntaxChecker( targetEntry, targetRegistries );
if ( ! oldSchema.isDisabled() )
Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaSyntaxHandler.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaSyntaxHandler.java?view=diff&rev=494169&r1=494168&r2=494169
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaSyntaxHandler.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaSyntaxHandler.java Mon Jan 8 11:41:45 2007
@@ -26,7 +26,6 @@
import javax.naming.NamingException;
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
-import javax.naming.directory.ModificationItem;
import javax.naming.directory.SearchResult;
import org.apache.directory.server.constants.MetaSchemaConstants;
@@ -36,7 +35,8 @@
import org.apache.directory.server.schema.registries.SyntaxRegistry;
import org.apache.directory.shared.ldap.exception.LdapInvalidNameException;
import org.apache.directory.shared.ldap.exception.LdapOperationNotSupportedException;
-import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+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.name.Rdn;
@@ -115,7 +115,7 @@
}
- public void modify( LdapDN name, ModificationItem[] mods, Attributes entry, Attributes targetEntry )
+ public void modify( LdapDN name, ModificationItemImpl[] mods, Attributes entry, Attributes targetEntry )
throws NamingException
{
modify( name, entry, targetEntry );
@@ -193,7 +193,7 @@
Schema schema = getSchema( name );
Attributes targetEntry = ( Attributes ) entry.clone();
String newOid = NamespaceTools.getRdnValue( newRdn );
- targetEntry.put( new LockableAttributeImpl( MetaSchemaConstants.M_OID_AT, newOid ) );
+ targetEntry.put( new AttributeImpl( MetaSchemaConstants.M_OID_AT, newOid ) );
if ( ! schema.isDisabled() )
{
Syntax syntax = factory.getSyntax( targetEntry, targetRegistries );
@@ -223,7 +223,7 @@
Schema newSchema = getSchema( newParentName );
Attributes targetEntry = ( Attributes ) entry.clone();
String newOid = NamespaceTools.getRdnValue( newRn );
- targetEntry.put( new LockableAttributeImpl( MetaSchemaConstants.M_OID_AT, newOid ) );
+ targetEntry.put( new AttributeImpl( MetaSchemaConstants.M_OID_AT, newOid ) );
Syntax syntax = factory.getSyntax( targetEntry, targetRegistries );
if ( ! oldSchema.isDisabled() )
Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaChangeHandler.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaChangeHandler.java?view=diff&rev=494169&r1=494168&r2=494169
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaChangeHandler.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaChangeHandler.java Mon Jan 8 11:41:45 2007
@@ -22,8 +22,8 @@
import javax.naming.NamingException;
import javax.naming.directory.Attributes;
-import javax.naming.directory.ModificationItem;
+import org.apache.directory.shared.ldap.message.ModificationItemImpl;
import org.apache.directory.shared.ldap.name.LdapDN;
@@ -40,7 +40,7 @@
void delete( LdapDN name, Attributes entry ) throws NamingException;
void rename( LdapDN name, Attributes entry, String newRdn ) throws NamingException;
void modify( LdapDN name, int modOp, Attributes mods, Attributes entry, Attributes targetEntry ) throws NamingException;
- void modify( LdapDN name, ModificationItem[] mods, Attributes entry, Attributes targetEntry ) throws NamingException;
+ void modify( LdapDN name, ModificationItemImpl[] mods, Attributes entry, Attributes targetEntry ) throws NamingException;
void move( LdapDN oriChildName, LdapDN newParentName, String newRn, boolean deleteOldRn, Attributes entry ) throws NamingException;
void move( LdapDN oriChildName, LdapDN newParentName, Attributes entry ) throws NamingException;
}
Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaEntityFactory.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaEntityFactory.java?view=diff&rev=494169&r1=494168&r2=494169
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaEntityFactory.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaEntityFactory.java Mon Jan 8 11:41:45 2007
@@ -36,7 +36,14 @@
import org.apache.directory.server.core.ServerUtils;
import org.apache.directory.server.schema.bootstrap.Schema;
import org.apache.directory.server.schema.registries.Registries;
-import org.apache.directory.shared.ldap.schema.*;
+import org.apache.directory.shared.ldap.schema.AttributeType;
+import org.apache.directory.shared.ldap.schema.MatchingRule;
+import org.apache.directory.shared.ldap.schema.MutableSchemaObject;
+import org.apache.directory.shared.ldap.schema.Normalizer;
+import org.apache.directory.shared.ldap.schema.ObjectClass;
+import org.apache.directory.shared.ldap.schema.ObjectClassTypeEnum;
+import org.apache.directory.shared.ldap.schema.Syntax;
+import org.apache.directory.shared.ldap.schema.UsageEnum;
import org.apache.directory.shared.ldap.schema.syntax.SyntaxChecker;
import org.apache.directory.shared.ldap.util.AttributeUtils;
Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaManager.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaManager.java?view=diff&rev=494169&r1=494168&r2=494169
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaManager.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaManager.java Mon Jan 8 11:41:45 2007
@@ -23,13 +23,13 @@
import javax.naming.NamingException;
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
-import javax.naming.directory.ModificationItem;
import org.apache.directory.server.constants.MetaSchemaConstants;
import org.apache.directory.server.constants.SystemSchemaConstants;
import org.apache.directory.server.core.ServerUtils;
import org.apache.directory.server.schema.registries.Registries;
import org.apache.directory.shared.ldap.NotImplementedException;
+import org.apache.directory.shared.ldap.message.ModificationItemImpl;
import org.apache.directory.shared.ldap.name.LdapDN;
import org.apache.directory.shared.ldap.schema.AttributeType;
import org.apache.directory.shared.ldap.util.AttributeUtils;
@@ -202,7 +202,7 @@
}
- public void modify( LdapDN name, ModificationItem[] mods, Attributes entry, Attributes targetEntry )
+ public void modify( LdapDN name, ModificationItemImpl[] mods, Attributes entry, Attributes targetEntry )
throws NamingException
{
Attribute oc = ServerUtils.getAttribute( objectClassAT, entry );
Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java?view=diff&rev=494169&r1=494168&r2=494169
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java Mon Jan 8 11:41:45 2007
@@ -31,7 +31,6 @@
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
import javax.naming.directory.DirContext;
-import javax.naming.directory.ModificationItem;
import javax.naming.directory.SearchControls;
import javax.naming.directory.SearchResult;
@@ -47,7 +46,8 @@
import org.apache.directory.shared.ldap.filter.ExprNode;
import org.apache.directory.shared.ldap.filter.SimpleNode;
import org.apache.directory.shared.ldap.filter.AssertionEnum;
-import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.ModificationItemImpl;
import org.apache.directory.shared.ldap.name.LdapDN;
import org.apache.directory.shared.ldap.name.Rdn;
import org.apache.directory.shared.ldap.schema.AttributeType;
@@ -305,7 +305,7 @@
dn.normalize( attrRegistry.getNormalizerMapping() );
Attributes entry = partition.lookup( dn );
Attribute disabledAttr = ServerUtils.getAttribute( disabledAttributeType, entry );
- ModificationItem[] mods = new ModificationItem[1];
+ ModificationItemImpl[] mods = new ModificationItemImpl[1];
if ( disabledAttr == null )
{
@@ -320,8 +320,8 @@
return;
}
- mods[0] = new ModificationItem( DirContext.REMOVE_ATTRIBUTE,
- new LockableAttributeImpl( MetaSchemaConstants.M_DISABLED_AT ) );
+ mods[0] = new ModificationItemImpl( DirContext.REMOVE_ATTRIBUTE,
+ new AttributeImpl( MetaSchemaConstants.M_DISABLED_AT ) );
partition.modify( dn, mods );
}
Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java?view=diff&rev=494169&r1=494168&r2=494169
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java Mon Jan 8 11:41:45 2007
@@ -30,7 +30,12 @@
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
-import javax.naming.directory.*;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.DirContext;
+import javax.naming.directory.InvalidAttributeValueException;
+import javax.naming.directory.SearchControls;
+import javax.naming.directory.SearchResult;
import org.apache.directory.server.core.DirectoryServiceConfiguration;
import org.apache.directory.server.core.configuration.InterceptorConfiguration;
@@ -56,8 +61,9 @@
import org.apache.directory.shared.ldap.filter.ExprNode;
import org.apache.directory.shared.ldap.filter.PresenceNode;
import org.apache.directory.shared.ldap.filter.SimpleNode;
-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;
@@ -280,8 +286,8 @@
}
Set<String> set = new HashSet<String>();
- LockableAttributesImpl attrs = new LockableAttributesImpl();
- LockableAttributeImpl attr;
+ AttributesImpl attrs = new AttributesImpl();
+ AttributeImpl attr;
for ( int ii = 0; ii < ids.length; ii++ )
{
@@ -294,7 +300,7 @@
if ( returnAllOperationalAttributes || set.contains( "objectclasses" ) )
{
- attr = new LockableAttributeImpl( "objectClasses" );
+ attr = new AttributeImpl( "objectClasses" );
Iterator<ObjectClass> list = registries.getObjectClassRegistry().iterator();
while ( list.hasNext() )
{
@@ -306,7 +312,7 @@
if ( returnAllOperationalAttributes || set.contains( "attributetypes" ) )
{
- attr = new LockableAttributeImpl( "attributeTypes" );
+ attr = new AttributeImpl( "attributeTypes" );
Iterator list = registries.getAttributeTypeRegistry().list();
while ( list.hasNext() )
{
@@ -318,7 +324,7 @@
if ( returnAllOperationalAttributes || set.contains( "matchingrules" ) )
{
- attr = new LockableAttributeImpl( "matchingRules" );
+ attr = new AttributeImpl( "matchingRules" );
Iterator<MatchingRule> list = registries.getMatchingRuleRegistry().iterator();
while ( list.hasNext() )
{
@@ -330,7 +336,7 @@
if ( returnAllOperationalAttributes || set.contains( "matchingruleuse" ) )
{
- attr = new LockableAttributeImpl( "matchingRuleUse" );
+ attr = new AttributeImpl( "matchingRuleUse" );
Iterator list = registries.getMatchingRuleUseRegistry().list();
while ( list.hasNext() )
{
@@ -342,7 +348,7 @@
if ( returnAllOperationalAttributes || set.contains( "ldapsyntaxes" ) )
{
- attr = new LockableAttributeImpl( "ldapSyntaxes" );
+ attr = new AttributeImpl( "ldapSyntaxes" );
Iterator<Syntax> list = registries.getSyntaxRegistry().iterator();
while ( list.hasNext() )
{
@@ -354,7 +360,7 @@
if ( returnAllOperationalAttributes || set.contains( "ditcontentrules" ) )
{
- attr = new LockableAttributeImpl( "dITContentRules" );
+ attr = new AttributeImpl( "dITContentRules" );
Iterator list = registries.getDitContentRuleRegistry().list();
while ( list.hasNext() )
{
@@ -366,7 +372,7 @@
if ( returnAllOperationalAttributes || set.contains( "ditstructurerules" ) )
{
- attr = new LockableAttributeImpl( "dITStructureRules" );
+ attr = new AttributeImpl( "dITStructureRules" );
Iterator list = registries.getDitStructureRuleRegistry().list();
while ( list.hasNext() )
{
@@ -378,7 +384,7 @@
if ( returnAllOperationalAttributes || set.contains( "nameforms" ) )
{
- attr = new LockableAttributeImpl( "nameForms" );
+ attr = new AttributeImpl( "nameForms" );
Iterator list = registries.getNameFormRegistry().list();
while ( list.hasNext() )
{
@@ -393,28 +399,28 @@
if ( returnAllOperationalAttributes || set.contains( "createtimestamp" ) )
{
- attr = new LockableAttributeImpl( "createTimestamp" );
+ attr = new AttributeImpl( "createTimestamp" );
attr.add( startUpTimeStamp );
attrs.put( attr );
}
if ( returnAllOperationalAttributes || set.contains( "modifytimestamp" ) )
{
- attr = new LockableAttributeImpl( "modifyTimestamp" );
+ attr = new AttributeImpl( "modifyTimestamp" );
attr.add( startUpTimeStamp );
attrs.put( attr );
}
if ( returnAllOperationalAttributes || set.contains( "creatorsname" ) )
{
- attr = new LockableAttributeImpl( "creatorsName" );
+ attr = new AttributeImpl( "creatorsName" );
attr.add( PartitionNexus.ADMIN_PRINCIPAL );
attrs.put( attr );
}
if ( returnAllOperationalAttributes || set.contains( "modifiersname" ) )
{
- attr = new LockableAttributeImpl( "modifiersName" );
+ attr = new AttributeImpl( "modifiersName" );
attr.add( PartitionNexus.ADMIN_PRINCIPAL );
attrs.put( attr );
}
@@ -436,7 +442,7 @@
// add the objectClass attribute
if ( set.contains( "*" ) || set.contains( "objectclass" ) || set.size() == minSetSize )
{
- attr = new LockableAttributeImpl( "objectClass" );
+ attr = new AttributeImpl( "objectClass" );
attr.add( "top" );
attr.add( "subschema" );
attrs.put( attr );
@@ -560,7 +566,7 @@
{
if ( changes == null && existing == null )
{
- return new LockableAttributeImpl( "objectClass" );
+ return new AttributeImpl( "objectClass" );
}
if ( changes == null )
@@ -574,7 +580,7 @@
}
else if ( existing == null )
{
- return new LockableAttributeImpl( "objectClasses" );
+ return new AttributeImpl( "objectClasses" );
}
switch ( modOp )
@@ -838,7 +844,7 @@
}
- public void modify( NextInterceptor next, LdapDN name, ModificationItem[] mods ) throws NamingException
+ public void modify( NextInterceptor next, LdapDN name, ModificationItemImpl[] mods ) throws NamingException
{
// First, we get the entry from the backend. If it does not exist, then we throw an exception
Attributes entry = nexus.lookup( name );
@@ -855,7 +861,7 @@
Attributes tmpEntry = ( Attributes ) entry.clone();
Set<String> modset = new HashSet<String>();
- ModificationItem objectClassMod = null;
+ ModificationItemImpl objectClassMod = null;
// Check that we don't have two times the same modification.
// This is somehow useless, has modification operations are supposed to
@@ -953,7 +959,7 @@
}
else
{
- attr = new LockableAttributeImpl( change.getID() );
+ attr = new AttributeImpl( change.getID() );
NamingEnumeration values = change.getAll();
while ( values.hasMoreElements() )
@@ -1000,7 +1006,7 @@
{
tmpEntry.remove( change.getID() );
}
- attr = new LockableAttributeImpl( change.getID() );
+ attr = new AttributeImpl( change.getID() );
NamingEnumeration values = change.getAll();
@@ -1126,7 +1132,7 @@
if ( asBinary )
{
Attribute attribute = entry.get( id );
- Attribute binary = new LockableAttributeImpl( id );
+ Attribute binary = new AttributeImpl( id );
for ( int i = 0; i < attribute.size(); i++ )
{
Object value = attribute.get( i );
Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java?view=diff&rev=494169&r1=494168&r2=494169
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java Mon Jan 8 11:41:45 2007
@@ -20,6 +20,11 @@
package org.apache.directory.server.core.subtree;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
import org.apache.directory.server.core.DirectoryServiceConfiguration;
import org.apache.directory.server.core.ServerUtils;
import org.apache.directory.server.core.configuration.InterceptorConfiguration;
@@ -40,8 +45,9 @@
import org.apache.directory.shared.ldap.filter.ExprNode;
import org.apache.directory.shared.ldap.filter.PresenceNode;
import org.apache.directory.shared.ldap.filter.SimpleNode;
-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.message.SubentriesControl;
import org.apache.directory.shared.ldap.name.LdapDN;
@@ -53,13 +59,16 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.DirContext;
+import javax.naming.directory.SearchControls;
+import javax.naming.directory.SearchResult;
import javax.naming.ldap.Control;
import javax.naming.ldap.LdapContext;
-import javax.naming.directory.*;
import javax.naming.NamingException;
import javax.naming.NamingEnumeration;
import javax.naming.Name;
-import java.util.*;
/**
@@ -298,7 +307,7 @@
*/
public Attributes getSubentryAttributes( Name dn, Attributes entryAttrs ) throws NamingException
{
- Attributes subentryAttrs = new LockableAttributesImpl();
+ Attributes subentryAttrs = new AttributesImpl();
Iterator list = subentryCache.nameIterator();
while ( list.hasNext() )
{
@@ -318,7 +327,7 @@
operational = subentryAttrs.get( AC_SUBENTRIES );
if ( operational == null )
{
- operational = new LockableAttributeImpl( AC_SUBENTRIES );
+ operational = new AttributeImpl( AC_SUBENTRIES );
subentryAttrs.put( operational );
}
operational.add( subentryDn.toString() );
@@ -328,7 +337,7 @@
operational = subentryAttrs.get( SCHEMA_SUBENTRY );
if ( operational == null )
{
- operational = new LockableAttributeImpl( SCHEMA_SUBENTRY );
+ operational = new AttributeImpl( SCHEMA_SUBENTRY );
subentryAttrs.put( operational );
}
operational.add( subentryDn.toString() );
@@ -338,7 +347,7 @@
operational = subentryAttrs.get( COLLECTIVE_ATTRIBUTE_SUBENTRIES );
if ( operational == null )
{
- operational = new LockableAttributeImpl( COLLECTIVE_ATTRIBUTE_SUBENTRIES );
+ operational = new AttributeImpl( COLLECTIVE_ATTRIBUTE_SUBENTRIES );
subentryAttrs.put( operational );
}
operational.add( subentryDn.toString() );
@@ -348,7 +357,7 @@
operational = subentryAttrs.get( TRIGGER_SUBENTRIES );
if ( operational == null )
{
- operational = new LockableAttributeImpl( TRIGGER_SUBENTRIES );
+ operational = new AttributeImpl( TRIGGER_SUBENTRIES );
subentryAttrs.put( operational );
}
operational.add( subentryDn.toString() );
@@ -467,7 +476,7 @@
operational = entry.get( AC_SUBENTRIES );
if ( operational == null )
{
- operational = new LockableAttributeImpl( AC_SUBENTRIES );
+ operational = new AttributeImpl( AC_SUBENTRIES );
entry.put( operational );
}
operational.add( subentryDn.toString() );
@@ -477,7 +486,7 @@
operational = entry.get( SCHEMA_SUBENTRY );
if ( operational == null )
{
- operational = new LockableAttributeImpl( SCHEMA_SUBENTRY );
+ operational = new AttributeImpl( SCHEMA_SUBENTRY );
entry.put( operational );
}
operational.add( subentryDn.toString() );
@@ -487,7 +496,7 @@
operational = entry.get( COLLECTIVE_ATTRIBUTE_SUBENTRIES );
if ( operational == null )
{
- operational = new LockableAttributeImpl( COLLECTIVE_ATTRIBUTE_SUBENTRIES );
+ operational = new AttributeImpl( COLLECTIVE_ATTRIBUTE_SUBENTRIES );
entry.put( operational );
}
operational.add( subentryDn.toString() );
@@ -497,7 +506,7 @@
operational = entry.get( TRIGGER_SUBENTRIES );
if ( operational == null )
{
- operational = new LockableAttributeImpl( TRIGGER_SUBENTRIES );
+ operational = new AttributeImpl( TRIGGER_SUBENTRIES );
entry.put( operational );
}
operational.add( subentryDn.toString() );
@@ -593,7 +602,7 @@
}
- private ModificationItem[] getModsOnEntryRdnChange( Name oldName, Name newName, Attributes entry )
+ private ModificationItemImpl[] getModsOnEntryRdnChange( Name oldName, Name newName, Attributes entry )
throws NamingException
{
List modList = new ArrayList();
@@ -643,7 +652,7 @@
op = DirContext.REMOVE_ATTRIBUTE;
}
- modList.add( new ModificationItem( op, opAttr ) );
+ modList.add( new ModificationItemImpl( op, opAttr ) );
}
}
}
@@ -653,15 +662,15 @@
for ( int ii = 0; ii < SUBENTRY_OPATTRS.length; ii++ )
{
int op = DirContext.ADD_ATTRIBUTE;
- Attribute opAttr = new LockableAttributeImpl( SUBENTRY_OPATTRS[ii] );
+ Attribute opAttr = new AttributeImpl( SUBENTRY_OPATTRS[ii] );
opAttr.add( subentryDn );
- modList.add( new ModificationItem( op, opAttr ) );
+ modList.add( new ModificationItemImpl( op, opAttr ) );
}
}
}
- ModificationItem[] mods = new ModificationItem[modList.size()];
- mods = ( ModificationItem[] ) modList.toArray( mods );
+ ModificationItemImpl[] mods = new ModificationItemImpl[modList.size()];
+ mods = ( ModificationItemImpl[] ) modList.toArray( mods );
return mods;
}
@@ -726,7 +735,7 @@
newName.remove( newName.size() - 1 );
newName.add( newRn );
newName.normalize( attrRegistry.getNormalizerMapping() );
- ModificationItem[] mods = getModsOnEntryRdnChange( name, newName, entry );
+ ModificationItemImpl[] mods = getModsOnEntryRdnChange( name, newName, entry );
if ( mods.length > 0 )
{
@@ -798,7 +807,7 @@
LdapDN newName = ( LdapDN ) newParentName.clone();
newName.add( newRn );
newName.normalize( attrRegistry.getNormalizerMapping() );
- ModificationItem[] mods = getModsOnEntryRdnChange( oriChildName, newName, entry );
+ ModificationItemImpl[] mods = getModsOnEntryRdnChange( oriChildName, newName, entry );
if ( mods.length > 0 )
{
@@ -865,7 +874,7 @@
// attributes contained within this regular entry with name changes
LdapDN newName = ( LdapDN ) newParentName.clone();
newName.add( oriChildName.get( oriChildName.size() - 1 ) );
- ModificationItem[] mods = getModsOnEntryRdnChange( oriChildName, newName, entry );
+ ModificationItemImpl[] mods = getModsOnEntryRdnChange( oriChildName, newName, entry );
if ( mods.length > 0 )
{
@@ -911,13 +920,13 @@
}
}
- Attributes attrs = new LockableAttributesImpl();
+ Attributes attrs = new AttributesImpl();
attrs.put( ocFinalState );
return getSubentryTypes( attrs );
}
- private int getSubentryTypes( Attributes entry, ModificationItem[] mods ) throws NamingException
+ private int getSubentryTypes( Attributes entry, ModificationItemImpl[] mods ) throws NamingException
{
Attribute ocFinalState = ( Attribute ) entry.get( "objectClass" ).clone();
for ( int ii = 0; ii < mods.length; ii++ )
@@ -945,7 +954,7 @@
}
}
- Attributes attrs = new LockableAttributesImpl();
+ Attributes attrs = new AttributesImpl();
attrs.put( ocFinalState );
return getSubentryTypes( attrs );
}
@@ -1025,12 +1034,12 @@
}
- public void modify( NextInterceptor next, LdapDN name, ModificationItem[] mods ) throws NamingException
+ public void modify( NextInterceptor next, LdapDN name, ModificationItemImpl[] mods ) throws NamingException
{
Attributes entry = nexus.lookup( name );
Attribute objectClasses = ServerUtils.getAttribute( objectClassType, entry );
boolean isSubtreeSpecificationModification = false;
- ModificationItem subtreeMod = null;
+ ModificationItemImpl subtreeMod = null;
for ( int ii = 0; ii < mods.length; ii++ )
{
@@ -1114,7 +1123,7 @@
// Utility Methods
// -----------------------------------------------------------------------
- private ModificationItem[] getOperationalModsForReplace( Name oldName, Name newName, Subentry subentry,
+ private ModificationItemImpl[] getOperationalModsForReplace( Name oldName, Name newName, Subentry subentry,
Attributes entry ) throws NamingException
{
List modList = new ArrayList();
@@ -1126,7 +1135,7 @@
operational = ( Attribute ) entry.get( AC_SUBENTRIES ).clone();
if ( operational == null )
{
- operational = new LockableAttributeImpl( AC_SUBENTRIES );
+ operational = new AttributeImpl( AC_SUBENTRIES );
operational.add( newName.toString() );
}
else
@@ -1134,14 +1143,14 @@
operational.remove( oldName.toString() );
operational.add( newName.toString() );
}
- modList.add( new ModificationItem( DirContext.REPLACE_ATTRIBUTE, operational ) );
+ modList.add( new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, operational ) );
}
if ( subentry.isSchemaSubentry() )
{
operational = ( Attribute ) entry.get( SCHEMA_SUBENTRY ).clone();
if ( operational == null )
{
- operational = new LockableAttributeImpl( SCHEMA_SUBENTRY );
+ operational = new AttributeImpl( SCHEMA_SUBENTRY );
operational.add( newName.toString() );
}
else
@@ -1149,14 +1158,14 @@
operational.remove( oldName.toString() );
operational.add( newName.toString() );
}
- modList.add( new ModificationItem( DirContext.REPLACE_ATTRIBUTE, operational ) );
+ modList.add( new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, operational ) );
}
if ( subentry.isCollectiveSubentry() )
{
operational = ( Attribute ) entry.get( COLLECTIVE_ATTRIBUTE_SUBENTRIES ).clone();
if ( operational == null )
{
- operational = new LockableAttributeImpl( COLLECTIVE_ATTRIBUTE_SUBENTRIES );
+ operational = new AttributeImpl( COLLECTIVE_ATTRIBUTE_SUBENTRIES );
operational.add( newName.toString() );
}
else
@@ -1164,14 +1173,14 @@
operational.remove( oldName.toString() );
operational.add( newName.toString() );
}
- modList.add( new ModificationItem( DirContext.REPLACE_ATTRIBUTE, operational ) );
+ modList.add( new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, operational ) );
}
if ( subentry.isTriggerSubentry() )
{
operational = ( Attribute ) entry.get( TRIGGER_SUBENTRIES ).clone();
if ( operational == null )
{
- operational = new LockableAttributeImpl( TRIGGER_SUBENTRIES );
+ operational = new AttributeImpl( TRIGGER_SUBENTRIES );
operational.add( newName.toString() );
}
else
@@ -1179,11 +1188,11 @@
operational.remove( oldName.toString() );
operational.add( newName.toString() );
}
- modList.add( new ModificationItem( DirContext.REPLACE_ATTRIBUTE, operational ) );
+ modList.add( new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, operational ) );
}
- ModificationItem[] mods = new ModificationItem[modList.size()];
- return ( ModificationItem[] ) modList.toArray( mods );
+ ModificationItemImpl[] mods = new ModificationItemImpl[modList.size()];
+ return ( ModificationItemImpl[] ) modList.toArray( mods );
}
@@ -1199,7 +1208,7 @@
private Attributes getSubentryOperatationalAttributes( Name name, Subentry subentry )
throws NamingException
{
- Attributes operational = new LockableAttributesImpl();
+ Attributes operational = new AttributesImpl();
if ( subentry.isAccessControlSubentry() )
{
@@ -1263,7 +1272,7 @@
* @return the set of modifications required to remove an entry's reference to
* a subentry
*/
- private ModificationItem[] getOperationalModsForRemove( LdapDN subentryDn, Attributes candidate )
+ private ModificationItemImpl[] getOperationalModsForRemove( LdapDN subentryDn, Attributes candidate )
{
List modList = new ArrayList();
String dn = subentryDn.toNormName();
@@ -1275,14 +1284,14 @@
if ( opAttr != null && opAttr.contains( dn ) )
{
- Attribute attr = new LockableAttributeImpl( SUBENTRY_OPATTRS[ii] );
+ Attribute attr = new AttributeImpl( SUBENTRY_OPATTRS[ii] );
attr.add( dn );
- modList.add( new ModificationItem( DirContext.REMOVE_ATTRIBUTE, attr ) );
+ modList.add( new ModificationItemImpl( DirContext.REMOVE_ATTRIBUTE, attr ) );
}
}
- ModificationItem[] mods = new ModificationItem[modList.size()];
- return ( ModificationItem[] ) modList.toArray( mods );
+ ModificationItemImpl[] mods = new ModificationItemImpl[modList.size()];
+ return ( ModificationItemImpl[] ) modList.toArray( mods );
}
@@ -1300,7 +1309,7 @@
* of the subentry
* @return the set of modifications needed to update the entry
*/
- public ModificationItem[] getOperationalModsForAdd( Attributes entry, Attributes operational )
+ public ModificationItemImpl[] getOperationalModsForAdd( Attributes entry, Attributes operational )
throws NamingException
{
List modList = new ArrayList();
@@ -1310,7 +1319,7 @@
{
int op = DirContext.REPLACE_ATTRIBUTE;
String opAttrId = ( String ) opAttrIds.next();
- Attribute result = new LockableAttributeImpl( opAttrId );
+ Attribute result = new AttributeImpl( opAttrId );
Attribute opAttrAdditions = operational.get( opAttrId );
Attribute opAttrInEntry = entry.get( opAttrId );
@@ -1331,11 +1340,11 @@
op = DirContext.ADD_ATTRIBUTE;
}
- modList.add( new ModificationItem( op, result ) );
+ modList.add( new ModificationItemImpl( op, result ) );
}
- ModificationItem[] mods = new ModificationItem[modList.size()];
- mods = ( ModificationItem[] ) modList.toArray( mods );
+ ModificationItemImpl[] mods = new ModificationItemImpl[modList.size()];
+ mods = ( ModificationItemImpl[] ) modList.toArray( mods );
return mods;
}
Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/ModifyStoredProcedureParameterInjector.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/ModifyStoredProcedureParameterInjector.java?view=diff&rev=494169&r1=494168&r2=494169
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/ModifyStoredProcedureParameterInjector.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/ModifyStoredProcedureParameterInjector.java Mon Jan 8 11:41:45 2007
@@ -26,23 +26,23 @@
import javax.naming.NamingException;
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
-import javax.naming.directory.ModificationItem;
import org.apache.directory.server.core.invocation.Invocation;
import org.apache.directory.server.core.partition.PartitionNexusProxy;
+import org.apache.directory.shared.ldap.message.ModificationItemImpl;
import org.apache.directory.shared.ldap.name.LdapDN;
import org.apache.directory.shared.ldap.trigger.StoredProcedureParameter;
public class ModifyStoredProcedureParameterInjector extends AbstractStoredProcedureParameterInjector
{
private LdapDN modifiedEntryName;
- private ModificationItem[] modifications;
+ private ModificationItemImpl[] modifications;
private Attributes oldEntry;
private Map injectors;
- public ModifyStoredProcedureParameterInjector( Invocation invocation, LdapDN modifiedEntryName, ModificationItem[] modifications ) throws NamingException
+ public ModifyStoredProcedureParameterInjector( Invocation invocation, LdapDN modifiedEntryName, ModificationItemImpl[] modifications ) throws NamingException
{
super( invocation );
init( modifiedEntryName, modifications );
@@ -51,19 +51,19 @@
public ModifyStoredProcedureParameterInjector( Invocation invocation, LdapDN modifiedEntryName, int modOp, Attributes modifications ) throws NamingException
{
super( invocation );
- ModificationItem[] mods = new ModificationItem[ modifications.size() ];
+ ModificationItemImpl[] mods = new ModificationItemImpl[ modifications.size() ];
NamingEnumeration modEnum = modifications.getAll();
int i = 0;
while ( modEnum.hasMoreElements() )
{
Attribute attribute = ( Attribute ) modEnum.nextElement();
- mods[ i++ ] = new ModificationItem( modOp, attribute );
+ mods[ i++ ] = new ModificationItemImpl( modOp, attribute );
}
init( modifiedEntryName, mods );
}
- private void init( LdapDN modifiedEntryName, ModificationItem[] modifications ) throws NamingException
+ private void init( LdapDN modifiedEntryName, ModificationItemImpl[] modifications ) throws NamingException
{
this.modifiedEntryName = modifiedEntryName;
this.modifications = modifications;
Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/TriggerService.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/TriggerService.java?view=diff&rev=494169&r1=494168&r2=494169
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/TriggerService.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/TriggerService.java Mon Jan 8 11:41:45 2007
@@ -34,7 +34,6 @@
import javax.naming.NamingException;
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
-import javax.naming.directory.ModificationItem;
import org.apache.directory.server.core.DirectoryServiceConfiguration;
import org.apache.directory.server.core.configuration.InterceptorConfiguration;
@@ -49,6 +48,7 @@
import org.apache.directory.server.core.subtree.SubentryService;
import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
import org.apache.directory.shared.ldap.exception.LdapNamingException;
+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.NormalizerMappingResolver;
@@ -327,7 +327,7 @@
}
- public void modify( NextInterceptor next, LdapDN normName, ModificationItem[] mods ) throws NamingException
+ public void modify( NextInterceptor next, LdapDN normName, ModificationItemImpl[] mods ) throws NamingException
{
// Bypass trigger handling if the service is disabled.
if ( !enabled )
Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java?view=diff&rev=494169&r1=494168&r2=494169
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java Mon Jan 8 11:41:45 2007
@@ -34,7 +34,6 @@
import javax.naming.NamingException;
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
-import javax.naming.directory.ModificationItem;
import javax.naming.directory.SearchControls;
import javax.naming.directory.SearchResult;
@@ -44,6 +43,7 @@
import org.apache.directory.shared.ldap.filter.AssertionEnum;
import org.apache.directory.shared.ldap.filter.ExprNode;
import org.apache.directory.shared.ldap.filter.SimpleNode;
+import org.apache.directory.shared.ldap.message.ModificationItemImpl;
import org.apache.directory.shared.ldap.name.LdapDN;
import org.apache.directory.shared.ldap.schema.NormalizerMappingResolver;
import org.apache.directory.shared.ldap.trigger.TriggerSpecification;
@@ -193,7 +193,7 @@
}
- public void subentryModified( LdapDN normName, ModificationItem[] mods, Attributes entry ) throws NamingException
+ public void subentryModified( LdapDN normName, ModificationItemImpl[] mods, Attributes entry ) throws NamingException
{
if ( !hasPrescriptiveTrigger( entry ) )
{
Modified: directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java?view=diff&rev=494169&r1=494168&r2=494169
==============================================================================
--- directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java (original)
+++ directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java Mon Jan 8 11:41:45 2007
@@ -20,13 +20,19 @@
package org.apache.directory.server.core.authz.support;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.Map;
+import java.util.NoSuchElementException;
+import java.util.Set;
import javax.naming.NamingException;
import javax.naming.Context;
import javax.naming.NamingEnumeration;
import javax.naming.directory.Attributes;
-import javax.naming.directory.BasicAttributes;
import javax.naming.directory.SearchControls;
import junit.framework.Assert;
@@ -41,6 +47,7 @@
import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
import org.apache.directory.shared.ldap.aci.ProtectedItem;
import org.apache.directory.shared.ldap.filter.ExprNode;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
import org.apache.directory.shared.ldap.name.LdapDN;
@@ -58,7 +65,7 @@
private static final LdapDN ROOTDSE_NAME = new LdapDN();
private static final LdapDN ENTRY_NAME;
private static final Collection PROTECTED_ITEMS = new ArrayList();
- private static final Attributes ENTRY = new BasicAttributes();
+ private static final Attributes ENTRY = new AttributesImpl();
static
{
Modified: directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/authz/support/MaxValueCountFilterTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/authz/support/MaxValueCountFilterTest.java?view=diff&rev=494169&r1=494168&r2=494169
==============================================================================
--- directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/authz/support/MaxValueCountFilterTest.java (original)
+++ directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/authz/support/MaxValueCountFilterTest.java Mon Jan 8 11:41:45 2007
@@ -28,8 +28,6 @@
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
-import javax.naming.directory.BasicAttribute;
-import javax.naming.directory.BasicAttributes;
import junit.framework.Assert;
import junit.framework.TestCase;
@@ -40,6 +38,8 @@
import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
import org.apache.directory.shared.ldap.aci.ProtectedItem;
import org.apache.directory.shared.ldap.aci.ProtectedItem.MaxValueCountItem;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
/**
@@ -54,8 +54,8 @@
private static final Set EMPTY_SET = Collections.unmodifiableSet( new HashSet() );
private static final Collection PROTECTED_ITEMS = new ArrayList();
- private static final Attributes ENTRY = new BasicAttributes();
- private static final Attributes FULL_ENTRY = new BasicAttributes();
+ private static final Attributes ENTRY = new AttributesImpl();
+ private static final Attributes FULL_ENTRY = new AttributesImpl();
static
{
@@ -65,7 +65,7 @@
ENTRY.put( "testAttr", "1" );
- Attribute attr = new BasicAttribute( "testAttr" );
+ Attribute attr = new AttributeImpl( "testAttr" );
attr.add( "1" );
attr.add( "2" );
FULL_ENTRY.put( attr );
Modified: directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilterTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilterTest.java?view=diff&rev=494169&r1=494168&r2=494169
==============================================================================
--- directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilterTest.java (original)
+++ directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilterTest.java Mon Jan 8 11:41:45 2007
@@ -27,8 +27,8 @@
import java.util.Set;
import javax.naming.NamingException;
+import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
-import javax.naming.directory.BasicAttribute;
import junit.framework.Assert;
import junit.framework.TestCase;
@@ -46,7 +46,8 @@
import org.apache.directory.shared.ldap.aci.ProtectedItem;
import org.apache.directory.shared.ldap.aci.ProtectedItem.MaxValueCountItem;
import org.apache.directory.shared.ldap.aci.ProtectedItem.RestrictedByItem;
-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.name.LdapDN;
@@ -63,8 +64,8 @@
private static final LdapDN GROUP_NAME;
private static final LdapDN USER_NAME;
- private static final Set USER_NAMES = new HashSet();
- private static final Set GROUP_NAMES = new HashSet();
+ private static final Set<LdapDN> USER_NAMES = new HashSet<LdapDN>();
+ private static final Set<LdapDN> GROUP_NAMES = new HashSet<LdapDN>();
private static final AttributeTypeRegistry ATTR_TYPE_REGISTRY_A = new DummyAttributeTypeRegistry( false );
private static final AttributeTypeRegistry ATTR_TYPE_REGISTRY_B = new DummyAttributeTypeRegistry( true );
@@ -160,7 +161,7 @@
public void testAllAttributeValues() throws Exception
{
- Collection attrTypes = new ArrayList();
+ Collection<String> attrTypes = new ArrayList<String>();
attrTypes.add( "attrA" );
Collection tuples = getTuples( new ProtectedItem.AllAttributeValues( attrTypes ) );
@@ -180,7 +181,7 @@
public void testAttributeType() throws Exception
{
- Collection attrTypes = new ArrayList();
+ Collection<String> attrTypes = new ArrayList<String>();
attrTypes.add( "attrA" );
Collection tuples = getTuples( new ProtectedItem.AttributeType( attrTypes ) );
@@ -200,8 +201,8 @@
public void testAttributeValue() throws Exception
{
- Collection attributes = new ArrayList();
- attributes.add( new BasicAttribute( "attrA", "valueA" ) );
+ Collection<Attribute> attributes = new ArrayList<Attribute>();
+ attributes.add( new AttributeImpl( "attrA", "valueA" ) );
Collection tuples = getTuples( new ProtectedItem.AttributeValue( attributes ) );
// Test wrong scope
@@ -244,7 +245,7 @@
public void testMaxValueCount() throws Exception
{
- Collection mvcItems = new ArrayList();
+ Collection<MaxValueCountItem> mvcItems = new ArrayList<MaxValueCountItem>();
mvcItems.add( new MaxValueCountItem( "attrA", 3 ) );
Collection tuples = getTuples( new ProtectedItem.MaxValueCount( mvcItems ) );
@@ -270,7 +271,7 @@
* using the registry now in this operation.
public void testRangeOfValues() throws Exception
{
- Attributes entry = new BasicAttributes( true );
+ Attributes entry = new AttributesImpl( true );
entry.put( "attrA", "valueA" );
Collection tuples = getTuples( new ProtectedItem.RangeOfValues( new PresenceNode( "attrA" ) ) );
@@ -286,7 +287,7 @@
public void testRestrictedBy() throws Exception
{
- Collection rbItems = new ArrayList();
+ Collection<RestrictedByItem> rbItems = new ArrayList<RestrictedByItem>();
rbItems.add( new RestrictedByItem( "attrA", "attrB" ) );
Collection tuples = getTuples( new ProtectedItem.RestrictedBy( rbItems ) );
@@ -309,11 +310,11 @@
public void testSelfValue() throws Exception
{
- Collection attrTypes = new ArrayList();
+ Collection<String> attrTypes = new ArrayList<String>();
attrTypes.add( "attrA" );
Collection tuples = getTuples( new ProtectedItem.SelfValue( attrTypes ) );
- Attributes entry = new LockableAttributesImpl();
+ Attributes entry = new AttributesImpl();
entry.put( "attrA", USER_NAME.toNormName() );
// Test wrong scope
@@ -337,10 +338,10 @@
private static Collection getTuples( ProtectedItem protectedItem )
{
- Collection protectedItems = new ArrayList();
+ Collection<ProtectedItem> protectedItems = new ArrayList<ProtectedItem>();
protectedItems.add( protectedItem );
- Collection tuples = new ArrayList();
+ Collection<ACITuple> tuples = new ArrayList<ACITuple>();
tuples.add( new ACITuple( EMPTY_COLLECTION, AuthenticationLevel.NONE, protectedItems, EMPTY_SET, true, 0 ) );
return tuples;
Modified: directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/authz/support/RestrictedByFilterTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/authz/support/RestrictedByFilterTest.java?view=diff&rev=494169&r1=494168&r2=494169
==============================================================================
--- directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/authz/support/RestrictedByFilterTest.java (original)
+++ directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/authz/support/RestrictedByFilterTest.java Mon Jan 8 11:41:45 2007
@@ -28,8 +28,6 @@
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
-import javax.naming.directory.BasicAttribute;
-import javax.naming.directory.BasicAttributes;
import junit.framework.Assert;
import junit.framework.TestCase;
@@ -40,6 +38,8 @@
import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
import org.apache.directory.shared.ldap.aci.ProtectedItem;
import org.apache.directory.shared.ldap.aci.ProtectedItem.RestrictedByItem;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
/**
@@ -53,16 +53,16 @@
private static final Collection EMPTY_COLLECTION = Collections.unmodifiableCollection( new ArrayList() );
private static final Set EMPTY_SET = Collections.unmodifiableSet( new HashSet() );
- private static final Collection PROTECTED_ITEMS = new ArrayList();
- private static final Attributes ENTRY = new BasicAttributes();
+ private static final Collection<ProtectedItem.RestrictedBy> PROTECTED_ITEMS = new ArrayList<ProtectedItem.RestrictedBy>();
+ private static final Attributes ENTRY = new AttributesImpl();
static
{
- Collection mvcItems = new ArrayList();
+ Collection<RestrictedByItem> mvcItems = new ArrayList<RestrictedByItem>();
mvcItems.add( new RestrictedByItem( "choice", "option" ) );
PROTECTED_ITEMS.add( new ProtectedItem.RestrictedBy( mvcItems ) );
- Attribute attr = new BasicAttribute( "option" );
+ Attribute attr = new AttributeImpl( "option" );
attr.add( "1" );
attr.add( "2" );
@@ -73,7 +73,7 @@
public void testWrongScope() throws Exception
{
RestrictedByFilter filter = new RestrictedByFilter();
- Collection tuples = new ArrayList();
+ Collection<ACITuple> tuples = new ArrayList<ACITuple>();
tuples.add( new ACITuple( EMPTY_COLLECTION, AuthenticationLevel.NONE, EMPTY_COLLECTION, EMPTY_SET, true, 0 ) );
tuples = Collections.unmodifiableCollection( tuples );
@@ -98,7 +98,7 @@
public void testDenialTuple() throws Exception
{
RestrictedByFilter filter = new RestrictedByFilter();
- Collection tuples = new ArrayList();
+ Collection<ACITuple> tuples = new ArrayList<ACITuple>();
tuples.add( new ACITuple( EMPTY_COLLECTION, AuthenticationLevel.NONE, PROTECTED_ITEMS, EMPTY_SET, false, 0 ) );
tuples = Collections.unmodifiableCollection( tuples );
@@ -111,7 +111,7 @@
public void testGrantTuple() throws Exception
{
RestrictedByFilter filter = new RestrictedByFilter();
- Collection tuples = new ArrayList();
+ Collection<ACITuple> tuples = new ArrayList<ACITuple>();
tuples.add( new ACITuple( EMPTY_COLLECTION, AuthenticationLevel.NONE, PROTECTED_ITEMS, EMPTY_SET, true, 0 ) );
Assert.assertEquals( 1, filter.filter( tuples, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, null, null, null, null,
Modified: directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/interceptor/InterceptorChainTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/interceptor/InterceptorChainTest.java?view=diff&rev=494169&r1=494168&r2=494169
==============================================================================
--- directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/interceptor/InterceptorChainTest.java (original)
+++ directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/interceptor/InterceptorChainTest.java Mon Jan 8 11:41:45 2007
@@ -20,6 +20,15 @@
package org.apache.directory.server.core.interceptor;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
import junit.framework.TestCase;
import org.apache.directory.server.core.DirectoryService;
@@ -33,15 +42,14 @@
import org.apache.directory.server.core.jndi.DeadContext;
import org.apache.directory.server.core.partition.PartitionNexusProxy;
import org.apache.directory.shared.ldap.filter.ExprNode;
+import org.apache.directory.shared.ldap.message.ModificationItemImpl;
import org.apache.directory.shared.ldap.name.LdapDN;
import javax.naming.NamingException;
import javax.naming.NamingEnumeration;
import javax.naming.Context;
import javax.naming.directory.Attributes;
-import javax.naming.directory.ModificationItem;
import javax.naming.directory.SearchControls;
-import java.util.*;
/**
@@ -351,7 +359,7 @@
}
- public void modify( NextInterceptor next, LdapDN name, ModificationItem[] items ) throws NamingException
+ public void modify( NextInterceptor next, LdapDN name, ModificationItemImpl[] items ) throws NamingException
{
interceptors.add( this );
next.modify( name, items );
Modified: directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/AttributeSerializerTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/AttributeSerializerTest.java?view=diff&rev=494169&r1=494168&r2=494169
==============================================================================
--- directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/AttributeSerializerTest.java (original)
+++ directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/AttributeSerializerTest.java Mon Jan 8 11:41:45 2007
@@ -25,7 +25,7 @@
import javax.naming.NamingException;
import javax.naming.directory.Attribute;
-import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
import org.apache.directory.shared.ldap.util.ArrayUtils;
import junit.framework.TestCase;
@@ -190,7 +190,7 @@
public void testFullCycleNonBinaryAttribute() throws IOException
{
- LockableAttributeImpl attr = new LockableAttributeImpl( "testing" );
+ AttributeImpl attr = new AttributeImpl( "testing" );
AttributeSerializer serializer = new AttributeSerializer();
attr.add( "value0" );
attr.add( "val1" );
@@ -204,7 +204,7 @@
public void testFullCycleBinaryAttribute() throws IOException, NamingException
{
- LockableAttributeImpl attr = new LockableAttributeImpl( "testing" );
+ AttributeImpl attr = new AttributeImpl( "testing" );
AttributeSerializer serializer = new AttributeSerializer();
byte[] ba0 = new byte[2];
ba0[0] = 7;
@@ -229,7 +229,7 @@
long start = System.currentTimeMillis();
for ( int ii = 0; ii < limit; ii++ )
{
- LockableAttributeImpl attr = new LockableAttributeImpl( "testing" );
+ AttributeImpl attr = new AttributeImpl( "testing" );
AttributeSerializer serializer = new AttributeSerializer();
attr.add( "value0" );
attr.add( "val1" );
Modified: directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/AttributesSerializerTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/AttributesSerializerTest.java?view=diff&rev=494169&r1=494168&r2=494169
==============================================================================
--- directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/AttributesSerializerTest.java (original)
+++ directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/AttributesSerializerTest.java Mon Jan 8 11:41:45 2007
@@ -22,8 +22,8 @@
import java.io.IOException;
-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.util.ArrayUtils;
import junit.framework.TestCase;
@@ -39,13 +39,13 @@
{
public void testFullCycle() throws IOException
{
- LockableAttributesImpl attrs = new LockableAttributesImpl();
- LockableAttributeImpl attr0 = new LockableAttributeImpl( "attr0" );
+ AttributesImpl attrs = new AttributesImpl();
+ AttributeImpl attr0 = new AttributeImpl( "attr0" );
attr0.add( "value0" );
attr0.add( "val1" );
attr0.add( "anything over here!" );
- LockableAttributeImpl attr1 = new LockableAttributeImpl( "attr1" );
+ AttributeImpl attr1 = new AttributeImpl( "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 );
- LockableAttributesImpl deserialized = ( LockableAttributesImpl ) serializer.deserialize( buf );
+ AttributesImpl deserialized = ( AttributesImpl ) serializer.deserialize( buf );
- LockableAttributeImpl attrDeserialized0 = ( LockableAttributeImpl ) deserialized.get( "attr0" );
+ AttributeImpl attrDeserialized0 = ( AttributeImpl ) deserialized.get( "attr0" );
assertEquals( "value0", attrDeserialized0.get() );
assertEquals( "val1", attrDeserialized0.get( 1 ) );
assertEquals( "anything over here!", attrDeserialized0.get( 2 ) );
- LockableAttributeImpl attrDeserialized1 = ( LockableAttributeImpl ) deserialized.get( "attr1" );
+ AttributeImpl attrDeserialized1 = ( AttributeImpl ) deserialized.get( "attr1" );
ArrayUtils.isEquals( ba0, attrDeserialized1.get() );
ArrayUtils.isEquals( ba1, attrDeserialized1.get( 1 ) );
}
@@ -79,7 +79,7 @@
// long start = System.currentTimeMillis();
// for ( int ii = 0; ii < limit; ii++ )
// {
-// LockableAttributeImpl attr = new LockableAttributeImpl( "testing" );
+// AttributeImpl attr = new AttributeImpl( "testing" );
// AttributeSerializer serializer = new AttributeSerializer();
// attr.add( "value0" );
// attr.add( "val1" );
Modified: directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java?view=diff&rev=494169&r1=494168&r2=494169
==============================================================================
--- directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java (original)
+++ directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java Mon Jan 8 11:41:45 2007
@@ -50,7 +50,7 @@
import org.apache.directory.server.schema.bootstrap.partition.SchemaPartitionExtractor;
import org.apache.directory.server.schema.registries.DefaultRegistries;
import org.apache.directory.server.schema.registries.Registries;
-import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
import junit.framework.TestCase;
@@ -137,7 +137,7 @@
pc.setOptimizerEnabled( true );
pc.setSuffix( "ou=schema" );
- Attributes entry = new LockableAttributesImpl();
+ Attributes entry = new AttributesImpl();
entry.put( "objectClass", "top" );
entry.get( "objectClass" ).add( "organizationalUnit" );
entry.put( "ou", "schema" );