Class WidgetTypeConfigurationImpl
- java.lang.Object
-
- org.nuxeo.ecm.platform.forms.layout.api.impl.WidgetTypeConfigurationImpl
-
- All Implemented Interfaces:
Serializable
,WidgetTypeConfiguration
public class WidgetTypeConfigurationImpl extends Object implements WidgetTypeConfiguration
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
acceptingSubWidgets
protected List<String>
categories
protected boolean
complex
protected boolean
containingForm
protected Map<String,Map<String,Serializable>>
defaultControlValues
protected List<FieldDefinition>
defaultFieldDefinitions
protected List<String>
defaultFieldTypes
protected Map<String,Map<String,Serializable>>
defaultPropertyValues
protected String
demoId
protected boolean
demoPreviewEnabled
protected String
deprecatedVersion
protected String
description
protected Map<String,List<LayoutDefinition>>
fieldLayouts
protected boolean
handlingLabels
protected boolean
list
protected Map<String,Serializable>
properties
protected Map<String,List<LayoutDefinition>>
propertyLayouts
protected String
sinceVersion
protected List<String>
supportedControls
protected List<String>
supportedFieldTypes
protected List<String>
supportedModes
protected String
title
-
Constructor Summary
Constructors Constructor Description WidgetTypeConfigurationImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
List<String>
getCategories()
Map<String,Serializable>
getConfProperties()
Returns configuration properties.Serializable
getConfProperty(String propName)
Map<String,Map<String,Serializable>>
getDefaultControlValues()
Map<String,Serializable>
getDefaultControlValues(String mode)
List<FieldDefinition>
getDefaultFieldDefinitions()
List<String>
getDefaultFieldTypes()
Map<String,Map<String,Serializable>>
getDefaultPropertyValues()
Returns the default values for the widget type properties, by mode.Map<String,Serializable>
getDefaultPropertyValues(String mode)
Returns the default values for the widget type properties, for given mode.String
getDemoId()
Returns the identifier to be used for the demo, or null if no demo is available.String
getDeprecatedVersion()
Returns the version name since the widget type has been deprecated (5.4, 5.4.2, etc...)String
getDescription()
Map<String,List<LayoutDefinition>>
getFieldLayouts()
Returns the map of field layouts per mode.List<LayoutDefinition>
getFieldLayouts(String mode, String additionalMode)
Returns the list of layouts for given mode and additional modes.List<LayoutDefinition>
getLayouts(Map<String,List<LayoutDefinition>> allLayouts, String mode, String additionalMode)
Map<String,List<LayoutDefinition>>
getPropertyLayouts()
List<LayoutDefinition>
getPropertyLayouts(String mode, String additionalMode)
String
getSinceVersion()
Returns the version name since the widget type has been available (5.4, 5.4.2, etc...)List<String>
getSupportedControls()
Returns the list of supported controls, e.g.List<String>
getSupportedFieldTypes()
List<String>
getSupportedModes()
String
getTitle()
boolean
isAcceptingSubWidgets()
boolean
isComplex()
boolean
isContainingForm()
Returns true if widget will be containing forms.boolean
isDemoPreviewEnabled()
Returns true is the preview is enabled on the demo.boolean
isHandlingLabels()
Returns true if widget knows how to display its label (some widget types might delegate this to their containing widget or layout, usually when defining form layouts).boolean
isList()
void
setAcceptingSubWidgets(boolean acceptingSubWidgets)
void
setCategories(List<String> categories)
void
setComplex(boolean complex)
void
setContainingForm(boolean containingForm)
void
setDefaultControlValues(Map<String,Map<String,Serializable>> values)
void
setDefaultFieldDefinitions(List<FieldDefinition> defaultFieldDefinitions)
void
setDefaultFieldTypes(List<String> defaultFieldTypes)
void
setDefaultPropertyValues(Map<String,Map<String,Serializable>> values)
void
setDemoId(String demoId)
void
setDemoPreviewEnabled(boolean demoPreviewEnabled)
void
setDeprecatedVersion(String deprecatedVersion)
void
setDescription(String description)
void
setFieldLayouts(Map<String,List<LayoutDefinition>> fieldLayouts)
void
setHandlingLabels(boolean handlingLabels)
void
setList(boolean list)
void
setProperties(Map<String,Serializable> properties)
void
setPropertyLayouts(Map<String,List<LayoutDefinition>> propertyLayouts)
void
setSinceVersion(String sinceVersion)
void
setSupportedControls(List<String> supportedControls)
void
setSupportedFieldTypes(List<String> supportedFieldTypes)
void
setSupportedModes(List<String> supportedModes)
void
setTitle(String title)
-
-
-
Field Detail
-
sinceVersion
protected String sinceVersion
-
deprecatedVersion
protected String deprecatedVersion
-
title
protected String title
-
description
protected String description
-
demoId
protected String demoId
-
demoPreviewEnabled
protected boolean demoPreviewEnabled
-
properties
protected Map<String,Serializable> properties
-
acceptingSubWidgets
protected boolean acceptingSubWidgets
-
handlingLabels
protected boolean handlingLabels
-
list
protected boolean list
-
complex
protected boolean complex
-
containingForm
protected boolean containingForm
-
defaultFieldDefinitions
protected List<FieldDefinition> defaultFieldDefinitions
-
propertyLayouts
protected Map<String,List<LayoutDefinition>> propertyLayouts
-
defaultPropertyValues
protected Map<String,Map<String,Serializable>> defaultPropertyValues
-
defaultControlValues
protected Map<String,Map<String,Serializable>> defaultControlValues
-
fieldLayouts
protected Map<String,List<LayoutDefinition>> fieldLayouts
-
-
Method Detail
-
getSinceVersion
public String getSinceVersion()
Description copied from interface:WidgetTypeConfiguration
Returns the version name since the widget type has been available (5.4, 5.4.2, etc...)- Specified by:
getSinceVersion
in interfaceWidgetTypeConfiguration
-
getDeprecatedVersion
public String getDeprecatedVersion()
Description copied from interface:WidgetTypeConfiguration
Returns the version name since the widget type has been deprecated (5.4, 5.4.2, etc...)- Specified by:
getDeprecatedVersion
in interfaceWidgetTypeConfiguration
-
getTitle
public String getTitle()
- Specified by:
getTitle
in interfaceWidgetTypeConfiguration
-
getDescription
public String getDescription()
- Specified by:
getDescription
in interfaceWidgetTypeConfiguration
-
getDemoId
public String getDemoId()
Description copied from interface:WidgetTypeConfiguration
Returns the identifier to be used for the demo, or null if no demo is available.- Specified by:
getDemoId
in interfaceWidgetTypeConfiguration
-
isDemoPreviewEnabled
public boolean isDemoPreviewEnabled()
Description copied from interface:WidgetTypeConfiguration
Returns true is the preview is enabled on the demo.- Specified by:
isDemoPreviewEnabled
in interfaceWidgetTypeConfiguration
-
getConfProperties
public Map<String,Serializable> getConfProperties()
Description copied from interface:WidgetTypeConfiguration
Returns configuration properties.- Specified by:
getConfProperties
in interfaceWidgetTypeConfiguration
-
getConfProperty
public Serializable getConfProperty(String propName)
- Specified by:
getConfProperty
in interfaceWidgetTypeConfiguration
-
getSupportedModes
public List<String> getSupportedModes()
- Specified by:
getSupportedModes
in interfaceWidgetTypeConfiguration
-
isAcceptingSubWidgets
public boolean isAcceptingSubWidgets()
- Specified by:
isAcceptingSubWidgets
in interfaceWidgetTypeConfiguration
-
isList
public boolean isList()
- Specified by:
isList
in interfaceWidgetTypeConfiguration
-
isComplex
public boolean isComplex()
- Specified by:
isComplex
in interfaceWidgetTypeConfiguration
-
isContainingForm
public boolean isContainingForm()
Description copied from interface:WidgetTypeConfiguration
Returns true if widget will be containing forms.Since forms cannot contains any sub forms, layouts using this widget should not be surrounded by any form. Other widgets in the same layouts not containing forms may then need a surrounding form that could be added by the layout template.
- Specified by:
isContainingForm
in interfaceWidgetTypeConfiguration
-
getSupportedFieldTypes
public List<String> getSupportedFieldTypes()
- Specified by:
getSupportedFieldTypes
in interfaceWidgetTypeConfiguration
-
getDefaultFieldTypes
public List<String> getDefaultFieldTypes()
- Specified by:
getDefaultFieldTypes
in interfaceWidgetTypeConfiguration
-
getDefaultFieldDefinitions
public List<FieldDefinition> getDefaultFieldDefinitions()
- Specified by:
getDefaultFieldDefinitions
in interfaceWidgetTypeConfiguration
-
getCategories
public List<String> getCategories()
- Specified by:
getCategories
in interfaceWidgetTypeConfiguration
-
getPropertyLayouts
public Map<String,List<LayoutDefinition>> getPropertyLayouts()
- Specified by:
getPropertyLayouts
in interfaceWidgetTypeConfiguration
-
getLayouts
public List<LayoutDefinition> getLayouts(Map<String,List<LayoutDefinition>> allLayouts, String mode, String additionalMode)
-
getPropertyLayouts
public List<LayoutDefinition> getPropertyLayouts(String mode, String additionalMode)
- Specified by:
getPropertyLayouts
in interfaceWidgetTypeConfiguration
-
setSinceVersion
public void setSinceVersion(String sinceVersion)
- Since:
- 5.6
-
setDeprecatedVersion
public void setDeprecatedVersion(String deprecatedVersion)
- Since:
- 5.6
-
setTitle
public void setTitle(String title)
- Since:
- 5.6
-
setDescription
public void setDescription(String description)
- Since:
- 5.6
-
setDemoId
public void setDemoId(String demoId)
- Since:
- 5.6
-
setDemoPreviewEnabled
public void setDemoPreviewEnabled(boolean demoPreviewEnabled)
- Since:
- 5.6
-
setProperties
public void setProperties(Map<String,Serializable> properties)
- Since:
- 5.6
-
setAcceptingSubWidgets
public void setAcceptingSubWidgets(boolean acceptingSubWidgets)
- Since:
- 5.6
-
setList
public void setList(boolean list)
- Since:
- 5.6
-
setComplex
public void setComplex(boolean complex)
- Since:
- 5.6
-
setContainingForm
public void setContainingForm(boolean containingForm)
- Since:
- 5.6
-
setSupportedFieldTypes
public void setSupportedFieldTypes(List<String> supportedFieldTypes)
- Since:
- 5.6
-
setDefaultFieldDefinitions
public void setDefaultFieldDefinitions(List<FieldDefinition> defaultFieldDefinitions)
- Since:
- 5.6
-
setPropertyLayouts
public void setPropertyLayouts(Map<String,List<LayoutDefinition>> propertyLayouts)
- Since:
- 5.6
-
isHandlingLabels
public boolean isHandlingLabels()
Description copied from interface:WidgetTypeConfiguration
Returns true if widget knows how to display its label (some widget types might delegate this to their containing widget or layout, usually when defining form layouts).- Specified by:
isHandlingLabels
in interfaceWidgetTypeConfiguration
- Since:
- 5.6
-
setHandlingLabels
public void setHandlingLabels(boolean handlingLabels)
- Since:
- 5.6
-
getDefaultPropertyValues
public Map<String,Map<String,Serializable>> getDefaultPropertyValues()
Description copied from interface:WidgetTypeConfiguration
Returns the default values for the widget type properties, by mode.- Specified by:
getDefaultPropertyValues
in interfaceWidgetTypeConfiguration
- Since:
- 5.7.3
-
getDefaultPropertyValues
public Map<String,Serializable> getDefaultPropertyValues(String mode)
Description copied from interface:WidgetTypeConfiguration
Returns the default values for the widget type properties, for given mode.- Specified by:
getDefaultPropertyValues
in interfaceWidgetTypeConfiguration
- Since:
- 5.7.3
-
setDefaultPropertyValues
public void setDefaultPropertyValues(Map<String,Map<String,Serializable>> values)
- Since:
- 5.7.3
-
getDefaultControlValues
public Map<String,Map<String,Serializable>> getDefaultControlValues()
- Specified by:
getDefaultControlValues
in interfaceWidgetTypeConfiguration
- Since:
- 6.0
-
getDefaultControlValues
public Map<String,Serializable> getDefaultControlValues(String mode)
- Specified by:
getDefaultControlValues
in interfaceWidgetTypeConfiguration
- Since:
- 6.0
-
setDefaultControlValues
public void setDefaultControlValues(Map<String,Map<String,Serializable>> values)
- Since:
- 6.0
-
getFieldLayouts
public Map<String,List<LayoutDefinition>> getFieldLayouts()
Description copied from interface:WidgetTypeConfiguration
Returns the map of field layouts per mode.- Specified by:
getFieldLayouts
in interfaceWidgetTypeConfiguration
- See Also:
WidgetTypeConfiguration.getFieldLayouts(String, String)
-
getFieldLayouts
public List<LayoutDefinition> getFieldLayouts(String mode, String additionalMode)
Description copied from interface:WidgetTypeConfiguration
Returns the list of layouts for given mode and additional modes.These layouts are used to document accepted fields on the widget type, depending on the rendering mode.
- Specified by:
getFieldLayouts
in interfaceWidgetTypeConfiguration
- Parameters:
mode
- the mode to retrieve layouts for.additionalMode
- additional mode to take into account, typicallyBuiltinModes.ANY
-
setFieldLayouts
public void setFieldLayouts(Map<String,List<LayoutDefinition>> fieldLayouts)
- Since:
- 5.7.3
-
getSupportedControls
public List<String> getSupportedControls()
Description copied from interface:WidgetTypeConfiguration
Returns the list of supported controls, e.g. controls that are checked on sub-widgets definitions.- Specified by:
getSupportedControls
in interfaceWidgetTypeConfiguration
- Since:
- 5.9.1
-
-