public List<EntryAttribute> remove( EntryAttribute... attributes ) throws LdapException { List<EntryAttribute> removedAttributes = new ArrayList<EntryAttribute>(); for ( EntryAttribute serverAttribute:attributes ) { if ( this.attributes.containsKey( ((EntryAttribute)serverAttribute).getAttributeType() ) ) { this.attributes.remove( ((EntryAttribute)serverAttribute).getAttributeType() ); removedAttributes.add( serverAttribute ); } } return removedAttributes; }
if ( !this.attributes.containsKey( ((EntryAttribute)entryAttribute).getAttributeType() ) )
/** * Utility method to extract a modification item from an array of modifications. * * @param mods the array of ModificationItems to extract the Attribute from. * @param type the attributeType spec of the Attribute to extract * @return the modification item on the attributeType specified */ public static final Modification getModificationItem( List<Modification> mods, AttributeType type ) { for ( Modification modification:mods ) { EntryAttribute attribute = modification.getAttribute(); if ( attribute.getAttributeType() == type ) { return modification; } } return null; }
EntryAttribute removed = this.attributes.put( ((EntryAttribute)serverAttribute).getAttributeType(), serverAttribute );
clone.attributes.put( value.getAttributeType(), value );
AttributeType attributeType = serverAttribute.getAttributeType();
if ( !((EntryAttribute)attribute).getAttributeType().equals( OBJECT_CLASS_AT ) )
if ( !attributeType.equals( other.getAttributeType() ) )
if ( !((EntryAttribute)objectClass).getAttributeType().equals( OBJECT_CLASS_AT ) )
else if ( !attr0.getAttributeType().equals( attr1.getAttributeType() ) )
/** * Convert a ServerAttribute into a BasicAttribute. The DN is lost * during this conversion, as the Attributes object does not store * this element. * * @return An instance of a AttributesImpl() object */ public static Attribute toBasicAttribute( EntryAttribute entryAttribute ) { AttributeType attributeType = entryAttribute.getAttributeType(); Attribute attribute = new BasicAttribute( attributeType.getName() ); for ( Value<?> value: entryAttribute ) { attribute.add( value.get() ); } return attribute; }
EntryAttribute attr = attributes.get( ((EntryAttribute)attribute).getAttributeType() );
public ServerModification( SchemaManager schemaManager, Modification modification ) { operation = modification.getOperation(); EntryAttribute modAttribute = modification.getAttribute(); try { AttributeType at = null; if ( modAttribute instanceof DefaultServerAttribute ) { at = ((EntryAttribute)modAttribute).getAttributeType(); } else { at = schemaManager.lookupAttributeTypeRegistry( modAttribute.getId() ); } attribute = new DefaultServerAttribute( at, modAttribute ); } catch ( LdapException ne ) { // The attributeType is incorrect. Log, but do nothing otherwise. LOG.error( I18n.err( I18n.ERR_04472, modAttribute.getId() ) ); } }
AttributeType attributeType = attribute.getAttributeType();
String attributeOid = attribute.getAttributeType().getOid();
String attributeOid = attribute.getAttributeType().getOid();