public final class DirectiveConfig extends Object
DirectiveConfig defines the configuration for the Wrangler.
It specifies the directive exclusions -- meaning directives that should
not be accessible to the users and as well as directive aliases.
{
"exclusions" : [
"parse-as-csv",
"parse-as-excel",
"set",
"invoke-http"
],
"aliases" : {
"json-parser" : "parse-as-json",
"js-parser" : "parse-as-json"
}
}| Modifier and Type | Field and Description |
|---|---|
static DirectiveConfig |
EMPTY |
| Constructor and Description |
|---|
DirectiveConfig() |
| Modifier and Type | Method and Description |
|---|---|
String |
getAliasName(String directive)
Dereferences an alias if defined, else returns the directive itself.
|
Map<String,List<String>> |
getReverseAlias() |
boolean |
hasAlias(String directive)
Checks if a directive is aliased.
|
boolean |
isExcluded(String directive)
Checks if the directive should be excluded.
|
com.google.gson.JsonElement |
toJson()
Converts this object into a
JsonElement. |
public static final DirectiveConfig EMPTY
public boolean hasAlias(String directive)
directive - to checked for alias.public String getAliasName(String directive)
directive - to be dereferenced.public boolean isExcluded(String directive)
directive - to checked if it has to be excluded.public com.google.gson.JsonElement toJson()
JsonElement.JsonElement representation of this object.Copyright © 2020 CDAP Licensed under the Apache License, Version 2.0.