Interface RuleTemplateSerializer
- All Superinterfaces:
ObjectSerializer<RuleTemplate>
RuleTemplateSerializer is the interface to implement by any file generator for RuleTemplate object.- Author:
- Ravi Nadahar - Initial contribution
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumAn enum representing the different rule template serialization options. -
Method Summary
Modifier and TypeMethodDescriptioncheckSerializability(Collection<RuleTemplate> templates) Checks if the specified rule templates are serializable with thisRuleTemplateSerializer.voidsetTemplatesToBeSerialized(String id, List<RuleTemplate> templates, RuleTemplateSerializer.RuleTemplateSerializationOption option) Specify theListofRuleTemplates to be serialized and associate them with an identifier.Methods inherited from interface org.openhab.core.converter.ObjectSerializer
generateFormat, getGeneratedFormat
-
Method Details
-
checkSerializability
Checks if the specified rule templates are serializable with thisRuleTemplateSerializer. Returned results are in the same order as the specified rule templates.- Parameters:
templates- theListofRuleTemplates to check.- Returns:
- The resulting
ListofSerializabilityResults.
-
setTemplatesToBeSerialized
void setTemplatesToBeSerialized(String id, List<RuleTemplate> templates, RuleTemplateSerializer.RuleTemplateSerializationOption option) throws SerializationException Specify theListofRuleTemplates to be serialized and associate them with an identifier.- Parameters:
id- the identifier of theRuleTemplateformat generation.templates- theListofRuleTemplates to serialize.option- the option that determines how to serialize theRuleTemplates.- Throws:
SerializationException- If one or more of the rule templates can't be serialized.
-