|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jboss.mx.util.JBossNotificationBroadcasterSupport
org.jboss.system.ServiceMBeanSupport
org.jboss.portal.jems.as.system.AbstractJBossService
org.jboss.portal.theme.impl.ThemeServiceImpl
public class ThemeServiceImpl
TODO: A description of this class.
| Field Summary |
|---|
| Fields inherited from class org.jboss.system.ServiceMBeanSupport |
|---|
server, SERVICE_CONTROLLER_SIG, serviceName |
| Fields inherited from interface org.jboss.system.ServiceMBean |
|---|
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
| Constructor Summary | |
|---|---|
ThemeServiceImpl()
|
|
| Method Summary | |
|---|---|
void |
addTheme(RuntimeContext runtimeContext,
PortalThemeMetaData metaData)
Add a theme. |
protected void |
createService()
|
protected void |
destroyService()
|
PortalTheme |
getDefaultTheme()
|
PortalTheme |
getTheme(ServerRegistrationID themeId,
boolean defaultOnNull)
Get a reference to a theme. |
PortalTheme |
getTheme(java.lang.String name,
boolean defaultOnNull)
Get a reference to a theme. |
PortalTheme |
getThemeById(java.lang.String themeIdString)
|
java.util.Collection |
getThemeNames()
Get a Collection of all the registered theme's names |
java.util.Collection |
getThemes()
Get a Collection of all registered themes. |
static java.lang.String[] |
parseId(java.lang.String layoutIDString)
parse the provided String for '.' as a separator. |
void |
removeTheme(PortalTheme theme)
Remove the theme from the available themes. |
void |
removeThemes(java.lang.String appId)
Remove all themes that are registered with the provided application. |
void |
setDefault(ServerRegistrationID themeId)
Set the default theme on a global scope. |
void |
setDefaultFromName(java.lang.String name)
Set the default theme. |
void |
setDefaultThemeName(java.lang.String defaultName)
|
protected void |
startService()
|
protected void |
stopService()
|
| Methods inherited from class org.jboss.portal.jems.as.system.AbstractJBossService |
|---|
create, destroy, getState, getStateString, start, stop |
| Methods inherited from class org.jboss.system.ServiceMBeanSupport |
|---|
getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister |
| Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport |
|---|
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jboss.system.Service |
|---|
create, destroy, start, stop |
| Constructor Detail |
|---|
public ThemeServiceImpl()
| Method Detail |
|---|
protected void createService()
throws java.lang.Exception
createService in class org.jboss.system.ServiceMBeanSupportjava.lang.Exceptionprotected void destroyService()
destroyService in class org.jboss.system.ServiceMBeanSupport
protected void startService()
throws java.lang.Exception
startService in class org.jboss.system.ServiceMBeanSupportjava.lang.Exceptionprotected void stopService()
stopService in class org.jboss.system.ServiceMBeanSupport
public void addTheme(RuntimeContext runtimeContext,
PortalThemeMetaData metaData)
throws ThemeException
ThemeService
addTheme in interface ThemeServicemetaData - the meta data about the theme
ThemeExceptionpublic void removeTheme(PortalTheme theme)
ThemeService
removeTheme in interface ThemeServicetheme - the theme to be removedThemeService.removeTheme(org.jboss.portal.theme.PortalTheme)public void removeThemes(java.lang.String appId)
ThemeServiceOn deployment of a new application, the theme descriptor (if any present) in that application is parsed for themes that are to be registered with the theme server. For each entry in the descriptor, a new theme is registered with the theme server. Uppon undeployment of that same application, all themes must be deregistered. This method is a convenient way to achieve this.
removeThemes in interface ThemeServiceappId - the name of the application that hosts the themes to unregisterThemeService.removeThemes(String)
public void setDefault(ServerRegistrationID themeId)
throws ThemeException
ThemeService
setDefault in interface ThemeServicethemeId - the registration id of the theme to be the new default theme
ThemeException - if the theme with this id is not available in the list of currently registered themesThemeService.setDefault(org.jboss.portal.theme.ServerRegistrationID)
public void setDefaultThemeName(java.lang.String defaultName)
throws ThemeException
ThemeExceptionpublic PortalTheme getDefaultTheme()
getDefaultTheme in interface ThemeService
public void setDefaultFromName(java.lang.String name)
throws ThemeException
name - the name of the theme that is to be set as default
ThemeException - if the theme is not part of the available themes
public PortalTheme getTheme(ServerRegistrationID themeId,
boolean defaultOnNull)
ThemeServiceInfo
getTheme in interface ThemeServiceInfothemeId - the registration id of the theme to retrievedefaultOnNull - true, when the server should return the default theme, in case the requested is not found
defaultOnNull was provided as trueThemeServiceInfo.getTheme(org.jboss.portal.theme.ServerRegistrationID,boolean)
public PortalTheme getTheme(java.lang.String name,
boolean defaultOnNull)
ThemeServiceInfo
getTheme in interface ThemeServiceInfoname - the name of the theme to retrievedefaultOnNull - true, when the server should return the default theme, in case the requested is not found
defaultOnNull was provided as trueThemeServiceInfo.getTheme(String,boolean)public PortalTheme getThemeById(java.lang.String themeIdString)
getThemeById in interface ThemeServiceInfopublic java.util.Collection getThemes()
ThemeServiceInfo
getThemes in interface ThemeServiceInfoThemeServiceInfo.getThemes()public java.util.Collection getThemeNames()
ThemeServiceInfo
getThemeNames in interface ThemeServiceInfoThemeServiceInfo.getThemeNames()public static java.lang.String[] parseId(java.lang.String layoutIDString)
layoutIDString - the string to be examined
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||