Interface Mappable

  • All Known Implementing Classes:
    AccessCheckResponse

    public interface Mappable
    An interface implementing a toMap() default method to transform any object into a Map using Jackson.

    Simply implement this interface and enjoy the use of toMap() without any boilerplate code.

    • Method Detail

      • toMap

        static Map<String,​ObjecttoMap​(Object whatever,
                                              Set<String> exclusions)
        Returns a non-null Map representation of the given object using Jackson as a transformation engine.

        If the input is null, an empty HashMap will be returned.

        Parameters:
        whatever - The object to transform
        exclusions - A set of fields to exclude from serialization, or null if none
        Returns:
        The resulting map
      • toMap

        default Map<String,​ObjecttoMap()
                                        throws sailpoint.tools.GeneralException
        Returns a non-null Map representation of this object.

        Only non-null values will be included by default.

        Returns:
        A Map representation of this object.
        Throws:
        sailpoint.tools.GeneralException - if Map conversion fails for any reason
      • toMapFieldExclusions

        default Set<StringtoMapFieldExclusions()
        Optionally returns a list of fields to exclude from serialization.

        This will be used in addition to any fields annotated with JsonIgnore.

        Returns:
        Returns a list of fields to exclude from serialization