/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2006 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: SubjectLocality.java,v 1.2 2008/06/25 05:47:33 qcheng Exp $
*
*/
/**
*The <code>SubjectLocality</code> element specifies the DNS domain name
*and IP address for the system entity that performed the authentication.
*It exists as part of <code>AuthenticationStatement</code> element.
*@supported.all.api
*/
public class SubjectLocality {
/**
*Default Constructor
*/
public SubjectLocality() {}
/**
* Constructs an instance of <code>SubjectLocality</code> from an existing
* XML block.
*
* @param localityElement A <code>org.w3c.dom.Element</code> representing
* DOM tree for <code>SubjectLocality</code> object.
* @exception SAMLException if it could not process the Element properly,
* implying that there is an error in the sender or in the
* element definition.
*/
throws SAMLException
{
+ "missing");
}
("nullInput")) ;
}
throw new SAMLException("invalidElement") ;
}
}
}
/**
* Constructs an instance of <code>SubjectLocality</code>.
*
* @param ipAddress String representing the IP Address of the entity
* that was authenticated.
* @param dnsAddress String representing the DNS Address of the entity that
* was authenticated. As per SAML specification they are both
* optional, so values can be null.
*/
_ipAddress = "";
} else {
}
if (dnsAddress == null) {
_dnsAddress = "";
} else {
}
}
/**
* Returns the IP address from <code>SubjectLocality</code> locality
*
* @return A String representation of IP address.
*/
return _ipAddress;
}
/**
* Sets the DNS address for <code>SubjectLocality></code> locality.
*
* @param dnsAddress A String representation of DNS address.
* @return true indicating the success of the operation.
*/
return false;
}
return true;
}
/**
* Sets the IP address for <code>SubjectLocality</code> locality.
*
* @param ipAddress A String representation of IP address.
* @return true indicating the success of the operation.
*/
return false;
}
return true;
}
/**
* Returns the DNS address from <code>SubjectLocality</code> locality
*
* @return A String representation of DNS address.
*/
return _dnsAddress;
}
/**
* Returns a String representation of the element.
*
* @return A string containing the valid XML for this element
* By default name space name is prepended to the element name
* example <code><saml:SubjectLocality></code>.
*/
// call toString() with includeNS true by default and declareNS false
return xml;
}
/**
* Returns a String representation of the
* <code><SubjectLocality></code> element.
*
* @param includeNS Determines whether or not the namespace qualifier is
* prepended to the Element when converted
* @param declareNS Determines whether or not the namespace is declared
* within the Element.
* @return A string containing the valid XML for this element
*/
}
}