You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2011/01/23 02:17:26 UTC
svn commit: r1062306 [9/32] - in /directory:
apacheds-manuals/trunk/src/advanced-user-guide/
apacheds-manuals/trunk/src/basic-user-guide/
apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/
apacheds/trunk/core-api/sr...
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultOperationManager.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultOperationManager.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultOperationManager.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultOperationManager.java Sun Jan 23 01:17:06 2011
@@ -57,7 +57,7 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.filter.LdapURL;
import org.apache.directory.shared.ldap.filter.SearchScope;
import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -85,7 +85,7 @@ public class DefaultOperationManager imp
}
- private LdapReferralException buildReferralException( Entry parentEntry, DN childDn )
+ private LdapReferralException buildReferralException( Entry parentEntry, Dn childDn )
throws LdapException //, LdapURLEncodingException
{
// Get the Ref attributeType
@@ -101,12 +101,12 @@ public class DefaultOperationManager imp
// we have to replace the parent by the referral
LdapURL ldapUrl = new LdapURL( url.getString() );
- // We have a problem with the DN : we can't use the UpName,
+ // We have a problem with the Dn : we can't use the UpName,
// as we may have some spaces around the ',' and '+'.
- // So we have to take the RDN one by one, and create a
- // new DN with the type and value UP form
+ // So we have to take the Rdn one by one, and create a
+ // new Dn with the type and value UP form
- DN urlDn = ldapUrl.getDn().addAll( childDn );
+ Dn urlDn = ldapUrl.getDn().addAll( childDn );
ldapUrl.setDn( urlDn );
urls.add( ldapUrl.toString() );
@@ -131,7 +131,7 @@ public class DefaultOperationManager imp
}
- private LdapReferralException buildReferralExceptionForSearch( Entry parentEntry, DN childDn, SearchScope scope )
+ private LdapReferralException buildReferralExceptionForSearch( Entry parentEntry, Dn childDn, SearchScope scope )
throws LdapException
{
// Get the Ref attributeType
@@ -149,18 +149,18 @@ public class DefaultOperationManager imp
StringBuilder urlString = new StringBuilder();
- if ( ( ldapUrl.getDn() == null ) || ( ldapUrl.getDn() == DN.EMPTY_DN ) )
+ if ( ( ldapUrl.getDn() == null ) || ( ldapUrl.getDn() == Dn.EMPTY_DN ) )
{
ldapUrl.setDn( parentEntry.getDn() );
}
else
{
- // We have a problem with the DN : we can't use the UpName,
+ // We have a problem with the Dn : we can't use the UpName,
// as we may have some spaces around the ',' and '+'.
- // So we have to take the RDN one by one, and create a
- // new DN with the type and value UP form
+ // So we have to take the Rdn one by one, and create a
+ // new Dn with the type and value UP form
- DN urlDn = ldapUrl.getDn().addAll( childDn );
+ Dn urlDn = ldapUrl.getDn().addAll( childDn );
ldapUrl.setDn( urlDn );
}
@@ -201,12 +201,12 @@ public class DefaultOperationManager imp
}
- private LdapPartialResultException buildLdapPartialResultException( DN childDn )
+ private LdapPartialResultException buildLdapPartialResultException( Dn childDn )
{
LdapPartialResultException lpre = new LdapPartialResultException( I18n.err( I18n.ERR_315 ) );
lpre.setRemainingDn( childDn );
- lpre.setResolvedDn( DN.EMPTY_DN );
+ lpre.setResolvedDn( Dn.EMPTY_DN );
return lpre;
}
@@ -225,8 +225,8 @@ public class DefaultOperationManager imp
try
{
- // Normalize the addContext DN
- DN dn = addContext.getDn();
+ // Normalize the addContext Dn
+ Dn dn = addContext.getDn();
dn.normalize( directoryService.getSchemaManager() );
// We have to deal with the referral first
@@ -235,7 +235,7 @@ public class DefaultOperationManager imp
if ( directoryService.getReferralManager().hasParentReferral( dn ) )
{
Entry parentEntry = directoryService.getReferralManager().getParentReferral( dn );
- DN childDn = dn.getSuffix( parentEntry.getDn().size() );
+ Dn childDn = dn.getSuffix( parentEntry.getDn().size() );
// Depending on the Context.REFERRAL property value, we will throw
// a different exception.
@@ -310,20 +310,20 @@ public class DefaultOperationManager imp
try
{
- // Normalize the compareContext DN
- DN dn = compareContext.getDn();
+ // Normalize the compareContext Dn
+ Dn dn = compareContext.getDn();
dn.normalize( directoryService.getSchemaManager() );
// We have to deal with the referral first
directoryService.getReferralManager().lockRead();
- // Check if we have an ancestor for this DN
+ // Check if we have an ancestor for this Dn
Entry parentEntry = directoryService.getReferralManager().getParentReferral( dn );
if ( parentEntry != null )
{
- // We have found a parent referral for the current DN
- DN childDn = dn.getSuffix( parentEntry.getDn().size() );
+ // We have found a parent referral for the current Dn
+ Dn childDn = dn.getSuffix( parentEntry.getDn().size() );
if ( directoryService.getReferralManager().isReferral( dn ) )
{
@@ -390,8 +390,8 @@ public class DefaultOperationManager imp
try
{
- // Normalize the deleteContext DN
- DN dn = deleteContext.getDn();
+ // Normalize the deleteContext Dn
+ Dn dn = deleteContext.getDn();
dn.normalize( directoryService.getSchemaManager() );
// We have to deal with the referral first
@@ -401,8 +401,8 @@ public class DefaultOperationManager imp
if ( parentEntry != null )
{
- // We have found a parent referral for the current DN
- DN childDn = dn.getSuffix( parentEntry.getDn().size() );
+ // We have found a parent referral for the current Dn
+ Dn childDn = dn.getSuffix( parentEntry.getDn().size() );
if ( directoryService.getReferralManager().isReferral( dn ) )
{
@@ -566,8 +566,8 @@ public class DefaultOperationManager imp
try
{
- // Normalize the modifyContext DN
- DN dn = modifyContext.getDn();
+ // Normalize the modifyContext Dn
+ Dn dn = modifyContext.getDn();
dn.normalize( directoryService.getSchemaManager() );
ReferralManager referralManager = directoryService.getReferralManager();
@@ -575,7 +575,7 @@ public class DefaultOperationManager imp
// We have to deal with the referral first
referralManager.lockRead();
- // Check if we have an ancestor for this DN
+ // Check if we have an ancestor for this Dn
Entry parentEntry = referralManager.getParentReferral( dn );
if ( parentEntry != null )
@@ -590,8 +590,8 @@ public class DefaultOperationManager imp
// Unlock the referral manager
referralManager.unlock();
- // We have found a parent referral for the current DN
- DN childDn = dn.getSuffix( parentEntry.getDn().size() );
+ // We have found a parent referral for the current Dn
+ Dn childDn = dn.getSuffix( parentEntry.getDn().size() );
LdapReferralException exception = buildReferralException( parentEntry, childDn );
throw exception;
@@ -607,8 +607,8 @@ public class DefaultOperationManager imp
{
referralManager.unlock();
- // We have found a parent referral for the current DN
- DN childDn = dn.getSuffix( parentEntry.getDn().size() );
+ // We have found a parent referral for the current Dn
+ Dn childDn = dn.getSuffix( parentEntry.getDn().size() );
LdapPartialResultException exception = buildLdapPartialResultException( childDn );
throw exception;
@@ -618,8 +618,8 @@ public class DefaultOperationManager imp
// Unlock the referral manager
referralManager.unlock();
- // We have found a parent referral for the current DN
- DN childDn = dn.getSuffix( parentEntry.getDn().size() );
+ // We have found a parent referral for the current Dn
+ Dn childDn = dn.getSuffix( parentEntry.getDn().size() );
LdapReferralException exception = buildReferralException( parentEntry, childDn );
throw exception;
@@ -657,24 +657,24 @@ public class DefaultOperationManager imp
try
{
- // Normalize the moveContext DN
- DN dn = moveContext.getDn();
+ // Normalize the moveContext Dn
+ Dn dn = moveContext.getDn();
dn.normalize( directoryService.getSchemaManager() );
- // Normalize the moveContext superior DN
- DN newSuperiorDn = moveContext.getNewSuperior();
+ // Normalize the moveContext superior Dn
+ Dn newSuperiorDn = moveContext.getNewSuperior();
newSuperiorDn.normalize( directoryService.getSchemaManager() );
// We have to deal with the referral first
directoryService.getReferralManager().lockRead();
- // Check if we have an ancestor for this DN
+ // Check if we have an ancestor for this Dn
Entry parentEntry = directoryService.getReferralManager().getParentReferral( dn );
if ( parentEntry != null )
{
- // We have found a parent referral for the current DN
- DN childDn = dn.getSuffix( parentEntry.getDn().size() );
+ // We have found a parent referral for the current Dn
+ Dn childDn = dn.getSuffix( parentEntry.getDn().size() );
if ( directoryService.getReferralManager().isReferral( dn ) )
{
@@ -715,7 +715,7 @@ public class DefaultOperationManager imp
}
// Now, check the destination
- // If he parent DN is a referral, or has a referral ancestor, we have to issue a AffectMultipleDsas result
+ // If he parent Dn is a referral, or has a referral ancestor, we have to issue a AffectMultipleDsas result
// as stated by RFC 3296 Section 5.6.2
if ( directoryService.getReferralManager().isReferral( newSuperiorDn )
|| directoryService.getReferralManager().hasParentReferral( newSuperiorDn ) )
@@ -759,20 +759,20 @@ public class DefaultOperationManager imp
try
{
- // Normalize the moveAndRenameContext DN
- DN dn = moveAndRenameContext.getDn();
+ // Normalize the moveAndRenameContext Dn
+ Dn dn = moveAndRenameContext.getDn();
dn.normalize( directoryService.getSchemaManager() );
// We have to deal with the referral first
directoryService.getReferralManager().lockRead();
- // Check if we have an ancestor for this DN
+ // Check if we have an ancestor for this Dn
Entry parentEntry = directoryService.getReferralManager().getParentReferral( dn );
if ( parentEntry != null )
{
- // We have found a parent referral for the current DN
- DN childDn = dn.getSuffix( parentEntry.getDn().size() );
+ // We have found a parent referral for the current Dn
+ Dn childDn = dn.getSuffix( parentEntry.getDn().size() );
if ( directoryService.getReferralManager().isReferral( dn ) )
{
@@ -813,11 +813,11 @@ public class DefaultOperationManager imp
}
// Now, check the destination
- // Normalize the moveAndRenameContext DN
- DN newSuperiorDn = moveAndRenameContext.getNewSuperiorDn();
+ // Normalize the moveAndRenameContext Dn
+ Dn newSuperiorDn = moveAndRenameContext.getNewSuperiorDn();
newSuperiorDn.normalize( directoryService.getSchemaManager() );
- // If he parent DN is a referral, or has a referral ancestor, we have to issue a AffectMultipleDsas result
+ // If he parent Dn is a referral, or has a referral ancestor, we have to issue a AffectMultipleDsas result
// as stated by RFC 3296 Section 5.6.2
if ( directoryService.getReferralManager().isReferral( newSuperiorDn )
|| directoryService.getReferralManager().hasParentReferral( newSuperiorDn ) )
@@ -825,7 +825,7 @@ public class DefaultOperationManager imp
// Unlock the referral manager
directoryService.getReferralManager().unlock();
- // The parent DN is a referral, we have to issue a AffectMultipleDsas result
+ // The parent Dn is a referral, we have to issue a AffectMultipleDsas result
// as stated by RFC 3296 Section 5.6.2
LdapAffectMultipleDsaException exception = new LdapAffectMultipleDsaException();
//exception.setRemainingName( dn );
@@ -863,15 +863,15 @@ public class DefaultOperationManager imp
try
{
- // Normalize the renameContext DN
- DN dn = renameContext.getDn();
+ // Normalize the renameContext Dn
+ Dn dn = renameContext.getDn();
dn.normalize( directoryService.getSchemaManager() );
// Inject the newDn into the operation context
- // Inject the new DN into the context
+ // Inject the new Dn into the context
if ( !dn.isEmpty() )
{
- DN newDn = dn;
+ Dn newDn = dn;
newDn = newDn.remove( dn.size() - 1 );
newDn = newDn.add( renameContext.getNewRdn() );
renameContext.setNewDn( newDn );
@@ -880,13 +880,13 @@ public class DefaultOperationManager imp
// We have to deal with the referral first
directoryService.getReferralManager().lockRead();
- // Check if we have an ancestor for this DN
+ // Check if we have an ancestor for this Dn
Entry parentEntry = directoryService.getReferralManager().getParentReferral( dn );
if ( parentEntry != null )
{
- // We have found a parent referral for the current DN
- DN childDn = dn.getSuffix( parentEntry.getDn().size() );
+ // We have found a parent referral for the current Dn
+ Dn childDn = dn.getSuffix( parentEntry.getDn().size() );
if ( directoryService.getReferralManager().isReferral( dn ) )
{
@@ -955,20 +955,20 @@ public class DefaultOperationManager imp
try
{
- // Normalize the searchContext DN
- DN dn = searchContext.getDn();
+ // Normalize the searchContext Dn
+ Dn dn = searchContext.getDn();
dn.normalize( directoryService.getSchemaManager() );
// We have to deal with the referral first
directoryService.getReferralManager().lockRead();
- // Check if we have an ancestor for this DN
+ // Check if we have an ancestor for this Dn
Entry parentEntry = directoryService.getReferralManager().getParentReferral( dn );
if ( parentEntry != null )
{
- // We have found a parent referral for the current DN
- DN childDn = dn.getSuffix( parentEntry.getDn().size() );
+ // We have found a parent referral for the current Dn
+ Dn childDn = dn.getSuffix( parentEntry.getDn().size() );
if ( directoryService.getReferralManager().isReferral( dn ) )
{
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/ReferralManagerImpl.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/ReferralManagerImpl.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/ReferralManagerImpl.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/ReferralManagerImpl.java Sun Jan 23 01:17:06 2011
@@ -36,7 +36,7 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.filter.EqualityNode;
import org.apache.directory.shared.ldap.filter.ExprNode;
import org.apache.directory.shared.ldap.message.AliasDerefMode;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
import org.apache.directory.shared.ldap.schema.AttributeType;
import org.apache.directory.shared.ldap.util.tree.DnNode;
@@ -160,8 +160,8 @@ public class ReferralManagerImpl impleme
for ( String suffix:suffixes )
{
- // We will store each entry's DN into the Referral tree
- DN suffixDn = directoryService.getDNFactory().create( suffix );
+ // We will store each entry's Dn into the Referral tree
+ Dn suffixDn = directoryService.getDNFactory().create( suffix );
SearchOperationContext searchOperationContext = new SearchOperationContext( adminSession, suffixDn, referralFilter, searchControl );
searchOperationContext.setAliasDerefMode( AliasDerefMode.DEREF_ALWAYS );
@@ -199,7 +199,7 @@ public class ReferralManagerImpl impleme
/**
* {@inheritDoc}
*/
- public void remove( DirectoryService directoryService, DN suffix ) throws Exception
+ public void remove( DirectoryService directoryService, Dn suffix ) throws Exception
{
ExprNode referralFilter = new EqualityNode<String>( OBJECT_CLASS_AT,
new StringValue( SchemaConstants.REFERRAL_OC ) );
@@ -212,7 +212,7 @@ public class ReferralManagerImpl impleme
CoreSession adminSession = directoryService.getAdminSession();
PartitionNexus nexus = directoryService.getPartitionNexus();
- // We will store each entry's DN into the Referral tree
+ // We will store each entry's Dn into the Referral tree
SearchOperationContext searchOperationContext = new SearchOperationContext( adminSession, suffix,
referralFilter, searchControl );
searchOperationContext.setAliasDerefMode( AliasDerefMode.DEREF_ALWAYS );
@@ -234,7 +234,7 @@ public class ReferralManagerImpl impleme
/**
* {@inheritDoc}
*/
- public boolean hasParentReferral( DN dn )
+ public boolean hasParentReferral( Dn dn )
{
DnNode<Entry> referral = referrals.getNode( dn );
@@ -245,7 +245,7 @@ public class ReferralManagerImpl impleme
/**
* {@inheritDoc}
*/
- public Entry getParentReferral( DN dn )
+ public Entry getParentReferral( Dn dn )
{
if ( !hasParentReferral( dn ) )
{
@@ -259,7 +259,7 @@ public class ReferralManagerImpl impleme
/**
* {@inheritDoc}
*/
- public boolean isReferral( DN dn )
+ public boolean isReferral( Dn dn )
{
Entry parent = referrals.getElement( dn );
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/admin/AdministrativePointInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/admin/AdministrativePointInterceptor.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/admin/AdministrativePointInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/admin/AdministrativePointInterceptor.java Sun Jan 23 01:17:06 2011
@@ -80,7 +80,7 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.filter.PresenceNode;
import org.apache.directory.shared.ldap.message.AliasDerefMode;
import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
import org.apache.directory.shared.ldap.subtree.AdministrativeRole;
import org.apache.directory.shared.ldap.util.tree.DnNode;
import org.apache.directory.shared.util.Strings;
@@ -227,7 +227,7 @@ public class AdministrativePointIntercep
/**
* Create the list of AP for a given entry
*/
- private void createAdministrativePoints( EntryAttribute adminPoint, DN dn, String uuid ) throws LdapException
+ private void createAdministrativePoints( EntryAttribute adminPoint, Dn dn, String uuid ) throws LdapException
{
if ( isAAP( adminPoint ) )
{
@@ -338,7 +338,7 @@ public class AdministrativePointIntercep
/**
* Update the cache clones with the added roles
*/
- private void addRole( String role, DN dn, String uuid, DnNode<AccessControlAdministrativePoint> acapCache,
+ private void addRole( String role, Dn dn, String uuid, DnNode<AccessControlAdministrativePoint> acapCache,
DnNode<CollectiveAttributeAdministrativePoint> caapCache, DnNode<TriggerExecutionAdministrativePoint> teapCache,
DnNode<SubschemaAdministrativePoint> ssapCache ) throws LdapException
{
@@ -432,7 +432,7 @@ public class AdministrativePointIntercep
/**
* Update the cache clones with the added roles
*/
- private void delRole( String role, DN dn, String uuid, DnNode<AccessControlAdministrativePoint> acapCache,
+ private void delRole( String role, Dn dn, String uuid, DnNode<AccessControlAdministrativePoint> acapCache,
DnNode<CollectiveAttributeAdministrativePoint> caapCache, DnNode<TriggerExecutionAdministrativePoint> teapCache,
DnNode<SubschemaAdministrativePoint> ssapCache ) throws LdapException
{
@@ -600,7 +600,7 @@ public class AdministrativePointIntercep
* Check if we can safely add a role. If it's an AAP, we have to be sure that
* it's the only role present in the AT.
*/
- private void checkAddRole( Value<?> role, EntryAttribute adminPoint, DN dn ) throws LdapException
+ private void checkAddRole( Value<?> role, EntryAttribute adminPoint, Dn dn ) throws LdapException
{
String roleStr = Strings.toLowerCase(Strings.trim(role.getString()));
@@ -655,7 +655,7 @@ public class AdministrativePointIntercep
/**
* Check if we can safely delete a role
*/
- private void checkDelRole( Value<?> role, EntryAttribute adminPoint, DN dn ) throws LdapException
+ private void checkDelRole( Value<?> role, EntryAttribute adminPoint, Dn dn ) throws LdapException
{
String roleStr = Strings.toLowerCase(Strings.trim(role.getString()));
@@ -755,7 +755,7 @@ public class AdministrativePointIntercep
{
List<Entry> entries = new ArrayList<Entry>();
- DN adminDn = new DN( ServerDNConstants.ADMIN_SYSTEM_DN, schemaManager );
+ Dn adminDn = new Dn( ServerDNConstants.ADMIN_SYSTEM_DN, schemaManager );
SearchControls controls = new SearchControls();
controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
@@ -768,7 +768,7 @@ public class AdministrativePointIntercep
CoreSession adminSession = new DefaultCoreSession( new LdapPrincipal( adminDn, AuthenticationLevel.STRONG ),
directoryService );
- SearchOperationContext searchOperationContext = new SearchOperationContext( adminSession, DN.EMPTY_DN, filter,
+ SearchOperationContext searchOperationContext = new SearchOperationContext( adminSession, Dn.EMPTY_DN, filter,
controls );
searchOperationContext.setAliasDerefMode( AliasDerefMode.NEVER_DEREF_ALIASES );
@@ -813,7 +813,7 @@ public class AdministrativePointIntercep
for ( Entry adminPointEntry : adminPointEntries )
{
// update the cache
- DN dn = adminPointEntry.getDn();
+ Dn dn = adminPointEntry.getDn();
String uuid = adminPointEntry.get( ENTRY_UUID_AT ).getString();
EntryAttribute adminPoint = adminPointEntry.get( ADMINISTRATIVE_ROLE_AT );
@@ -829,7 +829,7 @@ public class AdministrativePointIntercep
private void deleteAdminPointCache( EntryAttribute adminPoint, DeleteOperationContext deleteContext )
throws LdapException
{
- DN dn = deleteContext.getDn();
+ Dn dn = deleteContext.getDn();
// Remove the APs in the AP cache
for ( Value<?> value : adminPoint )
@@ -1067,7 +1067,7 @@ public class AdministrativePointIntercep
* Check that the IAPs (if any) have a parent. We will check for each kind or role :
* AC, CA and TE.
*/
- private void checkIAPHasParent( String role, EntryAttribute adminPoint, DN dn )
+ private void checkIAPHasParent( String role, EntryAttribute adminPoint, Dn dn )
throws LdapUnwillingToPerformException
{
// Check for the AC role
@@ -1139,7 +1139,7 @@ public class AdministrativePointIntercep
// Load all the AdministratvePoint :
// Autonomous Administrative Point first, then Specific
// administrative point, finally the Inner administrative Point
- DN adminDn = new DN( ServerDNConstants.ADMIN_SYSTEM_DN, schemaManager );
+ Dn adminDn = new Dn( ServerDNConstants.ADMIN_SYSTEM_DN, schemaManager );
SearchControls controls = new SearchControls();
controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
@@ -1190,7 +1190,7 @@ public class AdministrativePointIntercep
{
LOG.debug( ">>> Entering into the Administrative Interceptor, addRequest" );
Entry entry = addContext.getEntry();
- DN dn = entry.getDn();
+ Dn dn = entry.getDn();
// Check if we are adding an Administrative Point
EntryAttribute adminPoint = entry.get( ADMINISTRATIVE_ROLE_AT );
@@ -1245,7 +1245,7 @@ public class AdministrativePointIntercep
{
LOG.debug( ">>> Entering into the Administrative Interceptor, delRequest" );
Entry entry = deleteContext.getEntry();
- DN dn = entry.getDn();
+ Dn dn = entry.getDn();
// Check if we are deleting an Administrative Point
EntryAttribute adminPoint = entry.get( ADMINISTRATIVE_ROLE_AT );
@@ -1308,7 +1308,7 @@ public class AdministrativePointIntercep
LOG.debug( ">>> Entering into the Administrative Interceptor, modifyRequest" );
// We have to check that the modification is acceptable
List<Modification> modifications = modifyContext.getModItems();
- DN dn = modifyContext.getDn();
+ Dn dn = modifyContext.getDn();
String uuid = modifyContext.getEntry().get( ENTRY_UUID_AT ).getString();
// Create a clone of the current AdminRole AT
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AbstractAuthenticator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AbstractAuthenticator.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AbstractAuthenticator.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AbstractAuthenticator.java Sun Jan 23 01:17:06 2011
@@ -41,7 +41,7 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.entry.Modification;
import org.apache.directory.shared.ldap.entry.ModificationOperation;
import org.apache.directory.shared.ldap.exception.LdapException;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
import org.apache.directory.shared.util.DateUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -142,7 +142,7 @@ public abstract class AbstractAuthentica
/**
* Does nothing leaving it so subclasses can override.
*/
- public void invalidateCache( DN bindDn )
+ public void invalidateCache( Dn bindDn )
{
}
@@ -162,7 +162,7 @@ public abstract class AbstractAuthentica
// check for locked out account
if( pPolicyConfig.isPwdLockout() )
{
- LOG.debug( "checking if account with the DN {} is locked", userEntry.getDn() );
+ LOG.debug( "checking if account with the Dn {} is locked", userEntry.getDn() );
EntryAttribute accountLockAttr = userEntry.get( PWD_ACCOUNT_LOCKED_TIME_AT );
if( accountLockAttr != null )
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java Sun Jan 23 01:17:06 2011
@@ -104,7 +104,7 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.exception.LdapOperationException;
import org.apache.directory.shared.ldap.exception.LdapUnwillingToPerformException;
import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
import org.apache.directory.shared.ldap.schema.AttributeType;
import org.apache.directory.shared.util.DateUtils;
import org.apache.directory.shared.util.StringConstants;
@@ -135,7 +135,7 @@ public class AuthenticationInterceptor e
private CoreSession adminSession;
- private Set<DN> pwdResetSet = new HashSet<DN>();
+ private Set<Dn> pwdResetSet = new HashSet<Dn>();
// pwdpolicy state attribute types
private AttributeType AT_PWD_RESET;
@@ -476,7 +476,7 @@ public class AuthenticationInterceptor e
}
- private void invalidateAuthenticatorCaches( DN principalDn )
+ private void invalidateAuthenticatorCaches( Dn principalDn )
{
for ( AuthenticationLevel authMech : authenticatorsMapByType.keySet() )
{
@@ -512,7 +512,7 @@ public class AuthenticationInterceptor e
PasswordPolicyConfiguration policyConfig = directoryService.getPwdPolicy( modifyContext.getOriginalEntry() );
boolean isPPolicyReqCtrlPresent = modifyContext.hasRequestControl( PasswordPolicyRequestControl.CONTROL_OID );
- DN userDn = modifyContext.getSession().getAuthenticatedPrincipal().getDN();
+ Dn userDn = modifyContext.getSession().getAuthenticatedPrincipal().getDN();
PwdModDetailsHolder pwdModDetails = null;
if ( policyConfig.isPwdSafeModify() || pwdResetSet.contains( userDn ) || ( policyConfig.getPwdMinAge() > 0 ) )
@@ -844,10 +844,10 @@ public class AuthenticationInterceptor e
if ( level == AuthenticationLevel.UNAUTHENT )
{
- // This is a case where the Bind request contains a DN, but no password.
- // We don't check the DN, we just return a UnwillingToPerform error
+ // This is a case where the Bind request contains a Dn, but no password.
+ // We don't check the Dn, we just return a UnwillingToPerform error
// Cf RFC 4513, chap. 5.1.2
- throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, "Cannot Bind for DN "
+ throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, "Cannot Bind for Dn "
+ bindContext.getDn().getName() );
}
@@ -934,7 +934,7 @@ public class AuthenticationInterceptor e
throw ppe;
}
- DN dn = bindContext.getDn();
+ Dn dn = bindContext.getDn();
Entry userEntry = bindContext.getEntry();
PasswordPolicyConfiguration policyConfig = directoryService.getPwdPolicy( userEntry );
@@ -1104,7 +1104,7 @@ public class AuthenticationInterceptor e
{
super.unbind( next, unbindContext );
- // remove the DN from the password reset Set
+ // remove the Dn from the password reset Set
// we do not perform a check to see if the reset flag in the associated ppolicy is enabled
// cause that requires fetching the ppolicy first, which requires a lookup for user entry
if ( !directoryService.isPwdPolicyEnabled() )
@@ -1424,7 +1424,7 @@ public class AuthenticationInterceptor e
{
CoreSession session = opContext.getSession();
- DN userDn = session.getAuthenticatedPrincipal().getDN();
+ Dn userDn = session.getAuthenticatedPrincipal().getDN();
if ( pwdResetSet.contains( userDn ) )
{
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/Authenticator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/Authenticator.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/Authenticator.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/Authenticator.java Sun Jan 23 01:17:06 2011
@@ -29,7 +29,7 @@ import org.apache.directory.server.core.
import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
import org.apache.directory.shared.ldap.entry.Entry;
import org.apache.directory.shared.ldap.exception.LdapException;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
/**
@@ -78,7 +78,7 @@ public interface Authenticator
*
* @param bindDn the already normalized distinguished name of the bind principal
*/
- void invalidateCache( DN bindDn );
+ void invalidateCache( Dn bindDn );
/**
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/DelegatingAuthenticator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/DelegatingAuthenticator.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/DelegatingAuthenticator.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/DelegatingAuthenticator.java Sun Jan 23 01:17:06 2011
@@ -31,7 +31,7 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.exception.LdapException;
import org.apache.directory.shared.ldap.message.BindResponse;
import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
import org.apache.directory.shared.util.Strings;
@@ -171,7 +171,7 @@ public class DelegatingAuthenticator ext
/**
* We don't handle any cache when using a delegated authentication
*/
- public void invalidateCache( DN bindDn )
+ public void invalidateCache( Dn bindDn )
{
// cache is not implemented here
}
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java Sun Jan 23 01:17:06 2011
@@ -56,7 +56,7 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.entry.Value;
import org.apache.directory.shared.ldap.exception.LdapAuthenticationException;
import org.apache.directory.shared.ldap.exception.LdapException;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
import org.apache.directory.shared.util.Base64;
import org.apache.directory.shared.util.UnixCrypt;
import org.apache.directory.shared.util.StringConstants;
@@ -69,7 +69,7 @@ import org.apache.directory.shared.util.
* password is stored with a one-way encryption applied (e.g. SHA), the password
* is hashed the same way before comparison.
*
- * We use a cache to speedup authentication, where the DN/password are stored.
+ * We use a cache to speedup authentication, where the Dn/password are stored.
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
@@ -149,7 +149,7 @@ public class SimpleAuthenticator extends
/**
* Get the password either from cache or from backend.
- * @param principalDN The DN from which we want the password
+ * @param principalDN The Dn from which we want the password
* @return A byte array which can be empty if the password was not found
* @throws Exception If we have a problem during the lookup operation
*/
@@ -271,7 +271,7 @@ public class SimpleAuthenticator extends
if ( userEntry == null )
{
- DN dn = bindContext.getDn();
+ Dn dn = bindContext.getDn();
String upDn = ( dn == null ? "" : dn.getName() );
throw new LdapAuthenticationException( I18n.err( I18n.ERR_231, upDn ) );
@@ -404,7 +404,7 @@ public class SimpleAuthenticator extends
* Remove the principal form the cache. This is used when the user changes
* his password.
*/
- public void invalidateCache( DN bindDn )
+ public void invalidateCache( Dn bindDn )
{
synchronized ( credentialCache )
{
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java Sun Jan 23 01:17:06 2011
@@ -81,7 +81,7 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.filter.ExprNode;
import org.apache.directory.shared.ldap.filter.OrNode;
import org.apache.directory.shared.ldap.message.AliasDerefMode;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
import org.apache.directory.shared.ldap.schema.AttributeType;
import org.apache.directory.shared.ldap.schema.normalizers.ConcreteNameComponentNormalizer;
import org.slf4j.Logger;
@@ -178,7 +178,7 @@ public class AciAuthorizationInterceptor
private void initTupleCache() throws LdapException
{
// Load all the prescriptiveACI : they are stored in AccessControlSubentry entries
- DN adminDn = new DN( ServerDNConstants.ADMIN_SYSTEM_DN, schemaManager );
+ Dn adminDn = new Dn( ServerDNConstants.ADMIN_SYSTEM_DN, schemaManager );
SearchControls controls = new SearchControls();
controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
@@ -191,7 +191,7 @@ public class AciAuthorizationInterceptor
CoreSession adminSession = new DefaultCoreSession( new LdapPrincipal( adminDn, AuthenticationLevel.STRONG ),
directoryService );
- SearchOperationContext searchOperationContext = new SearchOperationContext( adminSession, DN.EMPTY_DN, filter,
+ SearchOperationContext searchOperationContext = new SearchOperationContext( adminSession, Dn.EMPTY_DN, filter,
controls );
searchOperationContext.setAliasDerefMode( AliasDerefMode.NEVER_DEREF_ALIASES );
@@ -222,7 +222,7 @@ public class AciAuthorizationInterceptor
private void initGroupCache() throws LdapException
{
// Load all the member/uniqueMember : they are stored in groupOfNames/groupOfUniqueName
- DN adminDn = new DN( ServerDNConstants.ADMIN_SYSTEM_DN, schemaManager );
+ Dn adminDn = new Dn( ServerDNConstants.ADMIN_SYSTEM_DN, schemaManager );
SearchControls controls = new SearchControls();
controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
@@ -237,7 +237,7 @@ public class AciAuthorizationInterceptor
CoreSession adminSession = new DefaultCoreSession( new LdapPrincipal( adminDn, AuthenticationLevel.STRONG ),
directoryService );
- SearchOperationContext searchOperationContext = new SearchOperationContext( adminSession, DN.EMPTY_DN, filter,
+ SearchOperationContext searchOperationContext = new SearchOperationContext( adminSession, Dn.EMPTY_DN, filter,
controls );
searchOperationContext.setAliasDerefMode( AliasDerefMode.NEVER_DEREF_ALIASES );
@@ -277,7 +277,7 @@ public class AciAuthorizationInterceptor
nexus = directoryService.getPartitionNexus();
- DN adminDn = directoryService.getDNFactory().create( ServerDNConstants.ADMIN_SYSTEM_DN );
+ Dn adminDn = directoryService.getDNFactory().create( ServerDNConstants.ADMIN_SYSTEM_DN );
CoreSession adminSession = new DefaultCoreSession( new LdapPrincipal( adminDn, AuthenticationLevel.STRONG ),
directoryService );
chain = directoryService.getInterceptorChain();
@@ -293,7 +293,7 @@ public class AciAuthorizationInterceptor
// stuff for dealing with subentries (garbage for now)
Value<?> subschemaSubentry = directoryService.getPartitionNexus().getRootDSE( null ).get(
SchemaConstants.SUBSCHEMA_SUBENTRY_AT ).get();
- DN subschemaSubentryDnName = directoryService.getDNFactory().create( subschemaSubentry.getString() );
+ Dn subschemaSubentryDnName = directoryService.getDNFactory().create( subschemaSubentry.getString() );
subschemaSubentryDn = subschemaSubentryDnName.getNormName();
// Init the caches now
@@ -302,9 +302,9 @@ public class AciAuthorizationInterceptor
}
- private void protectCriticalEntries( DN dn ) throws LdapException
+ private void protectCriticalEntries( Dn dn ) throws LdapException
{
- DN principalDn = getPrincipal().getDNRef();
+ Dn principalDn = getPrincipal().getDNRef();
if ( dn.isEmpty() )
{
@@ -336,7 +336,7 @@ public class AciAuthorizationInterceptor
* @throws Exception if there are problems accessing attribute values
* @param proxy the partition nexus proxy object
*/
- private void addPerscriptiveAciTuples( OperationContext opContext, Collection<ACITuple> tuples, DN dn, Entry entry )
+ private void addPerscriptiveAciTuples( OperationContext opContext, Collection<ACITuple> tuples, Dn dn, Entry entry )
throws LdapException
{
Entry originalEntry = null;
@@ -363,7 +363,7 @@ public class AciAuthorizationInterceptor
*/
if ( oc.contains( SchemaConstants.SUBENTRY_OC ) )
{
- DN parentDn = dn;
+ Dn parentDn = dn;
parentDn = parentDn.remove( dn.size() - 1 );
originalEntry = opContext.lookup( parentDn, ByPassConstants.LOOKUP_BYPASS );
}
@@ -431,7 +431,7 @@ public class AciAuthorizationInterceptor
* @throws Exception if there are problems accessing attribute values
* @param proxy the partition nexus proxy object
*/
- private void addSubentryAciTuples( OperationContext opContext, Collection<ACITuple> tuples, DN dn, Entry entry )
+ private void addSubentryAciTuples( OperationContext opContext, Collection<ACITuple> tuples, Dn dn, Entry entry )
throws LdapException
{
// only perform this for subentries
@@ -442,7 +442,7 @@ public class AciAuthorizationInterceptor
// get the parent or administrative entry for this subentry since it
// will contain the subentryACI attributes that effect subentries
- DN parentDn = dn.getParent();
+ Dn parentDn = dn.getParent();
Entry administrativeEntry = ( ( ClonedServerEntry ) opContext.lookup( parentDn, ByPassConstants.LOOKUP_BYPASS ) )
.getOriginalEntry();
@@ -509,11 +509,11 @@ public class AciAuthorizationInterceptor
// Access the principal requesting the operation, and bypass checks if it is the admin
LdapPrincipal principal = addContext.getSession().getEffectivePrincipal();
- DN principalDn = principal.getDN();
+ Dn principalDn = principal.getDN();
Entry serverEntry = addContext.getEntry();
- DN dn = addContext.getDn();
+ Dn dn = addContext.getDn();
// bypass authz code but manage caches if operation is performed by the admin
if ( isPrincipalAnAdministrator( principalDn ) )
@@ -537,7 +537,7 @@ public class AciAuthorizationInterceptor
}
// Assemble all the information required to make an access control decision
- Set<DN> userGroups = groupCache.getGroups( principalDn.getNormName() );
+ Set<Dn> userGroups = groupCache.getGroups( principalDn.getNormName() );
Collection<ACITuple> tuples = new HashSet<ACITuple>();
// Build the total collection of tuples to be considered for add rights
@@ -587,7 +587,7 @@ public class AciAuthorizationInterceptor
}
- private boolean isTheAdministrator( DN normalizedDn )
+ private boolean isTheAdministrator( Dn normalizedDn )
{
return normalizedDn.getNormName().equals( ServerDNConstants.ADMIN_SYSTEM_DN_NORMALIZED );
}
@@ -604,9 +604,9 @@ public class AciAuthorizationInterceptor
return;
}
- DN dn = deleteContext.getDn();
+ Dn dn = deleteContext.getDn();
LdapPrincipal principal = session.getEffectivePrincipal();
- DN principalDn = principal.getDN();
+ Dn principalDn = principal.getDN();
Entry entry = deleteContext.getEntry();
@@ -623,7 +623,7 @@ public class AciAuthorizationInterceptor
return;
}
- Set<DN> userGroups = groupCache.getGroups( principalDn.getNormName() );
+ Set<Dn> userGroups = groupCache.getGroups( principalDn.getNormName() );
Collection<ACITuple> tuples = new HashSet<ACITuple>();
addPerscriptiveAciTuples( deleteContext, tuples, dn, entry );
addEntryAciTuples( tuples, entry );
@@ -651,13 +651,13 @@ public class AciAuthorizationInterceptor
@SuppressWarnings("PMD.CollapsibleIfStatements")
public void modify( NextInterceptor next, ModifyOperationContext modifyContext ) throws LdapException
{
- DN dn = modifyContext.getDn();
+ Dn dn = modifyContext.getDn();
// Access the principal requesting the operation, and bypass checks if it is the admin
Entry entry = modifyContext.getEntry();
LdapPrincipal principal = modifyContext.getSession().getEffectivePrincipal();
- DN principalDn = principal.getDN();
+ Dn principalDn = principal.getDN();
// bypass authz code if we are disabled
if ( !modifyContext.getSession().getDirectoryService().isAccessControlEnabled() )
@@ -682,7 +682,7 @@ public class AciAuthorizationInterceptor
return;
}
- Set<DN> userGroups = groupCache.getGroups( principalDn.getName() );
+ Set<Dn> userGroups = groupCache.getGroups( principalDn.getName() );
Collection<ACITuple> tuples = new HashSet<ACITuple>();
addPerscriptiveAciTuples( modifyContext, tuples, dn, entry );
addEntryAciTuples( tuples, entry );
@@ -806,7 +806,7 @@ public class AciAuthorizationInterceptor
public boolean hasEntry( NextInterceptor next, EntryOperationContext hasEntryContext ) throws LdapException
{
- DN dn = hasEntryContext.getDn();
+ Dn dn = hasEntryContext.getDn();
if ( !hasEntryContext.getSession().getDirectoryService().isAccessControlEnabled() )
{
@@ -825,7 +825,7 @@ public class AciAuthorizationInterceptor
// TODO - eventually replace this with a check on session.isAnAdministrator()
LdapPrincipal principal = hasEntryContext.getSession().getEffectivePrincipal();
- DN principalDn = principal.getDN();
+ Dn principalDn = principal.getDN();
if ( isPrincipalAnAdministrator( principalDn ) )
{
@@ -833,7 +833,7 @@ public class AciAuthorizationInterceptor
}
Entry entry = hasEntryContext.lookup( dn, ByPassConstants.HAS_ENTRY_BYPASS );
- Set<DN> userGroups = groupCache.getGroups( principalDn.getNormName() );
+ Set<Dn> userGroups = groupCache.getGroups( principalDn.getNormName() );
Collection<ACITuple> tuples = new HashSet<ACITuple>();
addPerscriptiveAciTuples( hasEntryContext, tuples, dn, entry );
addEntryAciTuples( tuples, ( ( ClonedServerEntry ) entry ).getOriginalEntry() );
@@ -872,7 +872,7 @@ public class AciAuthorizationInterceptor
*/
private void checkLookupAccess( LookupOperationContext lookupContext, Entry entry ) throws LdapException
{
- DN dn = lookupContext.getDn();
+ Dn dn = lookupContext.getDn();
// no permissions checks on the RootDSE
if ( dn.isRootDSE() )
@@ -881,8 +881,8 @@ public class AciAuthorizationInterceptor
}
LdapPrincipal principal = lookupContext.getSession().getEffectivePrincipal();
- DN userName = principal.getDN();
- Set<DN> userGroups = groupCache.getGroups( userName.getNormName() );
+ Dn userName = principal.getDN();
+ Set<Dn> userGroups = groupCache.getGroups( userName.getNormName() );
Collection<ACITuple> tuples = new HashSet<ACITuple>();
addPerscriptiveAciTuples( lookupContext, tuples, dn, entry );
addEntryAciTuples( tuples, entry );
@@ -932,7 +932,7 @@ public class AciAuthorizationInterceptor
DirectoryService directoryService = session.getDirectoryService();
LdapPrincipal principal = session.getEffectivePrincipal();
- DN principalDn = principal.getDN();
+ Dn principalDn = principal.getDN();
if ( !principalDn.isNormalized() )
{
@@ -956,7 +956,7 @@ public class AciAuthorizationInterceptor
public void rename( NextInterceptor next, RenameOperationContext renameContext ) throws LdapException
{
- DN oldName = renameContext.getDn();
+ Dn oldName = renameContext.getDn();
Entry originalEntry = null;
if ( renameContext.getEntry() != null )
@@ -965,8 +965,8 @@ public class AciAuthorizationInterceptor
}
LdapPrincipal principal = renameContext.getSession().getEffectivePrincipal();
- DN principalDn = principal.getDN();
- DN newName = renameContext.getNewDn();
+ Dn principalDn = principal.getDN();
+ Dn newName = renameContext.getNewDn();
// bypass authz code if we are disabled
if ( !renameContext.getSession().getDirectoryService().isAccessControlEnabled() )
@@ -989,7 +989,7 @@ public class AciAuthorizationInterceptor
return;
}
- Set<DN> userGroups = groupCache.getGroups( principalDn.getNormName() );
+ Set<Dn> userGroups = groupCache.getGroups( principalDn.getNormName() );
Collection<ACITuple> tuples = new HashSet<ACITuple>();
addPerscriptiveAciTuples( renameContext, tuples, oldName, originalEntry );
addEntryAciTuples( tuples, originalEntry );
@@ -1015,13 +1015,13 @@ public class AciAuthorizationInterceptor
public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext moveAndRenameContext )
throws LdapException
{
- DN oldDn = moveAndRenameContext.getDn();
+ Dn oldDn = moveAndRenameContext.getDn();
Entry entry = moveAndRenameContext.getOriginalEntry();
LdapPrincipal principal = moveAndRenameContext.getSession().getEffectivePrincipal();
- DN principalDn = principal.getDN();
- DN newDn = moveAndRenameContext.getNewDn();
+ Dn principalDn = principal.getDN();
+ Dn newDn = moveAndRenameContext.getNewDn();
// bypass authz code if we are disabled
if ( !moveAndRenameContext.getSession().getDirectoryService().isAccessControlEnabled() )
@@ -1041,7 +1041,7 @@ public class AciAuthorizationInterceptor
return;
}
- Set<DN> userGroups = groupCache.getGroups( principalDn.getNormName() );
+ Set<Dn> userGroups = groupCache.getGroups( principalDn.getNormName() );
Collection<ACITuple> tuples = new HashSet<ACITuple>();
addPerscriptiveAciTuples( moveAndRenameContext, tuples, oldDn,entry );
addEntryAciTuples( tuples, entry );
@@ -1109,15 +1109,15 @@ public class AciAuthorizationInterceptor
*/
public void move( NextInterceptor next, MoveOperationContext moveContext ) throws LdapException
{
- DN oriChildName = moveContext.getDn();
+ Dn oriChildName = moveContext.getDn();
// Access the principal requesting the operation, and bypass checks if it is the admin
Entry entry = moveContext.getOriginalEntry();
- DN newDn = moveContext.getNewDn();
+ Dn newDn = moveContext.getNewDn();
LdapPrincipal principal = moveContext.getSession().getEffectivePrincipal();
- DN principalDn = principal.getDN();
+ Dn principalDn = principal.getDN();
// bypass authz code if we are disabled
if ( !moveContext.getSession().getDirectoryService().isAccessControlEnabled() )
@@ -1137,7 +1137,7 @@ public class AciAuthorizationInterceptor
return;
}
- Set<DN> userGroups = groupCache.getGroups( principalDn.getNormName() );
+ Set<Dn> userGroups = groupCache.getGroups( principalDn.getNormName() );
Collection<ACITuple> tuples = new HashSet<ACITuple>();
addPerscriptiveAciTuples( moveContext, tuples, oriChildName, entry );
addEntryAciTuples( tuples, entry );
@@ -1218,7 +1218,7 @@ public class AciAuthorizationInterceptor
public EntryFilteringCursor search( NextInterceptor next, SearchOperationContext searchContext ) throws LdapException
{
LdapPrincipal user = searchContext.getSession().getEffectivePrincipal();
- DN principalDn = user.getDN();
+ Dn principalDn = user.getDN();
EntryFilteringCursor cursor = next.search( searchContext );
boolean isSubschemaSubentryLookup = subschemaSubentryDn.equals( searchContext.getDn().getNormName() );
@@ -1238,7 +1238,7 @@ public class AciAuthorizationInterceptor
}
- public final boolean isPrincipalAnAdministrator( DN principalDn )
+ public final boolean isPrincipalAnAdministrator( Dn principalDn )
{
return groupCache.isPrincipalAnAdministrator( principalDn );
}
@@ -1250,21 +1250,21 @@ public class AciAuthorizationInterceptor
public boolean compare( NextInterceptor next, CompareOperationContext compareContext ) throws LdapException
{
CoreSession session = compareContext.getSession();
- DN dn = compareContext.getDn();
+ Dn dn = compareContext.getDn();
String oid = compareContext.getOid();
Value<?> value = compareContext.getValue();
Entry entry = compareContext.getOriginalEntry();
LdapPrincipal principal = session.getEffectivePrincipal();
- DN principalDn = principal.getDN();
+ Dn principalDn = principal.getDN();
if ( isPrincipalAnAdministrator( principalDn ) || !session.getDirectoryService().isAccessControlEnabled() )
{
return next.compare( compareContext );
}
- Set<DN> userGroups = groupCache.getGroups( principalDn.getNormName() );
+ Set<Dn> userGroups = groupCache.getGroups( principalDn.getNormName() );
Collection<ACITuple> tuples = new HashSet<ACITuple>();
addPerscriptiveAciTuples( compareContext, tuples, dn, entry );
addEntryAciTuples( tuples, entry );
@@ -1299,13 +1299,13 @@ public class AciAuthorizationInterceptor
}
- public void cacheNewGroup( DN name, Entry entry ) throws Exception
+ public void cacheNewGroup( Dn name, Entry entry ) throws Exception
{
groupCache.groupAdded( name, entry );
}
- private boolean filter( OperationContext opContext, DN normName, ClonedServerEntry clonedEntry ) throws Exception
+ private boolean filter( OperationContext opContext, Dn normName, ClonedServerEntry clonedEntry ) throws Exception
{
/*
* First call hasPermission() for entry level "Browse" and "ReturnDN" perm
@@ -1314,8 +1314,8 @@ public class AciAuthorizationInterceptor
*/
LdapPrincipal principal = opContext.getSession().getEffectivePrincipal();
- DN userDn = principal.getDN();
- Set<DN> userGroups = groupCache.getGroups( userDn.getNormName() );
+ Dn userDn = principal.getDN();
+ Set<Dn> userGroups = groupCache.getGroups( userDn.getNormName() );
Collection<ACITuple> tuples = new HashSet<ACITuple>();
addPerscriptiveAciTuples( opContext, tuples, normName, clonedEntry );
addEntryAciTuples( tuples, clonedEntry.getOriginalEntry() );
@@ -1414,7 +1414,7 @@ public class AciAuthorizationInterceptor
{
public boolean accept( SearchingOperationContext searchContext, ClonedServerEntry entry ) throws Exception
{
- DN normName = entry.getDn().normalize( schemaManager );
+ Dn normName = entry.getDn().normalize( schemaManager );
return filter( searchContext, normName, entry );
}
}
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java Sun Jan 23 01:17:06 2011
@@ -55,7 +55,7 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.entry.Value;
import org.apache.directory.shared.ldap.exception.LdapException;
import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -74,13 +74,13 @@ public class DefaultAuthorizationInterce
private static final Logger LOG = LoggerFactory.getLogger( DefaultAuthorizationInterceptor.class );
/** the base distinguished {@link Name} for the admin system */
- private static DN ADMIN_SYSTEM_DN;
+ private static Dn ADMIN_SYSTEM_DN;
/** the base distinguished {@link Name} for all groups */
- private static DN GROUP_BASE_DN;
+ private static Dn GROUP_BASE_DN;
/** the distinguished {@link Name} for the administrator group */
- private static DN ADMIN_GROUP_DN;
+ private static Dn ADMIN_GROUP_DN;
private Set<String> administrators = new HashSet<String>( 2 );
@@ -115,7 +115,7 @@ public class DefaultAuthorizationInterce
{
// read in the administrators and cache their normalized names
Set<String> newAdministrators = new HashSet<String>( 2 );
- DN adminDn = directoryService.getDNFactory().create( ServerDNConstants.ADMIN_SYSTEM_DN_NORMALIZED );
+ Dn adminDn = directoryService.getDNFactory().create( ServerDNConstants.ADMIN_SYSTEM_DN_NORMALIZED );
CoreSession adminSession = new DefaultCoreSession( new LdapPrincipal( adminDn, AuthenticationLevel.STRONG ),
directoryService );
@@ -130,7 +130,7 @@ public class DefaultAuthorizationInterce
for ( Value<?> value : uniqueMember )
{
- DN memberDn = directoryService.getDNFactory().create( value.getString() );
+ Dn memberDn = directoryService.getDNFactory().create( value.getString() );
newAdministrators.add( memberDn.getNormName() );
}
@@ -150,7 +150,7 @@ public class DefaultAuthorizationInterce
return;
}
- DN dn = deleteContext.getDn();
+ Dn dn = deleteContext.getDn();
if ( dn.isEmpty() )
{
@@ -166,27 +166,27 @@ public class DefaultAuthorizationInterce
throw new LdapNoPermissionException( msg );
}
- DN principalDN = getPrincipal().getDNRef();
+ Dn principalDn = getPrincipal().getDNRef();
if ( dn.equals( ADMIN_SYSTEM_DN ) )
{
- String msg = I18n.err( I18n.ERR_14, principalDN.getName() );
+ String msg = I18n.err( I18n.ERR_14, principalDn.getName() );
LOG.error( msg );
throw new LdapNoPermissionException( msg );
}
- if ( dn.size() > 2 && !isAnAdministrator( principalDN ) )
+ if ( dn.size() > 2 && !isAnAdministrator(principalDn) )
{
if ( dn.isChildOf( ADMIN_SYSTEM_DN ) )
{
- String msg = I18n.err( I18n.ERR_15, principalDN.getName(), dn.getName() );
+ String msg = I18n.err( I18n.ERR_15, principalDn.getName(), dn.getName() );
LOG.error( msg );
throw new LdapNoPermissionException( msg );
}
if ( dn.isChildOf( GROUP_BASE_DN ) )
{
- String msg = I18n.err( I18n.ERR_16, principalDN.getName(), dn.getName() );
+ String msg = I18n.err( I18n.ERR_16, principalDn.getName(), dn.getName() );
LOG.error( msg );
throw new LdapNoPermissionException( msg );
}
@@ -196,13 +196,13 @@ public class DefaultAuthorizationInterce
}
- private boolean isTheAdministrator( DN dn )
+ private boolean isTheAdministrator( Dn dn )
{
return dn.equals( ADMIN_SYSTEM_DN );
}
- private boolean isAnAdministrator( DN dn )
+ private boolean isAnAdministrator( Dn dn )
{
return isTheAdministrator( dn ) || administrators.contains( dn.getNormName() );
}
@@ -222,7 +222,7 @@ public class DefaultAuthorizationInterce
{
if ( !modifyContext.getSession().getDirectoryService().isAccessControlEnabled() )
{
- DN dn = modifyContext.getDn();
+ Dn dn = modifyContext.getDn();
protectModifyAlterations( dn );
nextInterceptor.modify( modifyContext );
@@ -240,9 +240,9 @@ public class DefaultAuthorizationInterce
}
- private void protectModifyAlterations( DN dn ) throws LdapException
+ private void protectModifyAlterations( Dn dn ) throws LdapException
{
- DN principalDn = getPrincipal().getDN();
+ Dn principalDn = getPrincipal().getDN();
if ( dn.isEmpty() )
{
@@ -287,7 +287,7 @@ public class DefaultAuthorizationInterce
// ------------------------------------------------------------------------
- // DN altering operations are a no no for any user entry. Basically here
+ // Dn altering operations are a no no for any user entry. Basically here
// are the rules of conduct to follow:
//
// o No user should have the ability to move or rename their entry
@@ -332,9 +332,9 @@ public class DefaultAuthorizationInterce
}
- private void protectDnAlterations( DN dn ) throws LdapException
+ private void protectDnAlterations( Dn dn ) throws LdapException
{
- DN principalDn = getPrincipal().getDN();
+ Dn principalDn = getPrincipal().getDN();
if ( dn.isEmpty() )
{
@@ -389,7 +389,7 @@ public class DefaultAuthorizationInterce
}
- private void protectLookUp( DN principalDn, DN normalizedDn ) throws LdapException
+ private void protectLookUp( Dn principalDn, Dn normalizedDn ) throws LdapException
{
if ( !isAnAdministrator( principalDn ) )
{
@@ -484,8 +484,8 @@ public class DefaultAuthorizationInterce
@SuppressWarnings("PMD.CollapsibleIfStatements")
private boolean isSearchable( OperationContext opContext, ClonedServerEntry result ) throws Exception
{
- DN principalDn = opContext.getSession().getEffectivePrincipal().getDN();
- DN dn = result.getDn();
+ Dn principalDn = opContext.getSession().getEffectivePrincipal().getDN();
+ Dn dn = result.getDn();
if ( !dn.isNormalized() )
{
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java Sun Jan 23 01:17:06 2011
@@ -50,7 +50,7 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.filter.EqualityNode;
import org.apache.directory.shared.ldap.filter.OrNode;
import org.apache.directory.shared.ldap.message.AliasDerefMode;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
import org.apache.directory.shared.ldap.schema.AttributeType;
import org.apache.directory.shared.ldap.schema.SchemaManager;
import org.slf4j.Logger;
@@ -87,15 +87,15 @@ public class GroupCache
*/
private SchemaManager schemaManager;
- /** the DN factory */
+ /** the Dn factory */
private DNFactory dnFactory;
/** the normalized dn of the administrators group */
- private DN administratorsGroupDn;
+ private Dn administratorsGroupDn;
- private static final Set<DN> EMPTY_GROUPS = new HashSet<DN>();
+ private static final Set<Dn> EMPTY_GROUPS = new HashSet<Dn>();
- /** String key for the DN of a group to a Set (HashSet) for the Strings of member DNs */
+ /** String key for the Dn of a group to a Set (HashSet) for the Strings of member DNs */
private Cache ehCache;
/**
@@ -122,9 +122,9 @@ public class GroupCache
}
- private DN parseNormalized( String name ) throws LdapException
+ private Dn parseNormalized( String name ) throws LdapException
{
- DN dn = dnFactory.create( name );
+ Dn dn = dnFactory.create( name );
return dn;
}
@@ -147,7 +147,7 @@ public class GroupCache
filter.addNode( new EqualityNode<String>( OBJECT_CLASS_AT, new StringValue(
SchemaConstants.GROUP_OF_UNIQUE_NAMES_OC ) ) );
- DN baseDn = dnFactory.create( suffix );
+ Dn baseDn = dnFactory.create( suffix );
SearchControls ctls = new SearchControls();
ctls.setSearchScope( SearchControls.SUBTREE_SCOPE );
@@ -161,7 +161,7 @@ public class GroupCache
while ( results.next() )
{
Entry result = results.get();
- DN groupDn = result.getDn().normalize( schemaManager );
+ Dn groupDn = result.getDn().normalize( schemaManager );
EntryAttribute members = getMemberAttribute( result );
if ( members != null )
@@ -234,7 +234,7 @@ public class GroupCache
for ( Value<?> value : members )
{
- // get and normalize the DN of the member
+ // get and normalize the Dn of the member
String memberDn = value.getString();
try
@@ -243,7 +243,7 @@ public class GroupCache
}
catch ( LdapException e )
{
- LOG.warn( "Malformed member DN in groupOf[Unique]Names entry. Member not added to GroupCache.", e );
+ LOG.warn( "Malformed member Dn in groupOf[Unique]Names entry. Member not added to GroupCache.", e );
}
memberSet.add( memberDn );
@@ -262,7 +262,7 @@ public class GroupCache
{
for ( Value<?> value : members )
{
- // get and normalize the DN of the member
+ // get and normalize the Dn of the member
String memberDn = value.getString();
try
@@ -271,7 +271,7 @@ public class GroupCache
}
catch ( LdapException e )
{
- LOG.warn( "Malformed member DN in groupOf[Unique]Names entry. Member not removed from GroupCache.", e );
+ LOG.warn( "Malformed member Dn in groupOf[Unique]Names entry. Member not removed from GroupCache.", e );
}
memberSet.remove( memberDn );
@@ -287,7 +287,7 @@ public class GroupCache
* @param entry the group entry's attributes
* @throws LdapException if there are problems accessing the attr values
*/
- public void groupAdded( DN name, Entry entry ) throws LdapException
+ public void groupAdded( Dn name, Entry entry ) throws LdapException
{
EntryAttribute members = getMemberAttribute( entry );
@@ -313,10 +313,10 @@ public class GroupCache
* Deletes a group's members from the cache. Called by interceptor to account for
* the deletion of groups.
*
- * @param name the normalized DN of the group entry
+ * @param name the normalized Dn of the group entry
* @param entry the attributes of entry being deleted
*/
- public void groupDeleted( DN name, Entry entry ) throws LdapException
+ public void groupDeleted( Dn name, Entry entry ) throws LdapException
{
EntryAttribute members = getMemberAttribute( entry );
@@ -381,7 +381,7 @@ public class GroupCache
* @param entry the group entry being modified
* @throws LdapException if there are problems accessing attribute values
*/
- public void groupModified( DN name, List<Modification> mods, Entry entry, SchemaManager schemaManager )
+ public void groupModified( Dn name, List<Modification> mods, Entry entry, SchemaManager schemaManager )
throws LdapException
{
EntryAttribute members = null;
@@ -437,7 +437,7 @@ public class GroupCache
* @param mods the modifications being performed
* @throws LdapException if there are problems accessing attribute values
*/
- public void groupModified( DN name, ModificationOperation modOp, Entry mods ) throws LdapException
+ public void groupModified( Dn name, ModificationOperation modOp, Entry mods ) throws LdapException
{
EntryAttribute members = getMemberAttribute( mods );
@@ -465,10 +465,10 @@ public class GroupCache
* An optimization. By having this method here we can directly access the group
* membership information and lookup to see if the principalDn is contained within.
*
- * @param principalDn the normalized DN of the user to check if they are an admin
+ * @param principalDn the normalized Dn of the user to check if they are an admin
* @return true if the principal is an admin or the admin
*/
- public final boolean isPrincipalAnAdministrator( DN principalDn )
+ public final boolean isPrincipalAnAdministrator( Dn principalDn )
{
if ( principalDn.getNormName().equals( ServerDNConstants.ADMIN_SYSTEM_DN_NORMALIZED ) )
{
@@ -498,9 +498,9 @@ public class GroupCache
* @return a Set of Name objects representing the groups
* @throws LdapException if there are problems accessing attribute values
*/
- public Set<DN> getGroups( String member ) throws LdapException
+ public Set<Dn> getGroups( String member ) throws LdapException
{
- DN normMember;
+ Dn normMember;
try
{
@@ -510,12 +510,12 @@ public class GroupCache
{
LOG
.warn(
- "Malformed member DN. Could not find groups for member '{}' in GroupCache. Returning empty set for groups!",
+ "Malformed member Dn. Could not find groups for member '{}' in GroupCache. Returning empty set for groups!",
member, e );
return EMPTY_GROUPS;
}
- Set<DN> memberGroups = null;
+ Set<Dn> memberGroups = null;
for ( Object obj : ehCache.getKeys() )
{
@@ -531,7 +531,7 @@ public class GroupCache
{
if ( memberGroups == null )
{
- memberGroups = new HashSet<DN>();
+ memberGroups = new HashSet<Dn>();
}
memberGroups.add( parseNormalized( group ) );
@@ -547,7 +547,7 @@ public class GroupCache
}
- public boolean groupRenamed( DN oldName, DN newName )
+ public boolean groupRenamed( Dn oldName, Dn newName )
{
Element membersElement = ehCache.get( oldName.getNormName() );
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java Sun Jan 23 01:17:06 2011
@@ -52,7 +52,7 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.filter.ExprNode;
import org.apache.directory.shared.ldap.message.AliasDerefMode;
import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
import org.apache.directory.shared.ldap.name.NameComponentNormalizer;
import org.apache.directory.shared.ldap.schema.AttributeType;
import org.apache.directory.shared.ldap.schema.SchemaManager;
@@ -76,7 +76,7 @@ public class TupleCache
/** a map of strings to ACITuple collections */
private final Map<String, List<ACITuple>> tuples = new HashMap<String, List<ACITuple>>();
- /** the DN factory */
+ /** the Dn factory */
private final DNFactory dnFactory;
/** a handle on the partition nexus */
@@ -111,9 +111,9 @@ public class TupleCache
}
- private DN parseNormalized( String name ) throws LdapException
+ private Dn parseNormalized( String name ) throws LdapException
{
- DN dn = dnFactory.create( name );
+ Dn dn = dnFactory.create( name );
return dn;
}
@@ -127,7 +127,7 @@ public class TupleCache
for ( String suffix:suffixes )
{
- DN baseDn = parseNormalized( suffix );
+ Dn baseDn = parseNormalized( suffix );
ExprNode filter = new EqualityNode<String>( OBJECT_CLASS_AT,
new StringValue( SchemaConstants.ACCESS_CONTROL_SUBENTRY_OC ) );
SearchControls ctls = new SearchControls();
@@ -144,7 +144,7 @@ public class TupleCache
while ( results.next() )
{
Entry result = results.get();
- DN subentryDn = result.getDn().normalize( session.getDirectoryService().getSchemaManager() );
+ Dn subentryDn = result.getDn().normalize( session.getDirectoryService().getSchemaManager() );
EntryAttribute aci = result.get( PRESCRIPTIVE_ACI_AT );
if ( aci == null )
@@ -194,7 +194,7 @@ public class TupleCache
}
- public void subentryAdded( DN dn, Entry entry ) throws LdapException
+ public void subentryAdded( Dn dn, Entry entry ) throws LdapException
{
// only do something if the entry contains a prescriptiveACI
if ( !hasPrescriptiveACI( entry ) )
@@ -233,7 +233,7 @@ public class TupleCache
}
- public void subentryDeleted( DN normName, Entry entry ) throws LdapException
+ public void subentryDeleted( Dn normName, Entry entry ) throws LdapException
{
if ( !hasPrescriptiveACI( entry ) )
{
@@ -244,7 +244,7 @@ public class TupleCache
}
- public void subentryModified( DN normName, List<Modification> mods, Entry entry ) throws LdapException
+ public void subentryModified( Dn normName, List<Modification> mods, Entry entry ) throws LdapException
{
if ( !hasPrescriptiveACI( entry ) )
{
@@ -262,7 +262,7 @@ public class TupleCache
}
- public void subentryModified( DN normName, Entry mods, Entry entry ) throws LdapException
+ public void subentryModified( Dn normName, Entry mods, Entry entry ) throws LdapException
{
if ( !hasPrescriptiveACI( entry ) )
{
@@ -289,7 +289,7 @@ public class TupleCache
}
- public void subentryRenamed( DN oldName, DN newName )
+ public void subentryRenamed( Dn oldName, Dn newName )
{
tuples.put( newName.getNormName(), tuples.remove( oldName.getNormName() ) );
}
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java Sun Jan 23 01:17:06 2011
@@ -23,11 +23,9 @@ package org.apache.directory.server.core
import java.util.Collection;
import org.apache.directory.shared.ldap.aci.ACITuple;
-import org.apache.directory.shared.ldap.aci.MicroOperation;
import org.apache.directory.shared.ldap.constants.Loggers;
import org.apache.directory.shared.ldap.entry.Entry;
import org.apache.directory.shared.ldap.exception.LdapException;
-import org.apache.directory.shared.ldap.name.DN;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/AciContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/AciContext.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/AciContext.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/AciContext.java Sun Jan 23 01:17:06 2011
@@ -27,7 +27,7 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
import org.apache.directory.shared.ldap.entry.Entry;
import org.apache.directory.shared.ldap.entry.Value;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
import org.apache.directory.shared.ldap.schema.AttributeType;
import org.apache.directory.shared.ldap.schema.SchemaManager;
@@ -46,16 +46,16 @@ public class AciContext
private OperationContext operationContext;
/** The Users belonging to a group */
- private Collection<DN> userGroupNames;
+ private Collection<Dn> userGroupNames;
- /** The user's DN */
- private DN userDn;
+ /** The user's Dn */
+ private Dn userDn;
/** The requested Authentication level (default to NONE) */
private AuthenticationLevel authenticationLevel = AuthenticationLevel.NONE;
- /** the entry's DN */
- private DN entryDn;
+ /** the entry's Dn */
+ private Dn entryDn;
/** The AttributeType */
private AttributeType attributeType;
@@ -123,7 +123,7 @@ public class AciContext
/**
* @return the userGroupNames
*/
- public Collection<DN> getUserGroupNames()
+ public Collection<Dn> getUserGroupNames()
{
return userGroupNames;
}
@@ -131,23 +131,23 @@ public class AciContext
/**
* @param userGroupNames the userGroupNames to set
*/
- public void setUserGroupNames( Collection<DN> userGroupNames )
+ public void setUserGroupNames( Collection<Dn> userGroupNames )
{
this.userGroupNames = userGroupNames;
}
/**
- * @return the user DN
+ * @return the user Dn
*/
- public DN getUserDn()
+ public Dn getUserDn()
{
return userDn;
}
/**
- * @param userDn the user DN to set
+ * @param userDn the user Dn to set
*/
- public void setUserDn( DN userDn )
+ public void setUserDn( Dn userDn )
{
this.userDn = userDn;
}
@@ -169,17 +169,17 @@ public class AciContext
}
/**
- * @return the entry DN
+ * @return the entry Dn
*/
- public DN getEntryDn()
+ public Dn getEntryDn()
{
return entryDn;
}
/**
- * @param entryDn the entry DN to set
+ * @param entryDn the entry Dn to set
*/
- public void setEntryDn( DN entryDn )
+ public void setEntryDn( Dn entryDn )
{
this.entryDn = entryDn;
}
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java Sun Jan 23 01:17:06 2011
@@ -50,7 +50,7 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.filter.ExprNode;
import org.apache.directory.shared.ldap.filter.PresenceNode;
import org.apache.directory.shared.ldap.message.AliasDerefMode;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
import org.apache.directory.shared.ldap.schema.AttributeType;
import org.apache.directory.shared.ldap.schema.SchemaManager;
@@ -158,7 +158,7 @@ public class MaxImmSubFilter implements
}
- private int getImmSubCount( OperationContext opContext, DN entryName ) throws LdapException
+ private int getImmSubCount( OperationContext opContext, Dn entryName ) throws LdapException
{
int cnt = 0;
EntryFilteringCursor results = null;
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java Sun Jan 23 01:17:06 2011
@@ -44,7 +44,7 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.entry.EntryAttribute;
import org.apache.directory.shared.ldap.entry.Value;
import org.apache.directory.shared.ldap.exception.LdapException;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
import org.apache.directory.shared.ldap.schema.AttributeType;
import org.apache.directory.shared.ldap.schema.SchemaManager;
@@ -91,7 +91,7 @@ public class RelatedProtectedItemFilter
}
- private boolean isRelated( ACITuple tuple, OperationScope scope, DN userName, DN entryName, AttributeType attributeType,
+ private boolean isRelated( ACITuple tuple, OperationScope scope, Dn userName, Dn entryName, AttributeType attributeType,
Value<?> attrValue, Entry entry ) throws LdapException, InternalError
{
String oid = null;