org.opencms.ade.containerpage
Class CmsElementUtil

java.lang.Object
  extended by org.opencms.ade.containerpage.CmsElementUtil

public class CmsElementUtil
extends Object

Utility class to generate the element data objects used within the container-page editor.

Since:
8.0.0

Constructor Summary
CmsElementUtil(CmsObject cms, String currentPageUri, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, Locale locale)
          Creates a new instance.
CmsElementUtil(CmsObject cms, String currentPageUri, String requestParameters, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, Locale locale)
          Creates a new instance.
 
Method Summary
 Map<String,String> getContentsByContainerName(CmsContainerElementBean element, Collection<CmsContainer> containers)
          Returns the rendered element content for all the given containers.
 CmsContainerElementData getElementData(CmsContainerElementBean element, Collection<CmsContainer> containers)
          Returns the data for an element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsElementUtil

public CmsElementUtil(CmsObject cms,
                      String currentPageUri,
                      javax.servlet.http.HttpServletRequest req,
                      javax.servlet.http.HttpServletResponse res,
                      Locale locale)
               throws CmsException
Creates a new instance.

Parameters:
cms - the cms context
currentPageUri - the current page uri
req - the http request
res - the http response
locale - the content locale
Throws:
CmsException - if something goes wrong

CmsElementUtil

public CmsElementUtil(CmsObject cms,
                      String currentPageUri,
                      String requestParameters,
                      javax.servlet.http.HttpServletRequest req,
                      javax.servlet.http.HttpServletResponse res,
                      Locale locale)
               throws CmsException
Creates a new instance.

Parameters:
cms - the cms context
currentPageUri - the current page uri
requestParameters - the request parameters to use while rendering the elements
req - the http request
res - the http response
locale - the content locale
Throws:
CmsException - if something goes wrong
Method Detail

getContentsByContainerName

public Map<String,String> getContentsByContainerName(CmsContainerElementBean element,
                                                     Collection<CmsContainer> containers)
Returns the rendered element content for all the given containers.

Parameters:
element - the element to render
containers - the containers the element appears in
Returns:
a map from container names to rendered page contents

getElementData

public CmsContainerElementData getElementData(CmsContainerElementBean element,
                                              Collection<CmsContainer> containers)
                                       throws CmsException
Returns the data for an element.

Parameters:
element - the resource
containers - the containers on the current container page
Returns:
the data for an element
Throws:
CmsException - if something goes wrong