|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.portal.server.impl.LayoutServerImpl
public class LayoutServerImpl
Implementaion of the layout server.
The layout server is a registry of all available layouts. The server also allows access to all available render sets and layout strategies. Render sets and layout strategies can be independent (named), or children of a layout. Accordingly, the layout server provides accessor methods to get strategies and render set by name, or by layout. Render sets and layout strategies can, and must, be defined for a specific media type (mime type).
PortalLayout
,
PortalRenderSet
,
LayoutStrategy
,
MediaType
Constructor Summary | |
---|---|
LayoutServerImpl()
|
Method Summary | |
---|---|
void |
addLayout(LayoutRegistrationMetaData metaData)
Add a layout. |
void |
addRenderSet(PortalRenderSet renderSet)
|
void |
addStrategy(AbstractLayoutStrategy strategy)
|
void |
create()
|
void |
destroy()
|
PortalLayout |
getLayout(ServerRegistrationID id,
boolean defaultOnNull)
Get the layout for the provided registration id. |
PortalLayout |
getLayout(java.lang.String name,
boolean defaultOnNull)
Get the layout for the provided name. |
PortalRenderSet |
getRenderSet(PortalLayout layout,
MediaType mediaType)
Get the render set for the provided layout. |
PortalRenderSet |
getRenderSet(java.lang.String renderSetName,
MediaType mediaType)
Get the render set for the provided layout. |
LayoutStrategy |
getStrategy(PortalLayout layout,
MediaType mediaType)
Get the layout strategy that was defined for the provided layout. |
LayoutStrategy |
getStrategy(java.lang.String strategyName,
MediaType mediaType)
|
void |
removeLayout(ServerRegistrationID id)
Remove the layout identified by the provided registration id. |
void |
removeLayouts(java.lang.String appName)
Remove all layouts that are hosted in the provided application. |
void |
removeRenderSets(java.lang.String appName)
Remove all rendersets that are hosted in the provided application. |
void |
removeStrategies(java.lang.String appName)
Remove all strategies that are hosted in the provided application. |
void |
setDefaultLayout(java.lang.String name)
Set the default layout (on a global level). |
void |
start()
|
void |
stop()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LayoutServerImpl()
Method Detail |
---|
public void create() throws java.lang.Exception
create
in interface org.jboss.system.Service
java.lang.Exception
Service.create()
public void destroy()
destroy
in interface org.jboss.system.Service
Service.destroy()
public void start() throws java.lang.Exception
start
in interface org.jboss.system.Service
java.lang.Exception
Service.start()
public void stop()
stop
in interface org.jboss.system.Service
Service.stop()
public void addLayout(LayoutRegistrationMetaData metaData) throws LayoutException
LayoutServer
addLayout
in interface LayoutServer
metaData
- the meta information about the layout
LayoutException
LayoutServer.addLayout(LayoutRegistrationMetaData)
public void setDefaultLayout(java.lang.String name) throws LayoutException
LayoutServer
setDefaultLayout
in interface LayoutServer
name
- the name of the layout to set as default
LayoutException
LayoutServer.setDefaultLayout(String)
public PortalLayout getLayout(ServerRegistrationID id, boolean defaultOnNull)
LayoutServer
getLayout
in interface LayoutServer
id
- the registration id of the layout to getdefaultOnNull
- true, if the default layout (if any is defined) should be
returned in case the requested layout is not found
LayoutServer.getLayout(org.jboss.portal.server.ServerRegistrationID, boolean)
public PortalLayout getLayout(java.lang.String name, boolean defaultOnNull)
LayoutServer
getLayout
in interface LayoutServer
name
- the name of the layout to requestdefaultOnNull
- true, if the default layout (if any is defined) should be
returned in case the requested layout is not found
LayoutServer.getLayout(String, boolean)
public void removeLayout(ServerRegistrationID id) throws LayoutException
id
- the id of the layout that needs to be removed
LayoutException
public void removeLayouts(java.lang.String appName) throws LayoutException
LayoutServer
removeLayouts
in interface LayoutServer
appName
- the name of the application that hosts the layout(s) to be removed
LayoutException
LayoutServer.removeLayouts(String)
public void addStrategy(AbstractLayoutStrategy strategy)
addStrategy
in interface LayoutServer
LayoutServer.addStrategy(org.jboss.portal.server.theme.strategy.AbstractLayoutStrategy)
public LayoutStrategy getStrategy(PortalLayout layout, MediaType mediaType)
LayoutServer
In the layout descriptor (portal-layouts.xml) a strategy can be defined to be used in conjunction with every layout that is defined in this file. The layout must be defined per media type. The portal provides a default implementation on a strategy which can be accessed by passing null as the layout.
getStrategy
in interface LayoutServer
layout
- the layout to get the strategy for (or null for the default layout strategy)mediaType
- the media type (content type ; mime type) of the strategy
LayoutServer.getStrategy(org.jboss.portal.server.theme.PortalLayout, org.jboss.portal.common.MediaType)
public LayoutStrategy getStrategy(java.lang.String strategyName, MediaType mediaType)
getStrategy
in interface LayoutServer
LayoutServer.getStrategy(String, org.jboss.portal.common.MediaType)
public void removeStrategies(java.lang.String appName) throws LayoutException
LayoutServer
removeStrategies
in interface LayoutServer
appName
- the name of the application that hosts the strategie(s) to be removed
LayoutException
LayoutServer.removeStrategies(String)
public void addRenderSet(PortalRenderSet renderSet)
addRenderSet
in interface LayoutServer
LayoutServer.addRenderSet(org.jboss.portal.server.theme.PortalRenderSet)
public PortalRenderSet getRenderSet(PortalLayout layout, MediaType mediaType)
LayoutServer
getRenderSet
in interface LayoutServer
LayoutServer.getRenderSet(org.jboss.portal.server.theme.PortalLayout, org.jboss.portal.common.MediaType)
public PortalRenderSet getRenderSet(java.lang.String renderSetName, MediaType mediaType)
LayoutServer
getRenderSet
in interface LayoutServer
LayoutServer.getRenderSet(String, org.jboss.portal.common.MediaType)
public void removeRenderSets(java.lang.String appName) throws LayoutException
LayoutServer
removeRenderSets
in interface LayoutServer
appName
- the name of the application that hosts the render set(s) to be removed
LayoutException
LayoutServer.removeRenderSets(String)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |