Package org.xwiki.extension.xar
Enum XarExtensionConfiguration.DocumentProtection
- java.lang.Object
-
- java.lang.Enum<XarExtensionConfiguration.DocumentProtection>
-
- org.xwiki.extension.xar.XarExtensionConfiguration.DocumentProtection
-
- All Implemented Interfaces:
Serializable
,Comparable<XarExtensionConfiguration.DocumentProtection>
- Enclosing interface:
- XarExtensionConfiguration
public static enum XarExtensionConfiguration.DocumentProtection extends Enum<XarExtensionConfiguration.DocumentProtection>
The type of protection to apply.- Version:
- $Id: 317de8b9444d044f270aa03002a4c2776a54a72f $
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DENY
EDIT/DELETE right is denied for everyone except for admins who just get a warning.DENYSIMPLE
EDIT/DELETE right is denied for simple users except for simple admins who just get a warning.FORCEDDENY
EDIT/DELETE right is denied for everyone including admins.FORCEDDENYSIMPLE
EDIT/DELETE right is denied for all simple users including simple admins.NONE
No protection at all.WARNING
Everyone get a warning when trying to edit a protected document.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isDeny()
boolean
isForced()
boolean
isSimple()
boolean
isWarning()
static XarExtensionConfiguration.DocumentProtection
valueOf(String name)
Returns the enum constant of this type with the specified name.static XarExtensionConfiguration.DocumentProtection[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NONE
public static final XarExtensionConfiguration.DocumentProtection NONE
No protection at all.
-
WARNING
public static final XarExtensionConfiguration.DocumentProtection WARNING
Everyone get a warning when trying to edit a protected document.
-
DENY
public static final XarExtensionConfiguration.DocumentProtection DENY
EDIT/DELETE right is denied for everyone except for admins who just get a warning.
-
FORCEDDENY
public static final XarExtensionConfiguration.DocumentProtection FORCEDDENY
EDIT/DELETE right is denied for everyone including admins.
-
DENYSIMPLE
public static final XarExtensionConfiguration.DocumentProtection DENYSIMPLE
EDIT/DELETE right is denied for simple users except for simple admins who just get a warning.
-
FORCEDDENYSIMPLE
public static final XarExtensionConfiguration.DocumentProtection FORCEDDENYSIMPLE
EDIT/DELETE right is denied for all simple users including simple admins.
-
-
Method Detail
-
values
public static XarExtensionConfiguration.DocumentProtection[] 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 (XarExtensionConfiguration.DocumentProtection c : XarExtensionConfiguration.DocumentProtection.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static XarExtensionConfiguration.DocumentProtection 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
-
isWarning
public boolean isWarning()
- Returns:
- true if a warning should be showed when editing a protected document
-
isDeny
public boolean isDeny()
- Returns:
- true if EDIT/DELETE rights should be denied
-
isForced
public boolean isForced()
- Returns:
- true if the deny should apply to admins
-
isSimple
public boolean isSimple()
- Returns:
- true if the deny should apply only to simple user and not advanced users
-
-