Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.sun.xacml.attr
Class X500NameAttribute  view X500NameAttribute download X500NameAttribute.java

java.lang.Object
  extended bycom.sun.xacml.attr.AttributeValue
      extended bycom.sun.xacml.attr.X500NameAttribute
All Implemented Interfaces:
com.sun.xacml.cond.Evaluatable

public class X500NameAttribute
extends AttributeValue

Representation of an X500 Name.

Since:
1.0

Field Summary
private static java.lang.RuntimeException earlyException
          RuntimeException that wraps an Exception thrown during the creation of identifierURI, null if none.
static java.lang.String identifier
          Official name of this type
private static java.net.URI identifierURI
          URI version of name for this type
private  javax.security.auth.x500.X500Principal value
           
 
Fields inherited from class com.sun.xacml.attr.AttributeValue
 
Constructor Summary
X500NameAttribute(javax.security.auth.x500.X500Principal value)
          Creates a new X500NameAttribute that represents the value supplied.
 
Method Summary
 java.lang.String encode()
          Encodes the value in a form suitable for including in XML data like a request or an obligation.
 boolean equals(java.lang.Object o)
          Returns true if the input is an instance of this class and if its value equals the value contained in this class.
static X500NameAttribute getInstance(org.w3c.dom.Node root)
          Returns a new that represents the X500 Name at a particular DOM node.
static X500NameAttribute getInstance(java.lang.String value)
          Returns a new X500NameAttribute that represents the X500 Name value indicated by the string provided.
 javax.security.auth.x500.X500Principal getValue()
          Returns the name value represented by this object
 int hashCode()
          Returns the hashcode value used to index and compare this object with others of the same type.
 
Methods inherited from class com.sun.xacml.attr.AttributeValue
encode, encode, encodeWithTags, evaluate, evaluatesToBag, getChildren, getType, isBag
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

identifier

public static final java.lang.String identifier
Official name of this type

See Also:
Constant Field Values

value

private javax.security.auth.x500.X500Principal value

identifierURI

private static java.net.URI identifierURI
URI version of name for this type

This field is initialized by a static initializer so that we can catch any exceptions thrown by URI(String) and transform them into a RuntimeException, since this should never happen but should be reported properly if it ever does.


earlyException

private static java.lang.RuntimeException earlyException
RuntimeException that wraps an Exception thrown during the creation of identifierURI, null if none.

Constructor Detail

X500NameAttribute

public X500NameAttribute(javax.security.auth.x500.X500Principal value)
Creates a new X500NameAttribute that represents the value supplied.

Method Detail

getInstance

public static X500NameAttribute getInstance(org.w3c.dom.Node root)
                                     throws java.lang.IllegalArgumentException
Returns a new that represents the X500 Name at a particular DOM node.


getInstance

public static X500NameAttribute getInstance(java.lang.String value)
                                     throws java.lang.IllegalArgumentException
Returns a new X500NameAttribute that represents the X500 Name value indicated by the string provided.


getValue

public javax.security.auth.x500.X500Principal getValue()
Returns the name value represented by this object


equals

public boolean equals(java.lang.Object o)
Returns true if the input is an instance of this class and if its value equals the value contained in this class. This method deviates slightly from the XACML spec in the way that it handles RDNs with multiple attributeTypeAndValue pairs and some additional canonicalization steps. This method uses the procedure used by javax.security.auth.x500.X500Principal.equals(), while the XACML spec uses a slightly different procedure. In practice, it is expected that this difference will not be noticeable. For more details, refer to the javadoc for X500Principal.equals() and the XACML specification.


hashCode

public int hashCode()
Returns the hashcode value used to index and compare this object with others of the same type. Typically this is the hashcode of the backing data object.


encode

public java.lang.String encode()
Description copied from class: AttributeValue
Encodes the value in a form suitable for including in XML data like a request or an obligation. This must return a value that could in turn be used by the factory to create a new instance with the same value.

Specified by:
encode in class AttributeValue