001/** 002 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 003 * 004 * Copyright (c) 2006 Sun Microsystems Inc. All Rights Reserved 005 * 006 * The contents of this file are subject to the terms 007 * of the Common Development and Distribution License 008 * (the License). You may not use this file except in 009 * compliance with the License. 010 * 011 * You can obtain a copy of the License at 012 * https://opensso.dev.java.net/public/CDDLv1.0.html or 013 * opensso/legal/CDDLv1.0.txt 014 * See the License for the specific language governing 015 * permission and limitations under the License. 016 * 017 * When distributing Covered Code, include this CDDL 018 * Header Notice in each file and include the License file 019 * at opensso/legal/CDDLv1.0.txt. 020 * If applicable, add the following below the CDDL Header, 021 * with the fields enclosed by brackets [] replaced by 022 * your own identifying information: 023 * "Portions Copyrighted [year] [name of copyright owner]" 024 * 025 * $Id: Advice.java,v 1.2 2008/06/25 05:47:31 qcheng Exp $ 026 * 027 */ 028 029 030package com.sun.identity.saml.assertion; 031 032import java.util.*; 033import org.w3c.dom.*; 034import com.sun.identity.saml.common.SAMLException; 035 036/** 037 * The <code>Advice</code> element contains additional information that the 038 * issuer wish to provide. This information MAY be ignored by applications 039 * without affecting either the semantics or validity. Advice elements MAY 040 * be specified in an extension schema. 041 * 042 * @supported.all.api 043 */ 044public class Advice extends AdviceBase { 045 046 /** 047 * Constructs an Advice element from an existing XML block. 048 * 049 * @param element representing a DOM tree element 050 * @exception SAMLException if there is an error in the sender or in the 051 * element definition. 052 */ 053 public Advice(Element element) throws SAMLException { 054 super(element); 055 } 056 057 /** 058 * Constructor 059 * 060 * @param assertionidreference A List of <code>AssertionIDReference</code>. 061 * @param assertion A List of Assertion 062 * @param otherelement A List of any element defined as 063 * <code>any namespace="##other" processContents="lax"</code>; 064 */ 065 public Advice(List assertionidreference, List assertion, 066 List otherelement){ 067 super(assertionidreference, assertion, otherelement); 068 } 069 070 protected AssertionBase createAssertion(Element assertionElement) 071 throws SAMLException { 072 return new Assertion(assertionElement); 073 } 074 075 protected AssertionIDReference 076 createAssertionIDReference(Element assertionIDRefElement) 077 throws SAMLException { 078 return new AssertionIDReference(assertionIDRefElement); 079 } 080 081}