Package org.ow2.authzforce.core.pdp.api
Interface CloseableNamedAttributeProvider.DependencyAwareFactory
-
- Enclosing interface:
- CloseableNamedAttributeProvider
public static interface CloseableNamedAttributeProvider.DependencyAwareFactory
Intermediate dependency-awareCloseableNamedAttributeProvider
factory that can create instances of Attribute Providers from an XML/JAXB configuration, and also provides the dependencies (required attributes) (based on this configuration), that any such instance (created by it) will need. Providing the dependencies helps to optimize thedepAttrProvider
argument togetInstance(AttributeValueFactoryRegistry, NamedAttributeProvider)
and therefore optimize the created provider's job of finding its own supported attribute values based on other attributes in the evaluation context.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Set<oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeDesignatorType>
getDependencies()
Returns non-nullSet
ofAttributeDesignator
s required as runtime inputs to the Attribute Provider instance created by this builder.CloseableNamedAttributeProvider
getInstance(AttributeValueFactoryRegistry attributeValueFactories, NamedAttributeProvider dependencyAttributeProvider)
Create Attribute Provider instance
-
-
-
Method Detail
-
getDependencies
Set<oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeDesignatorType> getDependencies()
Returns non-nullSet
ofAttributeDesignator
s required as runtime inputs to the Attribute Provider instance created by this builder. The PDP framework calls this method to know what input attributes the Provider will require (dependencies) beforegetInstance(AttributeValueFactoryRegistry, NamedAttributeProvider)
, and based on this, creates a specific dependency Attribute Provider that will enable the providers created by this factory to find their dependency attributes. So when the PDP framework callsgetInstance(AttributeValueFactoryRegistry, NamedAttributeProvider)
subsequently to instantiate one those Providers, the last argument is this the special dependency Attribute Provider.WARNING: do not provide a default implementation here (e.g. returning empty set), because we want to force the implementer to think about whatever dependency attribute his/her implementation may have.
- Returns:
- a
Set
of requiredAttributeDesignatorType
s. Null or empty if none required.
-
getInstance
CloseableNamedAttributeProvider getInstance(AttributeValueFactoryRegistry attributeValueFactories, NamedAttributeProvider dependencyAttributeProvider)
Create Attribute Provider instance- Parameters:
attributeValueFactories
- AttributeValue factories for the Provider to be able to create AttributeValuesdependencyAttributeProvider
- Existing Attribute Provider supplying the possibly required attributes that new Providers instantiated here will depend on- Returns:
- attribute value in internal model
-
-