public class CustomEditConfig extends java.lang.Object implements EditConfig
LISTENER_AFTERCREATE, LISTENER_AFTERDELETE, LISTENER_AFTEREDIT, LISTENER_AFTERINSERT, LISTENER_AFTERMOVE, LISTENER_AFTERREMOVE, REFRESH_PAGE, REFRESH_PARENT, REFRESH_SELF
Constructor and Description |
---|
CustomEditConfig(ComponentEditConfig cfg) |
Modifier and Type | Method and Description |
---|---|
void |
drawEditing(java.io.PrintWriter out,
java.lang.String contentPath,
java.lang.String resourceType,
java.lang.String dlgPath,
Cell cell,
boolean isContainer) |
DialogMode |
getDialogMode()
Returns the display mode of the dialog
|
java.util.Map<java.lang.String,DropTarget> |
getDropTargets()
Returns amap of configurations of drop targets.
|
java.lang.String |
getEmptyText()
Gets the text to be displayed when
ComponentEditConfig.isEmpty() is true . |
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.
|
InplaceEditingConfig |
getInplaceEditingConfig()
Returns the configuration for inplace editing of this configuration.
|
java.lang.String |
getInsertBehavior()
Returns the insert behavior or
null of not defined |
EditLayout |
getLayout()
Returns the edit layout for the edit control widget.
|
java.util.Map<java.lang.String,java.lang.String> |
getListeners()
Returns a modifiable map of edit listeners
|
JSONItem |
getLiveRelationship()
Returns the component live relationship.
|
Toolbar |
getToolbar()
Returns the (modifiable) toolbar for the editbar/menu.
|
java.lang.Boolean |
isDeepCancel()
Returns if cancelling inheritance of the component sets the cq:isCancelledForChildren flag or not.
|
boolean |
isDefault()
Checks if this config has all default values in respect to the default
values of the widgets.
|
boolean |
isEmpty()
Returns the
empty flag. |
java.lang.Boolean |
isOrderable()
Returns if the edited component is orderable.
|
boolean |
isTargetingDisabled()
Returns if targeting is disabled for this component.
|
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 mode
|
void |
setEmpty(boolean empty)
Sets the
empty flag. |
void |
setEmptyText(java.lang.String emptyText)
Sets the text to be displayed when
ComponentEditConfig.isEmpty() is true . |
void |
setInplaceEditingConfig(InplaceEditingConfig inplaceEditingConfig)
Sets the inplace editing configuration.
|
void |
setInsertBehavior(java.lang.String insertBehavior)
Sets the insert behavior
|
void |
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.
|
void |
write(JSONWriter out)
Serializes this descriptor to json
|
public CustomEditConfig(ComponentEditConfig cfg)
public void drawEditing(java.io.PrintWriter out, java.lang.String contentPath, java.lang.String resourceType, java.lang.String dlgPath, Cell cell, boolean isContainer) throws java.io.IOException
java.io.IOException
public void setLayout(EditLayout layout)
EditConfig
setLayout
in interface EditConfig
layout
- edit layoutpublic void setInsertBehavior(java.lang.String insertBehavior)
EditConfig
setInsertBehavior
in interface EditConfig
insertBehavior
- the behaviorpublic void setDialogMode(DialogMode mode)
EditConfig
setDialogMode
in interface EditConfig
mode
- the modepublic void setInplaceEditingConfig(InplaceEditingConfig inplaceEditingConfig)
EditConfig
setInplaceEditingConfig
in interface EditConfig
inplaceEditingConfig
- The inplace editing configurationpublic void setEmpty(boolean empty)
EditConfig
empty
flag. If true
this indicates
that the component has not visual content and a placeholder text should
be rendered.setEmpty
in interface EditConfig
empty
- true
if a placeholder text should be rendered.public void setEmptyText(java.lang.String emptyText)
EditConfig
ComponentEditConfig.isEmpty()
is true
.
If text
is null
then the default text is displayed.setEmptyText
in interface EditConfig
emptyText
- the text or null
public void setOrderable(java.lang.Boolean orderable)
EditConfig
setOrderable
in interface EditConfig
orderable
- true
to enable ordering or null
if the behavior is defined by the widgets.public void setDeepCancel(java.lang.Boolean deepCancel)
EditConfig
setDeepCancel
in interface EditConfig
deepCancel
- true
if cancel sets the flag or null
if cancel does not set the flag.public void setLiveRelationship(JSONItem liveRelationship)
EditConfig
setLiveRelationship
in interface EditConfig
liveRelationship
- the relationship to setpublic boolean isDefault()
ComponentEditConfig
true
the edit config does not
need to be submitted to the client.isDefault
in interface ComponentEditConfig
true
if defaultpublic EditLayout getLayout()
ComponentEditConfig
getLayout
in interface ComponentEditConfig
public java.util.Map<java.lang.String,DropTarget> getDropTargets()
EditConfig
getDropTargets
in interface ComponentEditConfig
getDropTargets
in interface EditConfig
public java.lang.String getInsertBehavior()
ComponentEditConfig
null
of not definedgetInsertBehavior
in interface ComponentEditConfig
null
public Toolbar getToolbar()
EditConfig
getToolbar
in interface ComponentEditConfig
getToolbar
in interface EditConfig
public DialogMode getDialogMode()
ComponentEditConfig
getDialogMode
in interface ComponentEditConfig
public InplaceEditingConfig getInplaceEditingConfig()
ComponentEditConfig
getInplaceEditingConfig
in interface ComponentEditConfig
null
if there is no inplace editing
config (which means that no inplace editing is available for the component)public boolean isEmpty()
ComponentEditConfig
empty
flag. Indicates if the respective
component has no visual content and a placeholder text should be
rendered.isEmpty
in interface ComponentEditConfig
true
if a placeholder text should be renderedpublic java.lang.String getEmptyText()
ComponentEditConfig
ComponentEditConfig.isEmpty()
is true
.
Returns null
if the default text is displayed.getEmptyText
in interface ComponentEditConfig
null
public java.lang.Boolean isOrderable()
ComponentEditConfig
isOrderable
in interface ComponentEditConfig
true
if the component is orderable or null
if the behavior is defined by the widgets.public java.util.Map<java.lang.String,java.lang.String> getFormParameters()
EditConfig
getFormParameters
in interface ComponentEditConfig
getFormParameters
in interface EditConfig
public java.util.Map<java.lang.String,java.lang.String> getListeners()
EditConfig
getListeners
in interface ComponentEditConfig
getListeners
in interface EditConfig
public JSONItem getLiveRelationship()
ComponentEditConfig
getLiveRelationship
in interface ComponentEditConfig
null
otherwisepublic java.lang.Boolean isDeepCancel()
ComponentEditConfig
isDeepCancel
in interface ComponentEditConfig
true
if cancel sets the flag or null
if cancel does not set the flag.public boolean isTargetingDisabled()
ComponentEditConfig
isTargetingDisabled
in interface ComponentEditConfig
true
if targeting is disabled, false
if targeting is allowedpublic void write(JSONWriter out) throws JSONException
JSONItem
write
in interface JSONItem
out
- json writerJSONException
- if a JSON error occurspublic java.util.Map<java.lang.String,java.lang.Object> getFormParameterMap()
EditConfig
getFormParameterMap
in interface ComponentEditConfig
getFormParameterMap
in interface EditConfig
Copyright © 2010 - 2020 Adobe. All Rights Reserved