Class AttributeSelectorExpressions


  • public final class AttributeSelectorExpressions
    extends Object
    Static utility methods pertaining to AttributeSelectorExpression instances.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <AV extends org.ow2.authzforce.core.pdp.api.value.AttributeValue>
      org.ow2.authzforce.core.pdp.api.expression.AttributeSelectorExpression<AV>
      newInstance​(String attributeSelectorCategory, String attributeSelectorPath, boolean mustBePresent, org.ow2.authzforce.core.pdp.api.expression.XPathCompilerProxy xPathCompiler, org.ow2.authzforce.core.pdp.api.value.AttributeValueFactory<AV> attributeFactory)
      Creates instance from XACML AttributeSelector without ContextSelectorId
      static <AV extends org.ow2.authzforce.core.pdp.api.value.AttributeValue>
      org.ow2.authzforce.core.pdp.api.expression.AttributeSelectorExpression<AV>
      newInstance​(oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeSelectorType attributeSelectorElement, org.ow2.authzforce.core.pdp.api.expression.XPathCompilerProxy xPathCompiler, org.ow2.authzforce.core.pdp.api.value.AttributeValueFactory<AV> attributeFactory, org.ow2.authzforce.core.pdp.api.SingleNamedAttributeProvider<org.ow2.authzforce.core.pdp.api.value.XPathValue> contextSelectorAttributeProvider)
      Creates instance from XACML AttributeSelector with ContextSelectorId
    • Method Detail

      • newInstance

        public static <AV extends org.ow2.authzforce.core.pdp.api.value.AttributeValue> org.ow2.authzforce.core.pdp.api.expression.AttributeSelectorExpression<AV> newInstance​(String attributeSelectorCategory,
                                                                                                                                                                               String attributeSelectorPath,
                                                                                                                                                                               boolean mustBePresent,
                                                                                                                                                                               org.ow2.authzforce.core.pdp.api.expression.XPathCompilerProxy xPathCompiler,
                                                                                                                                                                               org.ow2.authzforce.core.pdp.api.value.AttributeValueFactory<AV> attributeFactory)
                                                                                                                                                                        throws IllegalArgumentException
        Creates instance from XACML AttributeSelector without ContextSelectorId
        Parameters:
        attributeSelectorCategory - XACML AttributeSelector's Category
        attributeSelectorPath - XACML AttributeSelector's Path
        xPathCompiler - XPath compiler used for compiling attributeSelectorElement.getPath() and XPath given by attributeSelectorElement.getContextSelectorId().
        attributeFactory - attribute factory to create the AttributeValue(s) from the XML node(s) resolved by XPath
        Returns:
        instance of AttributeSelector expression
        Throws:
        IllegalArgumentException - if attributeSelectorElement == null || xPathCompiler == null || attributeFactory == null; or attributeSelectorElement.getContextSelectorId() != null but attributeProvider == null; or attributeSelectorElement.getPath() is not a valid XPath expression
      • newInstance

        public static <AV extends org.ow2.authzforce.core.pdp.api.value.AttributeValue> org.ow2.authzforce.core.pdp.api.expression.AttributeSelectorExpression<AV> newInstance​(oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeSelectorType attributeSelectorElement,
                                                                                                                                                                               org.ow2.authzforce.core.pdp.api.expression.XPathCompilerProxy xPathCompiler,
                                                                                                                                                                               org.ow2.authzforce.core.pdp.api.value.AttributeValueFactory<AV> attributeFactory,
                                                                                                                                                                               org.ow2.authzforce.core.pdp.api.SingleNamedAttributeProvider<org.ow2.authzforce.core.pdp.api.value.XPathValue> contextSelectorAttributeProvider)
                                                                                                                                                                        throws IllegalArgumentException
        Creates instance from XACML AttributeSelector with ContextSelectorId
        Parameters:
        attributeSelectorElement - XACML AttributeSelector
        xPathCompiler - XPATH compiler used for compiling attributeSelectorElement.getPath() and XPath given by attributeSelectorElement.getContextSelectorId() if not null
        contextSelectorAttributeProvider - AttributeProvider for finding value of the attribute identified by ContextSelectorId in attributeSelectorElement; may be null if attributeSelectorElement.getContextSelectorId() == null
        attributeFactory - attribute factory to create the AttributeValue(s) from the XML node(s) resolved by XPath
        Returns:
        instance of AttributeSelector expression
        Throws:
        IllegalArgumentException - if attributeSelectorElement == null || xPathCompiler == null || attributeFactory == null; or attributeSelectorElement.getContextSelectorId() != null but attributeProvider == null; or attributeSelectorElement.getPath() is not a valid XPath expression