com.day.cq.wcm.api
Enum WCMMode

java.lang.Object
  extended by java.lang.Enum<WCMMode>
      extended by com.day.cq.wcm.api.WCMMode
All Implemented Interfaces:
Serializable, Comparable<WCMMode>

public enum WCMMode
extends Enum<WCMMode>

The WCM mode defines the type of modes the WCM has in the current request.


Enum Constant Summary
DESIGN
          The WCM is in design mode.
DISABLED
          The WCM is disabled.
EDIT
          The WCM is in edit mode.
PREVIEW
          The WCM is in preview mode.
READ_ONLY
          The WCM is in read only mode.
 
Field Summary
static String REQUEST_ATTRIBUTE_NAME
          name of the WCMMode request attribute
 
Method Summary
static WCMMode fromRequest(javax.servlet.ServletRequest req)
          Returns the current WCM Mode of this request.
 WCMMode toRequest(javax.servlet.ServletRequest req)
          Sets the current WCM Mode of this request.
static WCMMode valueOf(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're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

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.


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.

Field Detail

REQUEST_ATTRIBUTE_NAME

public static final String REQUEST_ATTRIBUTE_NAME
name of the WCMMode request attribute

Method Detail

values

public static final WCMMode[] values()
Returns an array containing the constants of this enum type, in the order they're 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're declared

valueOf

public static WCMMode valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name

fromRequest

public static WCMMode fromRequest(javax.servlet.ServletRequest req)
Returns the current WCM Mode of this request.

Parameters:
req - servlet request
Returns:
current WCM Mode

toRequest

public WCMMode toRequest(javax.servlet.ServletRequest req)
Sets the current WCM Mode of this request.

Parameters:
req - servlet request
Returns:
previous WCM Mode


Copyright © 2008 Day Management AG. All Rights Reserved.