Package org.silverpeas.core.web.mvc.util
Class WysiwygEditorConfigRegistry
- java.lang.Object
-
- org.silverpeas.core.web.mvc.util.WysiwygEditorConfigRegistry
-
@Singleton public class WysiwygEditorConfigRegistry extends Object
A registry of configurations of the WYSIWYG editor per Silverpeas components. Each Silverpeas components has its own configuration of the WYSIWYG editor and this registry is a way to gather them in a single place in order to retrieve them later in any layer.- Author:
- mmoquillon
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
WysiwygEditorConfigRegistry()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static WysiwygEditorConfigRegistry
get()
WysiwygEditorConfig
get(String componentName)
Gets the WYSIWYG editor configuration registered for the specified component.void
register(String componentName, WysiwygEditorConfig config)
Register for the specified component a specific configuration of the WYSIWYG editor.
-
-
-
Method Detail
-
get
public static WysiwygEditorConfigRegistry get()
-
register
public void register(String componentName, WysiwygEditorConfig config)
Register for the specified component a specific configuration of the WYSIWYG editor.- Parameters:
componentName
- the name of the component. It can be a personal or a multi-user application.config
- the WYSIWYG editor configuration to register.
-
get
public WysiwygEditorConfig get(String componentName)
Gets the WYSIWYG editor configuration registered for the specified component. It no particular configuration was registered for the given component, then a default configuration is returned.- Parameters:
componentName
- the name of the component for which the WYSIWYG editor configuration is asked.- Returns:
- either the peculiar configuration for the specified component or the default WYSIWYG editor configuration.
-
-