Class ObligationService
java.lang.Object
org.opensaml.xacml.ctx.provider.impl.ObligationService
A service for evaluating the obligations within a context.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate class
Comparator used to order obligation handlers by precedence. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Set<BaseObligationHandler>
Registered obligation handlers.private ReentrantReadWriteLock
Read/write lock around the registered obligation handlers. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addObligationhandler
(Collection<BaseObligationHandler> handlers) Adds a collection of obligation handler to the list of registered handlers This method waits until a write lock is obtained for the set of registered obligation handlers.void
Adds an obligation handler to the list of registered handlers This method waits until a write lock is obtained for the set of registered obligation handlers.Gets the registered obligation handlers.protected Map<String,
ObligationType> Preprocesses the obligations returned within the result.void
Processes the obligations within the effective XACML policy.void
Removes an obligation handler from the list of registered handlers This method waits until a write lock is obtained for the set of registered obligation handlers.
-
Field Details
-
rwLock
Read/write lock around the registered obligation handlers. -
obligationHandlers
Registered obligation handlers.
-
-
Constructor Details
-
ObligationService
public ObligationService()Constructor.
-
-
Method Details
-
getObligationHandlers
Gets the registered obligation handlers.- Returns:
- registered obligation handlers
-
addObligationhandler
Adds an obligation handler to the list of registered handlers This method waits until a write lock is obtained for the set of registered obligation handlers.- Parameters:
handler
- the handler to add to the list of registered handlers.
-
addObligationhandler
Adds a collection of obligation handler to the list of registered handlers This method waits until a write lock is obtained for the set of registered obligation handlers.- Parameters:
handlers
- the collection of handlers to add to the list of registered handlers.
-
removeObligationHandler
Removes an obligation handler from the list of registered handlers This method waits until a write lock is obtained for the set of registered obligation handlers.- Parameters:
handler
- the handler to remove from the list of registered handlers.
-
processObligations
public void processObligations(ObligationProcessingContext context) throws ObligationProcessingException Processes the obligations within the effective XACML policy. This method waits until a read lock is obtained for the set of registered obligation handlers.- Parameters:
context
- current processing context- Throws:
ObligationProcessingException
- thrown if there is a problem evaluating an obligation
-
preprocessObligations
Preprocesses the obligations returned within the result. This preprocessing determines the active effect, based onResultType.getDecision()
, and creates an index that maps obligation IDs to theObligationType
returned by the PDP.- Parameters:
context
- current processing context- Returns:
- preprocessed obligations
-