Package org.keycloak.theme
Interface Theme
- All Known Implementing Classes:
ClassLoaderTheme,FolderTheme
public interface Theme
- Author:
- Stian Thorgersen
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiongetEnhancedMessages(RealmModel realm, Locale locale) Retrieve localized messages from a message bundle named "messages" and enhance those messages with messages from realm localization.getMessages(String baseBundlename, Locale locale) Retrieve localized messages from a message bundle.getMessages(Locale locale) Same as getMessages(baseBundlename, locale), but uses a default baseBundlename such as "messages".getName()getResourceAsStream(String path) getTemplate(String name) getType()
-
Field Details
-
ACCOUNT_RESOURCE_PROVIDER_KEY
- See Also:
-
-
Method Details
-
getName
String getName() -
getParentName
String getParentName() -
getImportName
String getImportName() -
getType
Theme.Type getType() -
getTemplate
- Throws:
IOException
-
getResourceAsStream
- Throws:
IOException
-
getMessages
Same as getMessages(baseBundlename, locale), but uses a default baseBundlename such as "messages".- Parameters:
locale- The locale of the desired message bundle.- Returns:
- The localized messages from the bundle.
- Throws:
IOException- If bundle can not be read.
-
getMessages
Retrieve localized messages from a message bundle.- 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.
-
getEnhancedMessages
Retrieve localized messages from a message bundle named "messages" and enhance those messages with messages from realm localization.In general, the translation for the most specific applicable language is used. If a translation exists both in the message bundle and realm localization, the realm localization translation is used.
- Parameters:
realm- The realm from which the localization should be retrievedlocale- The locale of the desired message bundle.- Returns:
- The localized messages from the bundle, enhanced with realm localization
- Throws:
IOException- If bundle can not be read.
-
getProperties
- Throws:
IOException
-