Enum CSPDirective

    • Enum Constant Detail

      • MANIFEST_SRC

        public static final CSPDirective MANIFEST_SRC
      • FRAME_ANCESTORS

        public static final CSPDirective FRAME_ANCESTORS
      • FRAME_SRC

        public static final CSPDirective FRAME_SRC
        This directive was deprecated in CSP 2, but no longer in 3. Wicket will automatically add a frame-src directive when child-src is added.
    • Method Detail

      • values

        public static CSPDirective[] 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 (CSPDirective c : CSPDirective.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static CSPDirective 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
        NullPointerException - if the argument is null
      • getValue

        public String getValue()
      • checkValueForDirective

        public void checkValueForDirective​(CSPRenderable value,
                                           List<CSPRenderable> existingDirectiveValues)
        Check if value can be added to the list of other values. By default, it checks for conflicts with wildcards and none and it checks if values are valid uris.
        Parameters:
        value - The value to add.
        existingDirectiveValues - The other values.
        Throws:
        IllegalArgumentException - if the given value is invalid.
      • fromValue

        public static CSPDirective fromValue​(String value)
        Returns:
        The CSPDirective constant whose value-parameter equals the input-parameter or null if none can be found.