Class ReloadMetadata
- All Implemented Interfaces:
Component
,DestructableComponent
,InitializableComponent
,ProfileAction
,Aware
,MessageSource
,MessageSourceAware
,Action
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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
Identifies bean to refresh.private final org.slf4j.Logger
Class logger.private ReloadableService<MetadataResolver>
The service that contains the metadata.static final String
Flow variable indicating ID of metadata provider bean to reload. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
doExecute
(ProfileRequestContext profileRequestContext) protected void
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
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, execute, getHttpServletRequest, getHttpServletRequestSupplier, getHttpServletResponse, getHttpServletResponseSupplier, getLogPrefix, setHttpServletRequest, setHttpServletRequestSupplier, setHttpServletResponse, setHttpServletResponseSupplier
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 Details
-
RESOLVER_ID
Flow variable indicating ID of metadata provider bean to reload.- See Also:
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
metadataResolverService
The service that contains the metadata. -
id
Identifies bean to refresh.
-
-
Constructor Details
-
ReloadMetadata
public ReloadMetadata()
-
-
Method Details
-
setMetadataResolver
Set the service that describes the metadata.- Parameters:
service
- what to set.
-
doInitialize
- Overrides:
doInitialize
in classAbstractInitializableComponent
- Throws:
ComponentInitializationException
-
doPreExecute
- Overrides:
doPreExecute
in classAbstractConditionalProfileAction
-
findProvider
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
- Overrides:
doExecute
in classAbstractProfileAction
-