Class OMRSRegistryEvent


public class OMRSRegistryEvent extends OMRSEvent
OMRSRegistryEvent provides the conversion between the properties of a registry event and the serialized event body. It supports conversion in either direction through its inner class called OMRSRegistryEventPayload:
  • Converting from registry event properties to an OMRSEvent body for sending outbound events.
  • Converting from an event body to registry event properties for inbound events.
OMRSRegistryEvent also provides a specialized interface to allow the cohort registry to work effectively with registry events.
  • Constructor Details

    • OMRSRegistryEvent

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

      public OMRSRegistryEvent(OMRSRegistryEventType registryEventType, Date registrationTimestamp, String metadataCollectionName, Connection remoteConnection)
      Constructor for a normal outbound event. It sets the event type and the other parameters used in a registry event payload.
      registrationTimestamp - time that the local repository registered.
      metadataCollectionName - name of the metadata collection being registered.
      remoteConnection - remote connection to this local repository.
    • OMRSRegistryEvent

      public OMRSRegistryEvent(OMRSRegistryEventType registryEventType)
      Constructor for an UnRegistration Event.
      registryEventType - the type of event
    • OMRSRegistryEvent

      public OMRSRegistryEvent(OMRSRegistryEventErrorCode errorCode, String errorMessage, String targetMetadataCollectionId, Connection remoteConnection)
      Constructor for the REGISTRATION_ERROR_EVENT outbound event.
      errorCode - detailed error code
      errorMessage - Optional error message
      targetMetadataCollectionId - the identifier of the server that sent bad information.
      remoteConnection - remote connection to the target repository. (Optional only supplied if relevant to the reported error; otherwise null.)
  • Method Details

    • getRegistryEventType

      public OMRSRegistryEventType getRegistryEventType()
      Return the specific registry event type.
      registry event type enum
    • getRegistrationTimestamp

      public Date getRegistrationTimestamp()
      Return the date/time that the repository registered with the open metadata repository cohort. If this is a normal registry event then this timestamp is the registration time for the local repository. If this an error event, then this is the registration time for the target repository.
      Date object for timestamp
    • getMetadataCollectionName

      public String getMetadataCollectionName()
      Return the display name for the repository's metadata collection.
      string name
    • getRemoteConnection

      public Connection getRemoteConnection()
      Return the remote connection used to create a connector used to call the repository across the network. If this is a normal registry event then this connection is for the local repository. If this an error event, then this is the connection for the target repository.
      Connection object
    • getErrorCode

      public OMRSRegistryEventErrorCode getErrorCode()
      Return the error code for the event. This property is only used for error events.
      OMRSRegistryEventErrorCode enum
    • getOMRSEventV1

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

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