public class CmsJspContentLoadBean extends java.lang.Object
CmsJspTagContentLoad
,
CmsJspContentAccessBean
Modifier and Type | Field and Description |
---|---|
protected CmsObject |
m_cms
The OpenCms context of the current user.
|
protected java.util.List<CmsJspContentAccessBean> |
m_content
The List of results form the content loader.
|
protected java.util.Locale |
m_locale
The selected locale for accessing entries from the XML content.
|
Constructor and Description |
---|
CmsJspContentLoadBean()
No argument constructor, required for a JavaBean.
|
CmsJspContentLoadBean(CmsObject cms,
java.util.List<CmsResource> content)
Creates a new context bean using the OpenCms context of the current user.
|
CmsJspContentLoadBean(CmsObject cms,
java.util.Locale locale,
java.util.List<CmsResource> content)
Creates a new context bean using the OpenCms context of the current user with the given locale.
|
Modifier and Type | Method and Description |
---|---|
static java.util.List<CmsJspContentAccessBean> |
convertResourceList(CmsObject cms,
java.util.List<CmsResource> resources)
Converts a list of
CmsResource objects to a list of CmsJspContentAccessBean objects,
using the current request context locale. |
static java.util.List<CmsJspContentAccessBean> |
convertResourceList(CmsObject cms,
java.util.Locale locale,
java.util.List<CmsResource> resources)
Converts a list of
CmsResource objects to a list of CmsJspContentAccessBean objects,
using the given locale. |
CmsObject |
getCmsObject()
Returns the OpenCms user context this bean was initialized with.
|
java.util.List<CmsJspContentAccessBean> |
getContent()
Returns a List of
CmsJspContentAccessBean instances, which have been wrapped around
the original CmsResource instances of the collector result. |
java.util.Locale |
getLocale()
Returns the Locale this bean was initialized with.
|
void |
init(CmsObject cms,
java.util.Locale locale,
java.util.List<CmsResource> content)
Initialize this instance.
|
protected java.util.List<CmsJspContentAccessBean> m_content
protected java.util.Locale m_locale
public CmsJspContentLoadBean()
You must call init(CmsObject, Locale, List)
and provide the
required values when you use this constructor.
init(CmsObject, Locale, List)
public CmsJspContentLoadBean(CmsObject cms, java.util.List<CmsResource> content)
The current request context locale is used.
cms
- the OpenCms context of the current usercontent
- the content to access, must contain Object of type CmsResource
public CmsJspContentLoadBean(CmsObject cms, java.util.Locale locale, java.util.List<CmsResource> content)
cms
- the OpenCms context of the current userlocale
- the Locale to use when accessing the contentcontent
- the content to access, must contain Object of type CmsResource
public static java.util.List<CmsJspContentAccessBean> convertResourceList(CmsObject cms, java.util.List<CmsResource> resources)
CmsResource
objects to a list of CmsJspContentAccessBean
objects,
using the current request context locale.cms
- the current OpenCms user contextresources
- a list of of CmsResource
objects that should be convertedCmsJspContentAccessBean
objects created from the given CmsResource
objectspublic static java.util.List<CmsJspContentAccessBean> convertResourceList(CmsObject cms, java.util.Locale locale, java.util.List<CmsResource> resources)
CmsResource
objects to a list of CmsJspContentAccessBean
objects,
using the given locale.cms
- the current OpenCms user contextlocale
- the default locale to use when accessing the contentresources
- a list of of CmsResource
objects that should be convertedCmsJspContentAccessBean
objects created from the given CmsResource
objectspublic CmsObject getCmsObject()
public java.util.List<CmsJspContentAccessBean> getContent()
CmsJspContentAccessBean
instances, which have been wrapped around
the original CmsResource
instances of the collector result.CmsJspContentAccessBean
instances, which have been wrapped around
the original CmsResource
instances of the collector result.public java.util.Locale getLocale()
public void init(CmsObject cms, java.util.Locale locale, java.util.List<CmsResource> content)
cms
- the OpenCms context of the current userlocale
- the Locale to use when accessing the contentcontent
- the content to access, must contain Object of type CmsResource