Class ReloadMetadata
-
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
public class ReloadMetadata extends AbstractProfileAction
Action that refreshes or clears aMetadataResolvermanually.The
MetadataResolverto reload is indicated by supplyingRESOLVER_IDas 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.
-
-
Field Summary
Fields Modifier and Type Field Description private StringidIdentifies bean to refresh.private org.slf4j.LoggerlogClass logger.private ReloadableService<MetadataResolver>metadataResolverServiceThe service that contains the metadata.static StringRESOLVER_IDFlow variable indicating ID of metadata provider bean to reload.
-
Constructor Summary
Constructors Constructor Description ReloadMetadata()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoExecute(ProfileRequestContext profileRequestContext)protected voiddoInitialize()protected booleandoPreExecute(ProfileRequestContext profileRequestContext)private MetadataResolverfindProvider(MetadataResolver rootResolver)Iterate over all providers to find the one with the name, recursing into chaining providers.voidsetMetadataResolver(ReloadableService<MetadataResolver> service)Set the service that describes the metadata.-
Methods inherited from class net.shibboleth.idp.profile.AbstractProfileAction
doExecute, execute, getMessage, getMessage, getMessage, 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, execute, getHttpServletRequest, getHttpServletResponse, getLogPrefix, setHttpServletRequest, setHttpServletResponse
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, 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.utilities.java.support.component.InitializableComponent
initialize, isInitialized
-
-
-
-
Field Detail
-
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
@Nullable private String id
Identifies bean to refresh.
-
-
Method Detail
-
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:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
doPreExecute
protected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext)- Overrides:
doPreExecutein classAbstractConditionalProfileAction
-
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:
doExecutein classAbstractProfileAction
-
-