Package org.forgerock.openig.script
Class DefaultScriptFactoryManager
java.lang.Object
org.forgerock.openig.script.DefaultScriptFactoryManager
- All Implemented Interfaces:
ScriptFactoryManager
Default implementation of
ScriptFactoryManager
supporting dynamic registration
and un-registration of ScriptFactory
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfindScriptFactory
(String mimeType) Finds a factory for the given MIME type.registerFactory
(String mimeType, ScriptFactory factory) Registers a givenmimeType
for the givenScriptFactory
.unregisterFactory
(String mimeType) Un-registers the factory for the givenmimeType
.
-
Constructor Details
-
DefaultScriptFactoryManager
public DefaultScriptFactoryManager()
-
-
Method Details
-
registerFactory
Registers a givenmimeType
for the givenScriptFactory
.- Parameters:
mimeType
- registered MIME typefactory
- factory to use for the given type- Returns:
- the previous registered factory (if any)
-
unregisterFactory
Un-registers the factory for the givenmimeType
.- Parameters:
mimeType
- MIME type to un-register- Returns:
- the removed factory (if any)
-
findScriptFactory
Description copied from interface:ScriptFactoryManager
Finds a factory for the given MIME type.- Specified by:
findScriptFactory
in interfaceScriptFactoryManager
- Parameters:
mimeType
- type value- Returns:
- an empty
Optional
if not factory can be found, otherwise a valuedOptional
wrapping the factory
-