/** * Normalize the ReturningAttributes. It reads all the String from the returningAttributesString, * and grab the associated AttributeType from the schema to store it into the returningAttributes * Set. * * @param schemaManager The schema manager */ public void normalize( SchemaManager schemaManager ) { for ( String returnAttribute : returningAttributesStr ) { try { String id = SchemaUtils.stripOptions( returnAttribute ); Set<String> options = SchemaUtils.getOptions( returnAttribute ); AttributeType attributeType = schemaManager.lookupAttributeTypeRegistry( id ); AttributeTypeOptions attrOptions = new AttributeTypeOptions( attributeType, options ); returningAttributes.add( attrOptions ); } catch ( LdapException ne ) { LOG.warn( "Requested attribute {} does not exist in the schema, it will be ignored", returnAttribute ); // Unknown attributes should be silently ignored, as RFC 2251 states } } }
String id = SchemaUtils.stripOptions( attributeId ); Set<String> options = SchemaUtils.getOptions( attributeId );