Class TestDnsNameWithPortValue

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.testutil.ext.TestDnsNameWithPortValue
All Implemented Interfaces:
org.ow2.authzforce.core.pdp.api.value.AttributeValue, org.ow2.authzforce.core.pdp.api.value.PrimitiveValue, org.ow2.authzforce.core.pdp.api.value.Value

public final class TestDnsNameWithPortValue extends org.ow2.authzforce.core.pdp.api.value.StringParseableValue<String>
Represents the dnsName-value datatype from XACML Data Loss Prevention / Network Access Control (DLP/NAC) Profile Version 1.0, Edited by John Tolbert, Richard Hill, Crystal Hayes, David Brossard, Hal Lockhart, and Steven Legg. 16 February 2015. OASIS Committee Specification 01. Latest version.

It is basically the same as XACML Core dnsName datatype except that the hostname may use a wildcard as left-most subdomain, and the part after ':' is limited to a port number only.

Used here for testing Authzforce datatype extension mechanism, i.e. plugging a custom simple datatype into the PDP engine.

Version:
$Id: $
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    AttributeValue factory

    Nested classes/interfaces inherited from class org.ow2.authzforce.core.pdp.api.value.SimpleValue

    org.ow2.authzforce.core.pdp.api.value.SimpleValue.BaseFactory<AV extends org.ow2.authzforce.core.pdp.api.value.AttributeValue>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.ow2.authzforce.core.pdp.api.value.AttributeDatatype<TestDnsNameWithPortValue>
    Data type
    Factory singleton instance

    Fields inherited from class org.ow2.authzforce.core.pdp.api.value.SimpleValue

    value
  • Constructor Summary

    Constructors
    Constructor
    Description
    Returns a new DNSNameAttributeValue that represents the name indicated by the String provided.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns the host name represented by this object.
    net.sf.saxon.s9api.XdmItem
     
    int

    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

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.ow2.authzforce.core.pdp.api.value.PrimitiveValue

    getXdmValue
  • Field Details

  • Constructor Details

    • TestDnsNameWithPortValue

      public TestDnsNameWithPortValue(String val) throws IllegalArgumentException
      Returns a new DNSNameAttributeValue that represents the name indicated by the String provided.
      Parameters:
      val - a string representing the name
      Throws:
      IllegalArgumentException - if format of val does not comply with the dnsName datatype definition
  • Method Details

    • getXdmItem

      public net.sf.saxon.s9api.XdmItem getXdmItem()
    • getHostName

      public String getHostName()
      Returns the host name represented by this object. Used by TestDnsNameValueEqualFunction
      Returns:
      the host name
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class org.ow2.authzforce.core.pdp.api.value.SimpleValue<String>
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class org.ow2.authzforce.core.pdp.api.value.SimpleValue<String>
    • printXML

      public String printXML()
      Specified by:
      printXML in class org.ow2.authzforce.core.pdp.api.value.SimpleValue<String>