org.opencms.workplace.explorer.menu
Interface I_CmsMenuItemRule

All Known Implementing Classes:
A_CmsMenuItemRule, CmsMirActiveNonDeleted, CmsMirAlwaysActive, CmsMirAlwaysInvisible, CmsMirContainerPageActive, CmsMirContainerPageActiveAndFileAvailable, CmsMirContainerpageInvisible, CmsMirDirectPublish, CmsMirEditControlcode, CmsMirEditProviderActive, CmsMirExplorerInvisible, CmsMirMultiDirPublishStandard, CmsMirMultiStandard, CmsMirNonContainerpageInvisible, CmsMirOtherSiteInactive, CmsMirPrOnlineActive, CmsMirPrOnlineInactive, CmsMirPrOnlineInvisible, CmsMirPrOtherActive, CmsMirPrOtherInactive, CmsMirPrOtherInvisible, CmsMirPrSameLockedActive, CmsMirPrSameLockedActiveChangedAl, CmsMirPrSameLockedActiveDeletedAl, CmsMirPrSameLockedActiveNotDeletedAl, CmsMirPrSameLockedActiveNotDeletedAlPermW, CmsMirPrSameLockedInactiveMovedAl, CmsMirPrSameLockedInvisible, CmsMirPrSameOtherlockActive, CmsMirPrSameOtherlockActiveNoPublish, CmsMirPrSameOtherlockInvisible, CmsMirPrSameUnlockedActive, CmsMirPrSameUnlockedActiveDeletedNoAl, CmsMirPrSameUnlockedActiveNotDeletedNoAl, CmsMirPrSameUnlockedActiveUnchanged, CmsMirPrSameUnlockedInactiveNoAl, CmsMirPrSameUnlockedInactiveNotDeletedNoAl, CmsMirPrSameUnlockedInvisible, CmsMirShowSiblings, CmsMirSitemapActive, CmsMirSitemapInvisible, CmsMirSubStandard

public interface I_CmsMenuItemRule

Defines a menu item rule to check the visibility of a context menu item in the explorer view.

Since:
6.5.6

Field Summary
static java.lang.String ATTR_CONTEXT_INFO
          The request attribute name for the context information.
static java.lang.String CONTEXT_CONTAINERPAGE
          A constant that signals that we are in the container page context.
static java.lang.String CONTEXT_EDITPROVIDER
          A constant that signals that we are in the edit provider context.
static java.lang.String CONTEXT_SITEMAP
          A constant that signals that we are in the sitemap context.
 
Method Summary
 CmsMenuItemVisibilityMode getVisibility(CmsObject cms, CmsResourceUtil[] resourceUtil)
          Returns the visibility for the menu item.
 CmsMenuItemVisibilityMode getVisibility(CmsObject cms, CmsResourceUtil[] resourceUtil, I_CmsMenuItemRule[] rule)
          Returns the visibility for the menu item, depending on the resource utilities and menu item rules.
 boolean matches(CmsObject cms, CmsResourceUtil[] resourceUtil)
          Returns if the rule for the menu item should be applied or not.
 

Field Detail

ATTR_CONTEXT_INFO

static final java.lang.String ATTR_CONTEXT_INFO
The request attribute name for the context information.

See Also:
Constant Field Values

CONTEXT_CONTAINERPAGE

static final java.lang.String CONTEXT_CONTAINERPAGE
A constant that signals that we are in the container page context.


CONTEXT_EDITPROVIDER

static final java.lang.String CONTEXT_EDITPROVIDER
A constant that signals that we are in the edit provider context.


CONTEXT_SITEMAP

static final java.lang.String CONTEXT_SITEMAP
A constant that signals that we are in the sitemap context.

Method Detail

getVisibility

CmsMenuItemVisibilityMode getVisibility(CmsObject cms,
                                        CmsResourceUtil[] resourceUtil)
Returns the visibility for the menu item.

The possible visibilities are:

Parameters:
cms - the current OpenCms user context
resourceUtil - the initialized resource utilities for which the menu item visibility is checked
Returns:
the visibility of the menu item

getVisibility

CmsMenuItemVisibilityMode getVisibility(CmsObject cms,
                                        CmsResourceUtil[] resourceUtil,
                                        I_CmsMenuItemRule[] rule)
Returns the visibility for the menu item, depending on the resource utilities and menu item rules.

Parameters:
cms - the current OpenCms user context
resourceUtil - the initialized resource utilities for which the menu item visibility is checked
rule - the rules which are checked for visibility
Returns:
the visibility for the menu item

matches

boolean matches(CmsObject cms,
                CmsResourceUtil[] resourceUtil)
Returns if the rule for the menu item should be applied or not.

Parameters:
cms - the current OpenCms user context
resourceUtil - the initialized resource utilities for which the menu item rule is checked
Returns:
true if the rule for the menu item should be applied, otherwise false