Package net.shibboleth.idp.saml.profile.impl

# Class ReloadMetadata

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.saml.profile.impl.ReloadMetadata

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

public class ReloadMetadata extends AbstractProfileAction
Action that refreshes or clears a `MetadataResolver` manually.

The `MetadataResolver` to reload is indicated by supplying `RESOLVER_ID` as a flow variable.

On success, a 200 HTTP status with a simple response body is returned. On failure, a non-successful HTTP status is returned.

Event:
  `EventIds.PROCEED_EVENT_ID`, `EventIds.INVALID_MESSAGE`, `EventIds.INVALID_PROFILE_CTX`, `EventIds.IO_ERROR`

## Field Summary

Fields
Modifier and Type
Field
Description
`private String`
`id`
Identifies bean to refresh.
`private final org.slf4j.Logger`
`log`
Class logger.
`private ReloadableService<MetadataResolver>`
`metadataResolverService`
The service that contains the metadata.
`static final String`
`RESOLVER_ID`
Flow variable indicating ID of metadata provider bean to reload.

## Constructor Summary

Constructors
Constructor
Description
`ReloadMetadata()`

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doExecute(ProfileRequestContext profileRequestContext)`
`protected void`
`doInitialize()`
`protected boolean`
`doPreExecute(ProfileRequestContext profileRequestContext)`
`private MetadataResolver`
`findProvider(MetadataResolver rootResolver)`
Iterate over all providers to find the one with the name, recursing into chaining providers.
`void`
`setMetadataResolver(ReloadableService<MetadataResolver> service)`
Set the service that describes the metadata.

### 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, 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

### RESOLVER_ID

@Nonnull @NotEmpty public static final String RESOLVER_ID
Flow variable indicating ID of metadata provider bean to reload.

See Also:
  - Constant Field Values

### log

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

### metadataResolverService

@NonnullAfterInit private ReloadableService<MetadataResolver> metadataResolverService
The service that contains the metadata.

### id

@NonnullBeforeExec private String id
Identifies bean to refresh.

## Constructor Details

### ReloadMetadata

public ReloadMetadata()

## Method Details

### setMetadataResolver

public void setMetadataResolver(@Nonnull ReloadableService<MetadataResolver> service)
Set the service that describes the metadata.

Parameters:
  `service` - what to set.

### doInitialize

protected void doInitialize() throws ComponentInitializationException

Overrides:
  `doInitialize` in class `AbstractInitializableComponent`
Throws:
  `ComponentInitializationException`

### doPreExecute

protected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext)

Overrides:
  `doPreExecute` in class `AbstractConditionalProfileAction`

### findProvider

@Nullable private MetadataResolver findProvider(MetadataResolver rootResolver)
Iterate over all providers to find the one with the name, recursing into chaining providers.

Parameters:
  `rootResolver` - where to start
Returns:
  the resolver, or null if none found.

### doExecute

protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext)

Overrides:
  `doExecute` in class `AbstractProfileAction`