Package net.shibboleth.profile.context.navigate.messaging

# Class AbstractRelyingPartyLookupFunction<ResultType>

java.lang.Object
net.shibboleth.profile.context.navigate.messaging.AbstractRelyingPartyLookupFunction<ResultType>

Type Parameters:
  `ResultType` - return type of function

All Implemented Interfaces:
  `Function<MessageContext,ResultType>`, `ContextDataLookupFunction<MessageContext,ResultType>`

Direct Known Subclasses:
  `AbstractDefaultSecurityConfigurationLookupFunction`, `MessageHandlerLookupFunction`, `SAMLMetadataContextLookupFunction`

public abstract class AbstractRelyingPartyLookupFunction<ResultType> extends Object implements ContextDataLookupFunction<MessageContext,ResultType>
Abstract base class for a function that requires a `ProfileRequestContext` obtained via a lookup function, by default the parent of the specified `MessageContext`, and a `RelyingPartyContext` obtained via a lookup function, by default a child of the aforementioned parent.

## Field Summary

Fields
Modifier and Type
Field
Description
`private Function<MessageContext,ProfileRequestContext>`
`profileRequestContextLookupStrategy`
Strategy used to locate the `ProfileRequestContext` associated with a given `MessageContext`.
`private Function<MessageContext,RelyingPartyContext>`
`relyingPartyContextLookupStrategy`
Strategy used to locate the `RelyingPartyContext` associated with a given `MessageContext`.

## Constructor Summary

Constructors
Constructor
Description
`AbstractRelyingPartyLookupFunction()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected ProfileRequestContext`
`getProfileRequestContext(MessageContext input)`
Return the result of applying the lookup function to obtain the `ProfileRequestContext`.
`Function<MessageContext,ProfileRequestContext>`
`getProfileRequestContextLookupStrategy()`
Get the strategy used to locate the `ProfileRequestContext` associated with a given `MessageContext`.
`protected RelyingPartyContext`
`getRelyingPartyContext(MessageContext input)`
Return the result of applying the lookup function to obtain the `RelyingPartyContext`.
`Function<MessageContext,RelyingPartyContext>`
`getRelyingPartyContextLookupStrategy()`
Get the strategy used to locate the `RelyingPartyContext` associated with a given `MessageContext`.
`void`
`setProfileRequestContextLookupStrategy(Function<MessageContext,ProfileRequestContext> strategy)`
Set the strategy used to locate the `ProfileRequestContext` associated with a given `MessageContext`.
`void`
`setRelyingPartyContextLookupStrategy(Function<MessageContext,RelyingPartyContext> strategy)`
Set the strategy used to locate the `RelyingPartyContext` associated with a given `MessageContext`.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.util.function.Function

`andThen, apply, compose`

## Field Details

### relyingPartyContextLookupStrategy

@Nonnull private Function<MessageContext,RelyingPartyContext> relyingPartyContextLookupStrategy
Strategy used to locate the `RelyingPartyContext` associated with a given `MessageContext`.

### profileRequestContextLookupStrategy

@Nonnull private Function<MessageContext,ProfileRequestContext> profileRequestContextLookupStrategy
Strategy used to locate the `ProfileRequestContext` associated with a given `MessageContext`.

## Constructor Details

### AbstractRelyingPartyLookupFunction

public AbstractRelyingPartyLookupFunction()
Constructor.

## Method Details

### getRelyingPartyContextLookupStrategy

@Nonnull public Function<MessageContext,RelyingPartyContext> getRelyingPartyContextLookupStrategy()
Get the strategy used to locate the `RelyingPartyContext` associated with a given `MessageContext`.

Returns:
  lookup strategy

### setRelyingPartyContextLookupStrategy

public void setRelyingPartyContextLookupStrategy(@Nonnull Function<MessageContext,RelyingPartyContext> strategy)
Set the strategy used to locate the `RelyingPartyContext` associated with a given `MessageContext`.

Parameters:
  `strategy` - lookup strategy

### getProfileRequestContextLookupStrategy

@Nonnull public Function<MessageContext,ProfileRequestContext> getProfileRequestContextLookupStrategy()
Get the strategy used to locate the `ProfileRequestContext` associated with a given `MessageContext`.

Returns:
  lookup strategy

### setProfileRequestContextLookupStrategy

public void setProfileRequestContextLookupStrategy(@Nonnull Function<MessageContext,ProfileRequestContext> strategy)
Set the strategy used to locate the `ProfileRequestContext` associated with a given `MessageContext`.

Parameters:
  `strategy` - lookup strategy

### getRelyingPartyContext

@Nullable protected RelyingPartyContext getRelyingPartyContext(@Nullable MessageContext input)
Return the result of applying the lookup function to obtain the `RelyingPartyContext`.

Parameters:
  `input` - message context
Returns:
  the `RelyingPartyContext` or null

### getProfileRequestContext

@Nullable protected ProfileRequestContext getProfileRequestContext(@Nullable MessageContext input)
Return the result of applying the lookup function to obtain the `ProfileRequestContext`.

Parameters:
  `input` - message context
Returns:
  the `ProfileRequestContext` or null