com.sysord.mad.configuration
Interface WidgetConfiguration<VT>

Type Parameters:
VT - Type of value.

public interface WidgetConfiguration<VT>

Configuration of a Widget as it is defined in a MAD configuration.

A WidgetConfiguration will be used by the WidgetFactory to create its corresponding Widget.

Author:
philippe.palau@sysord.com http://www.sysord.com

Nested Class Summary
static class WidgetConfiguration.WIDGET_CATEGORY
          Categories of widgets.
 
Field Summary
static java.lang.String DEFAULT_UI_TAB_ID
          Default UI Tab ID provided when no tab is defined for the widget
static java.lang.String DEFAULT_UI_TAB_LABEL
          Default UI Tab Label provided when no tab is defined for the widget
 
Method Summary
 QueryDefinition<java.util.Collection<?>> getCandidatesQuery()
          Returns the query used for selecting candidate elements.
 java.lang.Class<?> getCandidatesType()
          Returns the candidates value type as a java Class.
 QueryDefinition<java.lang.Boolean> getEditableQuery()
          Returns the query used for the evaluation of the widget editability.
 TypeConfiguration getFlexibleTemplate()
          Returns the TypeConfiguration to replicate by the flexible widget.
 java.lang.String getFormat()
          Returns the format expression to apply on the value of an output widget.
 java.lang.String getId()
          Returns the widget id.
 QueryDefinition<org.eclipse.emf.ecore.EObject> getIncludeQuery()
          Returns the include query for an included widget if widget is not an included widget then return null.
 java.lang.String getItemLabelExpression()
          Returns the format expression used for generating elements's labels.
 java.lang.String getLabel()
          Returns the widget label.
 java.util.List<Layer> getLayers()
          Returns the layers for which the widget must be visible.
 java.lang.String getName()
          Returns the widget name.
 java.lang.String getTabId()
          Returns the widget UI tab ID.
 java.lang.String getTabLabel()
          Returns the widget UI tab label.
 java.util.List<ValidatorDefinition> getValidators()
          Returns the validators defined on the widget.
 ValueConverterConfiguration getValueConverterConfiguration()
          Returns the value converter configuration, or null if not defined.
 QueryDefinition<?> getValueQuery()
          Returns the query used for getting the element value.
 QueryDefinition<java.lang.Boolean> getVisibilityQuery()
          Returns the query used for the evaluation of the widget visibility.
 WidgetConfiguration.WIDGET_CATEGORY getWidgCategory()
          Returns the widget's category.
 CommandDefinition getWidgetCommand(java.lang.String commandId)
          Returns the command with the given commandId used on the widget.
 java.util.Collection<CommandDefinition> getWidgetCommands()
          Returns all the defined commands of the widget.
 java.lang.String getWidgetType()
          Returns the widget concrete type ID.
 java.lang.Class<VT> getWidgetValueType()
          Returns the widget value type as a java Class.
 XtextLanguageDescription getXtextWidgetLanguageDescriptor()
          Returns the XtextLanguageDescriptor if the widget uses an Xtext editor.
 boolean isFlexibleWidget()
          Indicates if the widget is a FLEXIBLE_WIDGET.
 boolean isIncludedWidget()
          Returns true if the widget has been included.
 

Field Detail

DEFAULT_UI_TAB_ID

static final java.lang.String DEFAULT_UI_TAB_ID
Default UI Tab ID provided when no tab is defined for the widget

See Also:
Constant Field Values

DEFAULT_UI_TAB_LABEL

static final java.lang.String DEFAULT_UI_TAB_LABEL
Default UI Tab Label provided when no tab is defined for the widget

See Also:
Constant Field Values
Method Detail

getId

java.lang.String getId()
Returns the widget id.

Returns:
the widget id.

getName

java.lang.String getName()
Returns the widget name.

Returns:
the widget name.

getLabel

java.lang.String getLabel()
Returns the widget label.

Returns:
the widget label.

getTabId

java.lang.String getTabId()
Returns the widget UI tab ID.

If no UI tab was defined, "_MAIN" is returned.

Returns:
the widget UI tab ID.

getTabLabel

java.lang.String getTabLabel()
Returns the widget UI tab label.

If no UI tab was defined, "Main" is returned.

Returns:
the widget ui tab label

getLayers

java.util.List<Layer> getLayers()
Returns the layers for which the widget must be visible.

Returns:
the layers for which the widget must be visible.

getWidgetValueType

java.lang.Class<VT> getWidgetValueType()
Returns the widget value type as a java Class.

Returns:
the widget value type.

getCandidatesType

java.lang.Class<?> getCandidatesType()
Returns the candidates value type as a java Class.

Returns:
the candidates value type.

getWidgCategory

WidgetConfiguration.WIDGET_CATEGORY getWidgCategory()
Returns the widget's category.

Returns:
the widget's category.

getWidgetType

java.lang.String getWidgetType()
Returns the widget concrete type ID.

Returns:
the widget concrete type ID.

getVisibilityQuery

QueryDefinition<java.lang.Boolean> getVisibilityQuery()
Returns the query used for the evaluation of the widget visibility.

Returns:
the query used for the evaluation of the widget visibility.

getEditableQuery

QueryDefinition<java.lang.Boolean> getEditableQuery()
Returns the query used for the evaluation of the widget editability.

Returns:
the query used for the evaluation of the widget editability.

getValueQuery

QueryDefinition<?> getValueQuery()
Returns the query used for getting the element value.

Returns:
the query used for getting the element value.

getValidators

java.util.List<ValidatorDefinition> getValidators()
Returns the validators defined on the widget.

Returns:
the validators defined on the widget.

getValueConverterConfiguration

ValueConverterConfiguration getValueConverterConfiguration()
Returns the value converter configuration, or null if not defined.

Returns:
the value converter configuration, or null

getFormat

java.lang.String getFormat()
Returns the format expression to apply on the value of an output widget.

A format expression is a string expression usable for any label in the MAD configuration (see FormatExpressionEvaluationService for more details).

Returns:
the format expression to apply on the value of an output widget.

getCandidatesQuery

QueryDefinition<java.util.Collection<?>> getCandidatesQuery()
Returns the query used for selecting candidate elements.

Used for :

Returns:
the query used for selecting candidate elements.

getItemLabelExpression

java.lang.String getItemLabelExpression()
Returns the format expression used for generating elements's labels.

Used for :

A format expression is a string expression usable for any label in the MAD configuration (see FormatExpressionEvaluationService for more details).

Returns:
the format expression used for generate elements label

isFlexibleWidget

boolean isFlexibleWidget()
Indicates if the widget is a FLEXIBLE_WIDGET.

It means, the configuration will be replicated for 1 to N elements of the same type (=> with an identical configuration).

Returns:
true if the widget is a FLEXIBLE_WIDGET;
false otherwise.

getFlexibleTemplate

TypeConfiguration getFlexibleTemplate()
Returns the TypeConfiguration to replicate by the flexible widget.

Returns:
the TypeConfiguration to replicate by the flexible widget.

getWidgetCommands

java.util.Collection<CommandDefinition> getWidgetCommands()
Returns all the defined commands of the widget.

Returns:
all the defined commands of the widget.

getWidgetCommand

CommandDefinition getWidgetCommand(java.lang.String commandId)
Returns the command with the given commandId used on the widget.

Parameters:
commandId - The ID of the command to retrieve on the widget.
Returns:
the command with the given commandId used on the widget.

getXtextWidgetLanguageDescriptor

XtextLanguageDescription getXtextWidgetLanguageDescriptor()
Returns the XtextLanguageDescriptor if the widget uses an Xtext editor.

Returns:
the XtextLanguageDescriptor.

isIncludedWidget

boolean isIncludedWidget()
Returns true if the widget has been included.

Returns:
true if the widget has been included.

getIncludeQuery

QueryDefinition<org.eclipse.emf.ecore.EObject> getIncludeQuery()
Returns the include query for an included widget if widget is not an included widget then return null.

Returns:
the include query for the widget or null