private static void getQDStrings( StringBuilder sb, List<? extends SchemaObject> schemaObjects ) { if ( ( schemaObjects != null ) && ( schemaObjects.size() != 0 ) ) { if ( schemaObjects.size() == 1 ) { sb.append( '\'' ).append( schemaObjects.get( 0 ).getName() ).append( '\'' ); } else { boolean isFirst = true; sb.append( "( " ); for ( SchemaObject schemaObject : schemaObjects ) { if ( isFirst ) { isFirst = false; } else { sb.append( " " ); } sb.append( '\'' ).append( schemaObject.getName() ).append( '\'' ); } sb.append( " )" ); } } sb.append( '\n' ); }
LOG.debug( "registered " + schemaObject.getName() + " for OID {}", oid );
/** * Gets the primary name associated with an OID. The primary name is the * first name specified for the OID. * * @param oid the object identifier * @return the primary name * @throws LdapException if oid does not exist */ public String getPrimaryName( String oid ) throws LdapException { SchemaObject schemaObject = byOid.get( oid ); if ( schemaObject != null ) { return schemaObject.getName(); } else { String msg = I18n.err( I18n.ERR_04286, oid ); LOG.error( msg ); throw new LdapException( msg ); } }
sb.append( schemaObject.getOid() ); sb.append( ", " ); sb.append( schemaObject.getName() );
/** * Unlink the SchemaObject references */ public void removeReference( List<Throwable> errors, SchemaObject schemaObject ) { try { schemaObject.removeFromRegistries( errors, this ); } catch ( LdapException ne ) { // Not allowed. String msg = I18n.err( I18n.ERR_04293, schemaObject.getName(), ne.getLocalizedMessage() ); Throwable error = new LdapSchemaViolationException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, msg ); errors.add( error ); LOG.info( msg ); } }
/** * Build the SchemaObject references */ public void buildReference( List<Throwable> errors, SchemaObject schemaObject ) { try { schemaObject.addToRegistries( errors, this ); } catch ( LdapException ne ) { // Not allowed. String msg = I18n.err( I18n.ERR_04292, schemaObject.getName(), ne.getLocalizedMessage() ); Throwable error = new LdapProtocolErrorException( msg ); errors.add( error ); LOG.info( msg ); } }
LOG.debug( "registered {} for OID {}", schemaObject.getName(), schemaObject.getOid() );
LOG.debug( "Unregistered {} for OID {}", schemaObject.getName(), schemaObject.getOid() );