Package org.opencms.ui.contextmenu
Class CmsStandardVisibilityCheck
java.lang.Object
org.opencms.ui.contextmenu.A_CmsSimpleVisibilityCheck
org.opencms.ui.contextmenu.CmsStandardVisibilityCheck
- All Implemented Interfaces:
I_CmsHasMenuItemVisibility
Standard visibility check implementation.
Instances of this class are configured with a set of flags, each of which corresponds to a check to perform which may cause the context menu item to be hidden or deactivated.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final CmsStandardVisibilityCheck
Default visibility check for 'edit-like' operations on folders.static final CmsStandardVisibilityCheck
Default visibility check for 'edit-like' operations on resources.static final I_CmsHasMenuItemVisibility
Default permissions but with 'element author' role requirement instead of 'editor'static final I_CmsHasMenuItemVisibility
Check for operations which need a default file.static final CmsStandardVisibilityCheck
Default visibility check for 'edit-like' operations on folders.static final CmsStandardVisibilityCheck
Like DEFAULT, but only active for files.static final CmsStandardVisibilityCheck
Like DEFAULT, but only active for files.static final I_CmsHasMenuItemVisibility
Visibility check for editing external links (pointers).static final CmsStandardVisibilityCheck
Check for locking resources.static final CmsStandardVisibilityCheck
Visibility check used for copy to project dialog.static final I_CmsHasMenuItemVisibility
Visibility check for the permissions dialog.static final CmsStandardVisibilityCheck
Visibility check for publish option.static final CmsStandardVisibilityCheck
Visibility check for the reindex function.static final CmsStandardVisibilityCheck
Check for the 'replace' operation.static final CmsStandardVisibilityCheck
'Replace' check, but with 'element author' role requirement instead of 'editor'.static final CmsStandardVisibilityCheck
Default check for 'locked resources' action.static final I_CmsHasMenuItemVisibility
Permission check for stealing locks.static final CmsStandardVisibilityCheck
Visibility check for undelete option.static final CmsStandardVisibilityCheck
Visibility check for the undo function.static final CmsStandardVisibilityCheck
Visibility check for the undo function.static final CmsStandardVisibilityCheck
Visibility check for the undo function.static final CmsStandardVisibilityCheck
Default visibility check for view operations on resources.static final CmsStandardVisibilityCheck
Default visibility check for view operations on resources.static final I_CmsHasMenuItemVisibility
Always active.Fields inherited from class org.opencms.ui.contextmenu.A_CmsSimpleVisibilityCheck
m_singleResourceOnly
-
Constructor Summary
ConstructorDescriptionCreates a new instance using the given flags. -
Method Summary
Modifier and TypeMethodDescriptionboolean
flag
(CmsVisibilityCheckFlag flag) Helper method to make checking for a flag very short (character count).getSingleVisibility
(CmsObject cms, CmsResource resource) Computes visibility of the menu item for a single resource.getVisibility
(I_CmsDialogContext context) Gets the visibility for the current dialog context.toString()
Methods inherited from class org.opencms.ui.contextmenu.A_CmsSimpleVisibilityCheck
getVisibility
-
Field Details
-
COPY_PAGE
Default visibility check for 'edit-like' operations on folders. -
DEFAULT
Default visibility check for 'edit-like' operations on resources. -
DEFAULT_AUTHOR
Default permissions but with 'element author' role requirement instead of 'editor' -
DEFAULT_DEFAULTFILE
Check for operations which need a default file. -
DEFAULT_FOLDERS
Default visibility check for 'edit-like' operations on folders. -
EDIT
Like DEFAULT, but only active for files. -
EDIT_CODE
Like DEFAULT, but only active for files. -
EDIT_POINTER
Visibility check for editing external links (pointers). -
LOCK
Check for locking resources. -
OTHER_PROJECT
Visibility check used for copy to project dialog. -
PERMISSIONS
Visibility check for the permissions dialog. -
PUBLISH
Visibility check for publish option. -
REINDEX
Visibility check for the reindex function. -
REPLACE
Check for the 'replace' operation. -
REPLACE_AUTHOR
'Replace' check, but with 'element author' role requirement instead of 'editor'. -
SHOW_LOCKS
Default check for 'locked resources' action. -
STEAL_LOCK
Permission check for stealing locks. -
UNDELETE
Visibility check for undelete option. -
UNDO
Visibility check for the undo function. -
UNDO_AUTHOR
Visibility check for the undo function. -
UNLOCK
Visibility check for the undo function. -
VIEW
Default visibility check for view operations on resources. -
VIEW_AUTHOR
Default visibility check for view operations on resources. -
VISIBLE
Always active.
-
-
Constructor Details
-
Method Details
-
getSingleVisibility
Description copied from class:A_CmsSimpleVisibilityCheck
Computes visibility of the menu item for a single resource.- Specified by:
getSingleVisibility
in classA_CmsSimpleVisibilityCheck
- Parameters:
cms
- the CMS context to useresource
- the resource to check- Returns:
- the visibility for the given resource
- See Also:
-
getVisibility
Description copied from interface:I_CmsHasMenuItemVisibility
Gets the visibility for the current dialog context.- Parameters:
context
- the dialog context- Returns:
- the visibility
- See Also:
-
toString