Author: akarasulu
Date: Mon Jun 5 10:15:23 2006
New Revision: 411860
URL: http://svn.apache.org/viewvc?rev=411860&view=rev
Log:
changed rest of signatures up from interceptor stack to jndi provider to use LdapDN
Modified:
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationService.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationService.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilter.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MaxValueCountFilter.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MicroOperationFilter.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilter.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilter.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilter.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/RestrictedByFilter.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/configuration/RemoveDirectoryPartitionConfiguration.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/enumeration/ReferralHandlingEnumeration.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/event/EventService.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/interceptor/NextInterceptor.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationService.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeService.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/AbstractDirectoryPartition.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/DefaultDirectoryPartitionNexus.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/DirectoryPartition.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/DirectoryPartitionNexus.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/DirectoryPartitionNexusProxy.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreeDirectoryPartition.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmDirectoryPartition.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/referral/ReferralLut.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java
directory/branches/apacheds/optimization/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java
directory/branches/apacheds/optimization/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilterTest.java
directory/branches/apacheds/optimization/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilterTest.java
directory/branches/apacheds/optimization/core/src/test/java/org/apache/directory/server/core/interceptor/InterceptorChainTest.java
directory/branches/apacheds/optimization/core/src/test/java/org/apache/directory/server/core/referral/ReferralLutTest.java
directory/branches/apacheds/optimization/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/LaunchDiagnosticUiHandler.java
Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationService.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationService.java?rev=411860&r1=411859&r2=411860&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationService.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationService.java Mon Jun 5 10:15:23 2006
@@ -25,7 +25,6 @@
import java.util.Map;
import javax.naming.Context;
-import javax.naming.Name;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
import javax.naming.directory.Attributes;
@@ -208,7 +207,7 @@
}
- public Name getMatchedName( NextInterceptor next, Name dn, boolean normalized ) throws NamingException
+ public LdapDN getMatchedName ( NextInterceptor next, LdapDN dn ) throws NamingException
{
if ( log.isDebugEnabled() )
{
@@ -216,7 +215,7 @@
}
checkAuthenticated();
- return next.getMatchedName( dn, normalized );
+ return next.getMatchedName( dn );
}
@@ -232,7 +231,7 @@
}
- public Name getSuffix( NextInterceptor next, Name dn, boolean normalized ) throws NamingException
+ public LdapDN getSuffix ( NextInterceptor next, LdapDN dn ) throws NamingException
{
if ( log.isDebugEnabled() )
{
@@ -240,11 +239,11 @@
}
checkAuthenticated();
- return next.getSuffix( dn, normalized );
+ return next.getSuffix( dn );
}
- public boolean hasEntry( NextInterceptor next, Name name ) throws NamingException
+ public boolean hasEntry( NextInterceptor next, LdapDN name ) throws NamingException
{
if ( log.isDebugEnabled() )
{
@@ -256,7 +255,7 @@
}
- public boolean isSuffix( NextInterceptor next, Name name ) throws NamingException
+ public boolean isSuffix( NextInterceptor next, LdapDN name ) throws NamingException
{
if ( log.isDebugEnabled() )
{
@@ -268,7 +267,7 @@
}
- public NamingEnumeration list( NextInterceptor next, Name base ) throws NamingException
+ public NamingEnumeration list( NextInterceptor next, LdapDN base ) throws NamingException
{
if ( log.isDebugEnabled() )
{
@@ -280,7 +279,7 @@
}
- public Iterator listSuffixes( NextInterceptor next, boolean normalized ) throws NamingException
+ public Iterator listSuffixes ( NextInterceptor next ) throws NamingException
{
if ( log.isDebugEnabled() )
{
@@ -288,11 +287,11 @@
}
checkAuthenticated();
- return next.listSuffixes( normalized );
+ return next.listSuffixes();
}
- public Attributes lookup( NextInterceptor next, Name dn, String[] attrIds ) throws NamingException
+ public Attributes lookup( NextInterceptor next, LdapDN dn, String[] attrIds ) throws NamingException
{
if ( log.isDebugEnabled() )
{
@@ -304,7 +303,7 @@
}
- public Attributes lookup( NextInterceptor next, Name name ) throws NamingException
+ public Attributes lookup( NextInterceptor next, LdapDN name ) throws NamingException
{
if ( log.isDebugEnabled() )
{
@@ -379,7 +378,7 @@
}
- public NamingEnumeration search( NextInterceptor next, Name base, Map env, ExprNode filter,
+ public NamingEnumeration search( NextInterceptor next, LdapDN base, Map env, ExprNode filter,
SearchControls searchCtls ) throws NamingException
{
if ( log.isDebugEnabled() )
@@ -409,7 +408,7 @@
}
- public void bind( NextInterceptor next, Name bindDn, byte[] credentials, List mechanisms, String saslAuthId )
+ public void bind( NextInterceptor next, LdapDN bindDn, byte[] credentials, List mechanisms, String saslAuthId )
throws NamingException
{
// check if we are already authenticated and if so we return making
Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java?rev=411860&r1=411859&r2=411860&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java Mon Jun 5 10:15:23 2006
@@ -47,7 +47,6 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.naming.Name;
import javax.naming.NamingException;
import javax.naming.NamingEnumeration;
import javax.naming.directory.*;
@@ -160,7 +159,6 @@
groupCache = new GroupCache( factoryCfg );
attrRegistry = factoryCfg.getGlobalRegistries().getAttributeTypeRegistry();
aciParser = new ACIItemParser( new ConcreteNameComponentNormalizer( attrRegistry ) );
- dnParser = new DnParser( new ConcreteNameComponentNormalizer( attrRegistry ) );
engine = new ACDFEngine( factoryCfg.getGlobalRegistries().getOidRegistry(), attrRegistry );
chain = factoryCfg.getInterceptorChain();
enabled = factoryCfg.getStartupConfiguration().isAccessControlEnabled();
@@ -172,6 +170,13 @@
}
+ private LdapDN parseNormalized( String name ) throws NamingException
+ {
+ LdapDN dn = new LdapDN( name );
+ return LdapDN.normalize( dn, attrRegistry.getNormalizerMapping() );
+ }
+
+
/**
* Adds perscriptiveACI tuples to a collection of tuples by accessing the
* tupleCache. The tuple cache is accessed for each A/C subentry
@@ -185,7 +190,7 @@
* @param entry the target entry that access to is being controled
* @throws NamingException if there are problems accessing attribute values
*/
- private void addPerscriptiveAciTuples( DirectoryPartitionNexusProxy proxy, Collection tuples, Name dn,
+ private void addPerscriptiveAciTuples( DirectoryPartitionNexusProxy proxy, Collection tuples, LdapDN dn,
Attributes entry ) throws NamingException
{
/*
@@ -199,7 +204,7 @@
*/
if ( entry.get( "objectClass" ).contains( "subentry" ) )
{
- Name parentDn = ( Name ) dn.clone();
+ LdapDN parentDn = ( LdapDN ) dn.clone();
parentDn.remove( dn.size() - 1 );
entry = proxy.lookup( parentDn, DirectoryPartitionNexusProxy.LOOKUP_BYPASS );
}
@@ -263,7 +268,7 @@
* @param entry the target entry that access to is being regulated
* @throws NamingException if there are problems accessing attribute values
*/
- private void addSubentryAciTuples( DirectoryPartitionNexusProxy proxy, Collection tuples, Name dn, Attributes entry )
+ private void addSubentryAciTuples( DirectoryPartitionNexusProxy proxy, Collection tuples, LdapDN dn, Attributes entry )
throws NamingException
{
// only perform this for subentries
@@ -274,7 +279,7 @@
// get the parent or administrative entry for this subentry since it
// will contain the subentryACI attributes that effect subentries
- Name parentDn = ( Name ) dn.clone();
+ LdapDN parentDn = ( LdapDN ) dn.clone();
parentDn.remove( dn.size() - 1 );
Attributes administrativeEntry = proxy.lookup( parentDn, new String[]
{ SUBENTRYACI_ATTR }, DirectoryPartitionNexusProxy.LOOKUP_BYPASS );
@@ -332,7 +337,7 @@
// Access the principal requesting the operation, and bypass checks if it is the admin
Invocation invocation = InvocationStack.getInstance().peek();
LdapPrincipal principal = ( ( ServerContext ) invocation.getCaller() ).getPrincipal();
- Name userName = dnParser.parse( principal.getName() );
+ LdapDN userName = parseNormalized( principal.getName() );
// bypass authz code if we are disabled
if ( !enabled )
@@ -402,7 +407,7 @@
DirectoryPartitionNexusProxy proxy = invocation.getProxy();
Attributes entry = proxy.lookup( name, DirectoryPartitionNexusProxy.LOOKUP_BYPASS );
LdapPrincipal principal = ( ( ServerContext ) invocation.getCaller() ).getPrincipal();
- Name userName = dnParser.parse( principal.getName() );
+ LdapDN userName = parseNormalized( principal.getName() );
// bypass authz code if we are disabled
if ( !enabled )
@@ -442,7 +447,7 @@
DirectoryPartitionNexusProxy proxy = invocation.getProxy();
Attributes entry = proxy.lookup( name, DirectoryPartitionNexusProxy.LOOKUP_BYPASS );
LdapPrincipal principal = ( ( ServerContext ) invocation.getCaller() ).getPrincipal();
- Name userName = dnParser.parse( principal.getName() );
+ LdapDN userName = parseNormalized( principal.getName() );
// bypass authz code if we are disabled
if ( !enabled )
@@ -507,7 +512,7 @@
DirectoryPartitionNexusProxy proxy = invocation.getProxy();
Attributes entry = proxy.lookup( name, DirectoryPartitionNexusProxy.LOOKUP_BYPASS );
LdapPrincipal principal = ( ( ServerContext ) invocation.getCaller() ).getPrincipal();
- Name userName = dnParser.parse( principal.getName() );
+ LdapDN userName = parseNormalized( principal.getName() );
// bypass authz code if we are disabled
if ( !enabled )
@@ -564,13 +569,13 @@
}
- public boolean hasEntry( NextInterceptor next, Name name ) throws NamingException
+ public boolean hasEntry( NextInterceptor next, LdapDN name ) throws NamingException
{
Invocation invocation = InvocationStack.getInstance().peek();
DirectoryPartitionNexusProxy proxy = invocation.getProxy();
Attributes entry = proxy.lookup( name, DirectoryPartitionNexusProxy.LOOKUP_BYPASS );
LdapPrincipal principal = ( ( ServerContext ) invocation.getCaller() ).getPrincipal();
- Name userName = dnParser.parse( principal.getName() );
+ LdapDN userName = parseNormalized( principal.getName() );
if ( userName.toString().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL ) || !enabled
|| name.toString().trim().equals( "" ) ) // no checks on the rootdse
@@ -607,7 +612,7 @@
* @param entry the raw entry pulled from the nexus
* @throws NamingException
*/
- private void checkLookupAccess( LdapPrincipal principal, Name dn, Attributes entry ) throws NamingException
+ private void checkLookupAccess( LdapPrincipal principal, LdapDN dn, Attributes entry ) throws NamingException
{
// no permissions checks on the RootDSE
if ( dn.toString().trim().equals( "" ) )
@@ -616,7 +621,7 @@
}
DirectoryPartitionNexusProxy proxy = InvocationStack.getInstance().peek().getProxy();
- Name userName = dnParser.parse( principal.getName() );
+ LdapDN userName = parseNormalized( principal.getName() );
Set userGroups = groupCache.getGroups( userName.toString() );
Collection tuples = new HashSet();
addPerscriptiveAciTuples( proxy, tuples, dn, entry );
@@ -641,7 +646,7 @@
}
- public Attributes lookup( NextInterceptor next, Name dn, String[] attrIds ) throws NamingException
+ public Attributes lookup( NextInterceptor next, LdapDN dn, String[] attrIds ) throws NamingException
{
Invocation invocation = InvocationStack.getInstance().peek();
DirectoryPartitionNexusProxy proxy = invocation.getProxy();
@@ -658,7 +663,7 @@
}
- public Attributes lookup( NextInterceptor next, Name name ) throws NamingException
+ public Attributes lookup( NextInterceptor next, LdapDN name ) throws NamingException
{
Invocation invocation = InvocationStack.getInstance().peek();
DirectoryPartitionNexusProxy proxy = invocation.getProxy();
@@ -682,8 +687,8 @@
DirectoryPartitionNexusProxy proxy = invocation.getProxy();
Attributes entry = proxy.lookup( name, DirectoryPartitionNexusProxy.LOOKUP_BYPASS );
LdapPrincipal principal = ( ( ServerContext ) invocation.getCaller() ).getPrincipal();
- Name userName = dnParser.parse( principal.getName() );
- Name newName = ( Name ) name.clone();
+ LdapDN userName = parseNormalized( principal.getName() );
+ LdapDN newName = ( LdapDN ) name.clone();
newName.remove( name.size() - 1 );
newName.add( dnParser.parse( newRn ).get( 0 ) );
@@ -755,8 +760,8 @@
DirectoryPartitionNexusProxy proxy = invocation.getProxy();
Attributes entry = proxy.lookup( oriChildName, DirectoryPartitionNexusProxy.LOOKUP_BYPASS );
LdapPrincipal principal = ( ( ServerContext ) invocation.getCaller() ).getPrincipal();
- Name userName = dnParser.parse( principal.getName() );
- Name newName = ( Name ) newParentName.clone();
+ LdapDN userName = parseNormalized( principal.getName() );
+ LdapDN newName = ( LdapDN ) newParentName.clone();
newName.add( newRn );
// bypass authz code if we are disabled
@@ -830,10 +835,10 @@
Invocation invocation = InvocationStack.getInstance().peek();
DirectoryPartitionNexusProxy proxy = invocation.getProxy();
Attributes entry = proxy.lookup( oriChildName, DirectoryPartitionNexusProxy.LOOKUP_BYPASS );
- Name newName = ( Name ) newParentName.clone();
+ LdapDN newName = ( LdapDN ) newParentName.clone();
newName.add( oriChildName.get( oriChildName.size() - 1 ) );
LdapPrincipal principal = ( ( ServerContext ) invocation.getCaller() ).getPrincipal();
- Name userName = dnParser.parse( principal.getName() );
+ LdapDN userName = parseNormalized( principal.getName() );
// bypass authz code if we are disabled
if ( !enabled )
@@ -875,7 +880,7 @@
public static final SearchControls DEFUALT_SEARCH_CONTROLS = new SearchControls();
- public NamingEnumeration list( NextInterceptor next, Name base ) throws NamingException
+ public NamingEnumeration list( NextInterceptor next, LdapDN base ) throws NamingException
{
Invocation invocation = InvocationStack.getInstance().peek();
ServerLdapContext ctx = ( ServerLdapContext ) invocation.getCaller();
@@ -890,7 +895,7 @@
}
- public NamingEnumeration search( NextInterceptor next, Name base, Map env, ExprNode filter,
+ public NamingEnumeration search( NextInterceptor next, LdapDN base, Map env, ExprNode filter,
SearchControls searchCtls ) throws NamingException
{
Invocation invocation = InvocationStack.getInstance().peek();
@@ -910,14 +915,14 @@
}
- public boolean compare( NextInterceptor next, Name name, String oid, Object value ) throws NamingException
+ public boolean compare( NextInterceptor next, LdapDN name, String oid, Object value ) throws NamingException
{
// Access the principal requesting the operation, and bypass checks if it is the admin
Invocation invocation = InvocationStack.getInstance().peek();
DirectoryPartitionNexusProxy proxy = invocation.getProxy();
Attributes entry = proxy.lookup( name, DirectoryPartitionNexusProxy.LOOKUP_BYPASS );
LdapPrincipal principal = ( ( ServerContext ) invocation.getCaller() ).getPrincipal();
- Name userName = dnParser.parse( principal.getName() );
+ LdapDN userName = parseNormalized( principal.getName() );
if ( userName.toString().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL ) || !enabled )
{
@@ -939,36 +944,28 @@
}
- public Name getMatchedName( NextInterceptor next, Name dn, boolean normalized ) throws NamingException
+ public LdapDN getMatchedName ( NextInterceptor next, LdapDN dn ) throws NamingException
{
// Access the principal requesting the operation, and bypass checks if it is the admin
Invocation invocation = InvocationStack.getInstance().peek();
DirectoryPartitionNexusProxy proxy = invocation.getProxy();
LdapPrincipal principal = ( ( ServerContext ) invocation.getCaller() ).getPrincipal();
- Name userName = dnParser.parse( principal.getName() );
+ LdapDN userName = parseNormalized( principal.getName() );
if ( userName.toString().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL ) || !enabled )
{
- return next.getMatchedName( dn, normalized );
+ return next.getMatchedName( dn );
}
// get the present matched name
Attributes entry;
- Name matched = next.getMatchedName( dn, normalized );
+ LdapDN matched = next.getMatchedName( dn );
// check if we have disclose on error permission for the entry at the matched dn
// if not remove rdn and check that until nothing is left in the name and return
// that but if permission is granted then short the process and return the dn
while ( matched.size() > 0 )
{
- if ( normalized )
- {
- entry = proxy.lookup( matched, DirectoryPartitionNexusProxy.GETMATCHEDDN_BYPASS );
- }
- else
- {
- entry = proxy.lookup( matched, DirectoryPartitionNexusProxy.LOOKUP_BYPASS );
- }
-
+ entry = proxy.lookup( matched, DirectoryPartitionNexusProxy.GETMATCHEDDN_BYPASS );
Set userGroups = groupCache.getGroups( userName.toString() );
Collection tuples = new HashSet();
addPerscriptiveAciTuples( proxy, tuples, matched, entry );
@@ -988,13 +985,13 @@
}
- public void cacheNewGroup( String upName, Name normName, Attributes entry ) throws NamingException
+ public void cacheNewGroup( String upName, LdapDN normName, Attributes entry ) throws NamingException
{
this.groupCache.groupAdded( upName, normName, entry );
}
- private boolean filter( Invocation invocation, Name normName, SearchResult result ) throws NamingException
+ private boolean filter( Invocation invocation, LdapDN normName, SearchResult result ) throws NamingException
{
/*
* First call hasPermission() for entry level "Browse" and "ReturnDN" perm
@@ -1003,7 +1000,7 @@
*/
Attributes entry = invocation.getProxy().lookup( normName, DirectoryPartitionNexusProxy.LOOKUP_BYPASS );
ServerLdapContext ctx = ( ServerLdapContext ) invocation.getCaller();
- Name userDn = dnParser.parse( ctx.getPrincipal().getName() );
+ LdapDN userDn = parseNormalized( ctx.getPrincipal().getName() );
Set userGroups = groupCache.getGroups( userDn.toString() );
Collection tuples = new HashSet();
addPerscriptiveAciTuples( invocation.getProxy(), tuples, normName, entry );
@@ -1079,14 +1076,14 @@
public boolean accept( Invocation invocation, SearchResult result, SearchControls controls )
throws NamingException
{
- Name normName = parser.parse( result.getName() );
+ LdapDN normName = parseNormalized( result.getName() );
// looks like isRelative returns true even when the names for results are absolute!!!!
// @todo this is a big bug in JNDI provider
// if ( result.isRelative() )
// {
- // Name base = parser.parse( ctx.getNameInNamespace() );
+ // LdapDN base = parser.parse( ctx.getNameInNamespace() );
// normName = base.addAll( normName );
// }
Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationService.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationService.java?rev=411860&r1=411859&r2=411860&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationService.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationService.java Mon Jun 5 10:15:23 2006
@@ -153,7 +153,7 @@
* the provider for optimization purposes so there is no reason for us to
* start to constrain it.
*/
- public boolean hasEntry( NextInterceptor nextInterceptor, Name name ) throws NamingException
+ public boolean hasEntry( NextInterceptor nextInterceptor, LdapDN name ) throws NamingException
{
return super.hasEntry( nextInterceptor, name );
}
@@ -317,7 +317,7 @@
}
- public Attributes lookup( NextInterceptor nextInterceptor, Name name ) throws NamingException
+ public Attributes lookup( NextInterceptor nextInterceptor, LdapDN name ) throws NamingException
{
Attributes attributes = nextInterceptor.lookup( name );
if ( !enabled || attributes == null )
@@ -330,7 +330,7 @@
}
- public Attributes lookup( NextInterceptor nextInterceptor, Name name, String[] attrIds ) throws NamingException
+ public Attributes lookup( NextInterceptor nextInterceptor, LdapDN name, String[] attrIds ) throws NamingException
{
Attributes attributes = nextInterceptor.lookup( name, attrIds );
if ( !enabled || attributes == null )
@@ -395,7 +395,7 @@
}
- public NamingEnumeration search( NextInterceptor nextInterceptor, Name base, Map env, ExprNode filter,
+ public NamingEnumeration search( NextInterceptor nextInterceptor, LdapDN base, Map env, ExprNode filter,
SearchControls searchCtls ) throws NamingException
{
NamingEnumeration e = nextInterceptor.search( base, env, filter, searchCtls );
@@ -420,7 +420,7 @@
}
- public NamingEnumeration list( NextInterceptor nextInterceptor, Name base ) throws NamingException
+ public NamingEnumeration list( NextInterceptor nextInterceptor, LdapDN base ) throws NamingException
{
NamingEnumeration e = nextInterceptor.list( base );
if ( !enabled )
Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java?rev=411860&r1=411859&r2=411860&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java Mon Jun 5 10:15:23 2006
@@ -89,11 +89,11 @@
filter.addNode( new SimpleNode( OC_ATTR, GROUPOFNAMES_OC, SimpleNode.EQUALITY ) );
filter.addNode( new SimpleNode( OC_ATTR, GROUPOFUNIQUENAMES_OC, SimpleNode.EQUALITY ) );
- Iterator suffixes = nexus.listSuffixes( true );
+ Iterator suffixes = nexus.listSuffixes();
while ( suffixes.hasNext() )
{
String suffix = ( String ) suffixes.next();
- Name baseDn = new LdapDN( suffix );
+ LdapDN baseDn = new LdapDN( suffix );
SearchControls ctls = new SearchControls();
ctls.setSearchScope( SearchControls.SUBTREE_SCOPE );
NamingEnumeration results = nexus.search( baseDn, env, filter, ctls );
Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java?rev=411860&r1=411859&r2=411860&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java Mon Jun 5 10:15:23 2006
@@ -100,11 +100,11 @@
// search all naming contexts for access control subentenries
// generate ACITuple Arrays for each subentry
// add that subentry to the hash
- Iterator suffixes = nexus.listSuffixes( true );
+ Iterator suffixes = nexus.listSuffixes();
while ( suffixes.hasNext() )
{
String suffix = ( String ) suffixes.next();
- Name baseDn = new LdapDN( suffix );
+ LdapDN baseDn = new LdapDN( suffix );
ExprNode filter = new SimpleNode( OC_ATTR, ACSUBENTRY_OC, SimpleNode.EQUALITY );
SearchControls ctls = new SearchControls();
ctls.setSearchScope( SearchControls.SUBTREE_SCOPE );
Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java?rev=411860&r1=411859&r2=411860&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java Mon Jun 5 10:15:23 2006
@@ -38,6 +38,7 @@
import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
import org.apache.directory.shared.ldap.aci.MicroOperation;
import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
+import org.apache.directory.shared.ldap.name.LdapDN;
/**
@@ -99,18 +100,18 @@
* @param proxy the proxy to the partition nexus
* @param userGroupNames the collection of the group DNs the user who is trying to access the resource belongs
* @param username the DN of the user who is trying to access the resource
- * @param entryName the DN of the entry the user is trying to access
+ * @param entryName the DN of the entry the user is trying to access
* @param attrId the attribute type of the attribute the user is trying to access.
* <tt>null</tt> if the user is not accessing a specific attribute type.
* @param attrValue the attribute value of the attribute the user is trying to access.
* <tt>null</tt> if the user is not accessing a specific attribute value.
- * @param microOperations the {@link MicroOperation}s to perform
- * @param aciTuples {@link ACITuple}s translated from {@link ACIItem}s in the subtree entries
+ * @param microOperations the {@link org.apache.directory.shared.ldap.aci.MicroOperation}s to perform
+ * @param aciTuples {@link org.apache.directory.shared.ldap.aci.ACITuple}s translated from {@link org.apache.directory.shared.ldap.aci.ACIItem}s in the subtree entries
* @throws NamingException if failed to evaluate ACI items
*/
- public void checkPermission( DirectoryPartitionNexusProxy proxy, Collection userGroupNames, Name username,
- AuthenticationLevel authenticationLevel, Name entryName, String attrId, Object attrValue,
- Collection microOperations, Collection aciTuples, Attributes entry ) throws NamingException
+ public void checkPermission( DirectoryPartitionNexusProxy proxy, Collection userGroupNames, LdapDN username,
+ AuthenticationLevel authenticationLevel, LdapDN entryName, String attrId, Object attrValue,
+ Collection microOperations, Collection aciTuples, Attributes entry ) throws NamingException
{
if ( !hasPermission( proxy, userGroupNames, username, authenticationLevel, entryName, attrId, attrValue,
microOperations, aciTuples, entry ) )
@@ -143,17 +144,17 @@
* @param proxy the proxy to the partition nexus
* @param userGroupNames the collection of the group DNs the user who is trying to access the resource belongs
* @param userName the DN of the user who is trying to access the resource
- * @param entryName the DN of the entry the user is trying to access
+ * @param entryName the DN of the entry the user is trying to access
* @param attrId the attribute type of the attribute the user is trying to access.
* <tt>null</tt> if the user is not accessing a specific attribute type.
* @param attrValue the attribute value of the attribute the user is trying to access.
* <tt>null</tt> if the user is not accessing a specific attribute value.
- * @param microOperations the {@link MicroOperation}s to perform
- * @param aciTuples {@link ACITuple}s translated from {@link ACIItem}s in the subtree entries
+ * @param microOperations the {@link org.apache.directory.shared.ldap.aci.MicroOperation}s to perform
+ * @param aciTuples {@link org.apache.directory.shared.ldap.aci.ACITuple}s translated from {@link org.apache.directory.shared.ldap.aci.ACIItem}s in the subtree entries
*/
- public boolean hasPermission( DirectoryPartitionNexusProxy proxy, Collection userGroupNames, Name userName,
- AuthenticationLevel authenticationLevel, Name entryName, String attrId, Object attrValue,
- Collection microOperations, Collection aciTuples, Attributes entry ) throws NamingException
+ public boolean hasPermission( DirectoryPartitionNexusProxy proxy, Collection userGroupNames, LdapDN userName,
+ AuthenticationLevel authenticationLevel, LdapDN entryName, String attrId, Object attrValue,
+ Collection microOperations, Collection aciTuples, Attributes entry ) throws NamingException
{
if ( entryName == null )
{
Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java?rev=411860&r1=411859&r2=411860&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java Mon Jun 5 10:15:23 2006
@@ -28,6 +28,7 @@
import org.apache.directory.server.core.partition.DirectoryPartitionNexusProxy;
import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
import org.apache.directory.shared.ldap.aci.MicroOperation;
+import org.apache.directory.shared.ldap.name.LdapDN;
/**
@@ -61,7 +62,8 @@
* @throws NamingException if failed to filter the specifiec tuples
*/
Collection filter( Collection tuples, OperationScope scope, DirectoryPartitionNexusProxy proxy,
- Collection userGroupNames, Name userName, Attributes userEntry, AuthenticationLevel authenticationLevel,
- Name entryName, String attrId, Object attrValue, Attributes entry, Collection microOperations )
+ Collection userGroupNames, LdapDN userName, Attributes userEntry,
+ AuthenticationLevel authenticationLevel, LdapDN entryName, String attrId,
+ Object attrValue, Attributes entry, Collection microOperations )
throws NamingException;
}
Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilter.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilter.java?rev=411860&r1=411859&r2=411860&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilter.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilter.java Mon Jun 5 10:15:23 2006
@@ -22,13 +22,13 @@
import java.util.Collection;
import java.util.Iterator;
-import javax.naming.Name;
import javax.naming.NamingException;
import javax.naming.directory.Attributes;
import org.apache.directory.server.core.partition.DirectoryPartitionNexusProxy;
import org.apache.directory.shared.ldap.aci.ACITuple;
import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
+import org.apache.directory.shared.ldap.name.LdapDN;
/**
@@ -41,8 +41,8 @@
public class HighestPrecedenceFilter implements ACITupleFilter
{
public Collection filter( Collection tuples, OperationScope scope, DirectoryPartitionNexusProxy proxy,
- Collection userGroupNames, Name userName, Attributes userEntry, AuthenticationLevel authenticationLevel,
- Name entryName, String attrId, Object attrValue, Attributes entry, Collection microOperations )
+ Collection userGroupNames, LdapDN userName, Attributes userEntry, AuthenticationLevel authenticationLevel,
+ LdapDN entryName, String attrId, Object attrValue, Attributes entry, Collection microOperations )
throws NamingException
{
if ( tuples.size() <= 1 )
Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java?rev=411860&r1=411859&r2=411860&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java Mon Jun 5 10:15:23 2006
@@ -33,6 +33,7 @@
import org.apache.directory.shared.ldap.aci.ProtectedItem;
import org.apache.directory.shared.ldap.filter.ExprNode;
import org.apache.directory.shared.ldap.filter.PresenceNode;
+import org.apache.directory.shared.ldap.name.LdapDN;
/**
@@ -57,8 +58,8 @@
public Collection filter( Collection tuples, OperationScope scope, DirectoryPartitionNexusProxy proxy,
- Collection userGroupNames, Name userName, Attributes userEntry, AuthenticationLevel authenticationLevel,
- Name entryName, String attrId, Object attrValue, Attributes entry, Collection microOperations )
+ Collection userGroupNames, LdapDN userName, Attributes userEntry, AuthenticationLevel authenticationLevel,
+ LdapDN entryName, String attrId, Object attrValue, Attributes entry, Collection microOperations )
throws NamingException
{
if ( entryName.size() == 0 )
@@ -125,13 +126,13 @@
}
- private int getImmSubCount( DirectoryPartitionNexusProxy proxy, Name entryName ) throws NamingException
+ private int getImmSubCount( DirectoryPartitionNexusProxy proxy, LdapDN entryName ) throws NamingException
{
int cnt = 0;
NamingEnumeration e = null;
try
{
- e = proxy.search( entryName.getPrefix( 1 ), new HashMap(), childrenFilter, childrenSearchControls,
+ e = proxy.search( ( LdapDN ) entryName.getPrefix( 1 ), new HashMap(), childrenFilter, childrenSearchControls,
SEARCH_BYPASS );
while ( e.hasMore() )
Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MaxValueCountFilter.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MaxValueCountFilter.java?rev=411860&r1=411859&r2=411860&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MaxValueCountFilter.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MaxValueCountFilter.java Mon Jun 5 10:15:23 2006
@@ -32,6 +32,7 @@
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.name.LdapDN;
/**
@@ -44,8 +45,8 @@
public class MaxValueCountFilter implements ACITupleFilter
{
public Collection filter( Collection tuples, OperationScope scope, DirectoryPartitionNexusProxy proxy,
- Collection userGroupNames, Name userName, Attributes userEntry, AuthenticationLevel authenticationLevel,
- Name entryName, String attrId, Object attrValue, Attributes entry, Collection microOperations )
+ Collection userGroupNames, LdapDN userName, Attributes userEntry, AuthenticationLevel authenticationLevel,
+ LdapDN entryName, String attrId, Object attrValue, Attributes entry, Collection microOperations )
throws NamingException
{
if ( scope != OperationScope.ATTRIBUTE_TYPE_AND_VALUE )
Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MicroOperationFilter.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MicroOperationFilter.java?rev=411860&r1=411859&r2=411860&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MicroOperationFilter.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MicroOperationFilter.java Mon Jun 5 10:15:23 2006
@@ -30,6 +30,7 @@
import org.apache.directory.shared.ldap.aci.ACITuple;
import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
import org.apache.directory.shared.ldap.aci.MicroOperation;
+import org.apache.directory.shared.ldap.name.LdapDN;
/**
@@ -43,8 +44,8 @@
public class MicroOperationFilter implements ACITupleFilter
{
public Collection filter( Collection tuples, OperationScope scope, DirectoryPartitionNexusProxy proxy,
- Collection userGroupNames, Name userName, Attributes userEntry, AuthenticationLevel authenticationLevel,
- Name entryName, String attrId, Object attrValue, Attributes entry, Collection microOperations )
+ Collection userGroupNames, LdapDN userName, Attributes userEntry, AuthenticationLevel authenticationLevel,
+ LdapDN entryName, String attrId, Object attrValue, Attributes entry, Collection microOperations )
throws NamingException
{
if ( tuples.size() == 0 )
Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilter.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilter.java?rev=411860&r1=411859&r2=411860&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilter.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilter.java Mon Jun 5 10:15:23 2006
@@ -31,6 +31,7 @@
import org.apache.directory.shared.ldap.aci.ACITuple;
import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
import org.apache.directory.shared.ldap.aci.ProtectedItem;
+import org.apache.directory.shared.ldap.name.LdapDN;
/**
@@ -51,8 +52,8 @@
public class MostSpecificProtectedItemFilter implements ACITupleFilter
{
public Collection filter( Collection tuples, OperationScope scope, DirectoryPartitionNexusProxy proxy,
- Collection userGroupNames, Name userName, Attributes userEntry, AuthenticationLevel authenticationLevel,
- Name entryName, String attrId, Object attrValue, Attributes entry, Collection microOperations )
+ Collection userGroupNames, LdapDN userName, Attributes userEntry, AuthenticationLevel authenticationLevel,
+ LdapDN entryName, String attrId, Object attrValue, Attributes entry, Collection microOperations )
throws NamingException
{
if ( tuples.size() <= 1 )
Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilter.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilter.java?rev=411860&r1=411859&r2=411860&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilter.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilter.java Mon Jun 5 10:15:23 2006
@@ -31,6 +31,7 @@
import org.apache.directory.shared.ldap.aci.ACITuple;
import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
import org.apache.directory.shared.ldap.aci.UserClass;
+import org.apache.directory.shared.ldap.name.LdapDN;
/**
@@ -49,8 +50,8 @@
public class MostSpecificUserClassFilter implements ACITupleFilter
{
public Collection filter( Collection tuples, OperationScope scope, DirectoryPartitionNexusProxy proxy,
- Collection userGroupNames, Name userName, Attributes userEntry, AuthenticationLevel authenticationLevel,
- Name entryName, String attrId, Object attrValue, Attributes entry, Collection microOperations )
+ Collection userGroupNames, LdapDN userName, Attributes userEntry, AuthenticationLevel authenticationLevel,
+ LdapDN entryName, String attrId, Object attrValue, Attributes entry, Collection microOperations )
throws NamingException
{
if ( tuples.size() <= 1 )
Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java?rev=411860&r1=411859&r2=411860&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java Mon Jun 5 10:15:23 2006
@@ -22,7 +22,6 @@
import java.util.Collection;
import java.util.Iterator;
-import javax.naming.Name;
import javax.naming.NamingException;
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
@@ -35,6 +34,7 @@
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.name.LdapDN;
/**
@@ -58,8 +58,9 @@
public Collection filter( Collection tuples, OperationScope scope, DirectoryPartitionNexusProxy proxy,
- Collection userGroupNames, Name userName, Attributes userEntry, AuthenticationLevel authenticationLevel,
- Name entryName, String attrId, Object attrValue, Attributes entry, Collection microOperations )
+ Collection userGroupNames, LdapDN userName, Attributes userEntry,
+ AuthenticationLevel authenticationLevel, LdapDN entryName, String attrId,
+ Object attrValue, Attributes entry, Collection microOperations )
throws NamingException
{
if ( tuples.size() == 0 )
@@ -80,8 +81,8 @@
}
- private boolean isRelated( ACITuple tuple, OperationScope scope, Name userName, Name entryName, String attrId,
- Object attrValue, Attributes entry ) throws NamingException, InternalError
+ private boolean isRelated( ACITuple tuple, OperationScope scope, LdapDN userName, LdapDN entryName, String attrId,
+ Object attrValue, Attributes entry ) throws NamingException, InternalError
{
for ( Iterator i = tuple.getProtectedItems().iterator(); i.hasNext(); )
{
Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilter.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilter.java?rev=411860&r1=411859&r2=411860&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilter.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilter.java Mon Jun 5 10:15:23 2006
@@ -22,7 +22,6 @@
import java.util.Collection;
import java.util.Iterator;
-import javax.naming.Name;
import javax.naming.NamingException;
import javax.naming.directory.Attributes;
@@ -56,8 +55,8 @@
public Collection filter( Collection tuples, OperationScope scope, DirectoryPartitionNexusProxy proxy,
- Collection userGroupNames, Name userName, Attributes userEntry, AuthenticationLevel authenticationLevel,
- Name entryName, String attrId, Object attrValue, Attributes entry, Collection microOperations )
+ Collection userGroupNames, LdapDN userName, Attributes userEntry, AuthenticationLevel authenticationLevel,
+ LdapDN entryName, String attrId, Object attrValue, Attributes entry, Collection microOperations )
throws NamingException
{
if ( tuples.size() == 0 )
@@ -91,7 +90,7 @@
}
- private boolean isRelated( Collection userGroupNames, Name userName, Attributes userEntry, Name entryName,
+ private boolean isRelated( Collection userGroupNames, LdapDN userName, Attributes userEntry, LdapDN entryName,
Collection userClasses ) throws NamingException
{
for ( Iterator i = userClasses.iterator(); i.hasNext(); )
@@ -121,7 +120,7 @@
UserClass.UserGroup userGroupUserClass = ( UserClass.UserGroup ) userClass;
for ( Iterator j = userGroupNames.iterator(); j.hasNext(); )
{
- Name userGroupName = ( Name ) j.next();
+ LdapDN userGroupName = ( LdapDN ) j.next();
if ( userGroupName != null && userGroupUserClass.getNames().contains( userGroupName ) )
{
return true;
@@ -146,7 +145,7 @@
}
- private boolean matchUserClassSubtree( Name userName, Attributes userEntry, UserClass.Subtree subtree )
+ private boolean matchUserClassSubtree( LdapDN userName, Attributes userEntry, UserClass.Subtree subtree )
throws NamingException
{
for ( Iterator i = subtree.getSubtreeSpecifications().iterator(); i.hasNext(); )
Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/RestrictedByFilter.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/RestrictedByFilter.java?rev=411860&r1=411859&r2=411860&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/RestrictedByFilter.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/support/RestrictedByFilter.java Mon Jun 5 10:15:23 2006
@@ -22,7 +22,6 @@
import java.util.Collection;
import java.util.Iterator;
-import javax.naming.Name;
import javax.naming.NamingException;
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
@@ -32,6 +31,7 @@
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.name.LdapDN;
/**
@@ -44,8 +44,8 @@
public class RestrictedByFilter implements ACITupleFilter
{
public Collection filter( Collection tuples, OperationScope scope, DirectoryPartitionNexusProxy proxy,
- Collection userGroupNames, Name userName, Attributes userEntry, AuthenticationLevel authenticationLevel,
- Name entryName, String attrId, Object attrValue, Attributes entry, Collection microOperations )
+ Collection userGroupNames, LdapDN userName, Attributes userEntry, AuthenticationLevel authenticationLevel,
+ LdapDN entryName, String attrId, Object attrValue, Attributes entry, Collection microOperations )
throws NamingException
{
if ( scope != OperationScope.ATTRIBUTE_TYPE_AND_VALUE )
Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java?rev=411860&r1=411859&r2=411860&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java Mon Jun 5 10:15:23 2006
@@ -135,7 +135,7 @@
for ( int ii = 0; ii < subentries.size(); ii++ )
{
String subentryDnStr = ( String ) subentries.get( ii );
- Name subentryDn = new LdapDN( subentryDnStr );
+ LdapDN subentryDn = new LdapDN( subentryDnStr );
Attributes subentry = nexus.lookup( subentryDn );
NamingEnumeration attrIds = subentry.getIDs();
while ( attrIds.hasMore() )
@@ -236,7 +236,7 @@
// Interceptor Method Overrides
// ------------------------------------------------------------------------
- public Attributes lookup( NextInterceptor nextInterceptor, Name name ) throws NamingException
+ public Attributes lookup( NextInterceptor nextInterceptor, LdapDN name ) throws NamingException
{
Attributes result = nextInterceptor.lookup( name );
if ( result == null )
@@ -248,7 +248,7 @@
}
- public Attributes lookup( NextInterceptor nextInterceptor, Name name, String[] attrIds ) throws NamingException
+ public Attributes lookup( NextInterceptor nextInterceptor, LdapDN name, String[] attrIds ) throws NamingException
{
Attributes result = nextInterceptor.lookup( name, attrIds );
if ( result == null )
@@ -261,7 +261,7 @@
}
- public NamingEnumeration list( NextInterceptor nextInterceptor, Name base ) throws NamingException
+ public NamingEnumeration list( NextInterceptor nextInterceptor, LdapDN base ) throws NamingException
{
NamingEnumeration e = nextInterceptor.list( base );
Invocation invocation = InvocationStack.getInstance().peek();
@@ -269,7 +269,7 @@
}
- public NamingEnumeration search( NextInterceptor nextInterceptor, Name base, Map env, ExprNode filter,
+ public NamingEnumeration search( NextInterceptor nextInterceptor, LdapDN base, Map env, ExprNode filter,
SearchControls searchCtls ) throws NamingException
{
NamingEnumeration e = nextInterceptor.search( base, env, filter, searchCtls );
Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/configuration/RemoveDirectoryPartitionConfiguration.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/configuration/RemoveDirectoryPartitionConfiguration.java?rev=411860&r1=411859&r2=411860&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/configuration/RemoveDirectoryPartitionConfiguration.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/configuration/RemoveDirectoryPartitionConfiguration.java Mon Jun 5 10:15:23 2006
@@ -38,16 +38,16 @@
{
private static final long serialVersionUID = -6690435863387769527L;
- private final Name suffix;
+ private final LdapDN suffix;
- public RemoveDirectoryPartitionConfiguration(String suffix) throws NamingException
+ public RemoveDirectoryPartitionConfiguration( String suffix ) throws NamingException
{
this( new LdapDN( suffix.trim() ) );
}
- public RemoveDirectoryPartitionConfiguration(Name suffix)
+ public RemoveDirectoryPartitionConfiguration( LdapDN suffix )
{
if ( suffix == null )
{
@@ -58,7 +58,7 @@
}
- public Name getSuffix()
+ public LdapDN getSuffix()
{
return suffix;
}
Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/enumeration/ReferralHandlingEnumeration.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/enumeration/ReferralHandlingEnumeration.java?rev=411860&r1=411859&r2=411860&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/enumeration/ReferralHandlingEnumeration.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/enumeration/ReferralHandlingEnumeration.java Mon Jun 5 10:15:23 2006
@@ -30,12 +30,11 @@
import org.apache.directory.server.core.partition.DirectoryPartitionNexus;
import org.apache.directory.server.core.referral.ReferralLut;
+import org.apache.directory.server.core.schema.AttributeTypeRegistry;
import org.apache.directory.shared.ldap.codec.util.LdapURL;
import org.apache.directory.shared.ldap.codec.util.LdapURLEncodingException;
import org.apache.directory.shared.ldap.exception.LdapReferralException;
-
-// TODO remove DnParser usage with LdapDN
-import org.apache.directory.shared.ldap.name.DnParser;
+import org.apache.directory.shared.ldap.name.LdapDN;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -54,23 +53,23 @@
private final List referrals = new ArrayList();
private final NamingEnumeration underlying;
private final ReferralLut lut;
- private final DnParser parser;
private final DirectoryPartitionNexus nexus;
private final boolean doThrow;
private final int scope;
private SearchResult prefetched;
private int refIndex = -1;
+ private AttributeTypeRegistry registry;
- public ReferralHandlingEnumeration(NamingEnumeration underlying, ReferralLut lut, DnParser parser,
- DirectoryPartitionNexus nexus, int scope, boolean doThrow) throws NamingException
+ public ReferralHandlingEnumeration( NamingEnumeration underlying, ReferralLut lut, AttributeTypeRegistry registry,
+ DirectoryPartitionNexus nexus, int scope, boolean doThrow ) throws NamingException
{
this.underlying = underlying;
- this.parser = parser;
this.doThrow = doThrow;
this.lut = lut;
this.scope = scope;
this.nexus = nexus;
+ this.registry = registry;
prefetch();
}
@@ -80,7 +79,8 @@
while ( underlying.hasMore() )
{
SearchResult result = ( SearchResult ) underlying.next();
- Name dn = parser.parse( result.getName() );
+ LdapDN dn = new LdapDN( result.getName() );
+ dn = LdapDN.normalize( dn, registry.getNormalizerMapping() );
if ( lut.isReferral( dn ) )
{
referrals.add( result );
@@ -166,7 +166,9 @@
Attribute refs = prefetched.getAttributes().get( REF_ATTR );
if ( refs == null )
{
- refs = nexus.lookup( parser.parse( prefetched.getName() ) ).get( REF_ATTR );
+ LdapDN prefetchedDn = new LdapDN( prefetched.getName() );
+ prefetchedDn = LdapDN.normalize( prefetchedDn, registry.getNormalizerMapping() );
+ refs = nexus.lookup( prefetchedDn ).get( REF_ATTR );
}
if ( refs == null )
Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/event/EventService.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/event/EventService.java?rev=411860&r1=411859&r2=411860&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/event/EventService.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/event/EventService.java Mon Jun 5 10:15:23 2006
@@ -196,7 +196,7 @@
}
- private void notifyOnModify( Name name, ModificationItem[] mods, Attributes oriEntry ) throws NamingException
+ private void notifyOnModify( LdapDN name, ModificationItem[] mods, Attributes oriEntry ) throws NamingException
{
Attributes entry = nexus.lookup( name );
Set selecting = getSelectingSources( name, entry );
@@ -251,7 +251,7 @@
}
- private void notifyOnNameChange( Name oldName, Name newName ) throws NamingException
+ private void notifyOnNameChange( LdapDN oldName, LdapDN newName ) throws NamingException
{
Attributes entry = nexus.lookup( newName );
Set selecting = getSelectingSources( oldName, entry );
@@ -281,7 +281,7 @@
public void modifyRn( NextInterceptor next, LdapDN name, String newRn, boolean deleteOldRn ) throws NamingException
{
super.modifyRn( next, name, newRn, deleteOldRn );
- Name newName = ( Name ) name.clone();
+ LdapDN newName = ( LdapDN ) name.clone();
newName.remove( newName.size() - 1 );
newName.add( newRn );
notifyOnNameChange( name, newName );
@@ -292,7 +292,7 @@
throws NamingException
{
super.move( next, oriChildName, newParentName, newRn, deleteOldRn );
- Name newName = ( Name ) newParentName.clone();
+ LdapDN newName = ( LdapDN ) newParentName.clone();
newName.add( newRn );
notifyOnNameChange( oriChildName, newName );
}
@@ -301,7 +301,7 @@
public void move( NextInterceptor next, LdapDN oriChildName, LdapDN newParentName ) throws NamingException
{
super.move( next, oriChildName, newParentName );
- Name newName = ( Name ) newParentName.clone();
+ LdapDN newName = ( LdapDN ) newParentName.clone();
newName.add( oriChildName.get( oriChildName.size() - 1 ) );
notifyOnNameChange( oriChildName, newName );
}
Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java?rev=411860&r1=411859&r2=411860&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java Mon Jun 5 10:15:23 2006
@@ -19,7 +19,6 @@
import java.util.Map;
-import javax.naming.Name;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
import javax.naming.directory.*;
@@ -87,13 +86,13 @@
throw ne;
}
- Name parentDn = normName.getPrefix( 1 );
+ LdapDN parentDn = ( LdapDN ) normName.getPrefix( 1 );
// check if we don't have the parent to add to
assertHasEntry( nextInterceptor, "Attempt to add under non-existant parent: ", parentDn );
// check if we're trying to add to a parent that is an alias
- Attributes attrs = nextInterceptor.lookup( normName.getPrefix( 1 ) );
+ Attributes attrs = nextInterceptor.lookup( ( LdapDN ) normName.getPrefix( 1 ) );
Attribute objectClass = attrs.get( "objectClass" );
if ( objectClass.contains( "alias" ) )
{
@@ -141,7 +140,7 @@
/**
* Checks to see the base being searched exists, otherwise throws the appropriate LdapException.
*/
- public NamingEnumeration list( NextInterceptor nextInterceptor, Name baseName ) throws NamingException
+ public NamingEnumeration list( NextInterceptor nextInterceptor, LdapDN baseName ) throws NamingException
{
// check if entry to search exists
String msg = "Attempt to search under non-existant entry: ";
@@ -154,7 +153,7 @@
/**
* Checks to make sure the entry being looked up exists other wise throws the appropriate LdapException.
*/
- public Attributes lookup( NextInterceptor nextInterceptor, Name name ) throws NamingException
+ public Attributes lookup( NextInterceptor nextInterceptor, LdapDN name ) throws NamingException
{
String msg = "Attempt to lookup non-existant entry: ";
assertHasEntry( nextInterceptor, msg, name );
@@ -166,7 +165,7 @@
/**
* Checks to see the base being searched exists, otherwise throws the appropriate LdapException.
*/
- public Attributes lookup( NextInterceptor nextInterceptor, Name name, String[] attrIds ) throws NamingException
+ public Attributes lookup( NextInterceptor nextInterceptor, LdapDN name, String[] attrIds ) throws NamingException
{
// check if entry to lookup exists
String msg = "Attempt to lookup non-existant entry: ";
@@ -258,10 +257,10 @@
assertHasEntry( nextInterceptor, msg, dn );
// check to see if target entry exists
- Name target = dn.getPrefix( 1 ).add( newRn );
+ LdapDN target = ( LdapDN ) dn.getPrefix( 1 ).add( newRn );
if ( nextInterceptor.hasEntry( target ) )
{
- LdapNameAlreadyBoundException e = null;
+ LdapNameAlreadyBoundException e;
e = new LdapNameAlreadyBoundException( "target entry " + target + " already exists!" );
e.setResolvedName( target );
throw e;
@@ -287,11 +286,11 @@
// check to see if target entry exists
String rdn = oriChildName.get( oriChildName.size() - 1 );
- Name target = ( Name ) newParentName.clone();
+ LdapDN target = ( LdapDN ) newParentName.clone();
target.add( rdn );
if ( nextInterceptor.hasEntry( target ) )
{
- LdapNameAlreadyBoundException e = null;
+ LdapNameAlreadyBoundException e;
e = new LdapNameAlreadyBoundException( "target entry " + target + " already exists!" );
e.setResolvedName( target );
throw e;
@@ -317,11 +316,11 @@
assertHasEntry( nextInterceptor, msg, newParentName );
// check to see if target entry exists
- Name target = ( Name ) newParentName.clone();
+ LdapDN target = ( LdapDN ) newParentName.clone();
target.add( newRn );
if ( nextInterceptor.hasEntry( target ) )
{
- LdapNameAlreadyBoundException e = null;
+ LdapNameAlreadyBoundException e;
e = new LdapNameAlreadyBoundException( "target entry " + target + " already exists!" );
e.setResolvedName( target );
throw e;
@@ -334,7 +333,7 @@
/**
* Checks to see the entry being searched exists, otherwise throws the appropriate LdapException.
*/
- public NamingEnumeration search( NextInterceptor nextInterceptor, Name base, Map env, ExprNode filter,
+ public NamingEnumeration search( NextInterceptor nextInterceptor, LdapDN base, Map env, ExprNode filter,
SearchControls searchCtls ) throws NamingException
{
String msg = "Attempt to search under non-existant entry: ";
@@ -364,13 +363,13 @@
* @param dn the distinguished name of the entry that is asserted
* @throws NamingException if the entry does not exist
*/
- private void assertHasEntry( NextInterceptor nextInterceptor, String msg, Name dn ) throws NamingException
+ private void assertHasEntry( NextInterceptor nextInterceptor, String msg, LdapDN dn ) throws NamingException
{
Invocation invocation = InvocationStack.getInstance().peek();
DirectoryPartitionNexusProxy proxy = invocation.getProxy();
if ( !nextInterceptor.hasEntry( dn ) )
{
- LdapNameNotFoundException e = null;
+ LdapNameNotFoundException e;
if ( msg != null )
{
@@ -381,7 +380,7 @@
e = new LdapNameNotFoundException( dn.toString() );
}
- e.setResolvedName( proxy.getMatchedName( dn, false ) );
+ e.setResolvedName( proxy.getMatchedName( dn ) );
throw e;
}
}
Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java?rev=411860&r1=411859&r2=411860&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java Mon Jun 5 10:15:23 2006
@@ -22,7 +22,6 @@
import java.util.Map;
import javax.naming.Context;
-import javax.naming.Name;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
import javax.naming.directory.Attributes;
@@ -109,9 +108,9 @@
}
- public Name getMatchedName( NextInterceptor next, Name dn, boolean normalized ) throws NamingException
+ public LdapDN getMatchedName ( NextInterceptor next, LdapDN dn ) throws NamingException
{
- return next.getMatchedName( dn, normalized );
+ return next.getMatchedName( dn );
}
@@ -121,43 +120,43 @@
}
- public Name getSuffix( NextInterceptor next, Name dn, boolean normalized ) throws NamingException
+ public LdapDN getSuffix ( NextInterceptor next, LdapDN dn ) throws NamingException
{
- return next.getSuffix( dn, normalized );
+ return next.getSuffix( dn );
}
- public boolean hasEntry( NextInterceptor next, Name name ) throws NamingException
+ public boolean hasEntry( NextInterceptor next, LdapDN name ) throws NamingException
{
return next.hasEntry( name );
}
- public boolean isSuffix( NextInterceptor next, Name name ) throws NamingException
+ public boolean isSuffix( NextInterceptor next, LdapDN name ) throws NamingException
{
return next.isSuffix( name );
}
- public NamingEnumeration list( NextInterceptor next, Name base ) throws NamingException
+ public NamingEnumeration list( NextInterceptor next, LdapDN base ) throws NamingException
{
return next.list( base );
}
- public Iterator listSuffixes( NextInterceptor next, boolean normalized ) throws NamingException
+ public Iterator listSuffixes ( NextInterceptor next ) throws NamingException
{
- return next.listSuffixes( normalized );
+ return next.listSuffixes();
}
- public Attributes lookup( NextInterceptor next, Name dn, String[] attrIds ) throws NamingException
+ public Attributes lookup( NextInterceptor next, LdapDN dn, String[] attrIds ) throws NamingException
{
return next.lookup( dn, attrIds );
}
- public Attributes lookup( NextInterceptor next, Name name ) throws NamingException
+ public Attributes lookup( NextInterceptor next, LdapDN name ) throws NamingException
{
return next.lookup( name );
}
@@ -194,7 +193,7 @@
}
- public NamingEnumeration search( NextInterceptor next, Name base, Map env, ExprNode filter,
+ public NamingEnumeration search( NextInterceptor next, LdapDN base, Map env, ExprNode filter,
SearchControls searchCtls ) throws NamingException
{
return next.search( base, env, filter, searchCtls );
@@ -207,26 +206,26 @@
}
- public void removeContextPartition( NextInterceptor next, Name suffix ) throws NamingException
+ public void removeContextPartition( NextInterceptor next, LdapDN suffix ) throws NamingException
{
next.removeContextPartition( suffix );
}
- public boolean compare( NextInterceptor next, Name name, String oid, Object value ) throws NamingException
+ public boolean compare( NextInterceptor next, LdapDN name, String oid, Object value ) throws NamingException
{
return next.compare( name, oid, value );
}
- public void bind( NextInterceptor next, Name bindDn, byte[] credentials, List mechanisms, String saslAuthId )
+ public void bind( NextInterceptor next, LdapDN bindDn, byte[] credentials, List mechanisms, String saslAuthId )
throws NamingException
{
next.bind( bindDn, credentials, mechanisms, saslAuthId );
}
- public void unbind( NextInterceptor next, Name bindDn ) throws NamingException
+ public void unbind( NextInterceptor next, LdapDN bindDn ) throws NamingException
{
next.unbind( bindDn );
}
Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java?rev=411860&r1=411859&r2=411860&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java Mon Jun 5 10:15:23 2006
@@ -21,7 +21,6 @@
import java.util.List;
import java.util.Map;
-import javax.naming.Name;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
import javax.naming.directory.Attributes;
@@ -123,21 +122,21 @@
/**
- * Filters {@link DirectoryPartitionNexus#getMatchedName(Name, boolean)} call.
+ * Filters {@link DirectoryPartitionNexus#getMatchedName(org.apache.directory.shared.ldap.name.LdapDN)} call.
*/
- Name getMatchedName( NextInterceptor next, Name name, boolean normalized ) throws NamingException;
+ LdapDN getMatchedName ( NextInterceptor next, LdapDN name ) throws NamingException;
/**
- * Filters {@link DirectoryPartitionNexus#getSuffix(Name, boolean)} call.
+ * Filters {@link DirectoryPartitionNexus#getSuffix(org.apache.directory.shared.ldap.name.LdapDN)} call.
*/
- Name getSuffix( NextInterceptor next, Name name, boolean normalized ) throws NamingException;
+ LdapDN getSuffix ( NextInterceptor next, LdapDN name ) throws NamingException;
/**
- * Filters {@link DirectoryPartitionNexus#listSuffixes(boolean)} call.
+ * Filters {@link DirectoryPartitionNexus#listSuffixes()} call.
*/
- Iterator listSuffixes( NextInterceptor next, boolean normalized ) throws NamingException;
+ Iterator listSuffixes ( NextInterceptor next ) throws NamingException;
/**
@@ -147,15 +146,15 @@
/**
- * Filters {@link DirectoryPartitionNexus#removeContextPartition(Name)} call.
+ * Filters {@link DirectoryPartitionNexus#removeContextPartition(org.apache.directory.shared.ldap.name.LdapDN)} call.
*/
- void removeContextPartition( NextInterceptor next, Name suffix ) throws NamingException;
+ void removeContextPartition( NextInterceptor next, LdapDN suffix ) throws NamingException;
/**
- * Filters {@link DirectoryPartitionNexus#compare(Name,String,Object)} call.
+ * Filters {@link DirectoryPartitionNexus#compare(org.apache.directory.shared.ldap.name.LdapDN,String,Object)} call.
*/
- boolean compare( NextInterceptor next, Name name, String oid, Object value ) throws NamingException;
+ boolean compare( NextInterceptor next, LdapDN name, String oid, Object value ) throws NamingException;
/**
@@ -167,8 +166,7 @@
/**
* Filters {@link DirectoryPartition#add(org.apache.directory.shared.ldap.name.LdapDN,javax.naming.directory.Attributes)} call.
*/
- void add(NextInterceptor next, LdapDN name, Attributes entry)
- throws NamingException;
+ void add( NextInterceptor next, LdapDN name, Attributes entry ) throws NamingException;
/**
@@ -184,40 +182,40 @@
/**
- * Filters {@link DirectoryPartition#list(Name)} call.
+ * Filters {@link DirectoryPartition#list(org.apache.directory.shared.ldap.name.LdapDN)} call.
*/
- NamingEnumeration list( NextInterceptor next, Name baseName ) throws NamingException;
+ NamingEnumeration list( NextInterceptor next, LdapDN baseName ) throws NamingException;
/**
- * Filters {@link DirectoryPartition#search(Name, Map, ExprNode, SearchControls)} call.
+ * Filters {@link DirectoryPartition#search(org.apache.directory.shared.ldap.name.LdapDN,java.util.Map,org.apache.directory.shared.ldap.filter.ExprNode,javax.naming.directory.SearchControls)} call.
*/
- NamingEnumeration search( NextInterceptor next, Name baseName, Map environment, ExprNode filter,
+ NamingEnumeration search( NextInterceptor next, LdapDN baseName, Map environment, ExprNode filter,
SearchControls searchControls ) throws NamingException;
/**
- * Filters {@link DirectoryPartition#lookup(Name)} call.
+ * Filters {@link DirectoryPartition#lookup(org.apache.directory.shared.ldap.name.LdapDN)} call.
*/
- Attributes lookup( NextInterceptor next, Name name ) throws NamingException;
+ Attributes lookup( NextInterceptor next, LdapDN name ) throws NamingException;
/**
- * Filters {@link DirectoryPartition#lookup(Name, String[])} call.
+ * Filters {@link DirectoryPartition#lookup(org.apache.directory.shared.ldap.name.LdapDN,String[])} call.
*/
- Attributes lookup( NextInterceptor next, Name dn, String[] attrIds ) throws NamingException;
+ Attributes lookup( NextInterceptor next, LdapDN dn, String[] attrIds ) throws NamingException;
/**
- * Filters {@link DirectoryPartition#lookup(Name, String[])} call.
+ * Filters {@link DirectoryPartition#lookup(org.apache.directory.shared.ldap.name.LdapDN,String[])} call.
*/
- boolean hasEntry( NextInterceptor next, Name name ) throws NamingException;
+ boolean hasEntry( NextInterceptor next, LdapDN name ) throws NamingException;
/**
- * Filters {@link DirectoryPartition#isSuffix(Name)} call.
+ * Filters {@link DirectoryPartition#isSuffix(org.apache.directory.shared.ldap.name.LdapDN)} call.
*/
- boolean isSuffix( NextInterceptor next, Name name ) throws NamingException;
+ boolean isSuffix( NextInterceptor next, LdapDN name ) throws NamingException;
/**
@@ -240,14 +238,14 @@
/**
- * Filters {@link DirectoryPartition#bind(Name, byte[], List, String)} call.
+ * Filters {@link DirectoryPartition#bind(org.apache.directory.shared.ldap.name.LdapDN,byte[],java.util.List,String)} call.
*/
- void bind( NextInterceptor next, Name bindDn, byte[] credentials, List mechanisms, String saslAuthId )
+ void bind( NextInterceptor next, LdapDN bindDn, byte[] credentials, List mechanisms, String saslAuthId )
throws NamingException;
/**
- * Filters {@link DirectoryPartition#unbind(Name)} call.
+ * Filters {@link DirectoryPartition#unbind(org.apache.directory.shared.ldap.name.LdapDN)} call.
*/
- void unbind( NextInterceptor next, Name bindDn ) throws NamingException;
+ void unbind( NextInterceptor next, LdapDN bindDn ) throws NamingException;
}
|