keycloak-service
公開メンバ関数 | 静的公開変数類 | 限定公開メンバ関数 | 静的限定公開変数類 | 全メンバ一覧
org.keycloak.theme.JarThemeProviderFactory クラス
org.keycloak.theme.JarThemeProviderFactory の継承関係図
Inheritance graph
org.keycloak.theme.JarThemeProviderFactory 連携図
Collaboration graph

公開メンバ関数

 JarThemeProviderFactory ()
 
ThemeProvider create (KeycloakSession session)
 
void init (Config.Scope config)
 
void postInit (KeycloakSessionFactory factory)
 
void close ()
 
String getId ()
 

静的公開変数類

static final String KEYCLOAK_THEMES_JSON = "META-INF/keycloak-themes.json"
 

限定公開メンバ関数

void loadThemes (ClassLoader classLoader, InputStream themesInputStream)
 

静的限定公開変数類

static Map< Theme.Type, Map< String, ClassLoaderTheme > > themes = new HashMap<>()
 

詳解

著者
Stian Thorgersen

構築子と解体子

◆ JarThemeProviderFactory()

org.keycloak.theme.JarThemeProviderFactory.JarThemeProviderFactory ( )
inline
37  {
38  super("jar");
39  }

関数詳解

◆ close()

void org.keycloak.theme.ClasspathThemeProviderFactory.close ( )
inlineinherited
95  {
96  }

◆ create()

ThemeProvider org.keycloak.theme.JarThemeProviderFactory.create ( KeycloakSession  session)
inline
42  {
43  return new ClasspathThemeProvider(themes);
44  }
static Map< Theme.Type, Map< String, ClassLoaderTheme > > themes
Definition: ClasspathThemeProviderFactory.java:35

◆ getId()

String org.keycloak.theme.ClasspathThemeProviderFactory.getId ( )
inlineinherited
99  {
100  return id;
101  }
String id
Definition: ClasspathThemeProviderFactory.java:37

◆ init()

void org.keycloak.theme.JarThemeProviderFactory.init ( Config.Scope  config)
inline
47  {
48  try {
49  ClassLoader classLoader = getClass().getClassLoader();
50  Enumeration<URL> resources = classLoader.getResources(KEYCLOAK_THEMES_JSON);
51  while (resources.hasMoreElements()) {
52  loadThemes(classLoader, resources.nextElement().openStream());
53  }
54  } catch (IOException e) {
55  throw new RuntimeException("Failed to load themes", e);
56  }
57  }
static final String KEYCLOAK_THEMES_JSON
Definition: ClasspathThemeProviderFactory.java:34
void loadThemes(ClassLoader classLoader, InputStream themesInputStream)
Definition: ClasspathThemeProviderFactory.java:103

◆ loadThemes()

void org.keycloak.theme.ClasspathThemeProviderFactory.loadThemes ( ClassLoader  classLoader,
InputStream  themesInputStream 
)
inlineprotectedinherited
103  {
104  try {
105  ThemesRepresentation themesRep = JsonSerialization.readValue(themesInputStream, ThemesRepresentation.class);
106 
107  for (ThemeRepresentation themeRep : themesRep.getThemes()) {
108  for (String t : themeRep.getTypes()) {
109  Theme.Type type = Theme.Type.valueOf(t.toUpperCase());
110  if (!themes.containsKey(type)) {
111  themes.put(type, new HashMap<>());
112  }
113  themes.get(type).put(themeRep.getName(), new ClassLoaderTheme(themeRep.getName(), type, classLoader));
114  }
115  }
116  } catch (Exception e) {
117  throw new RuntimeException("Failed to load themes", e);
118  }
119  }
static Map< Theme.Type, Map< String, ClassLoaderTheme > > themes
Definition: ClasspathThemeProviderFactory.java:35

◆ postInit()

void org.keycloak.theme.ClasspathThemeProviderFactory.postInit ( KeycloakSessionFactory  factory)
inlineinherited
91  {
92  }

メンバ詳解

◆ KEYCLOAK_THEMES_JSON

final String org.keycloak.theme.ClasspathThemeProviderFactory.KEYCLOAK_THEMES_JSON = "META-INF/keycloak-themes.json"
staticinherited

◆ themes

Map<Theme.Type, Map<String, ClassLoaderTheme> > org.keycloak.theme.ClasspathThemeProviderFactory.themes = new HashMap<>()
staticprotectedinherited

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