public class ClasspathThemeResourceProviderFactory extends Object implements ThemeResourceProviderFactory, ThemeResourceProvider
| Modifier and Type | Field and Description |
|---|---|
static String |
THEME_RESOURCES_MESSAGES |
static String |
THEME_RESOURCES_RESOURCES |
static String |
THEME_RESOURCES_TEMPLATES |
| Constructor and Description |
|---|
ClasspathThemeResourceProviderFactory(String id,
ClassLoader classLoader) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
This is called when the server shuts down.
|
ThemeResourceProvider |
create(KeycloakSession session) |
String |
getId() |
Properties |
getMessages(String baseBundlename,
Locale locale)
Load the message bundle for the specific name and locale
|
InputStream |
getResourceAsStream(String path)
Load the resource for the specific path
|
URL |
getTemplate(String name)
Load the template for the specific name
|
void |
init(Config.Scope config)
Only called once when the factory is first created.
|
void |
postInit(KeycloakSessionFactory factory)
Called after all provider factories have been initialized
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitorderpublic static final String THEME_RESOURCES_TEMPLATES
public static final String THEME_RESOURCES_RESOURCES
public static final String THEME_RESOURCES_MESSAGES
public ClasspathThemeResourceProviderFactory(String id, ClassLoader classLoader)
public ThemeResourceProvider create(KeycloakSession session)
create in interface ProviderFactory<ThemeResourceProvider>public URL getTemplate(String name) throws IOException
ThemeResourceProvidergetTemplate in interface ThemeResourceProvidername - the template nameIOExceptionpublic InputStream getResourceAsStream(String path) throws IOException
ThemeResourceProvidergetResourceAsStream in interface ThemeResourceProviderpath - the resource pathIOExceptionpublic Properties getMessages(String baseBundlename, Locale locale) throws IOException
ThemeResourceProvidergetMessages in interface ThemeResourceProviderbaseBundlename - The base name of the bundle, such as "messages" in
messages_en.properties.locale - The locale of the desired message bundle.IOException - If bundle can not be read.public String getId()
getId in interface ProviderFactory<ThemeResourceProvider>public void init(Config.Scope config)
ProviderFactoryinit in interface ProviderFactory<ThemeResourceProvider>public void postInit(KeycloakSessionFactory factory)
ProviderFactorypostInit in interface ProviderFactory<ThemeResourceProvider>public void close()
ProviderFactoryclose in interface Providerclose in interface ProviderFactory<ThemeResourceProvider>Copyright © 2021 JBoss by Red Hat. All rights reserved.