Class CmsWidgetFactoryRegistry

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      I_CmsFormWidget createFormWidget​(java.lang.String key, java.util.Map<java.lang.String,​java.lang.String> widgetParams, com.google.common.base.Optional<java.lang.String> defaultValue)
      Creates a new widget based on a type string and widget parameters.
      static CmsWidgetFactoryRegistry instance()
      Returns the singleton instance of this class.
      void registerFactory​(java.lang.String key, I_CmsFormWidgetFactory factory)
      Registers a new widget factory for a given widget type key.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • createFormWidget

        public I_CmsFormWidget createFormWidget​(java.lang.String key,
                                                java.util.Map<java.lang.String,​java.lang.String> widgetParams,
                                                com.google.common.base.Optional<java.lang.String> defaultValue)
        Creates a new widget based on a type string and widget parameters.

        Specified by:
        createFormWidget in interface I_CmsFormWidgetMultiFactory
        Parameters:
        key - the type string
        widgetParams - the widget configuration parameters
        defaultValue - an optional default value
        Returns:
        the newly created widget
      • registerFactory

        public void registerFactory​(java.lang.String key,
                                    I_CmsFormWidgetFactory factory)
        Registers a new widget factory for a given widget type key.

        Parameters:
        key - the widget type key
        factory - the new factory for the key