Class StoutAttributeProvider
- java.lang.Object
-
- org.ow2.authzforce.core.pdp.api.BaseNamedAttributeProvider
-
- org.technologybrewery.fermenter.stout.authz.StoutAttributeProvider
-
- All Implemented Interfaces:
Closeable,AutoCloseable,org.ow2.authzforce.core.pdp.api.AttributeProvider,org.ow2.authzforce.core.pdp.api.CloseableNamedAttributeProvider,org.ow2.authzforce.core.pdp.api.NamedAttributeProvider
public class StoutAttributeProvider extends org.ow2.authzforce.core.pdp.api.BaseNamedAttributeProviderProvides an Authzforce attribute provider that allows relatively easy configuration of various attributes for use in the policy decision point.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStoutAttributeProvider.FactoryStoutAttributeExtensionfactory-
Nested classes/interfaces inherited from interface org.ow2.authzforce.core.pdp.api.CloseableNamedAttributeProvider
org.ow2.authzforce.core.pdp.api.CloseableNamedAttributeProvider.DependencyAwareFactory, org.ow2.authzforce.core.pdp.api.CloseableNamedAttributeProvider.FactoryBuilder<CONF_T extends org.ow2.authzforce.xmlns.pdp.ext.AbstractAttributeProvider>
-
-
Field Summary
Fields Modifier and Type Field Description protected AuthorizationConfigconfigprotected Map<String,StoutAttributePoint>idToAttributePointMapprotected Map<Class<StoutAttributePoint>,StoutAttributePoint>pointClassToInstanceMapprotected Map<String,oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeDesignatorType>supportedDesignatorTypes
-
Constructor Summary
Constructors Constructor Description StoutAttributeProvider()Allows an instance to be created outside the PDP.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddAttributeDefinition(StoutAttribute attribute)voidclose()protected <AV extends org.ow2.authzforce.core.pdp.api.value.AttributeValue>
org.ow2.authzforce.core.pdp.api.value.SimpleValue<?>convertRetrievedValueToXacmlFormat(org.ow2.authzforce.core.pdp.api.value.Datatype<AV> attributeDatatype, String id, String subject, AttributeValue<?> retrievedValue)protected StoutAttributePointfindAttributePointImplementation(StoutAttribute attribute)protected StringfindSubjectInEnvironmentContext(org.ow2.authzforce.core.pdp.api.EvaluationContext context)<AV extends org.ow2.authzforce.core.pdp.api.value.AttributeValue>
org.ow2.authzforce.core.pdp.api.value.AttributeBag<AV>get(org.ow2.authzforce.core.pdp.api.AttributeFqn attributeGUID, org.ow2.authzforce.core.pdp.api.value.Datatype<AV> attributeDatatype, org.ow2.authzforce.core.pdp.api.EvaluationContext context)Set<oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeDesignatorType>getProvidedAttributes()Collection<AttributeValue<?>>getStoutAttributeByIdAndSubject(String id, String subject)Returns a request for a simple, Stout attribute by attribute id and subject.protected voidloadAttributeConfiguration()
-
-
-
Field Detail
-
config
protected AuthorizationConfig config
-
supportedDesignatorTypes
protected Map<String,oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeDesignatorType> supportedDesignatorTypes
-
pointClassToInstanceMap
protected Map<Class<StoutAttributePoint>,StoutAttributePoint> pointClassToInstanceMap
-
idToAttributePointMap
protected Map<String,StoutAttributePoint> idToAttributePointMap
-
-
Method Detail
-
close
public void close() throws IOException- Throws:
IOException
-
getProvidedAttributes
public Set<oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeDesignatorType> getProvidedAttributes()
-
get
public <AV extends org.ow2.authzforce.core.pdp.api.value.AttributeValue> org.ow2.authzforce.core.pdp.api.value.AttributeBag<AV> get(org.ow2.authzforce.core.pdp.api.AttributeFqn attributeGUID, org.ow2.authzforce.core.pdp.api.value.Datatype<AV> attributeDatatype, org.ow2.authzforce.core.pdp.api.EvaluationContext context) throws org.ow2.authzforce.core.pdp.api.IndeterminateEvaluationException- Throws:
org.ow2.authzforce.core.pdp.api.IndeterminateEvaluationException
-
getStoutAttributeByIdAndSubject
public Collection<AttributeValue<?>> getStoutAttributeByIdAndSubject(String id, String subject)
Returns a request for a simple, Stout attribute by attribute id and subject.- Parameters:
id- attribute idsubject- subject name- Returns:
- collection of attributes or null if none found
-
convertRetrievedValueToXacmlFormat
protected <AV extends org.ow2.authzforce.core.pdp.api.value.AttributeValue> org.ow2.authzforce.core.pdp.api.value.SimpleValue<?> convertRetrievedValueToXacmlFormat(org.ow2.authzforce.core.pdp.api.value.Datatype<AV> attributeDatatype, String id, String subject, AttributeValue<?> retrievedValue)
-
findSubjectInEnvironmentContext
protected String findSubjectInEnvironmentContext(org.ow2.authzforce.core.pdp.api.EvaluationContext context)
-
loadAttributeConfiguration
protected void loadAttributeConfiguration()
-
addAttributeDefinition
protected void addAttributeDefinition(StoutAttribute attribute)
-
findAttributePointImplementation
protected StoutAttributePoint findAttributePointImplementation(StoutAttribute attribute)
-
-