ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mad...@apache.org
Subject incubator-ranger git commit: Updated setPolicyTypeFinal to accept set/unset boolean.
Date Wed, 27 May 2015 20:29:38 GMT
Repository: incubator-ranger
Updated Branches:
  refs/heads/tag-policy f796d82bd -> 893cfc664


Updated setPolicyTypeFinal to accept set/unset boolean.

Signed-off-by: Madhan Neethiraj <madhan@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/893cfc66
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/893cfc66
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/893cfc66

Branch: refs/heads/tag-policy
Commit: 893cfc664a6a75efa5ba1d33cfff1e4d7c669cbb
Parents: f796d82
Author: Abhay Kulkarni <akulkarni@hortonworks.com>
Authored: Tue May 26 22:21:23 2015 -0700
Committer: Madhan Neethiraj <madhan@apache.org>
Committed: Tue May 26 23:37:03 2015 -0700

----------------------------------------------------------------------
 .../java/org/apache/ranger/plugin/model/RangerPolicy.java   | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/893cfc66/agents-common/src/main/java/org/apache/ranger/plugin/model/RangerPolicy.java
----------------------------------------------------------------------
diff --git a/agents-common/src/main/java/org/apache/ranger/plugin/model/RangerPolicy.java
b/agents-common/src/main/java/org/apache/ranger/plugin/model/RangerPolicy.java
index 6d9c929..338174c 100644
--- a/agents-common/src/main/java/org/apache/ranger/plugin/model/RangerPolicy.java
+++ b/agents-common/src/main/java/org/apache/ranger/plugin/model/RangerPolicy.java
@@ -221,8 +221,13 @@ public class RangerPolicy extends RangerBaseModelObject implements java.io.Seria
 		policyType = POLICY_TYPE_DEFAULT;
 	}
 
-	final public void setPolicyTypeFinal() {
-		this.policyType |= POLICY_TYPE_FINAL;
+	final public void setPolicyTypeFinal(boolean set) {
+
+		if (set) {
+			this.policyType |= POLICY_TYPE_FINAL;
+		} else {
+			this.policyType &= (~POLICY_TYPE_FINAL);
+		}
 	}
 
 	/**


Mime
View raw message