|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nuxeo.ecm.platform.forms.layout.api.impl.WidgetDefinitionImpl
public class WidgetDefinitionImpl
Default implementation for a widget definition.
Useful to compute widgets independently from the layout service.
Field Summary |
---|
Fields inherited from interface org.nuxeo.ecm.platform.forms.layout.api.WidgetDefinition |
---|
RENDERED_PROPERTY_NAME, REQUIRED_PROPERTY_NAME |
Method Summary | |
---|---|
FieldDefinition[] |
getFieldDefinitions()
Returns the list of fields managed by this widget. |
String |
getHelpLabel(String mode)
Returns the help label to use in a given mode. |
Map<String,String> |
getHelpLabels()
Returns help labels by mode. |
String |
getLabel(String mode)
Returns the label to use in a given mode. |
Map<String,String> |
getLabels()
Returns labels by mode. |
String |
getMode(String layoutMode)
Returns the optional mode used to override the layout mode. |
Map<String,String> |
getModes()
|
String |
getName()
Returns the widget name used to identify it within a layout. |
Map<String,Map<String,Serializable>> |
getProperties()
Returns properties by mode. |
static Map<String,Serializable> |
getProperties(Map<String,Map<String,Serializable>> properties,
String mode)
|
Map<String,Serializable> |
getProperties(String layoutMode,
String mode)
Returns a map of properties to use in a given mode. |
String |
getRequired(String layoutMode,
String mode)
Returns an EL expression evaluating to true if the widget is required in given mode. |
WidgetSelectOption[] |
getSelectOptions()
Returns the select options for this widget. |
WidgetDefinition[] |
getSubWidgetDefinitions()
Returns sub widget definitions. |
String |
getType()
Returns the widget type used to render it. |
Map<String,Map<String,Serializable>> |
getWidgetModeProperties()
Returns properties by widget mode. |
boolean |
isTranslated()
Returns true if all labels are messages that need to be translated. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WidgetDefinitionImpl(String name, String type, String label, String helpLabel, boolean translated, Map<String,String> modes, List<FieldDefinition> fieldDefinitions, Map<String,Serializable> properties, List<WidgetDefinition> subWidgets)
public WidgetDefinitionImpl(String name, String type, Map<String,String> labels, Map<String,String> helpLabels, boolean translated, Map<String,String> modes, List<FieldDefinition> fieldDefinitions, Map<String,Map<String,Serializable>> properties, Map<String,Map<String,Serializable>> widgetModeProperties, List<WidgetDefinition> subWidgets)
public WidgetDefinitionImpl(String name, String type, Map<String,String> labels, Map<String,String> helpLabels, boolean translated, Map<String,String> modes, FieldDefinition[] fieldDefinitions, Map<String,Map<String,Serializable>> properties, Map<String,Map<String,Serializable>> widgetModeProperties, WidgetDefinition[] subWidgets)
public WidgetDefinitionImpl(String name, String type, Map<String,String> labels, Map<String,String> helpLabels, boolean translated, Map<String,String> modes, FieldDefinition[] fieldDefinitions, Map<String,Map<String,Serializable>> properties, Map<String,Map<String,Serializable>> widgetModeProperties, WidgetDefinition[] subWidgets, WidgetSelectOption[] selectOptions)
Method Detail |
---|
public FieldDefinition[] getFieldDefinitions()
WidgetDefinition
getFieldDefinitions
in interface WidgetDefinition
public String getHelpLabel(String mode)
WidgetDefinition
getHelpLabel
in interface WidgetDefinition
public Map<String,String> getHelpLabels()
WidgetDefinition
getHelpLabels
in interface WidgetDefinition
public String getLabel(String mode)
WidgetDefinition
getLabel
in interface WidgetDefinition
public Map<String,String> getLabels()
WidgetDefinition
getLabels
in interface WidgetDefinition
public String getMode(String layoutMode)
WidgetDefinition
Can be a string or an EL ValueExpression.
getMode
in interface WidgetDefinition
layoutMode
- the layout (or parent widget) mode
public Map<String,String> getModes()
getModes
in interface WidgetDefinition
public String getName()
WidgetDefinition
getName
in interface WidgetDefinition
public Map<String,Serializable> getProperties(String layoutMode, String mode)
WidgetDefinition
A property value can be a string or an EL ValueExpression.
The way that properties will be mapped to rendered components is managed by the widget type.
getProperties
in interface WidgetDefinition
public Map<String,Map<String,Serializable>> getProperties()
WidgetDefinition
getProperties
in interface WidgetDefinition
public Map<String,Map<String,Serializable>> getWidgetModeProperties()
WidgetDefinition
getWidgetModeProperties
in interface WidgetDefinition
public String getRequired(String layoutMode, String mode)
WidgetDefinition
This value is computed from the property "required" in given mode. and can be a string or an EL ValueExpression. Defaults to "false".
getRequired
in interface WidgetDefinition
public WidgetDefinition[] getSubWidgetDefinitions()
WidgetDefinition
getSubWidgetDefinitions
in interface WidgetDefinition
public String getType()
WidgetDefinition
getType
in interface WidgetDefinition
public boolean isTranslated()
WidgetDefinition
Default is true.
isTranslated
in interface WidgetDefinition
public static Map<String,Serializable> getProperties(Map<String,Map<String,Serializable>> properties, String mode)
public WidgetSelectOption[] getSelectOptions()
WidgetDefinition
getSelectOptions
in interface WidgetDefinition
|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |