Class ParameterSchemaAdapter
java.lang.Object
com.inductiveautomation.historian.common.rpc.adapters.query.ParameterSchemaAdapter
- All Implemented Interfaces:
BinaryAdapter<ParameterSchema>, BinaryDeserializer<ParameterSchema>, BinarySerializer<ParameterSchema>
Protobuf binary adapter for
ParameterSchema, using the ParameterSchemaProto.ParameterSchemaPB schema.
The ParameterSchema.ParameterField variants (ParameterSchema.ScalarField, ParameterSchema.EnumField) are discriminated by
a kind of "SCALAR" or "ENUM".
defaultValue, minValue and maxValue travel as toString() with
a _present flag to tell null from empty. They decode as strings, not their original
numeric types; the frontend interprets them by the scalar kind.
aggregate_params_class_name travels as Class.getName() and decodes with the
adapter's class loader. If the class is absent at decode time (for example a gateway-specific
params type decoded in the designer), GatewayOnlyParams is the recordType, so the
schema's fields survive for UI rendering rather than collapsing to ParameterSchema.EMPTY.
-
Method Summary
Modifier and TypeMethodDescriptiondecode(byte[] serialized, DeserializationContext context) byte[]encode(ParameterSchema src, SerializationContext context) static ParameterSchemaAdapter
-
Method Details
-
getInstance
-
encode
public byte[] encode(ParameterSchema src, SerializationContext context) throws ProtoSerializationException - Specified by:
encodein interfaceBinarySerializer<ParameterSchema>- Throws:
ProtoSerializationException
-
decode
public ParameterSchema decode(byte[] serialized, DeserializationContext context) throws ProtoSerializationException - Specified by:
decodein interfaceBinaryDeserializer<ParameterSchema>- Throws:
ProtoSerializationException
-