Package net.shibboleth.idp.ui.impl

# Class SetRPUIInformation

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.profile.action.AbstractProfileAction
org.opensaml.profile.action.AbstractConditionalProfileAction
net.shibboleth.idp.profile.AbstractProfileAction
net.shibboleth.idp.ui.impl.SetRPUIInformation

All Implemented Interfaces:
  `Component`, `DestructableComponent`, `InitializableComponent`, `ProfileAction`, `Aware`, `MessageSource`, `MessageSourceAware`, `Action`

public class SetRPUIInformation extends AbstractProfileAction
Action to populate the `ProfileRequestContext` with a `RelyingPartyUIContext`. The contents are populated by accessing a `SAMLMetadataContext` via lookup function and using it to copy data over to the UI context.

Event:
  `EventIds.PROCEED_EVENT_ID`, `EventIds.INVALID_PROFILE_CTX`
Postcondition:
  If a lookup function returns a SAMLMetadataContext, then a RelyingPartyUIContext is created and data copied into it.

## Field Summary

Fields
Modifier and Type
Field
Description
`private AttributeConsumingService`
`acsDesriptor`
The ACS context.
`private EntityDescriptor`
`entityDescriptor`
The `EntityDescriptor`.
`private List<String>`
`fallbackLanguages`
The system wide languages to inspect if there is no match between metadata and browser.
`private final org.slf4j.Logger`
`log`
Class logger.
`private Function<ProfileRequestContext,SAMLMetadataContext>`
`metadataContextLookupStrategy`
Strategy function for access to `SAMLMetadataContext`.
`private Function<ProfileRequestContext,RelyingPartyUIContext>`
`rpUIContextCreateStrategy`
Strategy function to create the `RelyingPartyUIContext`.
`private SPSSODescriptor`
`spSSODescriptor`
The `SPSSODescriptor`.

## Constructor Summary

Constructors
Constructor
Description
`SetRPUIInformation()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doExecute(ProfileRequestContext profileRequestContext)`
`protected boolean`
`doPreExecute(ProfileRequestContext profileRequestContext)`
`Function<ProfileRequestContext,SAMLMetadataContext>`
`getMetadataContextLookupStrategy()`
Get the mechanism to go from the `ProfileRequestContext` to the `SAMLMetadataContext`.
`Function<ProfileRequestContext,RelyingPartyUIContext>`
`getRPUIContextCreateStrategy()`
Get the mechanism to create/get the `RelyingPartyUIContext` from the `ProfileRequestContext`.
`protected UIInfo`
`getRPUInfo()`
Get the RP `UIInfo`, caching the value and consulting if needed.
`void`
`setFallbackLanguages(List<String> langs)`
Set the system wide default languages.
`void`
`setMetadataContextLookupStrategy(Function<ProfileRequestContext,SAMLMetadataContext> strgy)`
Set the mechanism to go from the `ProfileRequestContext` to the `SAMLMetadataContext`.
`void`
`setRPUIContextCreateStrategy(Function<ProfileRequestContext,RelyingPartyUIContext> strategy)`
Set the mechanism to create/get the `RelyingPartyUIContext` from the `ProfileRequestContext`.

### Methods inherited from class net.shibboleth.idp.profile.AbstractProfileAction

`doExecute, execute, getBean, getBean, getMessage, getMessage, getMessage, getParameter, getParameter, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategy`

### Methods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction

`getActivationCondition, setActivationCondition`

### Methods inherited from class org.opensaml.profile.action.AbstractProfileAction

`doPostExecute, doPostExecute, ensureHttpServletRequest, ensureHttpServletResponse, execute, getHttpServletRequest, getHttpServletRequestSupplier, getHttpServletResponse, getHttpServletResponseSupplier, getLogPrefix, isPreExecuteCalled, setHttpServletRequestSupplier, setHttpServletResponseSupplier`

### Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

`checkComponentActive, checkSetterPreconditions, destroy, doDestroy, doInitialize, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitialized`

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

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

### Methods inherited from interface net.shibboleth.shared.component.InitializableComponent

`initialize, isInitialized`

## Field Details

### log

@Nonnull private final org.slf4j.Logger log
Class logger.

### metadataContextLookupStrategy

@Nonnull private Function<ProfileRequestContext,SAMLMetadataContext> metadataContextLookupStrategy
Strategy function for access to `SAMLMetadataContext`.

### rpUIContextCreateStrategy

@Nonnull private Function<ProfileRequestContext,RelyingPartyUIContext> rpUIContextCreateStrategy
Strategy function to create the `RelyingPartyUIContext`.

### fallbackLanguages

@Nullable private List<String> fallbackLanguages
The system wide languages to inspect if there is no match between metadata and browser.

### entityDescriptor

@NonnullBeforeExec private EntityDescriptor entityDescriptor
The `EntityDescriptor`. If we cannot find this we short cut the `doExecute(ProfileRequestContext)` stage.

### spSSODescriptor

@Nullable private SPSSODescriptor spSSODescriptor
The `SPSSODescriptor`. Not finding this is not fatal

### acsDesriptor

@Nullable private AttributeConsumingService acsDesriptor
The ACS context.

## Constructor Details

### SetRPUIInformation

public SetRPUIInformation()
Constructor.

## Method Details

### getMetadataContextLookupStrategy

@Nonnull public Function<ProfileRequestContext,SAMLMetadataContext> getMetadataContextLookupStrategy()
Get the mechanism to go from the `ProfileRequestContext` to the `SAMLMetadataContext`.

Returns:
  lookup strategy

### setMetadataContextLookupStrategy

public void setMetadataContextLookupStrategy(@Nonnull Function<ProfileRequestContext,SAMLMetadataContext> strgy)
Set the mechanism to go from the `ProfileRequestContext` to the `SAMLMetadataContext`.

Parameters:
  `strgy` - what to set.

### getRPUIContextCreateStrategy

public Function<ProfileRequestContext,RelyingPartyUIContext> getRPUIContextCreateStrategy()
Get the mechanism to create/get the `RelyingPartyUIContext` from the `ProfileRequestContext`.

Returns:
  lookup/creation strategy

### setRPUIContextCreateStrategy

public void setRPUIContextCreateStrategy(@Nonnull Function<ProfileRequestContext,RelyingPartyUIContext> strategy)
Set the mechanism to create/get the `RelyingPartyUIContext` from the `ProfileRequestContext`.

Parameters:
  `strategy` - what to set.

### setFallbackLanguages

public void setFallbackLanguages(@Nonnull List<String> langs)
Set the system wide default languages.

Parameters:
  `langs` - a semi-colon separated string.

### getRPUInfo

@Nullable protected UIInfo getRPUInfo()
Get the RP `UIInfo`, caching the value and consulting if needed.

Returns:
  the value or null if there is none.

### doPreExecute

protected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext)

Overrides:
  `doPreExecute` in class `AbstractConditionalProfileAction`

### doExecute

protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext)

Overrides:
  `doExecute` in class `AbstractProfileAction`