Class DefaultEditorWrappingUtils

    • Constructor Detail

      • DefaultEditorWrappingUtils

        public DefaultEditorWrappingUtils()
    • Method Detail

      • createWrappedEditor

        public EditorBuilder createWrappedEditor​(java.util.Collection<Parameter> parameters,
                                                 DataType valueType,
                                                 java.lang.String editorDefinitionId,
                                                 WidgetInstanceManager widgetInstanceManager)
        Description copied from interface: EditorWrappingUtils
        Creates an editor component for specified definition identity. An editor is potentially wrapped (depending on i.e. widget settings).
        Specified by:
        createWrappedEditor in interface EditorWrappingUtils
        Parameters:
        parameters - editor parameters
        valueType - type of value that is to be represented by an editor
        editorDefinitionId - editor definition identity (may be null
        widgetInstanceManager - instance manager for a widget that requires editor
        Returns:
        a prepared builder for editor of provided definition id potentially wrapped with different one
      • createWrappedEditor

        public EditorBuilder createWrappedEditor​(java.util.Collection<Parameter> parameters,
                                                 java.lang.String editorDefinitionId,
                                                 DataAttribute dataAttribute,
                                                 WidgetInstanceManager widgetInstanceManager,
                                                 java.lang.String itemPath)
        Description copied from interface: EditorWrappingUtils
        Creates an editor component for specified definition identity bound to specified data attribute. An editor is potentially wrapped (depending on i.e. widget settings)
        Specified by:
        createWrappedEditor in interface EditorWrappingUtils
        Parameters:
        parameters - editor parameters
        editorDefinitionId - editor definition identity (may be null
        dataAttribute - an attribute that editor is representing
        widgetInstanceManager - instance manager for a widget that requires editor
        itemPath - specifies a path in widgets model to an item, which attribute is to be represented by editor
        Returns:
        a prepared builder for editor of provided definition id potentially wrapped with different one
      • createWrappedEditor

        public EditorBuilder createWrappedEditor​(java.util.Collection<Parameter> parameters,
                                                 java.lang.String editorDefinitionId,
                                                 WidgetInstanceManager widgetInstanceManager)
        Description copied from interface: EditorWrappingUtils
        Creates an editor component for specified definition identity. An editor is potentially wrapped (depending on i.e. widget settings).
        Specified by:
        createWrappedEditor in interface EditorWrappingUtils
        Parameters:
        parameters - editor parameters
        editorDefinitionId - editor definition identity (may be null
        widgetInstanceManager - instance manager for a widget that requires editor
        Returns:
        a prepared builder for editor of provided definition id potentially wrapped with different one
      • wrapEditorIfNecessary

        protected java.lang.String wrapEditorIfNecessary​(java.lang.String editor,
                                                         TypedSettingsMap widgetSettings)
      • isEditorWrappingEnabled

        public boolean isEditorWrappingEnabled​(java.lang.String editorDefinitionId,
                                               TypedSettingsMap widgetSettings)
        Description copied from interface: EditorWrappingUtils
        Checks if wrapping is enabled for specified widget. Method should also check, if in case of specified editor definition wrapping is required.
        Specified by:
        isEditorWrappingEnabled in interface EditorWrappingUtils
        Parameters:
        editorDefinitionId - editor definition identity to be potentially wrapped
        widgetSettings - settings of a widget
        Returns:
        true if editor would be wrapped, if requested
      • isEditorEqualToTemplate

        protected boolean isEditorEqualToTemplate​(java.lang.String editorDefinitionId,
                                                  java.lang.String editorTemplateSetting)
      • getWrapperSetting

        protected java.lang.String getWrapperSetting()
      • setWrapperSetting

        public void setWrapperSetting​(java.lang.String wrapperSetting)