Commit 6aaab221 by nikhilbonte Committed by Madhan Neethiraj

ATLAS-3075: Add tag propagation details in relationship notification message

parent d5f7cc46
...@@ -61,20 +61,15 @@ public class AtlasRelationshipHeader extends AtlasStruct implements Serializable ...@@ -61,20 +61,15 @@ public class AtlasRelationshipHeader extends AtlasStruct implements Serializable
setGuid(guid); setGuid(guid);
} }
public AtlasRelationshipHeader(String typeName, String guid, AtlasObjectId end1, AtlasObjectId end2) { public AtlasRelationshipHeader(String typeName, String guid, AtlasObjectId end1, AtlasObjectId end2, AtlasRelationshipDef.PropagateTags propagateTags) {
this(typeName, guid); this(typeName, guid);
this.propagateTags = propagateTags;
setEnd1(end1); setEnd1(end1);
setEnd2(end2); setEnd2(end2);
} }
public AtlasRelationshipHeader(String typeName, String guid, AtlasObjectId end1, AtlasObjectId end2, AtlasEntity.Status status) {
this(typeName, guid, end1, end2);
setStatus(status);
}
public AtlasRelationshipHeader(AtlasRelationship relationship) { public AtlasRelationshipHeader(AtlasRelationship relationship) {
this(relationship.getTypeName(), relationship.getGuid(), relationship.getEnd1(), relationship.getEnd2()); this(relationship.getTypeName(), relationship.getGuid(), relationship.getEnd1(), relationship.getEnd2(), relationship.getPropagateTags());
setLabel(relationship.getLabel()); setLabel(relationship.getLabel());
switch (relationship.getStatus()) { switch (relationship.getStatus()) {
...@@ -105,6 +100,10 @@ public class AtlasRelationshipHeader extends AtlasStruct implements Serializable ...@@ -105,6 +100,10 @@ public class AtlasRelationshipHeader extends AtlasStruct implements Serializable
this.status = status; this.status = status;
} }
public AtlasRelationshipDef.PropagateTags getPropagateTags() {
return propagateTags;
}
public void setPropagateTags(AtlasRelationshipDef.PropagateTags propagateTags) { public void setPropagateTags(AtlasRelationshipDef.PropagateTags propagateTags) {
this.propagateTags = propagateTags; this.propagateTags = propagateTags;
} }
...@@ -167,7 +166,7 @@ public class AtlasRelationshipHeader extends AtlasStruct implements Serializable ...@@ -167,7 +166,7 @@ public class AtlasRelationshipHeader extends AtlasStruct implements Serializable
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(super.hashCode(), guid, status); return Objects.hash(super.hashCode(), guid, status, label, propagateTags, end1, end2);
} }
@Override @Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment