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/ranger.git
The following commit(s) were added to refs/heads/master by this push:
new 58a9e67 RANGER-3003 : RangerAtlas Service doesn't auto complete
Business metadata type on policy UI
58a9e67 is described below
commit 58a9e67aac3e7d4957e02c5c8daa7fc6dc2b40bd
Author: nixonrodrigues <[email protected]>
AuthorDate: Fri Sep 18 15:50:17 2020 +0530
RANGER-3003 : RangerAtlas Service doesn't auto complete Business metadata
type on policy UI
Signed-off-by: Madhan Neethiraj <[email protected]>
---
.../ranger/services/atlas/RangerServiceAtlas.java | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git
a/plugin-atlas/src/main/java/org/apache/ranger/services/atlas/RangerServiceAtlas.java
b/plugin-atlas/src/main/java/org/apache/ranger/services/atlas/RangerServiceAtlas.java
index 5b58c06..c13633a 100644
---
a/plugin-atlas/src/main/java/org/apache/ranger/services/atlas/RangerServiceAtlas.java
+++
b/plugin-atlas/src/main/java/org/apache/ranger/services/atlas/RangerServiceAtlas.java
@@ -93,11 +93,12 @@ public class RangerServiceAtlas extends RangerBaseService {
public static final String CONFIG_PASSWORD = "password";
public static final String ENTITY_NOT_CLASSIFIED =
"_NOT_CLASSIFIED";
- private static final String TYPE_ENTITY = "entity";
- private static final String TYPE_CLASSIFICATION = "classification";
- private static final String TYPE_STRUCT = "struct";
- private static final String TYPE_ENUM = "enum";
- private static final String TYPE_RELATIONSHIP = "relationship";
+ private static final String TYPE_ENTITY = "entity";
+ private static final String TYPE_CLASSIFICATION = "classification";
+ private static final String TYPE_STRUCT = "struct";
+ private static final String TYPE_ENUM = "enum";
+ private static final String TYPE_RELATIONSHIP = "relationship";
+ private static final String TYPE_BUSINESS_METADATA =
"business_metadata";
private static final String URL_LOGIN =
"/j_spring_security_check";
private static final String URL_GET_TYPESDEF_HEADERS =
"/api/atlas/v2/types/typedefs/headers";
@@ -254,7 +255,7 @@ public class RangerServiceAtlas extends RangerBaseService {
}
private static class AtlasServiceClient extends BaseClient {
- private static final String[] TYPE_CATEGORIES = new String[] {
"classification", "enum", "entity", "relationship", "struct" };
+ private static final String[] TYPE_CATEGORIES = new String[] {
"classification", "enum", "entity", "relationship", "struct"
,"business_metadata" };
Map<String, List<String>> typesDef = new HashMap<>();
@@ -309,6 +310,10 @@ public class RangerServiceAtlas extends RangerBaseService {
if
(emptyOrContainsMatch(typeCategories, TYPE_RELATIONSHIP)) {
addIfStartsWithAndNotExcluded(ret, typesDef.get(TYPE_RELATIONSHIP), userInput,
currentValues);
}
+
+ if
(emptyOrContainsMatch(typeCategories, TYPE_BUSINESS_METADATA)) {
+
addIfStartsWithAndNotExcluded(ret, typesDef.get(TYPE_BUSINESS_METADATA),
userInput, currentValues);
+ }
}
break;