Package com.day.cq.wcm.api.components
Interface ComponentEditConfig
-
- All Superinterfaces:
JSONItem
- All Known Subinterfaces:
EditConfig
- All Known Implementing Classes:
CustomEditConfig
public interface ComponentEditConfig extends JSONItem
Defines the edit control configuration. A JSON serialized form needs to be written to the response when drawing the 'edit control'.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DialogModegetDialogMode()Returns the display mode of the dialogjava.util.Map<java.lang.String,DropTarget>getDropTargets()Returns a unmodifiable map of configurations of drop targets.java.lang.StringgetEmptyText()Gets the text to be displayed whenisEmpty()istrue.java.util.Map<java.lang.String,java.lang.Object>getFormParameterMap()Returns the additional form parameters to be included in the dialog.java.util.Map<java.lang.String,java.lang.String>getFormParameters()Returns an unmodifiable map for additional form parameters to be included in the dialog.InplaceEditingConfiggetInplaceEditingConfig()Returns the configuration for inplace editing of this configuration.java.lang.StringgetInsertBehavior()Returns the insert behavior ornullof not definedEditLayoutgetLayout()Returns the edit layout for the edit control widget.java.util.Map<java.lang.String,java.lang.String>getListeners()Returns an unmodifiable map of edit listeners.JSONItemgetLiveRelationship()Returns the component live relationship.ToolbargetToolbar()Returns the (unmodifiable) toolbar for the editbar/menu.java.lang.BooleanisDeepCancel()Returns if cancelling inheritance of the component sets the cq:isCancelledForChildren flag or not.booleanisDefault()Checks if this config has all default values in respect to the default values of the widgets.booleanisEmpty()Returns theemptyflag.java.lang.BooleanisOrderable()Returns if the edited component is orderable.booleanisTargetingDisabled()Returns if targeting is disabled for this component.
-
-
-
Method Detail
-
isDefault
boolean isDefault()
Checks if this config has all default values in respect to the default values of the widgets. Iftruethe edit config does not need to be submitted to the client.- Returns:
trueif default
-
getLayout
EditLayout getLayout()
Returns the edit layout for the edit control widget.- Returns:
- the edit layout for the edit control widget.
-
getDropTargets
java.util.Map<java.lang.String,DropTarget> getDropTargets()
Returns a unmodifiable map of configurations of drop targets. the keys are the ids of the configs.- Returns:
- map of drop target configurations.
-
getDialogMode
DialogMode getDialogMode()
Returns the display mode of the dialog- Returns:
- the dialog mode.
-
getInplaceEditingConfig
InplaceEditingConfig getInplaceEditingConfig()
Returns the configuration for inplace editing of this configuration.- Returns:
- The inplace editing config;
nullif there is no inplace editing config (which means that no inplace editing is available for the component) - Since:
- 5.3
-
getInsertBehavior
java.lang.String getInsertBehavior()
Returns the insert behavior ornullof not defined- Returns:
- insert behavior or
null
-
isEmpty
boolean isEmpty()
Returns theemptyflag. Indicates if the respective component has no visual content and a placeholder text should be rendered.- Returns:
trueif a placeholder text should be rendered
-
getEmptyText
java.lang.String getEmptyText()
Gets the text to be displayed whenisEmpty()istrue. Returnsnullif the default text is displayed.- Returns:
- the empty text or
null
-
isOrderable
java.lang.Boolean isOrderable()
Returns if the edited component is orderable.- Returns:
trueif the component is orderable ornullif the behavior is defined by the widgets.
-
getToolbar
Toolbar getToolbar()
Returns the (unmodifiable) toolbar for the editbar/menu.- Returns:
- toolbar
-
getFormParameters
java.util.Map<java.lang.String,java.lang.String> getFormParameters()
Returns an unmodifiable map for additional form parameters to be included in the dialog.- Returns:
- map of additional form parameters
-
getFormParameterMap
java.util.Map<java.lang.String,java.lang.Object> getFormParameterMap()
Returns the additional form parameters to be included in the dialog. This method allows to use multi value properties for form parameters.- Returns:
- map of additional form parameters
-
getListeners
java.util.Map<java.lang.String,java.lang.String> getListeners()
Returns an unmodifiable map of edit listeners.- Returns:
- map of edit listeners
-
getLiveRelationship
JSONItem getLiveRelationship()
Returns the component live relationship. TODO seems like we are only considering this as an additional JSONItem to render - if that's confirmed we might rename this method.- Returns:
- the computed live relationship.
nullotherwise
-
isDeepCancel
java.lang.Boolean isDeepCancel()
Returns if cancelling inheritance of the component sets the cq:isCancelledForChildren flag or not.- Returns:
trueif cancel sets the flag ornullif cancel does not set the flag.
-
isTargetingDisabled
boolean isTargetingDisabled()
Returns if targeting is disabled for this component.- Returns:
trueif targeting is disabled,falseif targeting is allowed
-
-