Class PolymerPublishedEventRpcHandler
java.lang.Object
com.vaadin.flow.component.polymertemplate.rpc.PolymerPublishedEventRpcHandler
- All Implemented Interfaces:
com.vaadin.flow.component.template.internal.DeprecatedPolymerPublishedEventHandler,Serializable
public class PolymerPublishedEventRpcHandler
extends Object
implements com.vaadin.flow.component.template.internal.DeprecatedPolymerPublishedEventHandler
Polymer utilitiy class for handling polymer rpc events for @EventHandler.
Registers
PolymerPublishedEventRpcHandler as a service to make it
available in Lookup in an OSGi container.
For internal use only. May be renamed or removed in a future release.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetTemplateItem(com.vaadin.flow.component.Component template, tools.jackson.databind.JsonNode argValue, Type convertedType) Get the template model object and type.booleanisTemplateModelValue(com.vaadin.flow.component.Component instance, tools.jackson.databind.JsonNode argValue, Class<?> convertedType) Validate that the given Component instance is a PolymerTemplate and that the value can be converted.
-
Constructor Details
-
PolymerPublishedEventRpcHandler
public PolymerPublishedEventRpcHandler()
-
-
Method Details
-
isTemplateModelValue
public boolean isTemplateModelValue(com.vaadin.flow.component.Component instance, tools.jackson.databind.JsonNode argValue, Class<?> convertedType) Validate that the given Component instance is a PolymerTemplate and that the value can be converted.- Specified by:
isTemplateModelValuein interfacecom.vaadin.flow.component.template.internal.DeprecatedPolymerPublishedEventHandler- Parameters:
instance- Component to be validatedargValue- received valueconvertedType- target type that value should be converted to- Returns:
- true if valid template model value
-
getTemplateItem
public Object getTemplateItem(com.vaadin.flow.component.Component template, tools.jackson.databind.JsonNode argValue, Type convertedType) Get the template model object and type.- Specified by:
getTemplateItemin interfacecom.vaadin.flow.component.template.internal.DeprecatedPolymerPublishedEventHandler- Parameters:
template- polymer template to get model fromargValue- argument valueconvertedType- value type- Returns:
- the provided model value
- Throws:
IllegalStateException- if the component is not attached to the UI
-