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: SubjectLocality.java,v 1.2 2008/06/25 05:47:42 qcheng Exp $ 026 * 027 */ 028 029 030 031package com.sun.identity.saml2.assertion; 032 033import com.sun.identity.saml2.common.SAML2Exception; 034 035/** 036 * The <code>SubjectLocality</code> element specifies the DNS domain name 037 * and IP address for the system entity that performed the authentication. 038 * It exists as part of <code>AuthenticationStatement</code> element. 039 * <p> 040 * <pre> 041 * <complexType name="SubjectLocalityType"> 042 * <complexContent> 043 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> 044 * <attribute name="Address" 045 * type="{http://www.w3.org/2001/XMLSchema}string" /> 046 * <attribute name="DNSName" 047 * type="{http://www.w3.org/2001/XMLSchema}string" /> 048 * </restriction> 049 * </complexContent> 050 * </complexType> 051 * </pre> 052 * 053 * @supported.all.api 054 */ 055public interface SubjectLocality { 056 057 /** 058 * Makes the object immutable. 059 */ 060 public void makeImmutable(); 061 062 /** 063 * Returns the mutability of the object. 064 * 065 * @return <code>true</code> if the object is mutable; 066 * <code>false</code> otherwise. 067 */ 068 public boolean isMutable(); 069 070 /** 071 * Returns the value of the <code>DNSName</code> attribute. 072 * 073 * @return the value of the <code>DNSName</code> attribute. 074 * @see #setDNSName(String) 075 */ 076 public String getDNSName(); 077 078 /** 079 * Sets the value of the <code>DNSName</code> attribute. 080 * 081 * @param value new value of the <code>DNSName</code> attribute. 082 * @throws SAML2Exception if the object is immutable. 083 * @see #getDNSName() 084 */ 085 public void setDNSName(String value) 086 throws SAML2Exception; 087 088 /** 089 * Returns the value of the <code>Address</code> attribute. 090 * 091 * @return the value of the <code>Address</code> attribute. 092 * @see #setAddress(String) 093 */ 094 public String getAddress(); 095 096 /** 097 * Sets the value of the <code>Address</code> attribute. 098 * 099 * @param value new value of <code>Address</code> attribute. 100 * @throws SAML2Exception if the object is immutable. 101 * @see #getAddress() 102 */ 103 public void setAddress(String value) 104 throws SAML2Exception; 105 106 /** 107 * Returns a String representation of the element. 108 * 109 * @return A string containing the valid XML for this element. 110 * By default name space name is prepended to the element name. 111 * @throws SAML2Exception if the object does not conform to the schema. 112 */ 113 public String toXMLString() 114 throws SAML2Exception; 115 116 /** 117 * Returns a String representation of the 118 * <code>SubjectLocality</code> element. 119 * 120 * @param includeNS Determines whether or not the namespace qualifier is 121 * prepended to the Element when converted 122 * @param declareNS Determines whether or not the namespace is declared 123 * within the Element. 124 * @return A string containing the valid XML for this element 125 * @throws SAML2Exception if the object does not conform to the schema. 126 */ 127 public String toXMLString(boolean includeNS, boolean declareNS) 128 throws SAML2Exception; 129}