com.sun.identity.saml.assertion
Class SubjectLocality

java.lang.Object
  extended bycom.sun.identity.saml.assertion.SubjectLocality

public class SubjectLocality
extends java.lang.Object

The SubjectLocality element specifies the DNS domain name and IP address for the system entity that performed the authentication. It exists as part of AuthenticationStatement element.


Constructor Summary
SubjectLocality()
          Constructor Constructor taking in nothing (assertion schema 25 allows it )
SubjectLocality(org.w3c.dom.Element localityElement)
          Constructs an instance of SubjectLocality from an existing XML block.
SubjectLocality(java.lang.String ipAddress, java.lang.String dnsAddress)
          Constructs an instance of SubjectLocality.
 
Method Summary
 java.lang.String getDNSAddress()
          Returns the DNS address from SubjectLocality locality
 java.lang.String getIPAddress()
          Returns the IP address from SubjectLocality locality
 boolean setDNSAddress(java.lang.String dnsAddress)
          Set the DNS address for SubjectLocality> locality.
 boolean setIPAddress(java.lang.String ipAddress)
          Set the IP address for SubjectLocality locality.
 java.lang.String toString()
          Returns a String representation of the element.
 java.lang.String toString(boolean includeNS, boolean declareNS)
          Returns a String representation of the <SubjectLocality> element.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SubjectLocality

public SubjectLocality()
Constructor Constructor taking in nothing (assertion schema 25 allows it )


SubjectLocality

public SubjectLocality(org.w3c.dom.Element localityElement)
                throws SAMLException
Constructs an instance of SubjectLocality from an existing XML block.

Parameters:
localityElement - A org.w3c.dom.Element representing DOM tree for SubjectLocality object.
Throws:
SAMLException - if it could not process the Element properly, implying that there is an error in the sender or in the element definition.

SubjectLocality

public SubjectLocality(java.lang.String ipAddress,
                       java.lang.String dnsAddress)
Constructs an instance of SubjectLocality.

Parameters:
ipAddress - String representing the IP Address of the entity that was authenticated.
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.
Method Detail

getIPAddress

public java.lang.String getIPAddress()
Returns the IP address from SubjectLocality locality

Returns:
A String representation of IP address.

setDNSAddress

public boolean setDNSAddress(java.lang.String dnsAddress)
Set the DNS address for SubjectLocality> locality.

Parameters:
dnsAddress - A String representation of DNS address.
Returns:
true indicating the success of the operation.

setIPAddress

public boolean setIPAddress(java.lang.String ipAddress)
Set the IP address for SubjectLocality locality.

Parameters:
ipAddress - A String representation of IP address.
Returns:
true indicating the success of the operation.

getDNSAddress

public java.lang.String getDNSAddress()
Returns the DNS address from SubjectLocality locality

Returns:
A String representation of DNS address.

toString

public java.lang.String toString()
Returns a String representation of the element.

Returns:
A string containing the valid XML for this element By default name space name is prepended to the element name example <saml:SubjectLocality>.

toString

public java.lang.String toString(boolean includeNS,
                                 boolean declareNS)
Returns a String representation of the <SubjectLocality> element.

Parameters:
includeNS - Determines whether or not the namespace qualifier is prepended to the Element when converted
declareNS - Determines whether or not the namespace is declared within the Element.
Returns:
A string containing the valid XML for this element


Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.