} else { try { return new Dn(dn).getNormName(); } catch (LdapInvalidDnException e) { LOG.debug("Invalid DN", e);
/** * Returns the normalized distinguished name of the principal as a String. */ @Override public String getName() { return dn.getNormName(); }
/** * {@inheritDoc} */ @Override public String normalize( String value ) throws LdapException { Dn dn = new Dn( schemaManager, value ); return dn.getNormName(); }
/** * {@inheritDoc} */ @Override public String normalize( String value, PrepareString.AssertionType assertionType ) throws LdapException { Dn dn = new Dn( schemaManager, value ); return dn.getNormName(); }
/** * {@inheritDoc} */ @Override public String normalize( String value, PrepareString.AssertionType assertionType ) throws LdapException { Dn dn = new Dn( schemaManager, value ); return dn.getNormName(); }
/** * {@inheritDoc} */ @Override public String normalize( String value ) throws LdapException { Dn dn = new Dn( schemaManager, value ); return dn.getNormName(); }
/** * {@inheritDoc} */ @Override public String normalize( String value ) throws LdapException { Dn dn = new Dn( schemaManager, value ); return dn.getNormName(); }
/** * {@inheritDoc} */ @Override public String normalize( String value, PrepareString.AssertionType assertionType ) throws LdapException { Dn dn = new Dn( schemaManager, value ); return dn.getNormName(); }
/** * Remove the principal form the cache. This is used when the user changes * his password. */ @Override public void invalidateCache( Dn bindDn ) { synchronized ( credentialCache ) { credentialCache.remove( bindDn.getNormName() ); } } }
} else { try { return new Dn(dn).getNormName(); } catch (LdapInvalidDnException e) { LOG.debug("Invalid DN", e);
/** * Normalize a Dn * @param value The Dn to normalize * @return A normalized Dn * @throws LdapException If the DN is invalid */ public String normalize( Dn value ) throws LdapException { Dn dn = value; if ( !value.isSchemaAware() ) { dn = new Dn( schemaManager, value ); } return dn.getNormName(); }
/** * Normalize a Dn * @param value The Dn to normalize * @return A normalized Dn * @throws LdapException If the DN is invalid */ public String normalize( Dn value ) throws LdapException { Dn dn = value; if ( !value.isSchemaAware() ) { dn = new Dn( schemaManager, value ); } return dn.getNormName(); }
/** * Normalize a Dn * @param value The Dn to normalize * @return A normalized Dn * @throws LdapException If the DN is invalid */ public String normalize( Dn value ) throws LdapException { Dn dn = value; if ( !value.isSchemaAware() ) { dn = new Dn( schemaManager, value ); } return dn.getNormName(); }
return dn.getNormName() + '#' + uid; return new Dn( schemaManager, value ).getNormName();
/** * {@inheritDoc} */ @Override public Entry lookup( LookupOperationContext lookupContext ) throws LdapException { Dn dn = lookupContext.getDn(); if ( dn.getNormName().equals( subschemaSubentryDn.getNormName() ) ) { Entry serverEntry = SchemaService.getSubschemaEntry( directoryService, lookupContext ); serverEntry.setDn( dn ); return serverEntry; } Entry entry = next( lookupContext ); denormalizeEntryOpAttrs( entry ); // Add the nbChildren/nbSubordinates attributes if required processSubordinates( lookupContext, lookupContext.getReturningAttributes(), lookupContext.isAllOperationalAttributes(), entry ); return entry; }
if ( dn.isRootDse() || dn.getNormName().equals( subschemaSubentryDn.getNormName() ) )
/** * {@inheritDoc} */ @Override public Entry lookup( LookupOperationContext lookupContext ) throws LdapException { Dn dn = lookupContext.getDn(); if ( dn.getNormName().equals( subschemaSubentryDn.getNormName() ) ) { return new ClonedServerEntry( rootDse.clone() ); } // This is for the case we do a lookup on the rootDSE if ( dn.isRootDse() ) { return new ClonedServerEntry( rootDse ); } Partition partition = getPartition( dn ); Entry entry = partition.lookup( lookupContext ); if ( entry == null ) { throw new LdapNoSuchObjectException( "Attempt to lookup non-existant entry: " + dn.getName() ); } return entry; }
String key = partition.getSuffixDn().getNormName(); partitions.put( partitionSuffix.getNormName(), partition ); partitionLookupTree.add( partition.getSuffixDn(), partition );
credentialCache.put( bindContext.getDn().getNormName(), principal );
/** * @param le * @param sequence * @return * @throws LdapInvalidAttributeValueException * @throws LdapException */ private Permission unloadPopLdapEntry( Entry le, long sequence, boolean isAdmin ) throws LdapInvalidAttributeValueException { Permission entity = new ObjectFactory().createPermission(); entity.setSequenceId( sequence ); entity.setAbstractName( getAttribute( le, PERM_NAME ) ); entity.setObjName( getAttribute( le, GlobalIds.POBJ_NAME ) ); entity.setObjId( getAttribute( le, GlobalIds.POBJ_ID ) ); entity.setOpName( getAttribute( le, GlobalIds.POP_NAME ) ); entity.setInternalId( getAttribute( le, GlobalIds.FT_IID ) ); entity.setRoles( getAttributeSet( le, ROLES ) ); entity.setUsers( getAttributeSet( le, USERS ) ); entity.setType( getAttribute( le, GlobalIds.TYPE ) ); entity.setDescription( getAttribute( le, SchemaConstants.DESCRIPTION_AT ) ); entity.addProperties( PropUtil.getProperties( getAttributes( le, GlobalIds.PROPS ) ) ); entity.setAdmin( isAdmin ); entity.setPaSets( getAttributeSet(le, GlobalIds.FT_PERMISSION_ATTRIBUTE_SET ) ); if ( le != null ) { entity.setDn( le.getDn().getNormName() ); } return entity; }