Class MockProvenanceEvent.Builder

java.lang.Object
org.apache.nifi.provenance.MockProvenanceEvent.Builder
All Implemented Interfaces:
org.apache.nifi.provenance.ProvenanceEventBuilder
Enclosing class:
MockProvenanceEvent

public static class MockProvenanceEvent.Builder extends Object implements org.apache.nifi.provenance.ProvenanceEventBuilder
  • Field Details

    • eventIdGenerator

      private static final AtomicLong eventIdGenerator
    • eventTime

      private long eventTime
    • entryDate

      private long entryDate
    • lineageStartDate

      private long lineageStartDate
    • eventType

      private org.apache.nifi.provenance.ProvenanceEventType eventType
    • componentId

      private String componentId
    • componentType

      private String componentType
    • sourceSystemFlowFileIdentifier

      private String sourceSystemFlowFileIdentifier
    • transitUri

      private String transitUri
    • uuid

      private String uuid
    • parentUuids

      private List<String> parentUuids
    • childrenUuids

      private List<String> childrenUuids
    • alternateIdentifierUri

      private String alternateIdentifierUri
    • details

      private String details
    • relationship

      private String relationship
    • eventDuration

      private long eventDuration
    • eventId

      private Long eventId
    • contentClaimSection

      private String contentClaimSection
    • contentClaimContainer

      private String contentClaimContainer
    • contentClaimIdentifier

      private String contentClaimIdentifier
    • contentClaimOffset

      private Long contentClaimOffset
    • contentSize

      private Long contentSize
    • previousClaimSection

      private String previousClaimSection
    • previousClaimContainer

      private String previousClaimContainer
    • previousClaimIdentifier

      private String previousClaimIdentifier
    • previousClaimOffset

      private Long previousClaimOffset
    • previousSize

      private Long previousSize
    • sourceQueueIdentifier

      private String sourceQueueIdentifier
    • previousAttributes

      private Map<String,String> previousAttributes
    • updatedAttributes

      private Map<String,String> updatedAttributes
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • fromEvent

      public MockProvenanceEvent.Builder fromEvent(org.apache.nifi.provenance.ProvenanceEventRecord event)
      Specified by:
      fromEvent in interface org.apache.nifi.provenance.ProvenanceEventBuilder
    • setEventId

      public MockProvenanceEvent.Builder setEventId(long eventId)
    • copy

      public org.apache.nifi.provenance.ProvenanceEventBuilder copy()
      Specified by:
      copy in interface org.apache.nifi.provenance.ProvenanceEventBuilder
    • setFlowFileEntryDate

      public MockProvenanceEvent.Builder setFlowFileEntryDate(long entryDate)
      Specified by:
      setFlowFileEntryDate in interface org.apache.nifi.provenance.ProvenanceEventBuilder
    • setAttributes

      public MockProvenanceEvent.Builder setAttributes(Map<String,String> previousAttributes, Map<String,String> updatedAttributes)
      Specified by:
      setAttributes in interface org.apache.nifi.provenance.ProvenanceEventBuilder
    • setUpdatedAttributes

      public MockProvenanceEvent.Builder setUpdatedAttributes(Map<String,String> updatedAttributes)
    • setFlowFileUUID

      public MockProvenanceEvent.Builder setFlowFileUUID(String uuid)
      Specified by:
      setFlowFileUUID in interface org.apache.nifi.provenance.ProvenanceEventBuilder
    • setEventTime

      public MockProvenanceEvent.Builder setEventTime(long eventTime)
      Specified by:
      setEventTime in interface org.apache.nifi.provenance.ProvenanceEventBuilder
    • setEventDuration

      public MockProvenanceEvent.Builder setEventDuration(long millis)
      Specified by:
      setEventDuration in interface org.apache.nifi.provenance.ProvenanceEventBuilder
    • setLineageStartDate

      public MockProvenanceEvent.Builder setLineageStartDate(long startDate)
      Specified by:
      setLineageStartDate in interface org.apache.nifi.provenance.ProvenanceEventBuilder
    • setEventType

      public MockProvenanceEvent.Builder setEventType(org.apache.nifi.provenance.ProvenanceEventType eventType)
      Specified by:
      setEventType in interface org.apache.nifi.provenance.ProvenanceEventBuilder
    • setComponentId

      public MockProvenanceEvent.Builder setComponentId(String componentId)
      Specified by:
      setComponentId in interface org.apache.nifi.provenance.ProvenanceEventBuilder
    • setComponentType

      public MockProvenanceEvent.Builder setComponentType(String componentType)
      Specified by:
      setComponentType in interface org.apache.nifi.provenance.ProvenanceEventBuilder
    • setSourceSystemFlowFileIdentifier

      public MockProvenanceEvent.Builder setSourceSystemFlowFileIdentifier(String sourceSystemFlowFileIdentifier)
      Specified by:
      setSourceSystemFlowFileIdentifier in interface org.apache.nifi.provenance.ProvenanceEventBuilder
    • setTransitUri

      public MockProvenanceEvent.Builder setTransitUri(String transitUri)
      Specified by:
      setTransitUri in interface org.apache.nifi.provenance.ProvenanceEventBuilder
    • addParentFlowFile

      public MockProvenanceEvent.Builder addParentFlowFile(org.apache.nifi.flowfile.FlowFile parentFlowFile)
      Specified by:
      addParentFlowFile in interface org.apache.nifi.provenance.ProvenanceEventBuilder
    • removeParentFlowFile

      public MockProvenanceEvent.Builder removeParentFlowFile(org.apache.nifi.flowfile.FlowFile parentFlowFile)
      Specified by:
      removeParentFlowFile in interface org.apache.nifi.provenance.ProvenanceEventBuilder
    • addChildFlowFile

      public MockProvenanceEvent.Builder addChildFlowFile(org.apache.nifi.flowfile.FlowFile childFlowFile)
      Specified by:
      addChildFlowFile in interface org.apache.nifi.provenance.ProvenanceEventBuilder
    • addChildFlowFile

      public MockProvenanceEvent.Builder addChildFlowFile(String childId)
      Specified by:
      addChildFlowFile in interface org.apache.nifi.provenance.ProvenanceEventBuilder
    • removeChildFlowFile

      public MockProvenanceEvent.Builder removeChildFlowFile(org.apache.nifi.flowfile.FlowFile childFlowFile)
      Specified by:
      removeChildFlowFile in interface org.apache.nifi.provenance.ProvenanceEventBuilder
    • setAlternateIdentifierUri

      public MockProvenanceEvent.Builder setAlternateIdentifierUri(String alternateIdentifierUri)
      Specified by:
      setAlternateIdentifierUri in interface org.apache.nifi.provenance.ProvenanceEventBuilder
    • setDetails

      public MockProvenanceEvent.Builder setDetails(String details)
      Specified by:
      setDetails in interface org.apache.nifi.provenance.ProvenanceEventBuilder
    • setRelationship

      public MockProvenanceEvent.Builder setRelationship(org.apache.nifi.processor.Relationship relationship)
      Specified by:
      setRelationship in interface org.apache.nifi.provenance.ProvenanceEventBuilder
    • setRelationship

      public MockProvenanceEvent.Builder setRelationship(String relationship)
    • fromFlowFile

      public org.apache.nifi.provenance.ProvenanceEventBuilder fromFlowFile(org.apache.nifi.flowfile.FlowFile flowFile)
      Specified by:
      fromFlowFile in interface org.apache.nifi.provenance.ProvenanceEventBuilder
    • setPreviousContentClaim

      public MockProvenanceEvent.Builder setPreviousContentClaim(String container, String section, String identifier, Long offset, long size)
      Specified by:
      setPreviousContentClaim in interface org.apache.nifi.provenance.ProvenanceEventBuilder
    • setCurrentContentClaim

      public MockProvenanceEvent.Builder setCurrentContentClaim(String container, String section, String identifier, Long offset, long size)
      Specified by:
      setCurrentContentClaim in interface org.apache.nifi.provenance.ProvenanceEventBuilder
    • setSourceQueueIdentifier

      public MockProvenanceEvent.Builder setSourceQueueIdentifier(String identifier)
      Specified by:
      setSourceQueueIdentifier in interface org.apache.nifi.provenance.ProvenanceEventBuilder
    • assertSet

      private void assertSet(Object value, String name)
    • getEventType

      public org.apache.nifi.provenance.ProvenanceEventType getEventType()
    • getChildUuids

      public List<String> getChildUuids()
    • getParentUuids

      public List<String> getParentUuids()
    • build

      public MockProvenanceEvent build()
      Specified by:
      build in interface org.apache.nifi.provenance.ProvenanceEventBuilder
    • getChildFlowFileIds

      public List<String> getChildFlowFileIds()
      Specified by:
      getChildFlowFileIds in interface org.apache.nifi.provenance.ProvenanceEventBuilder
    • getParentFlowFileIds

      public List<String> getParentFlowFileIds()
      Specified by:
      getParentFlowFileIds in interface org.apache.nifi.provenance.ProvenanceEventBuilder
    • getFlowFileId

      public String getFlowFileId()
      Specified by:
      getFlowFileId in interface org.apache.nifi.provenance.ProvenanceEventBuilder