public class ClassLoaderTheme extends Object implements Theme
Theme.Type
Constructor and Description |
---|
ClassLoaderTheme(String name,
Theme.Type type,
ClassLoader classLoader) |
Modifier and Type | Method and Description |
---|---|
String |
getImportName() |
Properties |
getMessages(Locale locale)
Same as getMessages(baseBundlename, locale), but uses a default baseBundlename
such as "messages".
|
Properties |
getMessages(String baseBundlename,
Locale locale)
Retrieve localized messages from a message bundle.
|
String |
getName() |
String |
getParentName() |
Properties |
getProperties() |
InputStream |
getResourceAsStream(String path) |
URL |
getTemplate(String name) |
Theme.Type |
getType() |
void |
init(String name,
Theme.Type type,
ClassLoader classLoader) |
public ClassLoaderTheme(String name, Theme.Type type, ClassLoader classLoader) throws IOException
IOException
public void init(String name, Theme.Type type, ClassLoader classLoader) throws IOException
IOException
public String getParentName()
getParentName
in interface Theme
public String getImportName()
getImportName
in interface Theme
public Theme.Type getType()
public URL getTemplate(String name)
getTemplate
in interface Theme
public InputStream getResourceAsStream(String path)
getResourceAsStream
in interface Theme
public Properties getMessages(Locale locale) throws IOException
Theme
getMessages
in interface Theme
locale
- The locale of the desired message bundle.IOException
- If bundle can not be read.public Properties getMessages(String baseBundlename, Locale locale) throws IOException
Theme
getMessages
in interface Theme
baseBundlename
- 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 Properties getProperties()
getProperties
in interface Theme
Copyright © 2021 JBoss by Red Hat. All rights reserved.