com.vaadin.flow.component.webcomponent.
Interface WebComponentConfiguration<C extends Component>
-
Type Parameters:
C
- type of the component being exportedAll Superinterfaces:
public interface WebComponentConfiguration<C extends Component> extends Serializable
Result of defining an embeddable web component using
WebComponentExporter
. Provides all the necessary information to generate the web component resources and constructs newWebComponentBinding
instances withcreateWebComponentBinding(com.vaadin.flow.di.Instantiator, com.vaadin.flow.dom.Element, elemental.json.JsonObject)
;Since:
2.0
Author:
Vaadin Ltd.
See Also:
-
-
Method Summary
All Methods Modifier and Type Method Description WebComponentBinding<C>
createWebComponentBinding(Instantiator instantiator, Element element, elemental.json.JsonObject newAttributeDefaults)
Creates a new
WebComponentBinding
instance.Class<C>
getComponentClass()
Retrieve the type of the component.
Class<? extends WebComponentExporter<C>>
getExporterClass()
Retrieves the type of the
WebComponentExporter
from which this configuration has been generated.Set<PropertyData<? extends Serializable>>
getPropertyDataSet()
Set of all the
PropertyData
objects defining the web component's properties.Class<? extends Serializable>
getPropertyType(String propertyName)
Retrieve the type of a property's value.
String
getTag()
Retrieves the tag name configured by the web component exporter.
boolean
hasProperty(String propertyName)
Check if the configuration has a property identified by the
propertyName
.
-
-
-
Method Detail
-
hasProperty
boolean hasProperty(String propertyName)
Check if the configuration has a property identified by the
propertyName
.Parameters:
propertyName
- name of the property, not nullReturns:
has property
-
getPropertyType
Class<? extends Serializable> getPropertyType(String propertyName)
Retrieve the type of a property's value. If the property is not known, returns
null
Parameters:
propertyName
- name of the property, not nullReturns:
property type or null
-
getComponentClass
Class<C> getComponentClass()
Retrieve the type of the component.
Returns:
component type
-
getPropertyDataSet
Set<PropertyData<? extends Serializable>> getPropertyDataSet()
Set of all the
PropertyData
objects defining the web component's properties.Returns:
set of
PropertyData
-
createWebComponentBinding
WebComponentBinding<C> createWebComponentBinding(Instantiator instantiator, Element element, elemental.json.JsonObject newAttributeDefaults)
Creates a new
WebComponentBinding
instance.Parameters:
instantiator
-Instantiator
used to construct instanceselement
- element which acts as the root element for the exportedcomponent
instancenewAttributeDefaults
-JsonObject
containing default overrides set by the user defining the component on a web page. These defaults are set using the web component's attributes.Returns:
web component binding which can be used by the web component host to communicate with the component it is hosting
-
getTag
String getTag()
Retrieves the tag name configured by the web component exporter.
Returns:
tag name, not
null
-
getExporterClass
Class<? extends WebComponentExporter<C>> getExporterClass()
Retrieves the type of the
WebComponentExporter
from which this configuration has been generated.Returns:
web component exporter class
-
-