keycloak-service
公開メンバ関数 | 非公開変数類 | 全メンバ一覧
org.keycloak.services.util.JsonConfigProvider.JsonScope クラス
org.keycloak.services.util.JsonConfigProvider.JsonScope の継承関係図
Inheritance graph
org.keycloak.services.util.JsonConfigProvider.JsonScope 連携図
Collaboration graph

公開メンバ関数

 JsonScope (JsonNode config)
 
String get (String key)
 
String get (String key, String defaultValue)
 
String [] getArray (String key)
 
Integer getInt (String key)
 
Integer getInt (String key, Integer defaultValue)
 
Long getLong (String key)
 
Long getLong (String key, Long defaultValue)
 
Boolean getBoolean (String key)
 
Boolean getBoolean (String key, Boolean defaultValue)
 
Config.Scope scope (String... path)
 

非公開変数類

JsonNode config
 

詳解

構築子と解体子

◆ JsonScope()

org.keycloak.services.util.JsonConfigProvider.JsonScope.JsonScope ( JsonNode  config)
inline
73  {
74  this.config = config;
75  }
JsonNode config
Definition: JsonConfigProvider.java:71

関数詳解

◆ get() [1/2]

String org.keycloak.services.util.JsonConfigProvider.JsonScope.get ( String  key)
inline
78  {
79  return get(key, null);
80  }

◆ get() [2/2]

String org.keycloak.services.util.JsonConfigProvider.JsonScope.get ( String  key,
String  defaultValue 
)
inline
83  {
84  if (config == null) {
85  return defaultValue;
86  }
87  JsonNode n = config.get(key);
88  if (n == null) {
89  return defaultValue;
90  }
91  return replaceProperties(n.textValue());
92  }
String replaceProperties(String value)
Definition: JsonConfigProvider.java:65
JsonNode config
Definition: JsonConfigProvider.java:71

◆ getArray()

String [] org.keycloak.services.util.JsonConfigProvider.JsonScope.getArray ( String  key)
inline
95  {
96  if (config == null) {
97  return null;
98  }
99 
100  JsonNode n = config.get(key);
101  if (n == null) {
102  return null;
103  } else if (n.isArray()) {
104  String[] a = new String[n.size()];
105  for (int i = 0; i < a.length; i++) {
106  a[i] = replaceProperties(n.get(i).textValue());
107  }
108  return a;
109  } else {
110  return new String[] { replaceProperties(n.textValue()) };
111  }
112  }
String replaceProperties(String value)
Definition: JsonConfigProvider.java:65
JsonNode config
Definition: JsonConfigProvider.java:71

◆ getBoolean() [1/2]

Boolean org.keycloak.services.util.JsonConfigProvider.JsonScope.getBoolean ( String  key)
inline
157  {
158  return getBoolean(key, null);
159  }
Boolean getBoolean(String key)
Definition: JsonConfigProvider.java:157

◆ getBoolean() [2/2]

Boolean org.keycloak.services.util.JsonConfigProvider.JsonScope.getBoolean ( String  key,
Boolean  defaultValue 
)
inline
162  {
163  if (config == null) {
164  return defaultValue;
165  }
166  JsonNode n = config.get(key);
167  if (n == null) {
168  return defaultValue;
169  }
170  if (n.isTextual()) {
171  return Boolean.parseBoolean(replaceProperties(n.textValue()));
172  } else {
173  return n.booleanValue();
174  }
175  }
String replaceProperties(String value)
Definition: JsonConfigProvider.java:65
JsonNode config
Definition: JsonConfigProvider.java:71

◆ getInt() [1/2]

Integer org.keycloak.services.util.JsonConfigProvider.JsonScope.getInt ( String  key)
inline
115  {
116  return getInt(key, null);
117  }
Integer getInt(String key)
Definition: JsonConfigProvider.java:115

◆ getInt() [2/2]

Integer org.keycloak.services.util.JsonConfigProvider.JsonScope.getInt ( String  key,
Integer  defaultValue 
)
inline
120  {
121  if (config == null) {
122  return defaultValue;
123  }
124  JsonNode n = config.get(key);
125  if (n == null) {
126  return defaultValue;
127  }
128  if (n.isTextual()) {
129  return Integer.parseInt(replaceProperties(n.textValue()));
130  } else {
131  return n.intValue();
132  }
133  }
String replaceProperties(String value)
Definition: JsonConfigProvider.java:65
JsonNode config
Definition: JsonConfigProvider.java:71

◆ getLong() [1/2]

Long org.keycloak.services.util.JsonConfigProvider.JsonScope.getLong ( String  key)
inline
136  {
137  return getLong(key, null);
138  }
Long getLong(String key)
Definition: JsonConfigProvider.java:136

◆ getLong() [2/2]

Long org.keycloak.services.util.JsonConfigProvider.JsonScope.getLong ( String  key,
Long  defaultValue 
)
inline
141  {
142  if (config == null) {
143  return defaultValue;
144  }
145  JsonNode n = config.get(key);
146  if (n == null) {
147  return defaultValue;
148  }
149  if (n.isTextual()) {
150  return Long.parseLong(replaceProperties(n.textValue()));
151  } else {
152  return n.longValue();
153  }
154  }
String replaceProperties(String value)
Definition: JsonConfigProvider.java:65
JsonNode config
Definition: JsonConfigProvider.java:71

◆ scope()

Config.Scope org.keycloak.services.util.JsonConfigProvider.JsonScope.scope ( String...  path)
inline
178  {
179  return new JsonScope(getNode(config, path));
180  }
JsonNode config
Definition: JsonConfigProvider.java:71
static JsonNode getNode(JsonNode root, String... path)
Definition: JsonConfigProvider.java:51
JsonScope(JsonNode config)
Definition: JsonConfigProvider.java:73

メンバ詳解

◆ config

JsonNode org.keycloak.services.util.JsonConfigProvider.JsonScope.config
private

このクラス詳解は次のファイルから抽出されました: