/** * Checks if an entry contains some specific attributes. * * @param attributes The Attributes to look for. * @return <code>true</code> if the attributes are all found within the entry. */ public boolean containsAttribute( String... attributes ) { for ( String attribute:attributes ) { try { if ( !this.attributes.containsKey( getAttributeType( attribute ) ) ) { return false; } } catch ( LdapException ne ) { return false; } } return true; }
/** * Add an attribute (represented by its ID and Value values) into an entry. * * @param upId The attribute ID * @param values The list of Value values to inject. It can be empty * @throws LdapException If the attribute does not exist */ public void add( String upId, Value<?>... values ) throws LdapException { add( upId, getAttributeType( upId ), values ); }
/** * Add an attribute (represented by its ID and binary values) into an entry. * * @param upId The attribute ID * @param values The list of binary values to inject. It can be empty * @throws LdapException If the attribute does not exist */ public void add( String upId, byte[]... values ) throws LdapException { add( upId, getAttributeType( upId ), values ); }
/** * Add an attribute (represented by its ID and string values) into an entry. * * @param upId The attribute ID * @param values The list of string values to inject. It can be empty * @throws LdapException If the attribute does not exist */ public void add( String upId, String... values ) throws LdapException { add( upId, getAttributeType( upId ), values ); }
attributeType = getAttributeType( upId );
/** * <p> * Put an attribute (represented by its ID and some String values) into an entry. * </p> * <p> * If the attribute already exists, the previous attribute will be * replaced and returned. * </p> * <p> * If the upId is not the ID of an existing AttributeType, an IllegalArgumentException is thrown. * </p> * * @param upId The attribute ID * @param values The list of String values to put. It can be empty. * @return The replaced attribute */ public EntryAttribute put( String upId, String... values ) { try { return put( upId, getAttributeType( upId ), values ); } catch ( LdapException ne ) { String message = I18n.err( I18n.ERR_04464, upId, ne.getLocalizedMessage() ); LOG.error( message ); throw new IllegalArgumentException( message ); } }
/** * <p> * Put an attribute (represented by its ID and some values) into an entry. * </p> * <p> * If the attribute already exists, the previous attribute will be * replaced and returned. * </p> * <p> * If the upId is not the ID of an existing AttributeType, an IllegalArgumentException is thrown. * </p> * * @param upId The attribute ID * @param values The list of values to put. It can be empty. * @return The replaced attribute */ public EntryAttribute put( String upId, Value<?>... values ) { try { return put( upId, getAttributeType( upId ), values ); } catch ( LdapException ne ) { String message = I18n.err( I18n.ERR_04464, upId, ne.getLocalizedMessage() ); LOG.error( message ); throw new IllegalArgumentException( message ); } }
/** * <p> * Put an attribute (represented by its ID and some binary values) into an entry. * </p> * <p> * If the attribute already exists, the previous attribute will be * replaced and returned. * </p> * <p> * If the upId is not the ID of an existing AttributeType, an IllegalArgumentException is thrown. * </p> * * @param upId The attribute ID * @param values The list of binary values to put. It can be empty. * @return The replaced attribute */ public EntryAttribute put( String upId, byte[]... values ) { try { return put( upId, getAttributeType( upId ), values ); } catch ( LdapException ne ) { String message = I18n.err( I18n.ERR_04464, upId, ne.getLocalizedMessage() ); LOG.error( message ); throw new IllegalArgumentException( message ); } }
AttributeType attributeType = getAttributeType( upId );
AttributeType attributeType = getAttributeType( upId );
AttributeType attributeType = getAttributeType( upId );
attributeType = getAttributeType( upId ); AttributeType tempAT = getAttributeType( upId );
AttributeType tempAT = getAttributeType( upId );
AttributeType tempAT = getAttributeType( upId );