Package net.shibboleth.profile.context.logic

# Class RelyingPartyIdPredicate

java.lang.Object
net.shibboleth.shared.logic.StrategyIndirectedPredicate<ProfileRequestContext,String>
net.shibboleth.profile.context.logic.RelyingPartyIdPredicate

All Implemented Interfaces:
  `Predicate<ProfileRequestContext>`

public class RelyingPartyIdPredicate extends StrategyIndirectedPredicate<ProfileRequestContext,String>
Predicate that evaluates a `ProfileRequestContext` by looking for a relying party ID that matches one of a designated set, or a generic predicate. The ID is obtained from a `RelyingPartyContext` child of the profile request context.

## Constructor Summary

Constructors
Constructor
Description
`RelyingPartyIdPredicate(String candidate)`
Constructor.
`RelyingPartyIdPredicate(Collection<String> candidates)`
Constructor.
`RelyingPartyIdPredicate(Predicate<String> pred)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`static RelyingPartyIdPredicate`
`fromCandidate(String candidate)`
Workaround for Spring type conversion ambiguities.
`static RelyingPartyIdPredicate`
`fromCandidates(Collection<String> candidates)`
Workaround for Spring type conversion ambiguities.
`static RelyingPartyIdPredicate`
`fromPredicate(Predicate<String> pred)`
Workaround for Spring type conversion ambiguities.

### Methods inherited from class net.shibboleth.shared.logic.StrategyIndirectedPredicate

`forCollection, forPredicate, test`

### 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.Predicate

`and, negate, or`

## Constructor Details

### RelyingPartyIdPredicate

public RelyingPartyIdPredicate(@Nonnull @ParameterName(name="candidates") Collection<String> candidates)
Constructor.

Parameters:
  `candidates` - hardwired set of values to check against

### RelyingPartyIdPredicate

public RelyingPartyIdPredicate(@Nonnull @NotEmpty @ParameterName(name="candidate") String candidate)
Constructor.

Parameters:
  `candidate` - a single value to check against

### RelyingPartyIdPredicate

public RelyingPartyIdPredicate(@Nonnull @ParameterName(name="pred") Predicate<String> pred)
Constructor.

Parameters:
  `pred` - generalized predicate

## Method Details

### fromCandidates

@Nonnull public static RelyingPartyIdPredicate fromCandidates(@Nonnull Collection<String> candidates)
Workaround for Spring type conversion ambiguities.

Parameters:
  `candidates` - hardwired set of values to check against
Returns:
  the predicate
Since:
  3.4.0

### fromCandidate

@Nonnull public static RelyingPartyIdPredicate fromCandidate(@Nonnull @NotEmpty String candidate)
Workaround for Spring type conversion ambiguities.

Parameters:
  `candidate` - a single value to check against
Returns:
  the predicate
Since:
  3.4.0

### fromPredicate

@Nonnull public static RelyingPartyIdPredicate fromPredicate(@Nonnull Predicate<String> pred)
Workaround for Spring type conversion ambiguities.

Parameters:
  `pred` - generalized predicate
Returns:
  the predicate
Since:
  3.4.0