This article explains the process for removing a specific value from a multi-valued attribute using the Identity Manager Java SDK. Since there is no direct "remove" method for single values in the AttributeCollection API, you must retrieve the current vector of values, modify the list, and update the attribute.
Identity Manager 14.5
The Identity Manager AttributeCollection Java API provides an addValueToAttribute method for adding individual values, but it lacks a corresponding method for removing single values from a multi-valued attribute.
Retrieve Current Values: Use the getAttributeMultiValue method to retrieve the current Vector of values for the targeted attribute.
Modify the Vector: Locate and remove the specific value from the retrieved Vector object using standard Java collection methods.
Update the Attribute: Use the setAttributeMultiValue method to pass the updated Vector back to the object. This action replaces the entire attribute list with the new, modified set of values.
Save Changes: Call the modifyObject method to commit the changes to the user object in the Identity Manager environment.
To speak with a customer representative or a Support Engineer see . Scroll to the bottom of the page and click on your respective region.