/** * Checks if an entry contains an attribute with some given binary values. * * @param attributeType The Attribute we are looking for. * @param values The searched values. * @return <code>true</code> if all the values are found within the attribute, * <code>false</code> otherwise, or if the attributes does not exist. */ public boolean contains( AttributeType attributeType, byte[]... values ) { if ( attributeType == null ) { return false; } EntryAttribute attribute = attributes.get( attributeType ); if ( attribute != null ) { return attribute.contains( values ); } else { return false; } }
/** * Checks if an entry contains an attribute with some given String values. * * @param attributeType The Attribute we are looking for. * @param values The searched values. * @return <code>true</code> if all the values are found within the attribute, * <code>false</code> otherwise, or if the attributes does not exist. */ public boolean contains( AttributeType attributeType, String... values ) { if ( attributeType == null ) { return false; } EntryAttribute attribute = attributes.get( attributeType ); if ( attribute != null ) { return attribute.contains( values ); } else { return false; } }
/** * Checks if an entry contains an attribute with some given binary values. * * @param attributeType The Attribute we are looking for. * @param values The searched values. * @return <code>true</code> if all the values are found within the attribute, * <code>false</code> otherwise, or if the attributes does not exist. */ public boolean contains( AttributeType attributeType, Value<?>... values ) { if ( attributeType == null ) { return false; } EntryAttribute attribute = attributes.get( attributeType ); if ( attribute != null ) { return attribute.contains( values ); } else { return false; } }
/** * Checks if an entry contains an attribute with some values. * * @param id The Attribute we are looking for. * @param values The searched values. * @return <code>true</code> if all the values are found within the attribute, * false if at least one value is not present or if the ID is not valid. */ public boolean contains( String upId, Value<?>... values ) { String id = getId( upId ); EntryAttribute attribute = attributes.get( id ); if ( attribute == null ) { return false; } return attribute.contains( values ); }
/** * Checks if an entry contains an attribute with some binary values. * * @param id The Attribute we are looking for. * @param values The searched values. * @return <code>true</code> if all the values are found within the attribute, * false if at least one value is not present or if the ID is not valid. */ public boolean contains( String upId, byte[]... values ) { String id = getId( upId ); EntryAttribute attribute = attributes.get( id ); if ( attribute == null ) { return false; } return attribute.contains( values ); }
/** * Checks if an entry contains an attribute with some String values. * * @param id The Attribute we are looking for. * @param values The searched values. * @return <code>true</code> if all the values are found within the attribute, * false if at least one value is not present or if the ID is not valid. */ public boolean contains( String upId, String... values ) { String id = getId( upId ); EntryAttribute attribute = attributes.get( id ); if ( attribute == null ) { return false; } return attribute.contains( values ); }
return attribute.contains( values );
return attribute.contains( values );
return attribute.contains( values );
if ( ! other.contains( val ) )
if ( !attribute.contains( value.getString() ) )
/** * Verifies that an entry exists in the directory with the * specified attributes. * * @param entry the entry to verify * @throws NamingException if there are problems accessing the entry */ protected void verify( LdifEntry entry ) throws Exception { Entry readEntry = rootDSE.lookup( entry.getDn() ); for ( EntryAttribute readAttribute:readEntry ) { String id = readAttribute.getId(); EntryAttribute origAttribute = entry.getEntry().get( id ); for ( Value<?> value:origAttribute ) { if ( ! readAttribute.contains( value ) ) { LOG.error( "Failed to verify entry addition of {}. {} attribute in original " + "entry missing from read entry.", entry.getDn(), id ); throw new AssertionFailedError( "Failed to verify entry addition of " + entry.getDn() ); } } } }
if ( ! other.contains( val ) )
/** * Verifies that an entry exists in the directory with the specified attributes. * * @param entry the entry to verify * @throws NamingException if there are problems accessing the entry */ protected void verify( LdifEntry entry ) throws Exception { Entry readEntry = rootDSE.lookup( entry.getDn() ); for ( EntryAttribute readAttribute : readEntry ) { String id = readAttribute.getId(); EntryAttribute origAttribute = entry.getEntry().get( id ); for ( Value<?> value : origAttribute ) { if ( !readAttribute.contains( value ) ) { logger.error( "Failed to verify entry addition of " + entry.getDn() + ". " + id + " attribute in original " + "entry missing from read entry." ); throw new AssertionFailedError( "Failed to verify entry addition of " + entry.getDn() ); } } } }
if ( objectClass.contains( SchemaConstants.ALIAS_OC ) )
if ( objectClass.contains( SchemaConstants.ALIAS_OC ) )