public class CmsModelGroupHelper extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
MODEL_GROUP_BASE_CONTAINER
The name of the container storing the groups base element.
|
Constructor and Description |
---|
CmsModelGroupHelper(CmsObject cms,
CmsADEConfigData configData,
CmsADESessionCache sessionCache,
boolean isEditingModelGroups)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static CmsResource |
createModelGroup(CmsObject cms,
CmsADEConfigData configData)
Creates a new model group resource.
|
static boolean |
isModelGroupResource(CmsResource resource)
Returns if the given resource is a model group resource.
|
CmsContainerPageBean |
prepareforModelGroupContent(java.util.Map<java.lang.String,CmsContainerElementBean> elements,
CmsContainerPageBean page,
java.util.Locale locale)
Adds the model group elements to the page.
|
CmsContainerPageBean |
readModelGroups(CmsContainerPageBean page)
Reads the present model groups and merges their containers into the page.
|
CmsContainerPageBean |
removeModelGroupContainers(CmsContainerPageBean page)
Removes the model group containers.
|
CmsContainerPageBean |
saveModelGroups(CmsContainerPageBean page)
Saves the model groups of the given container page.
|
public static final java.lang.String MODEL_GROUP_BASE_CONTAINER
public CmsModelGroupHelper(CmsObject cms, CmsADEConfigData configData, CmsADESessionCache sessionCache, boolean isEditingModelGroups)
cms
- the current cms contextconfigData
- the configuration datasessionCache
- the session cacheisEditingModelGroups
- the edit model groups flagpublic static CmsResource createModelGroup(CmsObject cms, CmsADEConfigData configData) throws CmsException
cms
- the current cms contextconfigData
- the configuration dataCmsException
- in case creating the resource failspublic static boolean isModelGroupResource(CmsResource resource)
resource
- the resourcetrue
if the given resource is a model group resourcepublic CmsContainerPageBean prepareforModelGroupContent(java.util.Map<java.lang.String,CmsContainerElementBean> elements, CmsContainerPageBean page, java.util.Locale locale) throws CmsException
elements
- the requested elementspage
- the pagelocale
- the content localeCmsException
- in case something goes wrongpublic CmsContainerPageBean readModelGroups(CmsContainerPageBean page)
page
- the container pagepublic CmsContainerPageBean removeModelGroupContainers(CmsContainerPageBean page)
page
- the container page statepublic CmsContainerPageBean saveModelGroups(CmsContainerPageBean page)
page
- the container page