Enum Editor

  • All Implemented Interfaces:
    Serializable, Comparable<Editor>

    public enum Editor
    extends Enum<Editor>
    The default editor that should be used for a user, when editing content.
    Since:
    12.2
    Version:
    $Id: 473f364c937cec0281f3887b682aa1661bd4d2ac $
    • Enum Constant Detail

      • TEXT

        public static final Editor TEXT
        Text editor (wiki editor).
      • WYSIWYG

        public static final Editor WYSIWYG
        WYSIWYG editor.
      • UNDEFINED

        public static final Editor UNDEFINED
        The editor is not explictly defined which means it'll dedcided based on some context information (for example based on the wiki's default editor).
    • Method Detail

      • values

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

        public static Editor 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
      • fromString

        public static Editor fromString​(String editorAsString)
        Parameters:
        editorAsString - the editor represented as a string ("Text", "Wysiwyg"). The case is ignored.
        Returns:
        the Editor object matching the passed string representation. All values different than Text (case ignored) are considered to represent the WYSIWYG editor.