keycloak-service
静的公開メンバ関数 | 全メンバ一覧
org.keycloak.theme.TemplatingUtil クラス
org.keycloak.theme.TemplatingUtil 連携図
Collaboration graph

静的公開メンバ関数

static String resolveVariables (String text, Properties props)
 
static String resolveVariables (String text, Properties props, String startMarker, String endMarker)
 

詳解

著者
Marko Strukelj

関数詳解

◆ resolveVariables() [1/2]

static String org.keycloak.theme.TemplatingUtil.resolveVariables ( String  text,
Properties  props 
)
inlinestatic
27  {
28  return resolveVariables(text, props, "${", "}");
29  }
static String resolveVariables(String text, Properties props)
Definition: TemplatingUtil.java:27

◆ resolveVariables() [2/2]

static String org.keycloak.theme.TemplatingUtil.resolveVariables ( String  text,
Properties  props,
String  startMarker,
String  endMarker 
)
inlinestatic
31  {
32 
33  int e = 0;
34  int s = text.indexOf(startMarker);
35  if (s == -1) {
36  return text;
37  } else {
38  StringBuilder sb = new StringBuilder();
39 
40  do {
41  if (e < s) {
42  sb.append(text.substring(e, s));
43  }
44  e = text.indexOf(endMarker, s + startMarker.length());
45  if (e != -1) {
46  String key = text.substring(s + startMarker.length(), e);
47  sb.append(props.getProperty(key, key));
48  e += endMarker.length();
49  s = text.indexOf(startMarker, e);
50  } else {
51  e = s;
52  break;
53  }
54  } while (s != -1);
55 
56  if (e < text.length()) {
57  sb.append(text.substring(e));
58  }
59  return sb.toString();
60  }
61  }

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