Upgrading from 8.2 to 8.4 : Replacing deprecated methods

Which IIQ version are you inquiring about?

8.4 (upgrading from 8.2)

Share all details about your problem, including any error messages you may have received.

We are in the process of replacing any detracted methods from version 8.2 to upgrade to 8.4. When doing this the javadoc has became unclear at times. There are two classes that I have questions about and hoping I can get more information on.

  1. sailpoint.object.Bundle.add(Bundle)
    Note regarding this method we received but do not see this in the docs (Now that there is more than one bundle list these older accessors are discouraged.)

Below code is currently what needs to be replaced

Bundle role = new Bundle();
Profile profile = new Profile();
role.add(profile);

In the new bundle class in 8.4 I do not see any method .add(). So in this case how can a Profile be added to a Bundle?

  1. sailpoint.object.Identity.getLinks(Application)
    Note regarding this method as it is not deprecated: This method might not perform well when identities have large numbers of links. Use IdentityService.getLinks(Identity, Application) instead.

Below code is currently what needs to be replaced

(identityName is a String being passed as a parameter in the function where below code in being implemented)

Identity identity = context.getObjectByName(Identity.class, identityName);
List links = identity.getLinks();

How can we use the IdentityService.getLinks(Identity, Application) without knowing the application as the logic will be iterating through all the users links to determine provisioning of any roles.

Thank you in advance for any help!

Hi @dantez,

before all, the methods are signed like deprecated most time still working when change version, especially for minor version, but not everytime.

  1. role.add() still working, I have created a rule last week on 8.4p2
  2. about IdentityService.getLinks(), you must to know the application

Instead of IdentityService you can use context.search() that return an iterator. About me this is the best way, because it has good performance and with QueryOption\Filter you can search everything.

1 Like

Hi @dantez,

I think both methods still work in 8.4, but here’s what you need to know:

  1. Bundle.add(Profile)
    It’s still usable in 8.4 (even if missing from Javadoc), but it’s part of the older model. If you’re assigning roles, use identity.addRole(bundle) instead. For future-proofing, SailPoint recommends shifting toward using Assignments instead of directly attaching Profiles.

  2. Identity.getLinks()
    Still works, but not ideal for large identity records.
    If you don’t know the application, and need all links, just use:

List<Link> links = IdentityService.getLinks(context, identity, null);

If you want better performance and filtering, use:

Iterator<Link> links = context.search(Link.class, Filter.eq("identity", identity));

That’s the cleanest and most scalable path going forward.

Regards,
Mustafa

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.