Removes the attribute with the specified AttributeTypes.
The removed attribute are returned by this method.
If there is no attribute with the specified AttributeTypes, the return value is null.
null
574575576577578579580581582583584
{ String oid = attributeType.getOid(); if ( !lookupContext.getAttrsId().contains( oid ) ) { retval.removeAttributes( attributeType ); } } return retval; }
654655656657658659660661662663664
// Now remove the ObjectClass attribute if it has not been requested if ( ( lookupContext.getAttrsId() != null ) && ( lookupContext.getAttrsId().size() != 0 ) && ( ( serverEntry.get( SchemaConstants.OBJECT_CLASS_AT ) != null ) && ( serverEntry.get( SchemaConstants.OBJECT_CLASS_AT ).size() == 0 ) ) ) { serverEntry.removeAttributes( SchemaConstants.OBJECT_CLASS_AT ); } return serverEntry; }
10891090109110921093109410951096109710981099
// We may have to remove the attribute or only some values if ( attribute.size() == 0 ) { // No value : we have to remove the entire attribute tempEntry.removeAttributes( attributeType ); } else { currentAttribute = tempEntry.get( attributeType );
11151116111711181119112011211122112311241125
// If the current attribute is empty, we have to remove // it from the entry if ( currentAttribute.size() == 0 ) { tempEntry.removeAttributes( attributeType ); } } break;
11451146114711481149115011511152115311541155
else { if ( attribute.size() == 0 ) { // Remove the attribute from the entry tempEntry.removeAttributes( attributeType ); } else { // Replace the existing values with the new values // This is done by removing the Attribute
11511152115311541155115611571158115911601161
} else { // Replace the existing values with the new values // This is done by removing the Attribute tempEntry.removeAttributes( attributeType ); // Create the new Attribute Attribute newAttribute = createNewAttribute( attribute ); tempEntry.put( newAttribute );
657658659660661662663664665666667
11081109111011111112111311141115111611171118
if ( attributeType.getUsage() != UsageEnum.USER_APPLICATIONS ) { if ( !lookupContext.getAttrsId().contains( oid ) ) { entry.removeAttributes( attributeType ); } } } } }
11271128112911301131113211331134113511361137
if ( attributeType.getUsage() == UsageEnum.USER_APPLICATIONS ) { if ( !lookupContext.getAttrsId().contains( oid ) ) { entry.removeAttributes( attributeType ); } } } } else
11421143114411451146114711481149115011511152
{ AttributeType attributeType = attribute.getAttributeType(); if ( attributeType.getUsage() != UsageEnum.USER_APPLICATIONS ) { entry.removeAttributes( attributeType ); } } } else {