Person.getNewRoles(boolean convertReplaceToAddDelete)

The method returns an array of newly added static roles for a Person.

Availability

IBM® Security Identity Manager 6.x

IBM Security Identity Manager 7.0.

Synopsis
person.getNewRoles(boolean convertReplaceToAddDelete)
Description

This method defined on the person object returns an array of new static roles associated with the person. The return type is an array of DirectoryObjects.

Depending on how the person modification is triggered, the role changes get stored as REPLACE operation or ADD/DELETE operation.

When the method is invoked with a true parameter, the REPLACE operation is evaluated as ADD/DELETE and the method will return only the newly added roles.

When the method is invoked with a false parameter, if role changes are stored as REPLACE operation, the method will return the complete set of new roles. This will include the existing roles too.
Note: The person object is often a runtime object in memory, and these new static roles were not added to the directory.
Usage
var newRoles = per.getNewRoles(true);