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: NameIDPolicy.java,v 1.2 2008/06/25 05:47:57 qcheng Exp $ 026 * 027 */ 028 029 030package com.sun.identity.saml2.protocol; 031 032import com.sun.identity.saml2.common.SAML2Exception; 033import org.w3c.dom.Element; 034 035/** 036 * This interface defines methods to retrieve name identifier related 037 * properties. 038 * 039 * @supported.all.api 040 */ 041public interface NameIDPolicy { 042 043 /** 044 * Returns the value of <code>Format</code> attribute. 045 * 046 * @return the value of <code>Format</code> attribute. 047 * @see #setFormat(String) 048 */ 049 public String getFormat(); 050 051 /** 052 * Sets the value of the <code>Format</code> attribute. 053 * 054 * @param uri the new value of <code>Format</code> attribute. 055 * @throws SAML2Exception if the object is immutable. 056 * @see #getFormat 057 */ 058 public void setFormat(String uri) throws SAML2Exception; 059 060 /** 061 * Returns the value of the <code>SPNameQualifier</code> attribute. 062 * 063 * @return the value of <code>SPNameQualifier</code> attribute. 064 * @see #setSPNameQualifier(String) 065 */ 066 public String getSPNameQualifier(); 067 068 /** 069 * Sets the value of <code>SPNameQualifier</code> attribute. 070 * 071 * @param spNameQualifier new value of <code>SPNameQualifier</code> 072 * attribute. 073 * @throws SAML2Exception if the object is immutable. 074 * @see #getSPNameQualifier 075 */ 076 public void setSPNameQualifier(String spNameQualifier) throws SAML2Exception ; 077 078 /** 079 * Sets the value of <code>AllowCreate</code> attribute. 080 * 081 * @param allowCreate the new value of <code>AllowCreate</code> attribute. 082 * @throws SAML2Exception if the object is immutable. 083 */ 084 public void setAllowCreate(boolean allowCreate) throws SAML2Exception ; 085 086 /** 087 * Returns true if the identity provider is allowed to create a 088 * new identifier to represent the principal. 089 * 090 * @return value of <code>AllowCreate</code> attribute. 091 */ 092 public boolean isAllowCreate(); 093 094 /** 095 * Returns a String representation of this Object. 096 * 097 * @return String representation of this Object. 098 * @throws SAML2Exception if cannot create String object. 099 */ 100 public String toXMLString() throws SAML2Exception ; 101 102 /** 103 * Returns a String representation of this object. 104 * 105 * @param includeNSPrefix determines whether or not the namespace 106 * qualifier is prepended to the Element when converted 107 * @param declareNS determines whether or not the namespace is declared 108 * within the Element. 109 * @return String representation of this Object. 110 * @throws SAML2Exception if cannot create String object. 111 */ 112 113 public String toXMLString(boolean includeNSPrefix,boolean declareNS) 114 throws SAML2Exception ; 115 116 /** 117 * Makes this object immutable. 118 */ 119 public void makeImmutable() ; 120 121 /** 122 * Returns true if object is mutable. 123 * 124 * @return true if object is mutable. 125 */ 126 public boolean isMutable(); 127}
Copyright © 2010-2017, ForgeRock All Rights Reserved.