1 /* 2 * Copyright [2005] [University Corporation for Advanced Internet Development, Inc.] 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package org.opensaml.saml2.core; 18 19 import javax.xml.namespace.QName; 20 21 import org.opensaml.common.SAMLObject; 22 import org.opensaml.common.xml.SAMLConstants; 23 import org.opensaml.xml.schema.XSBooleanValue; 24 25 /** 26 * SAML 2.0 Core NameIDPolicy. 27 */ 28 public interface NameIDPolicy extends SAMLObject { 29 30 /** Element local name. */ 31 public static final String DEFAULT_ELEMENT_LOCAL_NAME = "NameIDPolicy"; 32 33 /** Default element name. */ 34 public static final QName DEFAULT_ELEMENT_NAME = new QName(SAMLConstants.SAML20P_NS, DEFAULT_ELEMENT_LOCAL_NAME, 35 SAMLConstants.SAML20P_PREFIX); 36 37 /** Local name of the XSI type. */ 38 public static final String TYPE_LOCAL_NAME = "NameIDPolicyType"; 39 40 /** QName of the XSI type. */ 41 public static final QName TYPE_NAME = new QName(SAMLConstants.SAML20P_NS, TYPE_LOCAL_NAME, 42 SAMLConstants.SAML20P_PREFIX); 43 44 /** Format attribute name. */ 45 public static final String FORMAT_ATTRIB_NAME = "Format"; 46 47 /** SPNameQualifier attribute name. */ 48 public static final String SP_NAME_QUALIFIER_ATTRIB_NAME = "SPNameQualifier"; 49 50 /** AllowCreate attribute name. */ 51 public static final String ALLOW_CREATE_ATTRIB_NAME = "AllowCreate"; 52 53 /** 54 * Gets the format of the NameIDPolicy. 55 * 56 * @return the format of the NameIDPolicy 57 */ 58 public String getFormat(); 59 60 /** 61 * Sets the format of the NameIDPolicy 62 * 63 * @param newFormat the format of the NameIDPolicy 64 */ 65 public void setFormat(String newFormat); 66 67 /** 68 * Gets the SPNameQualifier value. 69 * 70 * @return the SPNameQualifier value 71 */ 72 public String getSPNameQualifier(); 73 74 /** 75 * Sets the SPNameQualifier value. 76 * 77 * @param newSPNameQualifier the SPNameQualifier value 78 */ 79 public void setSPNameQualifier(String newSPNameQualifier); 80 81 /** 82 * Gets the AllowCreate value. 83 * 84 * @return the AllowCreate value 85 */ 86 public Boolean getAllowCreate(); 87 88 /** 89 * Gets the AllowCreate value. 90 * 91 * @return the AllowCreate value 92 */ 93 public XSBooleanValue getAllowCreateXSBoolean(); 94 95 /** 96 * Sets the AllowCreate value. Boolean values will be marshalled to either "true" or "false". 97 * 98 * @param newAllowCreate the AllowCreate value 99 */ 100 public void setAllowCreate(Boolean newAllowCreate); 101 102 /** 103 * Sets the AllowCreate value. 104 * 105 * @param newAllowCreate the AllowCreate value 106 */ 107 public void setAllowCreate(XSBooleanValue newAllowCreate); 108 109 }