Class OMRSInstanceEvent
java.lang.Object
org.odpi.openmetadata.repositoryservices.events.OMRSEvent
org.odpi.openmetadata.repositoryservices.events.OMRSInstanceEvent
Structure of an instance event.
-
Field Summary
Fields inherited from class org.odpi.openmetadata.repositoryservices.events.OMRSEvent
errorMessage, eventCategory, eventDirection, eventOriginator, eventTimestamp, genericErrorCode, otherAttributeTypeDef, otherInstanceGUID, otherMetadataCollectionId, otherOrigin, otherTypeDef, otherTypeDefSummary, targetAttributeTypeDef, targetInstanceGUID, targetMetadataCollectionId, targetRemoteConnection, targetTypeDefSummary
-
Constructor Summary
ConstructorDescriptionOMRSInstanceEvent
(OMRSEventV1 inboundEvent) Inbound event constructor that takes the object created by the Jackson JSON mapper and unpacks the properties into the instance event.OMRSInstanceEvent
(OMRSInstanceEventErrorCode errorCode, String errorMessage, String targetMetadataCollectionId, TypeDefSummary targetTypeDefSummary, String targetInstanceGUID, String otherMetadataCollectionId, InstanceProvenanceType otherOrigin, TypeDefSummary otherTypeDefSummary, String otherInstanceGUID) Constructor for instance conflict events.OMRSInstanceEvent
(OMRSInstanceEventErrorCode errorCode, String errorMessage, String targetMetadataCollectionId, TypeDefSummary targetTypeDefSummary, String targetInstanceGUID, TypeDefSummary otherTypeDefSummary) Instance type conflict event.OMRSInstanceEvent
(OMRSInstanceEventType instanceEventType, String typeDefGUID, String typeDefName, String instanceGUID) Constructor for instance events related to a delete or purge of an instance or a request to refresh an instance.OMRSInstanceEvent
(OMRSInstanceEventType instanceEventType, EntityDetail entity) Constructor for instance events related to a change to an entity.OMRSInstanceEvent
(OMRSInstanceEventType instanceEventType, EntityDetail entity, Classification originalClassification, Classification classification) Constructor for instance events related to a change to an entity's classification.OMRSInstanceEvent
(OMRSInstanceEventType instanceEventType, EntityDetail originalEntity, EntityDetail newEntity) Constructor for instance events related to a change to an entity where the old version is supplied.OMRSInstanceEvent
(OMRSInstanceEventType instanceEventType, EntityProxy entityProxy, Classification originalClassification, Classification classification) Constructor for instance events related to a change to an entity's classification.OMRSInstanceEvent
(OMRSInstanceEventType instanceEventType, InstanceGraph instances) Constructor for batch instance events.OMRSInstanceEvent
(OMRSInstanceEventType instanceEventType, Relationship relationship) Constructor for instance events related to a change to a relationship.OMRSInstanceEvent
(OMRSInstanceEventType instanceEventType, Relationship originalRelationship, Relationship newRelationship) Constructor for instance events related to a change to a relationship where the original values are also sent. -
Method Summary
Modifier and TypeMethodDescriptionReturn the new classificationReturn the entity instance (if applicable) or null.Return the entity proxy (if applicable) or null.Return the error code for this instance event.Return the identifier of the instance's home metadata collection.Return the instance batch (if applicable) or null.Return the code for this event's type.Return the unique identifier for the instance itself.Returns an OMRSEvent populated with details from this InstanceEventReturn the original classification if existsReturn the original entity instance (if applicable) or null.Return the identifier of the original metadata collection for this instance.Return the original unique identifier (guid) for this instance.Return the original relationship instance (if applicable) or null.Return the original version for this instance's TypeDef.Return the relationship instance (if applicable) or null.Return the unique identifier for the instance's TypeDef.Return the unique name for the instance's TypeDef.void
setHomeMetadataCollectionId
(String homeMetadataCollectionId) Set up the home metadata collection id.void
setOriginalHomeMetadataCollectionId
(String originalHomeMetadataCollectionId) Set up the unique id of the metadata collection that was the original home of a metadata instance that has just been rehomed.void
setOriginalInstanceGUID
(String originalInstanceGUID) Set up the original unique id (guid) of an instance that has just been re-identified (ie it has had a new guid assigned.void
setOriginalTypeDefSummary
(TypeDefSummary originalTypeDefSummary) Set up the details of the original TypeDef of a metadata instance that has just been reTyped.toString()
Standard toString method.Methods inherited from class org.odpi.openmetadata.repositoryservices.events.OMRSEvent
getErrorMessage, getEventCategory, getEventDirection, getEventOriginator, getEventTimestamp, getGenericErrorCode, getOtherAttributeTypeDef, getOtherInstanceGUID, getOtherMetadataCollectionId, getOtherOrigin, getOtherTypeDef, getOtherTypeDefSummary, getTargetAttributeTypeDef, getTargetInstanceGUID, getTargetMetadataCollectionId, getTargetRemoteConnection, getTargetTypeDefSummary, setEventOriginator
-
Constructor Details
-
OMRSInstanceEvent
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 to parse.
-
OMRSInstanceEvent
Constructor for instance events related to a change to an entity.- Parameters:
instanceEventType
- type of evententity
- new values for entity that changed
-
OMRSInstanceEvent
public OMRSInstanceEvent(OMRSInstanceEventType instanceEventType, EntityProxy entityProxy, Classification originalClassification, Classification classification) Constructor for instance events related to a change to an entity's classification.- Parameters:
instanceEventType
- type of evententityProxy
- entity that changedoriginalClassification
- original Classification value (if existed)classification
- new classification (if relevant)
-
OMRSInstanceEvent
public OMRSInstanceEvent(OMRSInstanceEventType instanceEventType, EntityDetail entity, Classification originalClassification, Classification classification) Constructor for instance events related to a change to an entity's classification.- Parameters:
instanceEventType
- type of evententity
- entity that changedoriginalClassification
- original Classification value (if existed)classification
- new classification (if relevant)
-
OMRSInstanceEvent
public OMRSInstanceEvent(OMRSInstanceEventType instanceEventType, EntityDetail originalEntity, EntityDetail newEntity) Constructor for instance events related to a change to an entity where the old version is supplied.- Parameters:
instanceEventType
- type of eventoriginalEntity
- original value of the entitynewEntity
- new values for entity that changed
-
OMRSInstanceEvent
Constructor for instance events related to a change to a relationship.- Parameters:
instanceEventType
- type of eventrelationship
- new values for relationship that changed
-
OMRSInstanceEvent
public OMRSInstanceEvent(OMRSInstanceEventType instanceEventType, Relationship originalRelationship, Relationship newRelationship) Constructor for instance events related to a change to a relationship where the original values are also sent.- Parameters:
instanceEventType
- type of eventoriginalRelationship
- original values of relationshipnewRelationship
- new values for relationship that changed
-
OMRSInstanceEvent
public OMRSInstanceEvent(OMRSInstanceEventType instanceEventType, String typeDefGUID, String typeDefName, String instanceGUID) Constructor for instance events related to a delete or purge of an instance or a request to refresh an instance.- Parameters:
instanceEventType
- type of eventtypeDefGUID
- unique identifier for this entity's TypeDeftypeDefName
- name of this entity's TypeDefinstanceGUID
- unique identifier for the entity
-
OMRSInstanceEvent
Constructor for batch instance events.- Parameters:
instanceEventType
- type of eventinstances
- graph of instances
-
OMRSInstanceEvent
public OMRSInstanceEvent(OMRSInstanceEventErrorCode errorCode, String errorMessage, String targetMetadataCollectionId, TypeDefSummary targetTypeDefSummary, String targetInstanceGUID, String otherMetadataCollectionId, InstanceProvenanceType otherOrigin, TypeDefSummary otherTypeDefSummary, String otherInstanceGUID) Constructor for instance conflict events.- Parameters:
errorCode
- error codeerrorMessage
- description of the errortargetMetadataCollectionId
- metadata collection id of other repository with the conflicting instancetargetTypeDefSummary
- details of the target instance's TypeDeftargetInstanceGUID
- unique identifier for the source instanceotherMetadataCollectionId
- local metadata collection idotherOrigin
- provenance information of the local instanceotherTypeDefSummary
- TypeDef details of the local instanceotherInstanceGUID
- GUID of the local instance
-
OMRSInstanceEvent
public OMRSInstanceEvent(OMRSInstanceEventErrorCode errorCode, String errorMessage, String targetMetadataCollectionId, TypeDefSummary targetTypeDefSummary, String targetInstanceGUID, TypeDefSummary otherTypeDefSummary) Instance type conflict event.- Parameters:
errorCode
- error codeerrorMessage
- description of the errortargetMetadataCollectionId
- metadata collection id of other repository with the conflicting instancetargetTypeDefSummary
- details of the target instance's TypeDeftargetInstanceGUID
- unique identifier for the source instanceotherTypeDefSummary
- details of the other TypeDef
-
-
Method Details
-
setHomeMetadataCollectionId
Set up the home metadata collection id. This is used for when a repository is requesting a refresh of an instance's details.- Parameters:
homeMetadataCollectionId
- unique id of the metadata collection where this instance comes from.
-
setOriginalHomeMetadataCollectionId
Set up the unique id of the metadata collection that was the original home of a metadata instance that has just been rehomed.- Parameters:
originalHomeMetadataCollectionId
- unique id of original metadata collection
-
setOriginalTypeDefSummary
Set up the details of the original TypeDef of a metadata instance that has just been reTyped.- Parameters:
originalTypeDefSummary
- details of original TypeDef
-
setOriginalInstanceGUID
Set up the original unique id (guid) of an instance that has just been re-identified (ie it has had a new guid assigned.- Parameters:
originalInstanceGUID
- original guid of an instance
-
getInstanceEventType
Return the code for this event's type.- Returns:
- OMRSInstanceEventType enum
-
getTypeDefGUID
Return the unique identifier for the instance's TypeDef.- Returns:
- String identifier (guid)
-
getTypeDefName
Return the unique name for the instance's TypeDef.- Returns:
- String name
-
getInstanceGUID
Return the unique identifier for the instance itself.- Returns:
- String identifier (guid)
-
getOriginalEntity
Return the original entity instance (if applicable) or null.- Returns:
- EntityDetail object
-
getEntity
Return the entity instance (if applicable) or null.- Returns:
- EntityDetail object
-
getEntityProxy
Return the entity proxy (if applicable) or null.- Returns:
- EntityProxy object
-
getOriginalRelationship
Return the original relationship instance (if applicable) or null.- Returns:
- Relationship object
-
getRelationship
Return the relationship instance (if applicable) or null.- Returns:
- Relationship object
-
getOriginalClassification
Return the original classification if exists- Returns:
- classification object
-
getClassification
Return the new classification- Returns:
- classification object
-
getInstanceBatch
Return the instance batch (if applicable) or null.- Returns:
- InstanceGraph object
-
getHomeMetadataCollectionId
Return the identifier of the instance's home metadata collection. This is used on refresh requests.- Returns:
- String unique identifier (guid)
-
getOriginalHomeMetadataCollectionId
Return the identifier of the original metadata collection for this instance. This is used when an instance is being re-homed.- Returns:
- String unique identifier (guid)
-
getOriginalTypeDefSummary
Return the original version for this instance's TypeDef. This is used if the type for the instance has been changed to resolve a conflict or to allow a change in the TypeDef Gallery.- Returns:
- details of the original TypeDef
-
getOriginalInstanceGUID
Return the original unique identifier (guid) for this instance. This is used if the guid for the instance has been changed to resolve a conflict.- Returns:
- String unique identifier (guid)
-
getErrorCode
Return the error code for this instance event. If there is no error it is set to NOT_IN_USE.- Returns:
- OMRSInstanceEventErrorCode enum
-
getOMRSEventV1
Returns an OMRSEvent populated with details from this InstanceEvent- Overrides:
getOMRSEventV1
in classOMRSEvent
- Returns:
- OMRSEvent (Version 1) object
-
toString
Standard toString method.
-