com.sun.identity.saml.assertion
Class SubjectLocality

java.lang.Object
  |
  +--com.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)
          This constructor builds an SubjectLocality element from an existing XML block.
SubjectLocality(java.lang.String ipAddress, java.lang.String dnsAddress)
          Constructor
 
Method Summary
 java.lang.String getDNSAddress()
          get the DNS address from SubjectLocality locality
 java.lang.String getIPAddress()
          get 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()
          Create a String representation of the element
 java.lang.String toString(boolean includeNS, boolean declareNS)
          Create 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
This constructor builds an SubjectLocality element 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)
Constructor
Parameters:
ipAddress: - String representing the IPAddress of the entity that was authenticated.
dnsAddress: - String representing the DNSAddress 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()
get 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:
A boolean indicating the success or failure of the operation.

setIPAddress

public boolean setIPAddress(java.lang.String ipAddress)
set the IP address for SubjectLocality locality
Parameters:
ipAddess - : A String representation of IP address
Returns:
A boolean indicating the success or failure of the operation.

getDNSAddress

public java.lang.String getDNSAddress()
get the DNS address from SubjectLocality locality
Returns:
A String representation of DNS address

toString

public java.lang.String toString()
Create a String representation of the element
Overrides:
toString in class java.lang.Object
Returns:
A string containing the valid XML for this element By default name space name is prepended to the element name eg <saml:SubjectLocality>

toString

public java.lang.String toString(boolean includeNS,
                                 boolean declareNS)
Create 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