public class CmsElementUtil
extends java.lang.Object
| 构造器和说明 |
|---|
CmsElementUtil(CmsObject cms,
java.lang.String currentPageUri,
CmsUUID detailContentId,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
java.util.Locale locale)
Creates a new instance.
|
CmsElementUtil(CmsObject cms,
java.lang.String currentPageUri,
CmsUUID detailContentId,
java.lang.String requestParameters,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
java.util.Locale locale)
Creates a new instance.
|
| 限定符和类型 | 方法和说明 |
|---|---|
java.lang.String |
getContentByContainer(CmsFile elementFile,
java.lang.String elementId,
CmsContainer container)
Returns the HTML content for the given resource and container.
|
java.util.Map<java.lang.String,java.lang.String> |
getContentsByContainerName(CmsContainerElementBean element,
java.util.Collection<CmsContainer> containers)
Returns the rendered element content for all the given containers.
|
CmsContainerElementData |
getElementData(CmsContainerElementBean element,
java.util.Collection<CmsContainer> containers)
Returns the data for an element.
|
CmsContainerElement |
setElementInfo(CmsContainerElementBean elementBean,
CmsContainerElement result)
Sets the data to the given container element.
|
public CmsElementUtil(CmsObject cms, java.lang.String currentPageUri, CmsUUID detailContentId, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, java.util.Locale locale) throws CmsException
cms - the cms contextcurrentPageUri - the current page uridetailContentId - the detail content structure idreq - the http requestres - the http responselocale - the content localeCmsException - if something goes wrongpublic CmsElementUtil(CmsObject cms, java.lang.String currentPageUri, CmsUUID detailContentId, java.lang.String requestParameters, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, java.util.Locale locale) throws CmsException
cms - the cms contextcurrentPageUri - the current page uridetailContentId - the detail content structure idrequestParameters - the request parameters to use while rendering the elementsreq - the http requestres - the http responselocale - the content localeCmsException - if something goes wrongpublic java.lang.String getContentByContainer(CmsFile elementFile, java.lang.String elementId, CmsContainer container)
elementFile - the element resource fileelementId - the element idcontainer - the containerpublic java.util.Map<java.lang.String,java.lang.String> getContentsByContainerName(CmsContainerElementBean element, java.util.Collection<CmsContainer> containers)
element - the element to rendercontainers - the containers the element appears inpublic CmsContainerElementData getElementData(CmsContainerElementBean element, java.util.Collection<CmsContainer> containers) throws CmsException
element - the resourcecontainers - the containers on the current container pageCmsException - if something goes wrongpublic CmsContainerElement setElementInfo(CmsContainerElementBean elementBean, CmsContainerElement result) throws CmsException
elementBean - the element beanresult - the container element to set the data toCmsException - if something goes wrong