|
|||||||||
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
TODO: A description of this class.
Constructor Summary | |
---|---|
LayoutServerImpl()
|
Method Summary | |
---|---|
void |
addDefaultRenderSet(java.lang.String renderSetName,
PortalRenderSet renderSet)
|
void |
addDefaultStrategy(java.lang.String strategyName,
LayoutStrategy strategy)
|
void |
addLayout(LayoutRegistrationMetaData metaData)
Add a layout. |
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(java.lang.String name)
|
void |
removeLayouts(java.lang.String appName)
Remove all layouts 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
public void destroy()
destroy
in interface org.jboss.system.Service
public void start() throws java.lang.Exception
start
in interface org.jboss.system.Service
java.lang.Exception
public void stop()
stop
in interface org.jboss.system.Service
public void addLayout(LayoutRegistrationMetaData metaData) throws LayoutException
LayoutServer
addLayout
in interface LayoutServer
metaData
- the meta information about the layout
LayoutException
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
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
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
public LayoutStrategy getStrategy(PortalLayout layout, MediaType mediaType)
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 of a strategy which can be accessed by passing null as the layout. The default will also be returned if no strategy was found for the provided 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
public LayoutStrategy getStrategy(java.lang.String strategyName, MediaType mediaType)
getStrategy
in interface LayoutServer
strategyName
- mediaType
-
public PortalRenderSet getRenderSet(PortalLayout layout, MediaType mediaType)
LayoutServer
getRenderSet
in interface LayoutServer
layout
- mediaType
-
public PortalRenderSet getRenderSet(java.lang.String renderSetName, MediaType mediaType)
LayoutServer
getRenderSet
in interface LayoutServer
public void addDefaultRenderSet(java.lang.String renderSetName, PortalRenderSet renderSet)
addDefaultRenderSet
in interface LayoutServer
renderSetName
- renderSet
- public void addDefaultStrategy(java.lang.String strategyName, LayoutStrategy strategy)
addDefaultStrategy
in interface LayoutServer
strategyName
- strategy
- public void removeLayout(java.lang.String name) throws LayoutException
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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |