Package org.keycloak.theme
Class ClassLoaderTheme
- java.lang.Object
- 
- org.keycloak.theme.ClassLoaderTheme
 
- 
- All Implemented Interfaces:
- Theme
 
 public class ClassLoaderTheme extends Object implements Theme - Author:
- Stian Thorgersen
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface org.keycloak.theme.ThemeTheme.Type
 
- 
 - 
Constructor SummaryConstructors Constructor Description ClassLoaderTheme(String name, Theme.Type type, ClassLoader classLoader)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetImportName()PropertiesgetMessages(String baseBundlename, Locale locale)Retrieve localized messages from a message bundle.PropertiesgetMessages(Locale locale)Same as getMessages(baseBundlename, locale), but uses a default baseBundlename such as "messages".StringgetName()StringgetParentName()PropertiesgetProperties()InputStreamgetResourceAsStream(String path)URLgetTemplate(String name)Theme.TypegetType()voidinit(String name, Theme.Type type, ClassLoader classLoader)
 
- 
- 
- 
Constructor Detail- 
ClassLoaderThemepublic ClassLoaderTheme(String name, Theme.Type type, ClassLoader classLoader) throws IOException - Throws:
- IOException
 
 
- 
 - 
Method Detail- 
initpublic void init(String name, Theme.Type type, ClassLoader classLoader) throws IOException - Throws:
- IOException
 
 - 
getParentNamepublic String getParentName() - Specified by:
- getParentNamein interface- Theme
 
 - 
getImportNamepublic String getImportName() - Specified by:
- getImportNamein interface- Theme
 
 - 
getTypepublic Theme.Type getType() 
 - 
getTemplatepublic URL getTemplate(String name) - Specified by:
- getTemplatein interface- Theme
 
 - 
getResourceAsStreampublic InputStream getResourceAsStream(String path) throws IOException - Specified by:
- getResourceAsStreamin interface- Theme
- Throws:
- IOException
 
 - 
getMessagespublic Properties getMessages(Locale locale) throws IOException Description copied from interface:ThemeSame as getMessages(baseBundlename, locale), but uses a default baseBundlename such as "messages".- Specified by:
- getMessagesin interface- Theme
- Parameters:
- locale- The locale of the desired message bundle.
- Returns:
- The localized messages from the bundle.
- Throws:
- IOException- If bundle can not be read.
 
 - 
getMessagespublic Properties getMessages(String baseBundlename, Locale locale) throws IOException Description copied from interface:ThemeRetrieve localized messages from a message bundle.- Specified by:
- getMessagesin interface- Theme
- Parameters:
- baseBundlename- The base name of the bundle, such as "messages" in messages_en.properties.
- locale- The locale of the desired message bundle.
- Returns:
- The localized messages from the bundle.
- Throws:
- IOException- If bundle can not be read.
 
 - 
getPropertiespublic Properties getProperties() - Specified by:
- getPropertiesin interface- Theme
 
 
- 
 
-