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: NameIDType.java,v 1.2 2008/06/25 05:47:41 qcheng Exp $ 026 * 027 */ 028 029 030package com.sun.identity.saml2.assertion; 031 032import com.sun.identity.saml2.common.SAML2Exception; 033 034/** 035 * The <code>NameIDType</code> is used when an element serves to represent 036 * an entity by a string-valued name. In addition to the string content 037 * containing the actual identifier, it provides the following optional 038 * attributes: 039 * <code>NameQualifier</code> 040 * <code>SPNameQualifier</code> 041 * <code>Format</code> 042 * <code>SPProvidedID</code> 043 * @supported.all.api 044 */ 045public interface NameIDType { 046 047 /** 048 * Returns the string-valued identifier 049 * 050 * @return the string-valued identifier 051 */ 052 public String getValue(); 053 054 /** 055 * Sets the string-valued identifier 056 * 057 * @param value the string-valued identifier 058 * @exception SAML2Exception if the object is immutable 059 */ 060 public void setValue(String value) throws SAML2Exception; 061 062 /** 063 * Returns the name qualifier 064 * 065 * @return the name qualifier 066 */ 067 public String getNameQualifier(); 068 069 /** 070 * Sets the name qualifier 071 * 072 * @param value the name qualifier 073 * @exception SAML2Exception if the object is immutable 074 */ 075 public void setNameQualifier(String value) throws SAML2Exception; 076 077 /** 078 * Returns the <code>SP</code> provided ID 079 * 080 * @return the <code>SP</code> provided ID 081 */ 082 public String getSPProvidedID(); 083 084 /** 085 * Sets the <code>SP</code> provided ID 086 * 087 * @param value the <code>SP</code> provided ID 088 * @exception SAML2Exception if the object is immutable 089 */ 090 public void setSPProvidedID(String value) throws SAML2Exception; 091 092 /** 093 * Returns the <code>SP</code> name qualifier 094 * 095 * @return the <code>SP</code> name qualifier 096 */ 097 public String getSPNameQualifier(); 098 099 /** 100 * Sets the <code>SP</code> name qualifier 101 * 102 * @param value the <code>SP</code> name qualifier 103 * @exception SAML2Exception if the object is immutable 104 */ 105 public void setSPNameQualifier(String value) throws SAML2Exception; 106 107 /** 108 * Returns the format 109 * 110 * @return the format 111 */ 112 public String getFormat(); 113 114 /** 115 * Sets the format 116 * 117 * @param value the format 118 * @exception SAML2Exception if the object is immutable 119 */ 120 public void setFormat(String value) throws SAML2Exception; 121 122 /** 123 * Returns a String representation 124 * @param includeNSPrefix Determines whether or not the namespace qualifier 125 * is prepended to the Element when converted 126 * @param declareNS Determines whether or not the namespace is declared 127 * within the Element. 128 * @return A String representation 129 * @exception SAML2Exception if something is wrong during conversion 130 */ 131 public String toXMLString(boolean includeNSPrefix, boolean declareNS) 132 throws SAML2Exception; 133 134 /** 135 * Returns a String representation 136 * 137 * @return A String representation 138 * @exception SAML2Exception if something is wrong during conversion 139 */ 140 public String toXMLString() throws SAML2Exception; 141 142 /** 143 * Makes the object immutable 144 */ 145 public void makeImmutable(); 146 147 /** 148 * Returns true if the object is mutable 149 * 150 * @return true if the object is mutable 151 */ 152 public boolean isMutable(); 153 154}