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: ProviderHeader.java,v 1.3 2008/06/25 05:47:23 qcheng Exp $
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterpackage com.sun.identity.liberty.ws.soapbinding;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * The <code>ProviderHeader</code> class represents 'Provider' element defined
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * in SOAP binding schema.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * @supported.all.api
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * This constructor takes value of 'providerID' attribute which is
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * @param providerID value of 'providerID' attribute
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * @exception SOAPBindingException if the providerID is null
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster public ProviderHeader(String providerID) throws SOAPBindingException {
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster String msg = Utils.bundle.getString("missingProviderID");
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster Utils.debug.error("ProviderHeader.setProviderID: " + msg);
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster actor = SOAPBindingConstants.DEFAULT_SOAP_ACTOR;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * This constructor takes a <code>org.w3c.dom.Element</code>.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * @param providerElement a Provider element
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * @exception SOAPBindingException if an error occurs while parsing
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * the Consent element
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster ProviderHeader(Element providerElement) throws SOAPBindingException {
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster String msg = Utils.bundle.getString("missingProviderID");
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster Utils.debug.error("ProviderHeader.setProviderID: " + msg);
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster affiliationID = XMLUtils.getNodeAttributeValue(
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster String msg = Utils.bundle.getString("invalidMustUnderstand");
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster Utils.debug.error("ProviderHeader: " + msg, pe);
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Returns value of <code>providerID</code> attribute.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * @return value of <code>providerID</code> attribute
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Returns value of <code>affiliationID</code> attribute.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * @return value of <code>affiliationID</code> attribute.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Returns value of <code>id</code> attribute.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * @return value of <code>id</code> attribute
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Returns value of <code>mustUnderstand</code> attribute.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * @return value of <code>mustUnderstand</code> attribute
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Returns value of <code>actor</code> attribute.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * @return value of <code>actor</code> attribute
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Sets value of <code>providerID</code> attribute if the value is not null.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * @param providerID value of <code>providerID</code> attribute
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Sets value of <code>affiliationID</code> attribute.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * @param affiliationID value of <code>affiliationID</code> attribute.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster public void setAffiliationID(String affiliationID) {
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Sets value of <code>mustUnderstand</code> attribute.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * @param mustUnderstand value of <code>mustUnderstand</code> attribute
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster public void setMustUnderstand(Boolean mustUnderstand) {
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Sets value of <code>actor</code> attribute.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * @param actor value of <code>actor</code> attribute.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Sets the sign flag. The header will be signed if the
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * value is true.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * @param signFlag the boolean value of the sign flag.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Converts this header to <code>org.w3c.dom.Element</code> and add to
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * parent Header Element.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * @param headerE parent Header Element
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster providerHeaderE.setAttributeNS(null, SOAPBindingConstants.ATTR_id,
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster providerHeaderE.setAttributeNS(SOAPBindingConstants.NS_SOAP,