public final class MultiRelyingPartyContext extends BaseContext
BaseContext representing multiple relying parties involved in a request, usually a
subcontext of ProfileRequestContext.
The multiple parties may be accessed as a collection, by their name, or by "labels", which are specific to a given profile/scenario.
The context also provides state management for flows to iterate over the relying parties in the context using an iterator and a "current" pointer.
| Modifier and Type | Class and Description |
|---|---|
private class |
MultiRelyingPartyContext.RelyingPartyContextIterator
Wrapper for an iterator that tracks the current object.
|
BaseContext.ContextSetNoRemoveIteratorDecorator| Modifier and Type | Field and Description |
|---|---|
private RelyingPartyContext |
relyingPartyCtx
Tracks the context being operated on.
|
private Map<String,RelyingPartyContext> |
relyingPartyIdMap
Map of RP contexts indexed by name.
|
private Iterator<RelyingPartyContext> |
relyingPartyIterator
An iterator to track progress through the set of relying parties.
|
private com.google.common.collect.ListMultimap<String,RelyingPartyContext> |
relyingPartyLabelMap
Multimap of RP contexts indexed by role.
|
| Constructor and Description |
|---|
MultiRelyingPartyContext()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addRelyingPartyContext(String label,
RelyingPartyContext context)
Add a RP context associated with a label.
|
RelyingPartyContext |
getCurrentRelyingPartyContext()
Get the
RelyingPartyContext pointed to by an iterator. |
RelyingPartyContext |
getRelyingPartyContextById(String id)
Get a RP context by name/id.
|
Iterator<RelyingPartyContext> |
getRelyingPartyContextIterator()
Equivalent to calling
getRelyingPartyContextIterator(boolean) with a parameter of "false". |
Iterator<RelyingPartyContext> |
getRelyingPartyContextIterator(boolean fresh)
Get an iterator over the relying parties contained in the context.
|
Collection<RelyingPartyContext> |
getRelyingPartyContexts()
Get an immutable collection of the RP contexts.
|
Collection<RelyingPartyContext> |
getRelyingPartyContexts(String label)
Get an immutable collection of RP contexts associated with a label.
|
void |
removeRelyingPartyContext(String label,
RelyingPartyContext context)
Remove a RP context associated with a label.
|
addSubcontext, addSubcontext, clearSubcontexts, containsSubcontext, createSubcontext, getParent, getSubcontext, getSubcontext, getSubcontext, getSubcontext, isAutoCreateSubcontexts, iterator, removeSubcontext, removeSubcontext, setAutoCreateSubcontexts, setParent@Nonnull @NonnullElements private Map<String,RelyingPartyContext> relyingPartyIdMap
@Nonnull @NonnullElements private com.google.common.collect.ListMultimap<String,RelyingPartyContext> relyingPartyLabelMap
@Nullable private Iterator<RelyingPartyContext> relyingPartyIterator
@Nullable private RelyingPartyContext relyingPartyCtx
@Nonnull @NonnullElements @NotLive @Unmodifiable public Collection<RelyingPartyContext> getRelyingPartyContexts()
@Nonnull @NonnullElements @NotLive @Unmodifiable public Collection<RelyingPartyContext> getRelyingPartyContexts(@Nonnull@NotEmpty String label)
label - the label to search for@Nullable public RelyingPartyContext getRelyingPartyContextById(@Nonnull@NotEmpty String id)
id - the identifier to search for@Nonnull public Iterator<RelyingPartyContext> getRelyingPartyContextIterator(boolean fresh)
The first time this method is called, or if the parameter is set, it will return a fresh iterator; subsequent calls will return the same iterator.
Modification of the underlying collection while iterating is not supported.
fresh - if true, a new iterator will be created and returned@Nonnull public Iterator<RelyingPartyContext> getRelyingPartyContextIterator()
getRelyingPartyContextIterator(boolean) with a parameter of "false".@Nullable public RelyingPartyContext getCurrentRelyingPartyContext()
RelyingPartyContext pointed to by an iterator.getRelyingPartyContextIterator().public void addRelyingPartyContext(@Nonnull@NotEmpty String label, @Nonnull RelyingPartyContext context)
label - the label to associate with the contextcontext - context to addpublic void removeRelyingPartyContext(@Nonnull@NotEmpty String label, @Nonnull RelyingPartyContext context)
label - the label associated with the contextcontext - context to removeCopyright © 1999–2020 Shibboleth Consortium. All rights reserved.