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

クラス

class  ThemeRepresentation
 
class  ThemesRepresentation
 

公開メンバ関数

 ClasspathThemeProviderFactory (String id)
 
 ClasspathThemeProviderFactory (String id, ClassLoader classLoader)
 
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<>()
 

非公開変数類

String id
 

詳解

著者
Stian Thorgersen

構築子と解体子

◆ ClasspathThemeProviderFactory() [1/2]

org.keycloak.theme.ClasspathThemeProviderFactory.ClasspathThemeProviderFactory ( String  id)
inline
39  {
40  this.id = id;
41  }
String id
Definition: ClasspathThemeProviderFactory.java:37

◆ ClasspathThemeProviderFactory() [2/2]

org.keycloak.theme.ClasspathThemeProviderFactory.ClasspathThemeProviderFactory ( String  id,
ClassLoader  classLoader 
)
inline
43  {
44  this.id = id;
45  loadThemes(classLoader, classLoader.getResourceAsStream(KEYCLOAK_THEMES_JSON));
46  }
static final String KEYCLOAK_THEMES_JSON
Definition: ClasspathThemeProviderFactory.java:34
String id
Definition: ClasspathThemeProviderFactory.java:37
void loadThemes(ClassLoader classLoader, InputStream themesInputStream)
Definition: ClasspathThemeProviderFactory.java:103

関数詳解

◆ close()

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

◆ create()

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

◆ getId()

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

◆ init()

void org.keycloak.theme.ClasspathThemeProviderFactory.init ( Config.Scope  config)
inline
87  {
88  }

◆ loadThemes()

void org.keycloak.theme.ClasspathThemeProviderFactory.loadThemes ( ClassLoader  classLoader,
InputStream  themesInputStream 
)
inlineprotected
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)
inline
91  {
92  }

メンバ詳解

◆ id

String org.keycloak.theme.ClasspathThemeProviderFactory.id
private

◆ KEYCLOAK_THEMES_JSON

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

◆ themes

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

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