a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Copyright (c) 2006 Sun Microsystems Inc. All Rights Reserved
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * The contents of this file are subject to the terms
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * of the Common Development and Distribution License
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * (the License). You may not use this file except in
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * compliance with the License.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * You can obtain a copy of the License at
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * https://opensso.dev.java.net/public/CDDLv1.0.html or
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * See the License for the specific language governing
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * permission and limitations under the License.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * When distributing Covered Code, include this CDDL
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Header Notice in each file and include the License file
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * If applicable, add the following below the CDDL Header,
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * with the fields enclosed by brackets [] replaced by
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * your own identifying information:
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * "Portions Copyrighted [year] [name of copyright owner]"
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * $Id: InteractionUtils.java,v 1.2 2008/06/25 05:47:18 qcheng Exp $
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterpackage com.sun.identity.liberty.ws.interaction;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterimport com.sun.identity.liberty.ws.interaction.jaxb.InteractionResponseElement;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterimport com.sun.identity.liberty.ws.interaction.jaxb.UserInteractionElement;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterimport com.sun.identity.liberty.ws.interaction.jaxb.ParameterType;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterimport com.sun.identity.liberty.ws.soapbinding.Message;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Class that provides some utility methods that work with objects
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * related to interaction
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * @supported.all.api
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Returns user friendly <code>Map</code> representation of parameters
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * in interaction response element
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * @param interactionResponseElement obtained from
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * <code>InteractionManager</code>
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * @return a Map of parameters. Keys of the map are parameter
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * name String objects. Values in the map are parameter value
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * String objects
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster InteractionResponseElement interactionResponseElement) {
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster List parameters = interactionResponseElement.getParameter();
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster ParameterType pt = (ParameterType) iter.next();
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Returns languages listed for the language attribute of the
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * <code>UserInteraction</code> header in the message. Returns empty list
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * if <code>UserInteraction</code> header is not included in the message
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * @param message SOAP message from which to find out
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * interaction languages
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * @return languages listed for the language attribute of the
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * <code>UserInteraction</code> header in the message.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Returns empty list
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * if <code>UserInteraction</code> header is not included
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * in the message
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster public static List getInteractionLangauge(Message message) {