Class CmsDirectEditButtonSelection
- java.lang.Object
-
- org.opencms.workplace.editors.directedit.CmsDirectEditButtonSelection
-
public final class CmsDirectEditButtonSelection extends java.lang.Object
Constants to indicate which direct edit buttons should be displayed for a direct edit resource if the user has the permissions.The actual permission check is done later using
CmsDirectEditPermissions
.This button selection is used internally to indicate the buttons that may be displayed. Usually, for an XmlPage only the "edit" button is displayed, while for an XmlContent there may be an "edit", "delete" or "new" button.
Currently there are only constants for thouse button combinations that are actually used in practice. These are
EDIT
,EDIT_DELETE
andEDIT_DELETE_NEW
.- Since:
- 6.2.3
-
-
Field Summary
Fields Modifier and Type Field Description static CmsDirectEditButtonSelection
EDIT
Constant to indicate "show only the edit button".static CmsDirectEditButtonSelection
EDIT_DELETE
Constant to indicate "show the edit and the delete button".static CmsDirectEditButtonSelection
EDIT_DELETE_NEW
Constant to indicate "show the edit, the delete and the new button".static CmsDirectEditButtonSelection
EDIT_NEW
Constant to indicate "show the edit and the delete button".static CmsDirectEditButtonSelection
NEW
Constant to indicate "show only the new button" used on empty lists.static java.lang.String
VALUE_DELETE
String value that indicates the "delete" button should be displayed.static java.lang.String
VALUE_EDIT
String value that indicates the "edit" button should be displayed.static java.lang.String
VALUE_NEW
String value that indicates the "new" button should be displayed.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isShowDelete()
Returnstrue
if the "delete" button should be displayed.boolean
isShowEdit()
Returnstrue
if the "edit" button should be displayed.boolean
isShowNew()
Returnstrue
if the "new" button should be displayed.java.lang.String
toString()
Returns the selected edit options as a String in the formedit|delete|new
.
-
-
-
Field Detail
-
EDIT
public static final CmsDirectEditButtonSelection EDIT
Constant to indicate "show only the edit button".
-
EDIT_DELETE
public static final CmsDirectEditButtonSelection EDIT_DELETE
Constant to indicate "show the edit and the delete button".
-
EDIT_NEW
public static final CmsDirectEditButtonSelection EDIT_NEW
Constant to indicate "show the edit and the delete button".
-
EDIT_DELETE_NEW
public static final CmsDirectEditButtonSelection EDIT_DELETE_NEW
Constant to indicate "show the edit, the delete and the new button".
-
NEW
public static final CmsDirectEditButtonSelection NEW
Constant to indicate "show only the new button" used on empty lists.
-
VALUE_DELETE
public static final java.lang.String VALUE_DELETE
String value that indicates the "delete" button should be displayed.- See Also:
- Constant Field Values
-
VALUE_EDIT
public static final java.lang.String VALUE_EDIT
String value that indicates the "edit" button should be displayed.- See Also:
- Constant Field Values
-
VALUE_NEW
public static final java.lang.String VALUE_NEW
String value that indicates the "new" button should be displayed.- See Also:
- Constant Field Values
-
-
Method Detail
-
isShowDelete
public boolean isShowDelete()
Returnstrue
if the "delete" button should be displayed.- Returns:
true
if the "delete" button should be displayed
-
isShowEdit
public boolean isShowEdit()
Returnstrue
if the "edit" button should be displayed.- Returns:
true
if the "edit" button should be displayed
-
isShowNew
public boolean isShowNew()
Returnstrue
if the "new" button should be displayed.- Returns:
true
if the "new" button should be displayed
-
toString
public java.lang.String toString()
Returns the selected edit options as a String in the formedit|delete|new
.- Overrides:
toString
in classjava.lang.Object
- Returns:
- the selected edit options as a String
-
-