org.opencms.workplace.explorer.menu
Class CmsMirSubStandard

java.lang.Object
  extended by org.opencms.workplace.explorer.menu.A_CmsMenuItemRule
      extended by org.opencms.workplace.explorer.menu.CmsMirSubStandard
All Implemented Interfaces:
I_CmsMenuItemRule

public class CmsMirSubStandard
extends A_CmsMenuItemRule

Defines a menu item rule for the sub menu generation that checks the visibility of the sub items to show.

Since:
6.5.6
Version:
$Revision: 1.7 $
Author:
Andreas Zahner

Field Summary
static java.lang.String RULE_NAME
          The name of the standard rule set used for sub context menu entries.
 
Constructor Summary
CmsMirSubStandard()
           
 
Method Summary
 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.
 
Methods inherited from class org.opencms.workplace.explorer.menu.A_CmsMenuItemRule
getVisibility
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RULE_NAME

public static final java.lang.String RULE_NAME
The name of the standard rule set used for sub context menu entries.

See Also:
Constant Field Values
Constructor Detail

CmsMirSubStandard

public CmsMirSubStandard()
Method Detail

getVisibility

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

Specified by:
getVisibility in interface I_CmsMenuItemRule
Overrides:
getVisibility in class A_CmsMenuItemRule
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
See Also:
I_CmsMenuItemRule.getVisibility(org.opencms.file.CmsObject, org.opencms.workplace.explorer.CmsResourceUtil[], org.opencms.workplace.explorer.menu.I_CmsMenuItemRule[])

matches

public boolean matches(CmsObject cms,
                       CmsResourceUtil[] resourceUtil)
Description copied from interface: I_CmsMenuItemRule
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
See Also:
I_CmsMenuItemRule.matches(org.opencms.file.CmsObject, CmsResourceUtil[])