com.day.cq.wcm.api.components
Interface ComponentEditConfig

All Known Subinterfaces:
EditConfig
All Known Implementing Classes:
ComponentEditConfigImpl, DefaultDesignEditConfig, DefaultEditConfig, EditConfigImpl

public interface ComponentEditConfig

Defines the edit control configuration. A JSON serialized form needs to be written to the response when drawing the 'edit control'.


Method Summary
 DialogMode getDialogMode()
          Returns the display mode of the dialog
 Map<String,DropTarget> getDropTargets()
          Returns a unmodifiable map of configurations of drop targets.
 String getEmptyText()
          Gets the text to be displayed when isEmpty() is true.
 Map<String,String> getFormParameters()
          Returns an unmodifiable map for additional form parameters to be included in the dialog.
 String getInsertBehavior()
          Returns the insert behavior or null of not defined
 EditLayout getLayout()
          Returns the edit layout for the edit control widget.
 Map<String,String> getListeners()
          Returns an unmodifiable map of edit listeners.
 Toolbar getToolbar()
          Returns the (unmodifiable) toolbar for the editbar/menu.
 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.
 Boolean isOrderable()
          Returns if the edited component is orderable.
 void write(org.apache.sling.commons.json.io.JSONWriter out)
          Serializes this descriptor to json
 

Method Detail

isDefault

boolean isDefault()
Checks if this config has all default values in respect to the default values of the widgets. If true the edit config does not need to be submitted to the client.

Returns:
true if default

getLayout

EditLayout getLayout()
Returns the edit layout for the edit control widget.

Returns:
the edit layout for the edit control widget.

getDropTargets

Map<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.

getInsertBehavior

String getInsertBehavior()
Returns the insert behavior or null of not defined

Returns:
insert behavior or null

isEmpty

boolean isEmpty()
Returns the empty flag. Indicates if the respective component has no visual content and a placeholder text should be rendered.

Returns:
true if a placeholder text should be rendered

getEmptyText

String getEmptyText()
Gets the text to be displayed when isEmpty() is true. Returns null if the default text is displayed.

Returns:
the empty text or null

isOrderable

Boolean isOrderable()
Returns if the edited component is orderable.

Returns:
true if the component is orderable or null if the behavior is defined by the widgets.

getToolbar

Toolbar getToolbar()
Returns the (unmodifiable) toolbar for the editbar/menu.

Returns:
toolbar

getFormParameters

Map<String,String> getFormParameters()
Returns an unmodifiable map for additional form parameters to be included in the dialog.

Returns:
map of additional form parameters

write

void write(org.apache.sling.commons.json.io.JSONWriter out)
           throws org.apache.sling.commons.json.JSONException
Serializes this descriptor to json

Parameters:
out - json writer
Throws:
org.apache.sling.commons.json.JSONException - if a JSON error occurs

getListeners

Map<String,String> getListeners()
Returns an unmodifiable map of edit listeners.

Returns:
map of edit listeners


Copyright © 2008 Day Management AG. All Rights Reserved.