org.jboss.portal.server
Interface LayoutServer

All Known Implementing Classes:
LayoutServerImpl

public interface LayoutServer

TODO: A description of this class.


Method Summary
 void addLayout(LayoutRegistrationMetaData metaData)
          Add a layout.
 void addRenderSet(PortalRenderSet renderSet)
           
 void addStrategy(AbstractLayoutStrategy strategy)
           
 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 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).
 

Method Detail

addLayout

void addLayout(LayoutRegistrationMetaData metaData)
               throws LayoutException
Add a layout.

Parameters:
metaData - the meta information about the layout
Throws:
LayoutException

setDefaultLayout

void setDefaultLayout(java.lang.String name)
                      throws LayoutException
Set the default layout (on a global level).

Parameters:
name - the name of the layout to set as default
Throws:
LayoutException

getLayout

PortalLayout getLayout(ServerRegistrationID id,
                       boolean defaultOnNull)
Get the layout for the provided registration id.

Parameters:
id - the registration id of the layout to get
defaultOnNull - true, if the default layout (if any is defined) should be returned in case the requested layout is not found
Returns:
the requested layout , of the default layout, or null

getLayout

PortalLayout getLayout(java.lang.String name,
                       boolean defaultOnNull)
Get the layout for the provided name.

Parameters:
name - the name of the layout to request
defaultOnNull - true, if the default layout (if any is defined) should be returned in case the requested layout is not found
Returns:
the requested layout , of the default layout, or null

removeLayouts

void removeLayouts(java.lang.String appName)
                   throws LayoutException
Remove all layouts that are hosted in the provided application.

Parameters:
appName - the name of the application that hosts the layout(s) to be removed
Throws:
LayoutException

addStrategy

void addStrategy(AbstractLayoutStrategy strategy)
Parameters:
strategy -

getStrategy

LayoutStrategy getStrategy(PortalLayout layout,
                           MediaType mediaType)
Get the layout strategy that was defined for the provided layout.

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.

Parameters:
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
Returns:
an implementation of a LayoutStrategy or null if no strategy was found

getStrategy

LayoutStrategy getStrategy(java.lang.String strategyName,
                           MediaType mediaType)
Parameters:
strategyName -
mediaType -
Returns:

removeStrategies

void removeStrategies(java.lang.String appName)
                      throws LayoutException
Remove all strategies that are hosted in the provided application.

Parameters:
appName - the name of the application that hosts the strategie(s) to be removed
Throws:
LayoutException

addRenderSet

void addRenderSet(PortalRenderSet renderSet)
Parameters:
renderSet -

getRenderSet

PortalRenderSet getRenderSet(PortalLayout layout,
                             MediaType mediaType)
Get the render set for the provided layout.

Parameters:
layout -
mediaType -
Returns:

getRenderSet

PortalRenderSet getRenderSet(java.lang.String renderSetName,
                             MediaType mediaType)
Get the render set for the provided layout.

Parameters:
renderSetName -
mediaType -
Returns:

removeRenderSets

void removeRenderSets(java.lang.String appName)
                      throws LayoutException
Remove all rendersets that are hosted in the provided application.

Parameters:
appName - the name of the application that hosts the render set(s) to be removed
Throws:
LayoutException