use of org.apache.directory.api.ldap.model.schema.AttributeTypeOptions in project directory-ldap-api by apache.
the class SearchParams method normalize.
/**
* 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(I18n.msg(I18n.MSG_13500_ATTRIBUTE_NOT_IN_SCHEMA, returnAttribute));
// Unknown attributes should be silently ignored, as RFC 2251 states
}
}
}
Aggregations