Package net.shibboleth.profile.module
Class AbstractModule
java.lang.Object
net.shibboleth.profile.module.AbstractModule
- All Implemented Interfaces:
Module,Component,IdentifiedComponent
- Direct Known Subclasses:
PropertyDrivenModule
Module base class implementing basic file management.- Since:
- 9.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classModels a specific resource managed by a module.Nested classes/interfaces inherited from interface net.shibboleth.profile.module.Module
Module.ModuleResource, Module.ResourceResult -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringVersion-aware extension for new files added.private org.slf4j.LoggerClass logger.private Collection<Module.ModuleResource>Module resources. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondisable(ModuleContext moduleContext, boolean clean) Disable the module.enable(ModuleContext moduleContext) Enable the module.booleanGets resources managed by this module.inthashCode()booleanisEnabled(ModuleContext moduleContext) Gets whether the module is enabled.voidsetResources(Collection<AbstractModule.BasicModuleResource> resources) Sets the module resources to manage.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.IdentifiedComponent
getIdMethods inherited from interface net.shibboleth.profile.module.Module
enable, getDescription, getName, getNewExtension, getOwnerId, getSaveExtension, getURL, isHttpClientRequired
-
Field Details
-
log
@Nonnull private org.slf4j.Logger logClass logger. -
moduleResources
Module resources. -
appNewExt
Version-aware extension for new files added.
-
-
Constructor Details
-
AbstractModule
Constructor.- Parameters:
version- version of the containing application (or null if none available)
-
-
Method Details
-
getResources
Gets resources managed by this module.- Specified by:
getResourcesin interfaceModule- Returns:
- resources managed by this module
-
setResources
Sets the module resources to manage.- Parameters:
resources- resources to manage
-
isEnabled
Gets whether the module is enabled.The status of "enabled" is meant to reflect whether a deployer has previously or implicitly enabled the module, not necessarily whether the module is fully or properly configured or in use.
-
enable
@Nonnull @Unmodifiable @NotLive public Map<Module.ModuleResource,Module.ResourceResult> enable(@Nonnull ModuleContext moduleContext) throws ModuleException Enable the module.This operation MUST be idempotent.
- Specified by:
enablein interfaceModule- Parameters:
moduleContext- module context- Returns:
- summary of resource results
- Throws:
ModuleException- if not successful
-
disable
@Nonnull @Unmodifiable @NotLive public Map<Module.ModuleResource,Module.ResourceResult> disable(@Nonnull ModuleContext moduleContext, boolean clean) throws ModuleException Disable the module.This operation MUST be idempotent with respect to the value of the input parameter.
- Specified by:
disablein interfaceModule- Parameters:
moduleContext- module contextclean- if true, the module should attempt to fully remove traces of previous use in a potentially destructive fashion- Returns:
- summary of resource results
- Throws:
ModuleException- if not successful
-
equals
-
hashCode
public int hashCode() -
toString
-