Package com.day.cq.wcm.api.components
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 Summary
Fields Modifier and Type Field Description static java.lang.String
LISTENER_AFTERCREATE
Name of the edit listener that is invoked after a new component was created.static java.lang.String
LISTENER_AFTERDELETE
Name of the edit listener that is invoked after a component was deleted.static java.lang.String
LISTENER_AFTEREDIT
Name of the edit listener that is invoked after a component was edited (and modified).static java.lang.String
LISTENER_AFTERINSERT
Name of the edit listener that is invoked after a component was inserted in this container component.static java.lang.String
LISTENER_AFTERMOVE
Name of the edit listener that is invoked after a component was moved within this container component.static java.lang.String
LISTENER_AFTERREMOVE
Name of the edit listener that is invoked after a component was removed from this container component.static java.lang.String
REFRESH_PAGE
Predefined key for the 'CQ.wcm.EditBase.refreshPage' listener.static java.lang.String
REFRESH_PARENT
Predefined key for the 'CQ.wcm.EditBase.refreshParent' listener.static java.lang.String
REFRESH_SELF
Predefined key for the 'CQ.wcm.EditBase.refreshSelf' listener.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Map<java.lang.String,DropTarget>
getDropTargets()
Returns amap of configurations of drop targets.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 a modifiable map for additional form parameters to be included in the dialog.java.util.Map<java.lang.String,java.lang.String>
getListeners()
Returns a modifiable map of edit listenersToolbar
getToolbar()
Returns the (modifiable) toolbar for the editbar/menu.void
setDeepCancel(java.lang.Boolean deepCancel)
Sets if cancelling inheritance of the component sets the cq:isCancelledForChildren flag or not.void
setDialogMode(DialogMode mode)
Sets the dialog modevoid
setEmpty(boolean empty)
Sets theempty
flag.void
setEmptyText(java.lang.String text)
Sets the text to be displayed whenComponentEditConfig.isEmpty()
istrue
.void
setInplaceEditingConfig(InplaceEditingConfig inplaceEditingConfig)
Sets the inplace editing configuration.void
setInsertBehavior(java.lang.String behavior)
Sets the insert behaviorvoid
setLayout(EditLayout layout)
Sets the edit layout for the edit control widget.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.void
setOrderable(java.lang.Boolean orderable)
Sets if the edited component is orderable.-
Methods inherited from interface com.day.cq.wcm.api.components.ComponentEditConfig
getDialogMode, getEmptyText, getInplaceEditingConfig, getInsertBehavior, getLayout, getLiveRelationship, isDeepCancel, isDefault, isEmpty, isOrderable, isTargetingDisabled
-
-
-
-
Field Detail
-
LISTENER_AFTERCREATE
static final java.lang.String LISTENER_AFTERCREATE
Name of the edit listener that is invoked after a new component was created.- See Also:
getListeners()
, Constant Field Values
-
LISTENER_AFTEREDIT
static final java.lang.String LISTENER_AFTEREDIT
Name of the edit listener that is invoked after a component was edited (and modified).- See Also:
getListeners()
, Constant Field Values
-
LISTENER_AFTERDELETE
static final java.lang.String LISTENER_AFTERDELETE
Name of the edit listener that is invoked after a component was deleted.- See Also:
getListeners()
, Constant Field Values
-
LISTENER_AFTERINSERT
static final java.lang.String LISTENER_AFTERINSERT
Name of the edit listener that is invoked after a component was inserted in this container component.- See Also:
getListeners()
, Constant Field Values
-
LISTENER_AFTERREMOVE
static final java.lang.String LISTENER_AFTERREMOVE
Name of the edit listener that is invoked after a component was removed from this container component.- See Also:
getListeners()
, Constant Field Values
-
LISTENER_AFTERMOVE
static final java.lang.String LISTENER_AFTERMOVE
Name of the edit listener that is invoked after a component was moved within this container component.- See Also:
getListeners()
, Constant Field Values
-
REFRESH_PAGE
static final java.lang.String REFRESH_PAGE
Predefined key for the 'CQ.wcm.EditBase.refreshPage' listener.- See Also:
getListeners()
, Constant Field Values
-
REFRESH_SELF
static final java.lang.String REFRESH_SELF
Predefined key for the 'CQ.wcm.EditBase.refreshSelf' listener.- See Also:
getListeners()
, Constant Field Values
-
REFRESH_PARENT
static final java.lang.String REFRESH_PARENT
Predefined key for the 'CQ.wcm.EditBase.refreshParent' listener.- See Also:
getListeners()
, Constant Field Values
-
-
Method Detail
-
setLayout
void setLayout(EditLayout layout)
Sets the edit layout for the edit control widget.- Parameters:
layout
- edit layout
-
getDropTargets
java.util.Map<java.lang.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 interfaceComponentEditConfig
- 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(java.lang.String behavior)
Sets the insert behavior- Parameters:
behavior
- the behavior
-
setEmpty
void setEmpty(boolean empty)
Sets theempty
flag. Iftrue
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(java.lang.String text)
Sets the text to be displayed whenComponentEditConfig.isEmpty()
istrue
. Iftext
isnull
then the default text is displayed.- Parameters:
text
- the text ornull
-
setOrderable
void setOrderable(java.lang.Boolean orderable)
Sets if the edited component is orderable.- Parameters:
orderable
-true
to enable ordering ornull
if the behavior is defined by the widgets.
-
getToolbar
Toolbar getToolbar()
Returns the (modifiable) toolbar for the editbar/menu.- Specified by:
getToolbar
in interfaceComponentEditConfig
- Returns:
- toolbar
-
getFormParameters
java.util.Map<java.lang.String,java.lang.String> getFormParameters()
Returns a modifiable map for additional form parameters to be included in the dialog.- Specified by:
getFormParameters
in interfaceComponentEditConfig
- 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.- Specified by:
getFormParameterMap
in interfaceComponentEditConfig
- Returns:
- map of additional form parameters
-
getListeners
java.util.Map<java.lang.String,java.lang.String> getListeners()
Returns a modifiable map of edit listeners- Specified by:
getListeners
in interfaceComponentEditConfig
- 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(java.lang.Boolean deepCancel)
Sets if cancelling inheritance of the component sets the cq:isCancelledForChildren flag or not.- Parameters:
deepCancel
-true
if cancel sets the flag ornull
if cancel does not set the flag.
-
-