Package com.day.cq.wcm.api
Enum WCMMode
- java.lang.Object
-
- java.lang.Enum<WCMMode>
-
- com.day.cq.wcm.api.WCMMode
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
REQUEST_ATTRIBUTE_NAME
name of the WCMMode request attribute
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static WCMMode
fromRequest(ServletRequest req)
Returns the current WCM Mode of this request.WCMMode
toRequest(ServletRequest req)
Sets the current WCM Mode of this request.static WCMMode
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static WCMMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DISABLED
public static final WCMMode DISABLED
The WCM is disabled. This is usually the case on a 'publish' instance where the normal WCM capabilities are disabled.
-
EDIT
public static final WCMMode EDIT
The WCM is in edit mode. This is the normal case for authoring instances
-
PREVIEW
public static final WCMMode PREVIEW
The WCM is in preview mode. Only a limited set of WCM UI elements are visible.
-
ANALYTICS
public static final WCMMode ANALYTICS
The WCM is in analytics mode. WCM UI elements are visible which are analyzable.
-
READ_ONLY
public static final WCMMode READ_ONLY
The WCM is in read only mode. Only WCM UI elements are visible that are not used for editing.
-
DESIGN
public static final WCMMode DESIGN
The WCM is in design mode.
-
-
Method Detail
-
values
public static WCMMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (WCMMode c : WCMMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static WCMMode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
fromRequest
public static WCMMode fromRequest(ServletRequest req)
Returns the current WCM Mode of this request.- Parameters:
req
- servlet request- Returns:
- current WCM Mode
-
toRequest
public WCMMode toRequest(ServletRequest req)
Sets the current WCM Mode of this request.- Parameters:
req
- servlet request- Returns:
- previous WCM Mode
-
-