Interface SchemaReferenceWriter

All Superinterfaces:
org.apache.nifi.components.ConfigurableComponent, org.apache.nifi.controller.ControllerService

public interface SchemaReferenceWriter extends org.apache.nifi.controller.ControllerService
Service interface responsible for writing Schema Identifier reference information to attributes or encoded content information
  • Method Summary

    Modifier and Type
    Method
    Description
    getAttributes(org.apache.nifi.serialization.record.RecordSchema recordSchema)
    Get Attributes containing Record Schema content or references based on service implementation requirements
    Set<org.apache.nifi.schema.access.SchemaField>
    Get required Record Schema Fields for writing schema information
    void
    validateSchema(org.apache.nifi.serialization.record.RecordSchema recordSchema)
    Validate provided Record Schema for required information or throw SchemaNotFoundException indicating missing fields
    void
    writeHeader(org.apache.nifi.serialization.record.RecordSchema recordSchema, OutputStream outputStream)
    Writer Record Schema to the provided OutputStream as header information when required

    Methods inherited from interface org.apache.nifi.components.ConfigurableComponent

    getIdentifier, getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate

    Methods inherited from interface org.apache.nifi.controller.ControllerService

    initialize, isStateful, migrateProperties
  • Method Details

    • writeHeader

      void writeHeader(org.apache.nifi.serialization.record.RecordSchema recordSchema, OutputStream outputStream) throws IOException
      Writer Record Schema to the provided OutputStream as header information when required
      Parameters:
      recordSchema - Record Schema to be written to the provided Output Stream
      outputStream - Output Stream to which the provided Record Schema should be written
      Throws:
      IOException - Thrown in failure to write Record Schema to the Output Stream
    • getAttributes

      Map<String,String> getAttributes(org.apache.nifi.serialization.record.RecordSchema recordSchema)
      Get Attributes containing Record Schema content or references based on service implementation requirements
      Returns:
      Attributes containing Record Schema information or empty when not populated
    • validateSchema

      void validateSchema(org.apache.nifi.serialization.record.RecordSchema recordSchema) throws org.apache.nifi.schema.access.SchemaNotFoundException
      Validate provided Record Schema for required information or throw SchemaNotFoundException indicating missing fields
      Parameters:
      recordSchema - Record Schema to be validated
      Throws:
      org.apache.nifi.schema.access.SchemaNotFoundException - Thrown when the provided Record Schema is missing required information
    • getRequiredSchemaFields

      Set<org.apache.nifi.schema.access.SchemaField> getRequiredSchemaFields()
      Get required Record Schema Fields for writing schema information
      Returns:
      Required Record Schema Fields