站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.2 API 英文版文档

PortalLayoutImpl - JBOSS Portal 2.2 API 英文版文档


org.jboss.portal.theme.impl
Class PortalLayoutImpl

java.lang.Object
  extended byorg.jboss.portal.theme.metadata.ServerRegistrationMetaData
      extended byorg.jboss.portal.theme.metadata.LayoutRegistrationMetaData
          extended byorg.jboss.portal.theme.impl.PortalLayoutImpl
All Implemented Interfaces:
PortalLayout

public class PortalLayoutImpl
extends LayoutRegistrationMetaData
implements PortalLayout

Implementation of a PortalLayout.

An instance of this class represents the meta data of a portal layout.


Constructor Summary
PortalLayoutImpl(ServerRegistrationID id, PortalWebApp pwa, java.lang.String name, java.lang.String uri, java.util.Map stateURIs, java.util.List renderSets, java.util.Map strategies, java.util.List regionNames)
          Create the layout.
 
Method Summary
 java.lang.String getAppID()
          Get the name of the portal web application that contains this layout.
 java.lang.String getContextPath()
          Get the context path for the servlet context (portal web application) that contains this layout.
 java.lang.ClassLoader getLoader()
          Get the class loader for this layout, the loader of the portal web application.
 java.lang.String getName()
          Get the name of this layout.
 java.util.List getRegionNames()
          Get a list of region names are they are provided in the layout descriptor.
 PortalRenderSet getRenderSet(MediaType mediaType)
          Out of the render sets defined for this layout (in portal-layouts.xml), get the one that matches the requested content type.
 javax.servlet.ServletContext getServletContext()
          Get the servlet context that contains this layout.
 LayoutStrategy getStrategy(MediaType mediaType)
          Out of the portal strategies defined for this layout (if any), get the one that was defined for the provided media type.
 java.lang.String getURI()
          Get the generic URI for this layout.
 java.lang.String getURI(java.lang.String state)
          Get the uri, the location of the layout, relative to its context.
 
Methods inherited from class org.jboss.portal.theme.metadata.ServerRegistrationMetaData
getRegistrationID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortalLayoutImpl

public PortalLayoutImpl(ServerRegistrationID id,
                        PortalWebApp pwa,
                        java.lang.String name,
                        java.lang.String uri,
                        java.util.Map stateURIs,
                        java.util.List renderSets,
                        java.util.Map strategies,
                        java.util.List regionNames)
Create the layout.

Parameters:
id -
pwa - the portal pweb application the layout is contained in
name - the name of the layout
uri - the uri of the layout (the Servlet or JSP), relative to the context root of the portal web application
stateURIs - a java.util.Map of state and uri values. the layout can use a differnt resource (URI) for a particular state (example: use maximized.jsp if the state is maximized)
renderSets - a java.util.List of render sets that is defined for this layout (see portal-layouts.xml)
strategies - a java.util.Map of media type and strategy values. A layout can specify a different strategy for a particular MediaType (see portal-layouts.xml) // * @see ServerRegistrationID
See Also:
MediaType
Method Detail

getAppID

public java.lang.String getAppID()
Get the name of the portal web application that contains this layout.

Specified by:
getAppID in interface PortalLayout
Returns:
the name of the portal web application that contains this layout

getName

public java.lang.String getName()
Get the name of this layout.

Specified by:
getName in interface PortalLayout
Returns:
the name of the layout

getServletContext

public javax.servlet.ServletContext getServletContext()
Get the servlet context that contains this layout.

Specified by:
getServletContext in interface PortalLayout
Returns:
the serlvet context of this layout

getURI

public java.lang.String getURI()
Get the generic URI for this layout.

The URI is the location of the layout resource inside the Servlet context that contains it. The generic URI is the one that does not depend on a state. It is the most common URI for this layout.

Specified by:
getURI in interface PortalLayout
Returns:
the URI for this layout
See Also:
getServletContext(), getURI(String)

getURI

public java.lang.String getURI(java.lang.String state)
Get the uri, the location of the layout, relative to its context.

Specified by:
getURI in interface PortalLayout
Parameters:
state - an optional key to further separate URIs (for example for maximized window state). If a layout uri was defined for the provided state, that uri will be returned, otherwise the generic URI for this layout will be returned. If null is provided, the result is the same as calling getURI()
Returns:
the uri of the layout relative to its context
See Also:
getServletContext(), getURI()

getContextPath

public java.lang.String getContextPath()
Get the context path for the servlet context (portal web application) that contains this layout.

Specified by:
getContextPath in interface PortalLayout
Returns:
the context path of this layout

getRenderSet

public PortalRenderSet getRenderSet(MediaType mediaType)
Out of the render sets defined for this layout (in portal-layouts.xml), get the one that matches the requested content type.

Specified by:
getRenderSet in interface PortalLayout
Parameters:
mediaType - the media type of the current request
Returns:
a PortalRenderSet for this layout and provided media/content type
See Also:
MediaType, PortalRenderSet

getLoader

public java.lang.ClassLoader getLoader()
Get the class loader for this layout, the loader of the portal web application.

Specified by:
getLoader in interface PortalLayout
Returns:
the class loader of the portal web application

getStrategy

public LayoutStrategy getStrategy(MediaType mediaType)
Out of the portal strategies defined for this layout (if any), get the one that was defined for the provided media type. (see also portal-layouts.xml)

Specified by:
getStrategy in interface PortalLayout
Parameters:
mediaType - the media type (content type) for which to get the strategy for
Returns:
the strategy that was defined for this layout and media type, or null if no strategy was defined for the provided criteria.

getRegionNames

public java.util.List getRegionNames()
Description copied from interface: PortalLayout
Get a list of region names are they are provided in the layout descriptor.

Specified by:
getRegionNames in interface PortalLayout
Returns:
the list of region names that this layout uses
See Also:
PortalLayout.getRegionNames()