Class Rfc822NameValue

  • All Implemented Interfaces:
    AttributeValue, PrimitiveValue, Value

    public final class Rfc822NameValue
    extends StringParseableValue<String>
    Representation of an RFC 822 email address. The valid syntax for such a name is described in IETF RFC 2821, Section 4.1.2, 4019 Command Argument Syntax, under the term "Mailbox". Mailbox = Local-part "@" Domain

    N.B.: This is more restrictive than a generic RFC 822 name.

    Version:
    $Id: $
    • Constructor Detail

      • Rfc822NameValue

        public Rfc822NameValue​(javax.mail.internet.InternetAddress address)
        Creates instance from InternetAddress
        Parameters:
        address - Java equivalent of RFC822Name
      • Rfc822NameValue

        public Rfc822NameValue​(String value)
                        throws IllegalArgumentException
        Creates a new RFC822NameAttributeValue that represents the value supplied.
        Parameters:
        value - the email address to be represented
        Throws:
        IllegalArgumentException - if value is not a valid string representation of XACML rfc822Name
    • Method Detail

      • match

        public boolean match​(String maybePartialRfc822Name)
        Implements function 'urn:oasis:names:tc:xacml:1.0:function:rfc822Name-match'
        Parameters:
        maybePartialRfc822Name - used as first argument to the function
        Returns:
        true if match
      • printXML

        public String printXML()
        Converts the internal value (accessible via SimpleValue.getUnderlyingValue()) to a valid lexical representation for XML marshalling. Equivalent to the 'printMethod' in JAXB 'javaType' binding customizations. Implementations of this typically call DatatypeConverter. This method is called by SimpleValue.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 class SimpleValue<String>
        Returns:
        XML-valid lexical representation.