Class XMLResourceExceptionHandler

  • All Implemented Interfaces:
    org.forgerock.caf.authentication.framework.ResponseWriter

    public class XMLResourceExceptionHandler
    extends Object
    implements org.forgerock.caf.authentication.framework.ResponseWriter
    An implementation of ResourceExceptionHandler that renders to XML.
    • Constructor Detail

      • XMLResourceExceptionHandler

        public XMLResourceExceptionHandler()
    • Method Detail

      • handles

        public Collection<com.google.common.net.MediaType> handles()
        Specified by:
        handles in interface org.forgerock.caf.authentication.framework.ResponseWriter
        Returns:
        text/xml and application/xml.
      • write

        public void write​(org.forgerock.caf.authentication.api.MessageContext context,
                          org.forgerock.caf.authentication.api.AuthenticationException exception)
        Specified by:
        write in interface org.forgerock.caf.authentication.framework.ResponseWriter
      • asXMLDOM

        public static Document asXMLDOM​(Map<String,​Object> map)
        Convert a Map to XML DOM. The root node is an error element. Collections are represented as child entry elements.
        Parameters:
        map - The map to convert.
        Returns:
        The DOM document.