public class CmsSitemapTreeController extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
class |
CmsSitemapTreeController.DialogContext
The context used for child dialogs.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
RHS_WIDTH
Default width for linked items displayed on the right side of tree items.
|
| Constructor and Description |
|---|
CmsSitemapTreeController(CmsObject cms,
CmsResource root,
I_CmsLocaleCompareContext context,
com.vaadin.ui.Component parent)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
static CmsMenuItemVisibilityMode |
activeIfTrue(boolean condition)
Returns VISIBILITY_ACTIVE if the given parameter is true, and VISIBILITY_INACTIVE otherwise.
|
CmsSitemapTreeNode |
createNode(CmsSitemapTreeNodeData entry)
Creates a sitemap tree node widget from a tree node bean.
|
CmsSitemapTreeNode |
createRootNode()
Creates the root node of the tree.
|
CmsResource |
getRoot()
Gets the resource corresponding to the tree's root.
|
void |
initEventHandlers(CmsSitemapTreeNode node)
Initializes the event handlers for a tree node widget.
|
void |
onClickOpen(CmsSitemapTreeNode node)
Called when the user clicks on the 'opener' icon of a sitemap tree entry.
|
void |
openPageCopyDialog(CmsSitemapTreeNode node,
CmsSitemapTreeNodeData entry)
Opens the page copy dialog for a tree entry.
|
protected CmsResource |
readSitemapEntryFolderIfPossible(CmsResource resource)
If the given resource is the default file of a sitmeap entry folder, then returns that
folder, else the original file.
|
void |
updateNode(CmsSitemapTreeNode node)
Updates a sitemap node widget after the resource it corresponds to has changed.
|
void |
updateNodeForId(CmsUUID id)
Updates the tree node for the resource with the given structure id, if it exists.
|
static CmsMenuItemVisibilityMode |
visibleIfTrue(boolean condition)
Returns VISIBILITY_ACTIVE if the given parameter is true, and VISIBILITY_INVISIBLE otherwise.
|
public static final int RHS_WIDTH
public CmsSitemapTreeController(CmsObject cms, CmsResource root, I_CmsLocaleCompareContext context, com.vaadin.ui.Component parent)
cms - the CMS contextroot - the tree's root resourcecontext - the locale comparison contextparent - the parent widget in which the tree will be renderedpublic static CmsMenuItemVisibilityMode activeIfTrue(boolean condition)
condition - a boolean valuepublic static CmsMenuItemVisibilityMode visibleIfTrue(boolean condition)
condition - a boolean valuepublic CmsSitemapTreeNode createNode(CmsSitemapTreeNodeData entry)
entry - the tree node beanpublic CmsSitemapTreeNode createRootNode()
public CmsResource getRoot()
public void initEventHandlers(CmsSitemapTreeNode node)
node - the node for which to initialize the event handlerspublic void onClickOpen(CmsSitemapTreeNode node)
node - the sitemap node widgetpublic void openPageCopyDialog(CmsSitemapTreeNode node, CmsSitemapTreeNodeData entry)
node - the tree node widgetentry - the tree entrypublic void updateNode(CmsSitemapTreeNode node)
node - the sitemap nodepublic void updateNodeForId(CmsUUID id)
id - the structure id of a resourceprotected CmsResource readSitemapEntryFolderIfPossible(CmsResource resource)
resource - a resource