private void checkOidIsUniqueForComparator( String oid ) throws LdapSchemaViolationException { if ( schemaManager.getComparatorRegistry().contains( oid ) ) { throw new LdapSchemaViolationException( ResultCodeEnum.OTHER, I18n.err( I18n.ERR_355, oid ) ); } }
/** * Check that a Comparator exists in the ComparatorRegistry, and if so, * return it. * * @param entry the Entry we want to know it exists * @return The found comparator * @throws LdapException If teh comparator is not found */ protected LdapComparator<?> checkComparatorOidExists( Entry entry ) throws LdapException { String oid = getOid( entry ); if ( schemaManager.getComparatorRegistry().contains( oid ) ) { return schemaManager.getComparatorRegistry().get( oid ); } else { throw new LdapSchemaViolationException( ResultCodeEnum.OTHER, I18n.err( I18n.ERR_336, oid ) ); } }
private void checkOidIsUniqueForComparator( Entry entry ) throws LdapException { String oid = getOid( entry ); if ( schemaManager.getComparatorRegistry().contains( oid ) ) { throw new LdapSchemaViolationException( ResultCodeEnum.OTHER, I18n.err( I18n.ERR_355, oid ) ); } }
/** * Generate the comparators attribute from the registry */ private static Attribute generateComparators( SchemaManager schemaManager ) throws LdapException { Attribute attr = new DefaultAttribute( schemaManager.lookupAttributeTypeRegistry( SchemaConstants.COMPARATORS_AT ) ); for ( LdapComparator<?> comparator : schemaManager.getComparatorRegistry() ) { attr.add( SchemaUtils.render( comparator ) ); } return attr; }
ComparatorRegistry comparatorRegistry = schemaManager.getComparatorRegistry();
ComparatorRegistry comparatorRegistry = schemaManager.getComparatorRegistry();
SchemaManager schemaManager = new DefaultSchemaManager(loader); schemaManager.loadAllEnabled(); ComparatorRegistry comparatorRegistry = schemaManager.getComparatorRegistry(); for (LdapComparator<?> comparator : comparatorRegistry) { if (comparator instanceof NormalizingComparator) {
SchemaManager schemaManager = new DefaultSchemaManager(loader); schemaManager.loadAllEnabled(); ComparatorRegistry comparatorRegistry = schemaManager.getComparatorRegistry(); for (LdapComparator<?> comparator : comparatorRegistry) { if (comparator instanceof NormalizingComparator) {