Interface EditConfig

All Superinterfaces:
ComponentEditConfig, JSONItem
All Known Implementing Classes:
CustomEditConfig

public interface EditConfig extends ComponentEditConfig
Defines the edit control configuration. A JSON serialized form needs to be written to the response when drawing the 'edit control'. Note that modifications to the config are never persisted and applied to the final, merged config. Be aware when modifying a parent config that the changes can propagate to the successive children.
  • Field Details

  • Method Details

    • setLayout

      void setLayout(EditLayout layout)
      Sets the edit layout for the edit control widget.
      Parameters:
      layout - edit layout
    • getDropTargets

      Map<String,DropTarget> getDropTargets()
      Returns amap of configurations of drop targets. the keys are the ids of the configs. Note that the map is modifiable and can be used to extend the drop targets dynamically.
      Specified by:
      getDropTargets in interface ComponentEditConfig
      Returns:
      map of drop target configurations.
    • setDialogMode

      void setDialogMode(DialogMode mode)
      Sets the dialog mode
      Parameters:
      mode - the mode
    • setInplaceEditingConfig

      void setInplaceEditingConfig(InplaceEditingConfig inplaceEditingConfig)
      Sets the inplace editing configuration.
      Parameters:
      inplaceEditingConfig - The inplace editing configuration
      Since:
      5.3
    • setInsertBehavior

      void setInsertBehavior(String behavior)
      Sets the insert behavior
      Parameters:
      behavior - the behavior
    • setEmpty

      void setEmpty(boolean empty)
      Sets the empty flag. If true this indicates that the component has not visual content and a placeholder text should be rendered.
      Parameters:
      empty - true if a placeholder text should be rendered.
    • setEmptyText

      void setEmptyText(String text)
      Sets the text to be displayed when ComponentEditConfig.isEmpty() is true. If text is null then the default text is displayed.
      Parameters:
      text - the text or null
    • setOrderable

      void setOrderable(Boolean orderable)
      Sets if the edited component is orderable.
      Parameters:
      orderable - true to enable ordering or null if the behavior is defined by the widgets.
    • getToolbar

      Toolbar getToolbar()
      Returns the (modifiable) toolbar for the editbar/menu.
      Specified by:
      getToolbar in interface ComponentEditConfig
      Returns:
      toolbar
    • getFormParameters

      Map<String,String> getFormParameters()
      Returns a modifiable map for additional form parameters to be included in the dialog.
      Specified by:
      getFormParameters in interface ComponentEditConfig
      Returns:
      map of additional form parameters
    • getFormParameterMap

      Map<String,Object> getFormParameterMap()
      Returns the additional form parameters to be included in the dialog. This method allows to use multi value properties for form parameters.
      Specified by:
      getFormParameterMap in interface ComponentEditConfig
      Returns:
      map of additional form parameters
    • getListeners

      Map<String,String> getListeners()
      Returns a modifiable map of edit listeners
      Specified by:
      getListeners in interface ComponentEditConfig
      Returns:
      map of edit listeners
    • setLiveRelationship

      void setLiveRelationship(JSONItem liveRelationship)
      Set the computed live relationship of the component TODO seems like we are only considering this as an additional JSONItem to render - if that's confirmed we might rename this method.
      Parameters:
      liveRelationship - the relationship to set
    • setDeepCancel

      void setDeepCancel(Boolean deepCancel)
      Sets if cancelling inheritance of the component sets the cq:isCancelledForChildren flag or not.
      Parameters:
      deepCancel - true if cancel sets the flag or null if cancel does not set the flag.