Package com.xpn.xwiki.web
Enum ObjectPolicyType
- java.lang.Object
-
- java.lang.Enum<ObjectPolicyType>
-
- com.xpn.xwiki.web.ObjectPolicyType
-
- All Implemented Interfaces:
Serializable
,Comparable<ObjectPolicyType>
public enum ObjectPolicyType extends Enum<ObjectPolicyType>
Enumeration of supported object policy types. A object policy type is an implementation on how to manage parameters in the query string that wants to modify objects in page. They are usually on the form of 'Space.PageClass_0_prop. In the default implementation of XWiki, these parameters will initialize values of properties of existing object (see 'UPDATE'). The second implementation, called 'UDPATE_OR_CREATE' will also create objects if they don't exist. For example, let's take a page that contains one object Space.PageClass. Given the following parameters:- Space.PageClass_0_prop=abc
- Space.PageClass_1_prop=def
- Space.PageClass_2_prop=ghi
- Space.PageClass_6_prop=jkl
- Since:
- 7.0RC1
- Version:
- $Id: 6f304bb83bcf96f2e817254670ca9bd237e12a2a $
-
-
Enum Constant Summary
Enum Constants Enum Constant Description UPDATE
Only update objects.UPDATE_OR_CREATE
Update and/or create objects.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ObjectPolicyType
forName(String name)
String
getName()
static ObjectPolicyType
valueOf(String name)
Returns the enum constant of this type with the specified name.static ObjectPolicyType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UPDATE
public static final ObjectPolicyType UPDATE
Only update objects.
-
UPDATE_OR_CREATE
public static final ObjectPolicyType UPDATE_OR_CREATE
Update and/or create objects.
-
-
Method Detail
-
values
public static ObjectPolicyType[] 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 (ObjectPolicyType c : ObjectPolicyType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ObjectPolicyType 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 nameNullPointerException
- if the argument is null
-
getName
public String getName()
- Returns:
- The string name corresponding to the object policy type.
-
forName
public static ObjectPolicyType forName(String name)
- Parameters:
name
- The string name corresponding to the object policy type.- Returns:
- The ObjectPolicyType corresponding to the parameter 'name'.
-
-