Enum ContentType.DefinedType

    • Field Detail

      • cmMode

        public final String cmMode
      • mime

        public final String mime
    • Method Detail

      • values

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

        public static ContentType.DefinedType 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
      • getCmMode

        public String getCmMode()
        Description copied from interface: ContentType
        The CodeMirror mode as defined in Stapler ( org.kohsuke.stapler.codemirror.mode.*).
        Currently Supported:
        • clike
        • css
        • diff
        • haskell
        • htmlmixed
        • javascript
        • lua
        • php
        • plsql
        • python
        • rst
        • smaltalk
        • stex
        • xml
        e.g. used in <textarea name="config.content" codemirror-mode="${contentType.cmMode}" ... />
        Specified by:
        getCmMode in interface ContentType
        Returns:
        the CodeMirror mode
      • getMime

        public String getMime()
        Description copied from interface: ContentType
        Actually the 'mode' attribute for the CodeMirror editor. As in: <textarea name="config.content" codemirror-config="mode:'${contentType.mime}',lineNumbers: true" ... />
        Specified by:
        getMime in interface ContentType
        Returns:
        the mime.