Class OMRSTypeDefEvent

java.lang.Object
org.odpi.openmetadata.repositoryservices.events.OMRSEvent
org.odpi.openmetadata.repositoryservices.events.OMRSTypeDefEvent

public class OMRSTypeDefEvent extends OMRSEvent
OMRSTypeDefEvent provides the wrapper for an event that relates to a type definition (TypeDef).
  • Constructor Details

    • OMRSTypeDefEvent

      public OMRSTypeDefEvent(OMRSEventV1 inboundEvent)
      Inbound event constructor that takes the object created by the Jackson JSON mapper and unpacks the properties into the instance event.
      Parameters:
      inboundEvent - incoming Event.
    • OMRSTypeDefEvent

      public OMRSTypeDefEvent(OMRSTypeDefEventType typeDefEventType, TypeDef typeDef)
      Outbound event constructor for events such as newTypeDef.
      Parameters:
      typeDefEventType - type of event
      typeDef - Complete details of the TypeDef that is the subject of the event.
    • OMRSTypeDefEvent

      public OMRSTypeDefEvent(OMRSTypeDefEventType typeDefEventType, AttributeTypeDef attributeTypeDef)
      Outbound event constructor for events such as newAttributeTypeDef.
      Parameters:
      typeDefEventType - type of event
      attributeTypeDef - Complete details of the AttributeTypeDef that is the subject of the event.
    • OMRSTypeDefEvent

      public OMRSTypeDefEvent(OMRSTypeDefEventType typeDefEventType, TypeDefPatch typeDefPatch)
      Outbound event constructor for events such as updates.
      Parameters:
      typeDefEventType - type of event
      typeDefPatch - Complete details of the TypeDef that is the subject of the event.
    • OMRSTypeDefEvent

      public OMRSTypeDefEvent(OMRSTypeDefEventType typeDefEventType, String typeDefGUID, String typeDefName)
      Outbound event constructor for events such as deletes.
      Parameters:
      typeDefEventType - type of event
      typeDefGUID - Unique identifier of the TypeDef that is the subject of the event.
      typeDefName - Unique name of the TypeDef that is the subject of the event.
    • OMRSTypeDefEvent

      public OMRSTypeDefEvent(OMRSTypeDefEventType typeDefEventType, TypeDefSummary originalTypeDefSummary, TypeDef typeDef)
      Outbound event constructor for changing the identifiers associated with TypeDefs.
      Parameters:
      typeDefEventType - type of event
      originalTypeDefSummary - description of the original TypeDef that is the subject of the event.
      typeDef - updated TypeDef with new identifiers
    • OMRSTypeDefEvent

      public OMRSTypeDefEvent(OMRSTypeDefEventType typeDefEventType, AttributeTypeDef originalAttributeTypeDef, AttributeTypeDef attributeTypeDef)
      Outbound event constructor for changing the identifiers associated with AttributeTypeDefs.
      Parameters:
      typeDefEventType - type of event
      originalAttributeTypeDef - description of the original AttributeTypeDef that is the subject of the event.
      attributeTypeDef - updated AttributeTypeDef with new identifiers
    • OMRSTypeDefEvent

      public OMRSTypeDefEvent(OMRSTypeDefEventErrorCode errorCode, String errorMessage, TypeDefSummary originatorTypeDefSummary, String otherMetadataCollectionId, TypeDefSummary otherTypeDefSummary)
      Outbound event constructor for conflicting typedef errors.
      Parameters:
      errorCode - code enum indicating the cause of the error.
      errorMessage - descriptive message about the error.
      originatorTypeDefSummary - details of the TypeDef in the remote repository.
      otherMetadataCollectionId - unique id of the remote repository.
      otherTypeDefSummary - details of the TypeDef in the local repository.
    • OMRSTypeDefEvent

      public OMRSTypeDefEvent(OMRSTypeDefEventErrorCode errorCode, String errorMessage, AttributeTypeDef originatorAttributeTypeDef, String otherMetadataCollectionId, AttributeTypeDef otherAttributeTypeDef)
      Outbound event constructor for conflicting attribute typedef errors.
      Parameters:
      errorCode - code enum indicating the cause of the error.
      errorMessage - descriptive message about the error.
      originatorAttributeTypeDef - details of the TypeDef in the local repository.
      otherMetadataCollectionId - unique id of the remote repository.
      otherAttributeTypeDef - details of the TypeDef in the remote repository.
    • OMRSTypeDefEvent

      public OMRSTypeDefEvent(OMRSTypeDefEventErrorCode errorCode, String errorMessage, String targetMetadataCollectionId, AttributeTypeDef targetAttributeTypeDef, AttributeTypeDef otherAttributeTypeDef)
      Outbound event constructor for conflicting attribute typedef errors.
      Parameters:
      errorCode - code enum indicating the cause of the error.
      errorMessage - descriptive message about the error.
      targetMetadataCollectionId - identifier of the cohort member that issued the event in error.
      targetAttributeTypeDef - details of the TypeDef in the remote repository.
      otherAttributeTypeDef - details of the TypeDef in the local repository.
    • OMRSTypeDefEvent

      public OMRSTypeDefEvent(OMRSTypeDefEventErrorCode errorCode, String errorMessage, String targetMetadataCollectionId, TypeDefSummary targetTypeDefSummary, TypeDef otherTypeDef)
      Outbound event constructor for typedef mismatch errors.
      Parameters:
      errorCode - code enum indicating the cause of the error.
      errorMessage - descriptive message about the error.
      targetMetadataCollectionId - identifier of the cohort member that issued the event in error.
      targetTypeDefSummary - details of the TypeDef in the remote repository.
      otherTypeDef - details of the TypeDef in the local repository.
  • Method Details

    • getTypeDefEventType

      public OMRSTypeDefEventType getTypeDefEventType()
      Return the code for this event's type.
      Returns:
      OMRSTypeDefEventType enum
    • getTypeDef

      public TypeDef getTypeDef()
      Return the complete TypeDef object.
      Returns:
      TypeDef object
    • getAttributeTypeDef

      public AttributeTypeDef getAttributeTypeDef()
      Return the complete AttributeTypeDef object.
      Returns:
      AttributeTypeDef object
    • getTypeDefGUID

      public String getTypeDefGUID()
      Return the unique id of the TypeDef.
      Returns:
      String guid
    • getTypeDefName

      public String getTypeDefName()
      Return the unique name of the TypeDef.
      Returns:
      String name
    • getTypeDefPatch

      public TypeDefPatch getTypeDefPatch()
      Return a patch for the TypeDef.
      Returns:
      TypeDefPatch object
    • getOriginalTypeDefSummary

      public TypeDefSummary getOriginalTypeDefSummary()
      Return the details of the TypeDef before it was changed.
      Returns:
      TypeDefSummary containing identifiers, category and version
    • getOriginalAttributeTypeDef

      public AttributeTypeDef getOriginalAttributeTypeDef()
      Return the details of the AttributeTypeDef before it was changed.
      Returns:
      AttributeTypeDef object
    • getErrorCode

      public OMRSTypeDefEventErrorCode getErrorCode()
      Return the TypeDef error code for error events.
      Returns:
      OMRSTypeDefEventErrorCode enum
    • getOMRSEventV1

      public OMRSEventV1 getOMRSEventV1()
      Returns an OMRSEvent populated with details from this TypeDefEvent
      Overrides:
      getOMRSEventV1 in class OMRSEvent
      Returns:
      OMRSEvent (Version 1) object
    • toString

      public String toString()
      Standard toString method.
      Overrides:
      toString in class OMRSEvent
      Returns:
      JSON style description of variables.