You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by ma...@apache.org on 2019/03/23 02:24:44 UTC

[atlas] branch master updated: ATLAS-3075: Add tag propagation details in relationship notification message

This is an automated email from the ASF dual-hosted git repository.

madhan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git


The following commit(s) were added to refs/heads/master by this push:
     new 6aaab22  ATLAS-3075: Add tag propagation details in relationship notification message
6aaab22 is described below

commit 6aaab22160a214b303f2f2d9ff1b2e5be48db8b3
Author: nikhilbonte <ni...@freestoneinfotech.com>
AuthorDate: Fri Mar 22 17:43:07 2019 +0530

    ATLAS-3075: Add tag propagation details in relationship notification message
    
    Signed-off-by: Madhan Neethiraj <ma...@apache.org>
---
 .../atlas/model/instance/AtlasRelationshipHeader.java   | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/intg/src/main/java/org/apache/atlas/model/instance/AtlasRelationshipHeader.java b/intg/src/main/java/org/apache/atlas/model/instance/AtlasRelationshipHeader.java
index c76807a..ad3b98e 100644
--- a/intg/src/main/java/org/apache/atlas/model/instance/AtlasRelationshipHeader.java
+++ b/intg/src/main/java/org/apache/atlas/model/instance/AtlasRelationshipHeader.java
@@ -61,20 +61,15 @@ public class AtlasRelationshipHeader extends AtlasStruct implements Serializable
         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.propagateTags = propagateTags;
         setEnd1(end1);
         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) {
-        this(relationship.getTypeName(), relationship.getGuid(), relationship.getEnd1(), relationship.getEnd2());
+        this(relationship.getTypeName(), relationship.getGuid(), relationship.getEnd1(), relationship.getEnd2(), relationship.getPropagateTags());
 
         setLabel(relationship.getLabel());
         switch (relationship.getStatus()) {
@@ -105,6 +100,10 @@ public class AtlasRelationshipHeader extends AtlasStruct implements Serializable
         this.status = status;
     }
 
+    public AtlasRelationshipDef.PropagateTags getPropagateTags() {
+        return propagateTags;
+    }
+
     public void setPropagateTags(AtlasRelationshipDef.PropagateTags propagateTags) {
         this.propagateTags = propagateTags;
     }
@@ -167,7 +166,7 @@ public class AtlasRelationshipHeader extends AtlasStruct implements Serializable
 
     @Override
     public int hashCode() {
-        return Objects.hash(super.hashCode(), guid, status);
+        return Objects.hash(super.hashCode(), guid, status, label, propagateTags, end1, end2);
     }
 
     @Override