Interface WebComponentConfiguration<C extends Component>

Type Parameters:
C - type of the component being exported
All Superinterfaces:
Serializable

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 new WebComponentBinding instances with createWebComponentBinding(com.vaadin.flow.di.Instantiator, com.vaadin.flow.dom.Element, elemental.json.JsonObject);
Since:
2.0
Author:
Vaadin Ltd.
See Also:
  • Method Details

    • hasProperty

      boolean hasProperty(String propertyName)
      Check if the configuration has a property identified by the propertyName.
      Parameters:
      propertyName - name of the property, not null
      Returns:
      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 null
      Returns:
      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 instances
      element - element which acts as the root element for the exported component instance
      newAttributeDefaults - 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