public class CmsModelPageHelper extends java.lang.Object
| Constructor and Description |
|---|
CmsModelPageHelper(CmsObject cms,
CmsResource rootResource)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addModelPageToSitemapConfiguration(CmsResource sitemapConfig,
CmsResource modelPage,
boolean disabled)
Adds a model page to the sitemap config.
|
CmsResource |
createModelGroupPage(java.lang.String name,
java.lang.String description,
CmsUUID copyId)
Creates a new model group page.
|
CmsResource |
createPageInModelFolder(java.lang.String name,
java.lang.String description,
CmsUUID copyId)
Creates a new potential model page in the default folder for new model pages.
|
void |
disableModelPage(CmsResource sitemapConfig,
CmsUUID structureId,
boolean disabled)
Disables the given model page.
|
CmsResource |
ensureModelFolder(CmsResource rootResource)
Tries to either read or create the default folder for model pages in the current sitemap, and returns it.
|
java.util.List<CmsModelPageEntry> |
getModelGroups()
Returns the local model group pages.
|
CmsModelInfo |
getModelInfo()
Returns the model infos.
|
java.util.List<CmsModelPageEntry> |
getModelPages()
Reads the model pages from the ADE configuration.
|
java.util.List<CmsModelPageEntry> |
getParentModelPages()
Returns the parent model pages.
|
void |
removeModelPage(CmsResource sitemapConfig,
CmsUUID structureId)
Removes a model page from the sitemap configuration.
|
public CmsModelPageHelper(CmsObject cms, CmsResource rootResource) throws CmsException
cms - the CMS context to userootResource - the root resource for the sitemapCmsException - if something goes wrongpublic void addModelPageToSitemapConfiguration(CmsResource sitemapConfig, CmsResource modelPage, boolean disabled) throws CmsException
sitemapConfig - the sitemap configuration resourcemodelPage - the model page to adddisabled - true if the model page should be added as 'disabled'CmsException - if something goes wrongpublic CmsResource createModelGroupPage(java.lang.String name, java.lang.String description, CmsUUID copyId) throws CmsException
name - the page namedescription - the page descriptioncopyId - structure id of the resource to use as a model for the model page, if any (may be null)CmsException - in case something goes wrongpublic CmsResource createPageInModelFolder(java.lang.String name, java.lang.String description, CmsUUID copyId) throws CmsException
name - the title for the model pagedescription - the description for the model pagecopyId - structure id of the resource to use as a model for the model page, if any (may be null)CmsException - if something goes wrongpublic void disableModelPage(CmsResource sitemapConfig, CmsUUID structureId, boolean disabled) throws CmsException
sitemapConfig - the configuration resourcestructureId - the model page iddisabled - true to disabe the entryCmsException - if something goes wrongpublic CmsResource ensureModelFolder(CmsResource rootResource) throws CmsException
rootResource - the root of the sitemapCmsException - if something goes wrongpublic java.util.List<CmsModelPageEntry> getModelGroups()
public CmsModelInfo getModelInfo()
public java.util.List<CmsModelPageEntry> getModelPages()
public java.util.List<CmsModelPageEntry> getParentModelPages()
public void removeModelPage(CmsResource sitemapConfig, CmsUUID structureId) throws CmsException
sitemapConfig - the sitemap configuration resourcestructureId - the structure id of the model page to removeCmsException - if something goes wrong