public boolean hasEntry( NextInterceptor next, LdapDN name ) throws NamingException { return nexus.hasEntry( name ); }
/** * @see javax.naming.Context#rebind(javax.naming.Name, java.lang.Object) */ public void rebind( Name name, Object obj ) throws NamingException { LdapDN target = buildTarget( name ); if ( nexusProxy.hasEntry( target ) ) { nexusProxy.delete( target ); } bind( name, obj ); }
/** * @see javax.naming.directory.DirContext#rebind(javax.naming.Name, * java.lang.Object, javax.naming.directory.Attributes) */ public void rebind( Name name, Object obj, Attributes attrs ) throws NamingException { LdapDN target = buildTarget( name ); if ( getNexusProxy().hasEntry( target ) ) { getNexusProxy().delete( target ); } bind( name, obj, attrs ); }
.getSaslAuthId() ); if ( ! nexusProxy.hasEntry( dn ) )
/** * Make sure the specified <tt>newEntryName</tt> already exists. It * checked {@link Constants#ENTRY_DELETED} additionally to see if the * entry actually exists in a {@link Partition} but maked as deleted. * * @param newEntryName makes sure an entry already exists. */ private void checkBeforeAdd( LdapDN newEntryName ) throws Exception { LdapDN adminDn = new LdapDN( ServerDNConstants.ADMIN_SYSTEM_DN_NORMALIZED ); adminDn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() ); CoreSession adminSession = new DefaultCoreSession( new LdapPrincipal( adminDn, AuthenticationLevel.STRONG ), ds ); if ( nexus.hasEntry( new EntryOperationContext( adminSession, newEntryName ) ) ) { ServerEntry entry = nexus.lookup( new LookupOperationContext( adminSession, newEntryName ) ); EntryAttribute deleted = entry.get( Constants.ENTRY_DELETED ); Object value = deleted == null ? null : deleted.get(); /* * Check first if the entry has been marked as deleted before * throwing an exception and delete the entry if so and return * without throwing an exception. */ if ( value != null && "TRUE".equalsIgnoreCase( value.toString() ) ) { return; } throw new NameAlreadyBoundException( newEntryName.toString() + " already exists." ); } }
if ( nexus.hasEntry( new EntryOperationContext( coreSession, name ) ) )