String strValue = value.getString();
if ( strValue.length() == 0 )
{
return new StringValue( "" );
}
// if value is a numeric id then return it as is
if ( checker.isValidSyntax( strValue ) )
{
return value;
}
// if it is a name we need to do a lookup
String oid = schemaManager.getRegistries().getOid( strValue );
if ( oid != null )
{
return new StringValue( oid );
}
// if all else fails
throw new LdapOtherException( I18n.err( I18n.ERR_04225, value ) );
}