Class BetterDifferencer


  • public class BetterDifferencer
    extends Object
    An API to reimplement the Differencer to increase its reliability with various Sailpoint objects.

    Most notably:

    (1) LinkSnapshots will be compared correctly. That is, if the user has more than one account on the same Application, the correct LinkSnapshot will be returned, rather than simply returning the first one. Only if there are no matches by Native Identity will the first LinkSnapshot be returned.

    (2) The Sameness class will be used to compare changes. This will account for a few differences in type and order that are not accounted for out-of-box.

    (3) Changes solely in String case will be ignored in most cases.

    (4) Old and new values will be sorted, for easier comparison.

    TODO: Policy violation differences TODO: Javadocs!

    • Constructor Detail

      • BetterDifferencer

        public BetterDifferencer​(sailpoint.api.SailPointContext context)
        Constructs a new BetterDifferencer with the given IIQ context
        Parameters:
        context - The IIQ context to use for lookups
    • Method Detail

      • addCaseInsensitiveApplication

        public void addCaseInsensitiveApplication​(String application)
        Adds a particular application name as case-insensitive
        Parameters:
        application - The application name
      • addCaseInsensitiveField

        public void addCaseInsensitiveField​(String application,
                                            String field)
        Adds a particular field on a particular applicaiton as case-insensitive
        Parameters:
        application - The application name
        field - The field name
      • addRenamedApplication

        public void addRenamedApplication​(String oldName,
                                          String newName)
        Adds a ‘before’ and ‘after’ to the rename map, which is used to find pairs of Links and also to figure out which Application’s schema to use for difference detection.
        Parameters:
        oldName - The old name
        newName - The new name
      • diff

        public sailpoint.object.IdentityDifference diff​(sailpoint.object.IdentitySnapshot before,
                                                        sailpoint.object.IdentitySnapshot after)
                                                 throws sailpoint.tools.GeneralException
        Diffs the two snapshots and returns an IdentityDifference object containing all of the attribute, link, and role differences.

        TODO support permissions and policy violations

        Parameters:
        before - The before snapshot
        after - The after snapshot
        Returns:
        Any differences between the two snapshots
        Throws:
        sailpoint.tools.GeneralException - if any failures occur
      • setGuessRenames

        public void setGuessRenames​(boolean guessRenames)
        Sets the ‘guess renames’ flag to true.

        If true, the BetterDifferencer will attempt to guess which Link corresponds to the one in the previous snapshot.

        Parameters:
        guessRenames - The flag to set
      • shouldGuessRenames

        public boolean shouldGuessRenames()
        Returns:
        The value of the ‘guess renames’ flag