
com.day.cq.wcm.api.components.ComponentEditConfig Maven / Gradle / Ivy
/*
* Copyright 1997-2008 Day Management AG
* Barfuesserplatz 6, 4001 Basel, Switzerland
* All Rights Reserved.
*
* This software is the confidential and proprietary information of
* Day Management AG, ("Confidential Information"). You shall not
* disclose such Confidential Information and shall use it only in
* accordance with the terms of the license agreement you entered into
* with Day.
*/
package com.day.cq.wcm.api.components;
import java.util.Map;
import com.day.cq.commons.JSONItem;
/**
* Defines the edit control configuration. A JSON serialized form needs to be
* written to the response when drawing the 'edit control'.
*/
public interface ComponentEditConfig extends JSONItem {
/**
* 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.
* @return true
if default
*/
boolean isDefault();
/**
* Returns the edit layout for the edit control widget.
* @return the edit layout for the edit control widget.
*/
EditLayout getLayout();
/**
* Returns a unmodifiable map of configurations of drop targets.
* the keys are the ids of the configs.
*
* @return map of drop target configurations.
*/
Map getDropTargets();
/**
* Returns the display mode of the dialog
* @return the dialog mode.
*/
DialogMode getDialogMode();
/**
* Returns the configuration for inplace editing of this configuration.
* @return The inplace editing config; null
if there is no inplace editing
* config (which means that no inplace editing is available for the component)
* @since 5.3
*/
InplaceEditingConfig getInplaceEditingConfig();
/**
* Returns the insert behavior or null
of not defined
* @return insert behavior or null
*/
String getInsertBehavior();
/**
* Returns the empty
flag. Indicates if the respective
* component has no visual content and a placeholder text should be
* rendered.
*
* @return true
if a placeholder text should be rendered
*/
boolean isEmpty();
/**
* Gets the text to be displayed when {@link #isEmpty()} is true
.
* Returns null
if the default text is displayed.
*
* @return the empty text or null
*/
String getEmptyText();
/**
* Returns if the edited component is orderable.
*
* @return true
if the component is orderable or null
* if the behavior is defined by the widgets.
*/
Boolean isOrderable();
/**
* Returns the (unmodifiable) toolbar for the editbar/menu.
* @return toolbar
*/
Toolbar getToolbar();
/**
* Returns an unmodifiable map for additional form parameters to be included
* in the dialog.
* @return map of additional form parameters
*/
Map getFormParameters();
/**
* Returns the additional form parameters to be included in the dialog.
* This method allows to use multi value properties for form parameters.
* @return map of additional form parameters
*/
Map getFormParameterMap();
/**
* Returns an unmodifiable map of edit listeners.
* @return map of edit listeners
*/
Map getListeners();
/**
* 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.
* @return the computed live relationship. null
otherwise
*/
JSONItem getLiveRelationship();
/**
* Returns if cancelling inheritance of the component sets the cq:isCancelledForChildren flag or not.
*
* @return true
if cancel sets the flag or null
* if cancel does not set the flag.
*/
Boolean isDeepCancel();
/**
* Returns if targeting is disabled for this component.
*
* @return true
if targeting is disabled, false
if targeting is allowed
*/
boolean isTargetingDisabled();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy