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: Subject.java,v 1.2 2008/06/25 05:47:41 qcheng Exp $ 026 * 027 */ 028 029 030package com.sun.identity.saml2.assertion; 031 032import java.util.List; 033import com.sun.identity.saml2.common.SAML2Exception; 034 035/** 036 * The <code>Subject</code> specifies the principal that is the subject 037 * of all of the statements in the assertion. It contains an identifier, 038 * a series of one or more subject confirmations, or both. 039 * 040 * @supported.all.api 041 */ 042public interface Subject { 043 044 /** 045 * Returns the encrypted identifier 046 * 047 * @return the encrypted identifier 048 */ 049 public EncryptedID getEncryptedID(); 050 051 /** 052 * Sets the encrypted identifier 053 * 054 * @param value the encrypted identifier 055 * @exception SAML2Exception if the object is immutable 056 */ 057 public void setEncryptedID(EncryptedID value) throws SAML2Exception; 058 059 /** 060 * Returns the identifier in <code>NameID</code> format 061 * 062 * @return the identifier in <code>NameID</code> format 063 */ 064 public NameID getNameID(); 065 066 /** 067 * Sets the identifier in <code>NameID</code> format 068 * 069 * @param value the identifier in <code>NameID</code> format 070 * @exception SAML2Exception if the object is immutable 071 */ 072 public void setNameID(NameID value) throws SAML2Exception; 073 074 /** 075 * Returns a list of subject confirmations 076 * 077 * @return a list of subject confirmations 078 */ 079 public List getSubjectConfirmation(); 080 081 /** 082 * Sets a list of subject confirmations 083 * 084 * @param confirmations a list of subject confirmations 085 * @exception SAML2Exception if the object is immutable 086 */ 087 public void setSubjectConfirmation(List confirmations) 088 throws SAML2Exception; 089 090 /** 091 * Returns the identifier in <code>BaseID</code> format 092 * 093 * @return the identifier in <code>BaseID</code> format 094 */ 095 public BaseID getBaseID(); 096 097 /** 098 * Sets the identifier in <code>BaseID</code> format 099 * 100 * @param value the identifier in <code>BaseID</code> format 101 * @exception SAML2Exception if the object is immutable 102 */ 103 public void setBaseID(BaseID value) throws SAML2Exception; 104 105 /** 106 * Returns a String representation 107 * @param includeNSPrefix Determines whether or not the namespace qualifier 108 * is prepended to the Element when converted 109 * @param declareNS Determines whether or not the namespace is declared 110 * within the Element. 111 * @return A String representation 112 * @exception SAML2Exception if something is wrong during conversion 113 */ 114 public String toXMLString(boolean includeNSPrefix, boolean declareNS) 115 throws SAML2Exception; 116 117 /** 118 * Returns a String representation 119 * 120 * @return A String representation 121 * @exception SAML2Exception if something is wrong during conversion 122 */ 123 public String toXMLString() throws SAML2Exception; 124 125 /** 126 * Makes the object immutable 127 */ 128 public void makeImmutable(); 129 130 /** 131 * Returns true if the object is mutable 132 * 133 * @return true if the object is mutable 134 */ 135 public boolean isMutable(); 136 137}