knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From su...@apache.org
Subject [26/41] knox git commit: Added policy chain to webhdfs service KNOX-487
Date Thu, 12 Feb 2015 16:22:08 GMT
Added policy chain to webhdfs service KNOX-487


Project: http://git-wip-us.apache.org/repos/asf/knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/knox/commit/bba245fe
Tree: http://git-wip-us.apache.org/repos/asf/knox/tree/bba245fe
Diff: http://git-wip-us.apache.org/repos/asf/knox/diff/bba245fe

Branch: refs/heads/KNOX-481
Commit: bba245fe736be164d575ce89b2af86b0ba48f348
Parents: 52c3418
Author: Sumit Gupta <sumit@apache.org>
Authored: Tue Jan 20 12:23:31 2015 -0500
Committer: Sumit Gupta <sumit@apache.org>
Committed: Wed Feb 11 15:49:49 2015 -0500

----------------------------------------------------------------------
 .../service/definition/PolicyBinding.java       | 24 ++++++++++++++++++++
 .../service/definition/ServiceDefinition.java   | 12 ++++++++++
 .../gateway/service/definition/UrlBinding.java  | 13 +++++++++++
 3 files changed, 49 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/bba245fe/gateway-service-definitions/src/main/java/org/apache/hadoop/gateway/service/definition/PolicyBinding.java
----------------------------------------------------------------------
diff --git a/gateway-service-definitions/src/main/java/org/apache/hadoop/gateway/service/definition/PolicyBinding.java
b/gateway-service-definitions/src/main/java/org/apache/hadoop/gateway/service/definition/PolicyBinding.java
index ad6b0a6..d87674f 100644
--- a/gateway-service-definitions/src/main/java/org/apache/hadoop/gateway/service/definition/PolicyBinding.java
+++ b/gateway-service-definitions/src/main/java/org/apache/hadoop/gateway/service/definition/PolicyBinding.java
@@ -17,5 +17,29 @@
  */
 package org.apache.hadoop.gateway.service.definition;
 
+import javax.xml.bind.annotation.XmlAttribute;
+
 public class PolicyBinding {
+
+  private String name;
+
+  private String role;
+
+  @XmlAttribute
+  public String getName() {
+    return name;
+  }
+
+  public void setName(String name) {
+    this.name = name;
+  }
+
+  @XmlAttribute
+  public String getRole() {
+    return role;
+  }
+
+  public void setRole(String role) {
+    this.role = role;
+  }
 }

http://git-wip-us.apache.org/repos/asf/knox/blob/bba245fe/gateway-service-definitions/src/main/java/org/apache/hadoop/gateway/service/definition/ServiceDefinition.java
----------------------------------------------------------------------
diff --git a/gateway-service-definitions/src/main/java/org/apache/hadoop/gateway/service/definition/ServiceDefinition.java
b/gateway-service-definitions/src/main/java/org/apache/hadoop/gateway/service/definition/ServiceDefinition.java
index 9cbb9e0..6cb14c4 100644
--- a/gateway-service-definitions/src/main/java/org/apache/hadoop/gateway/service/definition/ServiceDefinition.java
+++ b/gateway-service-definitions/src/main/java/org/apache/hadoop/gateway/service/definition/ServiceDefinition.java
@@ -38,6 +38,8 @@ public class ServiceDefinition {
 
   private CustomDispatch dispatch;
 
+  private List<PolicyBinding> policyBindings;
+
   private CustomDispatch dispatch;
 
   @XmlAttribute
@@ -96,6 +98,16 @@ public class ServiceDefinition {
     this.dispatch = dispatch;
   }
 
+  @XmlElement(name = "policy")
+  @XmlElementWrapper(name = "policies")
+  public List<PolicyBinding> getPolicyBindings() {
+    return policyBindings;
+  }
+
+  public void setPolicyBindings(List<PolicyBinding> policyBindings) {
+    this.policyBindings = policyBindings;
+  }
+
   @XmlElement(name = "dispatch")
   public CustomDispatch getDispatch() {
     return dispatch;

http://git-wip-us.apache.org/repos/asf/knox/blob/bba245fe/gateway-service-definitions/src/main/java/org/apache/hadoop/gateway/service/definition/UrlBinding.java
----------------------------------------------------------------------
diff --git a/gateway-service-definitions/src/main/java/org/apache/hadoop/gateway/service/definition/UrlBinding.java
b/gateway-service-definitions/src/main/java/org/apache/hadoop/gateway/service/definition/UrlBinding.java
index c64658c..a1b7718 100644
--- a/gateway-service-definitions/src/main/java/org/apache/hadoop/gateway/service/definition/UrlBinding.java
+++ b/gateway-service-definitions/src/main/java/org/apache/hadoop/gateway/service/definition/UrlBinding.java
@@ -19,6 +19,7 @@ package org.apache.hadoop.gateway.service.definition;
 
 import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlType;
 import java.util.List;
 
@@ -29,6 +30,8 @@ public class UrlBinding {
 
   private List<RewriteFilter> rewriteFilters;
 
+  private List<PolicyBinding> policyBindings;
+
   private CustomDispatch dispatch;
 
   @XmlAttribute
@@ -49,6 +52,16 @@ public class UrlBinding {
     this.rewriteFilters = rewriteFilters;
   }
 
+  @XmlElement(name = "policy")
+  @XmlElementWrapper(name = "policies")
+  public List<PolicyBinding> getPolicyBindings() {
+    return policyBindings;
+  }
+
+  public void setPolicyBindings(List<PolicyBinding> policyBindings) {
+    this.policyBindings = policyBindings;
+  }
+
   @XmlElement(name = "dispatch")
   public CustomDispatch getDispatch() {
     return dispatch;


Mime
View raw message