Need to know Java method for removing a multi-valued attribute value
search cancel

Need to know Java method for removing a multi-valued attribute value

book

Article ID: 271034

calendar_today

Updated On:

Products

CA Identity Manager CA Identity Suite

Issue/Introduction

The IM JavaDoc includes the addValueToAttribute method that can be used for adding a new value to a multi-valued attribute but there is no method in the IM JavaDoc for removing a value from a multi-valued attribute. How can that be done?

 

Environment

All Identity Manager

Resolution

While there is the addValueToAttribute method for adding a single value, in order to remove a value you would need to use the setAttributeMultiValue method and pass in the entire vector of values you want the attribute to have (i.e. replace all values as opposed to remove a single value).

You can get the current vector of values with the getAttributeMultiValue method and then remove the value from the vector and pass in the updated vector of values into the setAttributeMultiValue method.

Additional Information

https://ftpdocs.broadcom.com/cadocs/0/CA%20Identity%20Manager%20r12%205%20SP7-ENU/Bookshelf_Files/HTML/javadoc-im/com/netegrity/llsdk6/imsapi/abstractinterface/AttributeCollection.html