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: SubjectConfirmationData.java,v 1.4 2008/06/25 05:47:42 qcheng Exp $ 026 * 027 */ 028 029package com.sun.identity.saml2.assertion; 030 031import java.util.List; 032import java.util.Date; 033import com.sun.identity.saml2.common.SAML2Exception; 034 035/** 036 * The <code>SubjectConfirmationData</code> specifies additional data 037 * that allows the subject to be confirmed or constrains the circumstances 038 * under which the act of subject confirmation can take place. Subject 039 * confirmation takes place when a relying party seeks to verify the 040 * relationship between an entity presenting the assertion and the 041 * subject of the assertion's claims. 042 * 043 * @supported.all.api 044 */ 045public interface SubjectConfirmationData { 046 047 /** 048 * Returns the time instant at which the subject can no longer be 049 * confirmed 050 * 051 * @return the time instant at which the subject can no longer be 052 * confirmed 053 */ 054 public Date getNotOnOrAfter(); 055 056 /** 057 * Sets the time instant at which the subject can no longer be 058 * confirmed 059 * 060 * @param value the time instant at which the subject can no longer be 061 * confirmed 062 * @exception SAML2Exception if the object is immutable 063 */ 064 public void setNotOnOrAfter(Date value) throws SAML2Exception; 065 066 /** 067 * Returns the ID of a SAML protocol message in response to which 068 * an attesting entity can present the assertion 069 * 070 * @return the ID of a SAML protocol message in response to which 071 * an attesting entity can present the assertion 072 */ 073 public String getInResponseTo(); 074 075 /** 076 * Sets the ID of a SAML protocol message in response to which 077 * an attesting entity can present the assertion 078 * 079 * @param value the ID of a SAML protocol message in response to which 080 * an attesting entity can present the assertion 081 * @exception SAML2Exception if the object is immutable 082 */ 083 public void setInResponseTo(String value) throws SAML2Exception; 084 085 /** 086 * Returns a list of arbitrary XML elements to be added to this 087 * <code>SubjectConfirmationData</code> object. 088 * 089 * @return a list of arbitrary XML elements to be added to this 090 * <code>SubjectConfirmationData</code> object. 091 */ 092 public List getContent(); 093 094 /** 095 * Sets a list of arbitrary XML elements to be added to this 096 * <code>SubjectConfirmationData</code> object. 097 * 098 * @param content a list of arbitrary XML elements to be added to this 099 * <code>SubjectConfirmationData</code> object. 100 * @exception SAML2Exception if the object is immutable 101 */ 102 public void setContent(List content) throws SAML2Exception; 103 104 /** 105 * Returns the URI specifying the entity or location to which an 106 * attesting entity can present the assertion 107 * 108 * @return the URI specifying the entity or location to which an 109 * attesting entity can present the assertion 110 */ 111 public String getRecipient(); 112 113 /** 114 * Sets the URI specifying the entity or location to which an 115 * attesting entity can present the assertion 116 * 117 * @param value the URI specifying the entity or location to which an 118 * attesting entity can present the assertion 119 * @exception SAML2Exception if the object is immutable 120 */ 121 public void setRecipient(String value) throws SAML2Exception; 122 123 /** 124 * Returns the time instant before which the subject cannot be confirmed 125 * 126 * @return the time instant before which the subject cannot be confirmed 127 */ 128 public Date getNotBefore(); 129 130 /** 131 * Sets the time instant before which the subject cannot be confirmed 132 * 133 * @param value the time instant before which the subject cannot be 134 * confirmed 135 * @exception SAML2Exception if the object is immutable 136 */ 137 public void setNotBefore(Date value) throws SAML2Exception; 138 139 /** 140 * Returns the network address/location from which an attesting 141 * entity can present the assertion 142 * 143 * @return the network address/location from which an attesting 144 * entity can present the assertion 145 */ 146 public String getAddress(); 147 148 /** 149 * Sets the network address/location from which an attesting 150 * entity can present the assertion 151 * 152 * @param value the network address/location from which an attesting 153 * entity can present the assertion 154 * @exception SAML2Exception if the object is immutable 155 */ 156 public void setAddress(String value) throws SAML2Exception; 157 158 /** 159 * Returns the content type attribute 160 * 161 * @return the content type attribute 162 * @see #setContentType(String) 163 */ 164 public String getContentType(); 165 166 /** 167 * Sets the content type attribute 168 * 169 * @param attribute attribute type value for the content that will be 170 * added 171 * @exception SAML2Exception if the object is immutable 172 * @see #getContentType() 173 */ 174 public void setContentType(String attribute) throws SAML2Exception; 175 176 /** 177 * Returns a String representation 178 * @param includeNSPrefix Determines whether or not the namespace 179 * qualifier is 180 * prepended to the Element when converted 181 * @param declareNS Determines whether or not the namespace is declared 182 * within the Element. 183 * @return A String representation 184 * @exception SAML2Exception if something is wrong during conversion 185 */ 186 public String toXMLString(boolean includeNSPrefix, boolean declareNS) 187 throws SAML2Exception; 188 189 /** 190 * Returns a String representation 191 * 192 * @return A String representation 193 * @exception SAML2Exception if something is wrong during conversion 194 */ 195 public String toXMLString() throws SAML2Exception; 196 197 /** 198 * Makes the object immutable 199 */ 200 public void makeImmutable(); 201 202 /** 203 * Returns true if the object is mutable 204 * 205 * @return true if the object is mutable 206 */ 207 public boolean isMutable(); 208 209}