Package org.apache.wicket.csp
Enum CSPDirectiveSandboxValue
- java.lang.Object
-
- java.lang.Enum<CSPDirectiveSandboxValue>
-
- org.apache.wicket.csp.CSPDirectiveSandboxValue
-
- All Implemented Interfaces:
Serializable
,Comparable<CSPDirectiveSandboxValue>
,CSPRenderable
public enum CSPDirectiveSandboxValue extends Enum<CSPDirectiveSandboxValue> implements CSPRenderable
An enum representing the only possible values for the sandbox directive
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALLOW_FORMS
ALLOW_SAME_ORIGIN
ALLOW_SCRIPTS
ALLOW_TOP_NAVIGATION
EMPTY
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getValue()
String
render(ContentSecurityPolicySettings settings, RequestCycle cycle)
Renders the value that should be put in the CSP header.static CSPDirectiveSandboxValue
valueOf(String name)
Returns the enum constant of this type with the specified name.static CSPDirectiveSandboxValue[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface org.apache.wicket.csp.CSPRenderable
checkValidityForSrc
-
-
-
-
Enum Constant Detail
-
ALLOW_FORMS
public static final CSPDirectiveSandboxValue ALLOW_FORMS
-
ALLOW_SAME_ORIGIN
public static final CSPDirectiveSandboxValue ALLOW_SAME_ORIGIN
-
ALLOW_SCRIPTS
public static final CSPDirectiveSandboxValue ALLOW_SCRIPTS
-
ALLOW_TOP_NAVIGATION
public static final CSPDirectiveSandboxValue ALLOW_TOP_NAVIGATION
-
EMPTY
public static final CSPDirectiveSandboxValue EMPTY
-
-
Method Detail
-
values
public static CSPDirectiveSandboxValue[] 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 (CSPDirectiveSandboxValue c : CSPDirectiveSandboxValue.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CSPDirectiveSandboxValue 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
-
render
public String render(ContentSecurityPolicySettings settings, RequestCycle cycle)
Description copied from interface:CSPRenderable
Renders the value that should be put in the CSP header.- Specified by:
render
in interfaceCSPRenderable
- Parameters:
settings
- TheContentSecurityPolicySettings
that renders this value.cycle
- The currentRequestCycle
.- Returns:
- The rendered value.
-
-