Class X500NameValue
- java.lang.Object
-
- org.ow2.authzforce.core.pdp.api.value.SimpleValue<V>
-
- org.ow2.authzforce.core.pdp.api.value.StringParseableValue<String>
-
- org.ow2.authzforce.core.pdp.api.value.X500NameValue
-
- All Implemented Interfaces:
AttributeValue
,PrimitiveValue
,Value
public final class X500NameValue extends StringParseableValue<String>
Representation of an X.500 Directory Name.- Version:
- $Id: $
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.ow2.authzforce.core.pdp.api.value.StringParseableValue
StringParseableValue.Factory<AV extends AttributeValue>
-
Nested classes/interfaces inherited from class org.ow2.authzforce.core.pdp.api.value.SimpleValue
SimpleValue.BaseFactory<AV extends AttributeValue>
-
-
Field Summary
-
Fields inherited from class org.ow2.authzforce.core.pdp.api.value.SimpleValue
value
-
-
Constructor Summary
Constructors Constructor Description X500NameValue(String value)
Creates a newX500NameValue
from string formX500NameValue(X500Principal value)
Creates a newX500NameValue
from anX500Principal
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
int
hashCode()
boolean
match(X500NameValue other)
Implements XACML function 'urn:oasis:names:tc:xacml:1.0:function:x500Name-match' with this as first argument.String
printXML()
Converts the internal value (accessible viaSimpleValue.getUnderlyingValue()
) to a valid lexical representation for XML marshalling.-
Methods inherited from class org.ow2.authzforce.core.pdp.api.value.StringParseableValue
getXmlAttributes
-
Methods inherited from class org.ow2.authzforce.core.pdp.api.value.SimpleValue
getContent, getUnderlyingValue, toString
-
-
-
-
Constructor Detail
-
X500NameValue
public X500NameValue(X500Principal value) throws IllegalArgumentException
Creates a newX500NameValue
from anX500Principal
.- Parameters:
value
- a string representing the X500 name (considered immutable, therefore suppress Spotbugs warning)- Throws:
IllegalArgumentException
- if value is not a valid XACML X500Name
-
X500NameValue
public X500NameValue(String value) throws IllegalArgumentException
Creates a newX500NameValue
from string form- Parameters:
value
- a string representing the X500 name- Throws:
IllegalArgumentException
- if value is not a valid XACML X500Name
-
-
Method Detail
-
match
public boolean match(X500NameValue other)
Implements XACML function 'urn:oasis:names:tc:xacml:1.0:function:x500Name-match' with this as first argument.- Parameters:
other
- the second argument- Returns:
- true if and only if this matches some terminal sequence of RDNs from the
other's value when compared using x500Name-equal.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classSimpleValue<String>
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classSimpleValue<String>
-
printXML
public String printXML()
Converts the internal value (accessible viaSimpleValue.getUnderlyingValue()
) to a valid lexical representation for XML marshalling. Equivalent to the 'printMethod' in JAXB 'javaType' binding customizations. Implementations of this typically callDatatypeConverter
. This method is called bySimpleValue.getContent()
and its result cached by the same method for later use. Therefore, no need to cache the result in the implementation.- Specified by:
printXML
in classSimpleValue<String>
- Returns:
- XML-valid lexical representation.
-
-