sb.append( ava.getNormType() ).append( '=' ); Value value = ava.getValue();
/** * Compute the real name based on the Dn, assuming that depending on the underlying * OS, some characters are not allowed. * * We don't allow filename which length is > 255 chars. */ private String getFileName( Dn dn ) throws LdapException { StringBuilder sb = new StringBuilder(); boolean isFirst = true; for ( Rdn rdn : dn.getRdns() ) { // First, get the AT name, or OID String normAT = rdn.getNormType(); AttributeType at = schemaManager.lookupAttributeTypeRegistry( normAT ); String atName = at.getName(); // Now, get the normalized value String normValue = rdn.getAva().getValue().getValue(); if ( isFirst ) { isFirst = false; } else { sb.append( "," ); } sb.append( atName ).append( "=" ).append( normValue ); } return getOSFileName( sb.toString() ); }
sb.append( ava.getNormType() ).append( '=' ); Value value = ava.getValue();
sb.append( ava.getNormType() ).append( '=' ); Value value = ava.getValue();
sbNormName.append( ava.getValue().getNormalized() );
sbNormName.append( ava.getValue().getNormalized() );
buf.append( type ).append( '=' ).append( atav.getValue().getValue() );
private void injectRdnAttributeValues( Dn target, Entry serverEntry ) throws NamingException { // Add all the Rdn attributes and their values to this entry Rdn rdn = target.getRdn(); if ( rdn.size() == 1 ) { serverEntry.put( rdn.getType(), rdn.getValue() ); } else { for ( Ava atav : rdn ) { serverEntry.put( atav.getType(), atav.getValue() ); } } }
/** * Exctract the schema name from the Dn. It is supposed to be the * second Rdn in the dn : * <pre> * ou=schema, cn=MySchema, ... * </pre> * Here, the schemaName is MySchema * * @param dn The Dn we want to get the schema name from * @return The schema name * @throws LdapException If we got an error */ protected String getSchemaName( Dn dn ) throws LdapException { int size = dn.size(); if ( size < 2 ) { throw new LdapInvalidDnException( I18n.err( I18n.ERR_276 ) ); } Rdn rdn = dn.getRdn( size - 2 ); return Strings.trim( rdn.getAva().getValue().getNormalized() ); }
Value value = ava.getValue(); AttributeType attributeType = ava.getAttributeType(); Value anonymizedValue = valueMap.get( value );