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: Evidence.java,v 1.2 2008/06/25 05:47:41 qcheng Exp $ 026 * 027 */ 028 029 030 031package com.sun.identity.saml2.assertion; 032 033import java.util.List; 034 035import com.sun.identity.saml2.common.SAML2Exception; 036 037/** 038 * The <code>Evidence</code> element contains one or more assertions or 039 * assertion references that the SAML authority relied on in issuing the 040 * authorization decision. It has the <code>EvidenceType</code> complex type. 041 * <p> 042 * <pre> 043 * <complexType name="EvidenceType"> 044 * <complexContent> 045 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> 046 * <choice maxOccurs="unbounded"> 047 * <element ref="{urn:oasis:names:tc:SAML:2.0:assertion} 048 * AssertionIDRef"/> 049 * <element ref="{urn:oasis:names:tc:SAML:2.0:assertion} 050 * AssertionURIRef"/> 051 * <element ref="{urn:oasis:names:tc:SAML:2.0:assertion}Assertion"/> 052 * <element ref="{urn:oasis:names:tc:SAML:2.0:assertion} 053 * EncryptedAssertion"/> 054 * </choice> 055 * </restriction> 056 * </complexContent> 057 * </complexType> 058 * </pre> 059 * 060 * @supported.all.api 061 */ 062public interface Evidence { 063 064 /** 065 * Makes the object immutable. 066 */ 067 public void makeImmutable(); 068 069 /** 070 * Returns the mutability of the object. 071 * 072 * @return <code>true</code> if the object is mutable; 073 * <code>false</code> otherwise. 074 */ 075 public boolean isMutable(); 076 077 /** 078 * Returns the <code>AssertionIDRef</code> in the element. 079 * 080 * @return List of Strings representing the <code>AssertionIDRef</code>s 081 * in the <code>Evidence</code>. 082 * @see #setAssertionIDRef(List) 083 */ 084 public List getAssertionIDRef(); 085 086 /** 087 * Sets the <code>AssertionIDRef</code>(s) in the element. 088 * 089 * @param value List of Strings representing new 090 * <code>AssertionIDRef</code>(s). 091 * @throws SAML2Exception if the object is immutable. 092 * @see #getAssertionIDRef() 093 */ 094 public void setAssertionIDRef(List value) 095 throws SAML2Exception; 096 097 /** 098 * Returns the <code>AssertionURIRef</code>(s) in the element. 099 * 100 * @return List of Strings representing the <code>AssertionURIRef</code>(s) 101 * in the <code>Evidence</code>. 102 * @see #setAssertionURIRef(List) 103 */ 104 public List getAssertionURIRef(); 105 106 /** 107 * Sets the <code>AssertionURIRef</code>(s) in the element. 108 * 109 * @param value List of Strings representing new 110 * <code>AssertionURIRef</code>(s). 111 * @throws SAML2Exception if the object is immutable. 112 * @see #getAssertionURIRef() 113 */ 114 public void setAssertionURIRef(List value) 115 throws SAML2Exception; 116 117 /** 118 * Returns the <code>Assertion</code>(s) in the element. 119 * 120 * @return List of <code>Assertion</code>(s) in the <code>Evidence</code>. 121 * @see #setAssertion(List) 122 */ 123 public List getAssertion(); 124 125 /** 126 * Sets the <code>Assertion</code>(s) in the element. 127 * 128 * @param value List of new <code>Assertion</code>(s). 129 * @throws SAML2Exception if the object is immutable. 130 * @see #getAssertion() 131 */ 132 public void setAssertion(List value) 133 throws SAML2Exception; 134 135 /** 136 * Returns the <code>EncryptedAssertion</code>(s) in the element. 137 * 138 * @return List of <code>EncryptedAssertion</code>(s) in the 139 * <code>Evidence</code>. 140 * @see #setEncryptedAssertion(List) 141 */ 142 public List getEncryptedAssertion(); 143 144 /** 145 * Sets the <code>EncryptedAssertion</code>(s) in the element. 146 * 147 * @param value List of new <code>EncryptedAssertion</code>(s). 148 * @throws SAML2Exception if the object is immutable. 149 * @see #getEncryptedAssertion() 150 */ 151 public void setEncryptedAssertion(List value) 152 throws SAML2Exception; 153 154 /** 155 * Returns a String representation of the element. 156 * 157 * @return A string containing the valid XML for this element. 158 * By default name space name is prepended to the element name. 159 * @throws SAML2Exception if the object does not conform to the schema. 160 */ 161 public String toXMLString() 162 throws SAML2Exception; 163 164 /** 165 * Returns a String representation of the element. 166 * 167 * @param includeNS Determines whether or not the namespace qualifier is 168 * prepended to the Element when converted 169 * @param declareNS Determines whether or not the namespace is declared 170 * within the Element. 171 * @return A string containing the valid XML for this element 172 * @throws SAML2Exception if the object does not conform to the schema. 173 */ 174 public String toXMLString(boolean includeNS, boolean declareNS) 175 throws SAML2Exception; 176 177} 178