org.opencms.workplace.explorer.menu
Class CmsMirPrSameLockedActiveNotDeletedAlPermW

java.lang.Object
  extended byorg.opencms.workplace.explorer.menu.A_CmsMenuItemRule
      extended byorg.opencms.workplace.explorer.menu.CmsMirPrSameLockedActiveNotDeletedAlPermW
All Implemented Interfaces:
I_CmsMenuItemRule

public class CmsMirPrSameLockedActiveNotDeletedAlPermW
extends A_CmsMenuItemRule

Defines a menu item rule that sets the visibility to active if the current resource is not deleted or inactive if the current resource is deleted and locked by the current user.

Also checks if the current user has write permissions on the resource and sets the visibility to inactive if not.

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

Constructor Summary
CmsMirPrSameLockedActiveNotDeletedAlPermW()
           
 
Method Summary
 CmsMenuItemVisibilityMode getVisibility(CmsObject cms, CmsResourceUtil[] resourceUtil)
          Returns the visibility for the menu item.
 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
 

Constructor Detail

CmsMirPrSameLockedActiveNotDeletedAlPermW

public CmsMirPrSameLockedActiveNotDeletedAlPermW()
Method Detail

getVisibility

public CmsMenuItemVisibilityMode getVisibility(CmsObject cms,
                                               CmsResourceUtil[] resourceUtil)
Description copied from interface: I_CmsMenuItemRule
Returns the visibility for the menu item.

The possible visibilities are:

Specified by:
getVisibility in interface I_CmsMenuItemRule
Overrides:
getVisibility in class A_CmsMenuItemRule
See Also:
I_CmsMenuItemRule.getVisibility(org.opencms.file.CmsObject, CmsResourceUtil[])

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[])