|
||||||||||
| 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
TODO: A description of this class.
| Field Summary | |
private ServerRegistrationID |
defaultID
|
private java.util.Map |
exactThemeNames
|
private static org.apache.log4j.Logger |
log
|
private java.util.Map |
themeNames
|
private java.util.Map |
themes
|
| Fields inherited from class org.jboss.system.ServiceMBeanSupport |
server, SERVICE_CONTROLLER_SIG, serviceName |
| Fields inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport |
|
| 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 |
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. |
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. |
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. |
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 |
| Field Detail |
private static org.apache.log4j.Logger log
private java.util.Map themes
private java.util.Map themeNames
private java.util.Map exactThemeNames
private ServerRegistrationID defaultID
| Constructor Detail |
public ThemeServiceImpl()
| Method Detail |
protected void createService()
throws java.lang.Exception
java.lang.Exceptionprotected void destroyService()
protected void startService()
throws java.lang.Exception
java.lang.Exceptionprotected void stopService()
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 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 themespublic 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 java.util.Collection getThemes()
ThemeServiceInfo
getThemes in interface ThemeServiceInfoThemeServiceInfo.getThemes()public java.util.Collection getThemeNames()
ThemeServiceInfo
getThemeNames in interface ThemeServiceInfoThemeServiceInfo.getThemeNames()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||