public String normalizeName( String attributeName ) throws LdapException { return schemaManager.getAttributeTypeRegistry().getOidByName( attributeName ); } }
/** * @see NameComponentNormalizer#isDefined(String) */ public boolean isDefined( String id ) { return schemaManager.getAttributeTypeRegistry().contains( id ); }
/** * {@inheritDoc} */ public Index<?, E, Long> getIndex( String id ) throws IndexNotFoundException { try { id = schemaManager.getAttributeTypeRegistry().getOidByName( id ); } catch ( LdapException e ) { LOG.error( I18n.err( I18n.ERR_1, id ), e.getLocalizedMessage() ); throw new IndexNotFoundException( I18n.err( I18n.ERR_1, id ), id, e ); } if ( userIndices.containsKey( id ) ) { return userIndices.get( id ); } if ( systemIndices.containsKey( id ) ) { return systemIndices.get( id ); } throw new IndexNotFoundException( I18n.err( I18n.ERR_2, id, name ) ); }
private void setupUserIndices() throws Exception { if ( userIndices != null && userIndices.size() > 0 ) { Map<String, AvlIndex<? extends Object, E>> tmp = new HashMap<String, AvlIndex<? extends Object, E>>(); for ( AvlIndex<? extends Object, E> index : userIndices.values() ) { String oid = schemaManager.getAttributeTypeRegistry().getOidByName( index.getAttributeId() ); AttributeType attributeType = schemaManager.lookupAttributeTypeRegistry( oid ); // Check that the attributeType has an EQUALITY matchingRule MatchingRule mr = attributeType.getEquality(); if ( mr != null ) { index.initialize( schemaManager.lookupAttributeTypeRegistry( oid ) ); tmp.put( oid, index ); } else { LOG.error( I18n.err( I18n.ERR_4, attributeType.getName() ) ); } } userIndices = tmp; } else { userIndices = new HashMap<String, AvlIndex<? extends Object, E>>(); } }
/** * {@inheritDoc} */ public Index<? extends Object, E, Long> getUserIndex( String id ) throws IndexNotFoundException { try { id = schemaManager.getAttributeTypeRegistry().getOidByName( id ); } catch ( LdapException e ) { LOG.error( I18n.err( I18n.ERR_1, id ), e.getLocalizedMessage() ); throw new IndexNotFoundException( I18n.err( I18n.ERR_1, id ), id, e ); } if ( userIndices.containsKey( id ) ) { return userIndices.get( id ); } throw new IndexNotFoundException( I18n.err( I18n.ERR_3, id, name ) ); }
/** * {@inheritDoc} */ public Index<?, E, Long> getSystemIndex( String id ) throws IndexNotFoundException { try { id = schemaManager.getAttributeTypeRegistry().getOidByName( id ); } catch ( LdapException e ) { LOG.error( I18n.err( I18n.ERR_1, id ), e.getLocalizedMessage() ); throw new IndexNotFoundException( I18n.err( I18n.ERR_1, id ), id, e ); } if ( systemIndices.containsKey( id ) ) { return systemIndices.get( id ); } throw new IndexNotFoundException( I18n.err( I18n.ERR_2, id, name ) ); }
SchemaManager schemaManager = this.service.getSchemaManager(); if (schemaManager != null) { AttributeTypeRegistry registry = schemaManager.getAttributeTypeRegistry(); if (registry != null) { try {
String oid = schemaManager.getAttributeTypeRegistry().getOidByName( index.getAttributeId() ); if ( SYS_INDEX_OIDS.contains( schemaManager.getAttributeTypeRegistry() .getOidByName( index.getAttributeId() ) ) )
if ( ! schemaManager.getAttributeTypeRegistry().contains( id ) && modification.getAttribute().size() == 0 && modification.getModificationOp() == DirContext.REPLACE_ATTRIBUTE )
if ( ! schemaManager.getAttributeTypeRegistry().contains( id ) && modification.getAttribute().size() == 0 && modification.getOperation() == ModificationOperation.REPLACE_ATTRIBUTE )
String modsOid = schemaManager.getAttributeTypeRegistry().getOidByName( mods.getId() );
String modsOid = schemaManager.getAttributeTypeRegistry().getOidByName( mods.getId() );
String modsOid = schemaManager.getAttributeTypeRegistry().getOidByName( mods.getId() );