Class AccessCheckResponse

    • Constructor Detail

      • AccessCheckResponse

        public AccessCheckResponse()
        Basic constructor used by actual users of this class
      • AccessCheckResponse

        public AccessCheckResponse​(boolean allowed,
                                   List<StampedMessage> messages,
                                   long timestamp)
        Jackson-specific constructor.

        Don’t use this one unless you’re a JSON library.

        Parameters:
        allowed - The value of the allowed flag
        messages - The messages (possibly null) to add to a new empty list
        timestamp - The timestamp from the JSON
    • Method Detail

      • decode

        public static AccessCheckResponse decode​(String input)
                                          throws IOException
        Decodes an AccessCheckResponse from the given String, which should be a JSON formatted value.
        Parameters:
        input - The input JSON
        Returns:
        The decoded AccessCheckResponse
        Throws:
        IOException - if JSON decoding fails
      • decode

        public static AccessCheckResponse decode​(Map<String,​Object> input)
        Decodes an AccessCheckResponse from the given Map, which may have been generated using this class’s Mappable.toMap().

        The Map may contain a long ‘timestamp’, a set of ‘messages’, and an ‘allowed’ boolean.

        Parameters:
        input - The Map input
        Returns:
        The decoded AccessCheckResponse
      • addMessage

        public void addMessage​(String message)
        Adds a message to the collection
        Parameters:
        message - The message to add
      • addMessage

        public void addMessage​(sailpoint.tools.Message message)
        Adds a message to the collection
        Parameters:
        message - The message to add
      • deny

        public void deny()
        Denies access to the thing, setting the allowed flag to false
      • denyMessage

        public void denyMessage​(String reason)
        Denies access to the thing, additionally logging a message indicating the denial reason
        Parameters:
        reason - the denial reason
      • getTimestamp

        public long getTimestamp()
        Gets the timestamp
        Returns:
        The timestamp
      • isAllowed

        public boolean isAllowed()
        Returns true if the access was allowed
        Returns:
        True if access was allowed
      • merge

        public void merge​(AccessCheckResponse other)
        Merges this response with another response.

        If either response indicates that access is not allowed, then it will be set to false in this object. Also, messages will be merged.

        Parameters:
        other - The other object to merge