public class ThemeManager extends Object implements IThemeManagerSPI
Modifier and Type | Field and Description |
---|---|
static String |
APPLIED_THEME_PROPERTY_BAG_NAME
Applied themes property bag name.
|
static String |
BASE_THEME_PREFIX
Base theme prefix
lum_basetheme/ . |
static String |
CLASSIC_THEME_ID
The classic theme identifier.
|
static String |
LUMIS_PORTAL_7_0_THEME_ID
The Lumis Portal 7.0 theme identifier.
|
static String |
LUMIS_PORTAL_9_0_THEME_ID
The Lumis Portal 9.0 theme identifier.
|
static String |
LUMIS_PORTAL_ADMIN_THEME_ID
The Lumis Portal 7.0 theme identifier.
|
static String |
NO_THEME_PREFIX
No theme prefix
lum_notheme/ . |
static String |
THEME_DEFINITION_FILE
The theme definition file name.
|
static String |
THEME_WWW_RESOURCE_PREFIX
The WWW resource prefix
lumis-theme/ . |
Constructor and Description |
---|
ThemeManager() |
Modifier and Type | Method and Description |
---|---|
void |
clearCache(String themeId)
Clears the theme cache.
|
void |
copyThemesFilesToWebRoots(Collection<? extends ITheme> themes,
Collection<IWebRootPortalBaseFolder> webRoots)
Copies the given themes' WWW resources to the given web root folders.
|
Collection<ITheme> |
getAllThemes()
Returns all existent themes.
|
List<String> |
getAppliedThemesIds(ChannelConfig channel)
Return the applied themes (identifiers) in the given channel.
|
List<String> |
getAppliedThemesIds(PageConfig page)
Returns the applied themes (identifiers) in the given page.
|
ThemeUsageConfig |
getLocalThemes(ChannelConfig channel,
String runtimeInterfaceId)
Returns the
theme usage for the given channel. |
ThemeUsageConfig |
getLocalThemes(PageConfig page,
String runtimeInterfaceId)
Returns the
theme usage for the given page. |
IThemeSPI |
getTheme(String themeId)
Returns the theme with the given identifier.
|
List<ITheme> |
getThemes(List<String> appliedThemeIds)
Returns the applied themes from an applied themes identifiers list.
|
List<ITheme> |
getThemes(WebResource webResource)
Returns the applied themes in the given web resource.
|
void |
register(String themePath)
Registers a theme in the specified classpath relative path.
|
void |
removeThemeFolderFromWebRoots(Collection<? extends ITheme> themes,
Collection<IWebRootPortalBaseFolder> webRoots)
Removes the given themes' folders from the given web root folders.
|
void |
unregister(String themeId)
Unregisters a theme, removing it from the themes registry.
|
void |
unregister(String themeId,
boolean verifyUsage)
Unregisters a theme, removing it from the themes registry.
|
void |
updateLocalThemeUsage(ChannelConfig channel,
ThemeUsageConfig themeUsage)
Updates the
theme usage for the given channel. |
void |
updateLocalThemeUsage(PageConfig page,
ThemeUsageConfig themeUsage)
Updates the
theme usage for the given page. |
public static final String THEME_DEFINITION_FILE
public static final String APPLIED_THEME_PROPERTY_BAG_NAME
public static final String BASE_THEME_PREFIX
lum_basetheme/
.public static final String NO_THEME_PREFIX
lum_notheme/
.public static final String THEME_WWW_RESOURCE_PREFIX
lumis-theme/
.public static final String CLASSIC_THEME_ID
public static final String LUMIS_PORTAL_7_0_THEME_ID
public static final String LUMIS_PORTAL_9_0_THEME_ID
public static final String LUMIS_PORTAL_ADMIN_THEME_ID
public void register(String themePath) throws PortalException
IThemeManagerSPI
The theme will be added or updated in the themes registry.
register
in interface IThemeManagerSPI
themePath
- the relative path in the classpath, referencing
the folder that contains the themedefintion.xml
file.PortalException
- if an error occurs during register.public void unregister(String themeId) throws PortalException
IThemeManagerSPI
unregister
in interface IThemeManagerSPI
themeId
- the theme identifier.PortalException
- if an error occurs during unregister.public void unregister(String themeId, boolean verifyUsage) throws PortalException
themeId
- the theme identifier.verifyUsage
- indicates whether the theme usage must be done.PortalException
public IThemeSPI getTheme(String themeId) throws PortalException
IThemeManagerSPI
getTheme
in interface IThemeManagerSPI
themeId
- the theme identifier.PortalObjectNotFoundException
- if no theme exists with the given
identifier.PortalException
- if an error occurred while obtaining the theme.public List<String> getAppliedThemesIds(ChannelConfig channel) throws PortalException
channel
- the channel.PortalException
public List<String> getAppliedThemesIds(PageConfig page) throws PortalException
page
- the page.PortalException
public List<ITheme> getThemes(WebResource webResource) throws PortalException
webResource
- the web resource.PortalException
public List<ITheme> getThemes(List<String> appliedThemeIds) throws PortalException
appliedThemeIds
- the applied themes identifiers list.PortalException
public ThemeUsageConfig getLocalThemes(PageConfig page, String runtimeInterfaceId) throws PortalException
theme usage
for the given page.page
- the page.runtimeInterfaceId
- the runtime interface identifier being requested (if any).theme usage
for the given page.PortalException
public ThemeUsageConfig getLocalThemes(ChannelConfig channel, String runtimeInterfaceId) throws PortalException
theme usage
for the given channel.channel
- the channel.runtimeInterfaceId
- the runtime interface identifier being requested (if any).theme usage
for the given channel.PortalException
public void updateLocalThemeUsage(PageConfig page, ThemeUsageConfig themeUsage) throws PortalException
theme usage
for the given page.page
- the page.themeUsage
- the theme usage.PortalException
public void updateLocalThemeUsage(ChannelConfig channel, ThemeUsageConfig themeUsage) throws PortalException
theme usage
for the given channel.channel
- the channel.themeUsage
- the theme usage.PortalException
public void copyThemesFilesToWebRoots(Collection<? extends ITheme> themes, Collection<IWebRootPortalBaseFolder> webRoots) throws PortalException
themes
- the themes.webRoots
- the web root folders.PortalException
public void removeThemeFolderFromWebRoots(Collection<? extends ITheme> themes, Collection<IWebRootPortalBaseFolder> webRoots) throws PortalException
themes
- the themes.webRoots
- the web root folders.PortalException
public Collection<ITheme> getAllThemes() throws PortalException
getAllThemes
in interface IThemeManagerSPI
PortalException
public void clearCache(String themeId) throws PortalException
IThemeManagerSPI
clearCache
in interface IThemeManagerSPI
themeId
- the theme identifierPortalException
LumisXP 12.3.0.200408 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.