Enum Doctype

java.lang.Object
java.lang.Enum<Doctype>
com.day.cq.commons.Doctype
All Implemented Interfaces:
Serializable, Comparable<Doctype>, java.lang.constant.Constable

public enum Doctype extends Enum<Doctype>
Deprecated.
Use Doctype instead
Doctypes Available in the W3C Recommendations
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Deprecated.
    HTML 4.01 Frameset This DTD is equal to HTML 4.01 Transitional, but allows the use of frameset content.
    Deprecated.
    HTML 4.01 Strict This DTD contains all HTML elements and attributes, but does not include presentational or deprecated elements (like font).
    Deprecated.
    HTML 4.01 Transitional This DTD contains all HTML elements and attributes, including presentational and deprecated elements (like font).
    Deprecated.
    HTML 5 doctype.
    Deprecated.
    XHTML 1.0 Frameset This DTD is equal to XHTML 1.0 Transitional, but allows the use of frameset content.
    Deprecated.
    XHTML 1.0 Strict This DTD contains all HTML elements and attributes, but does not include presentational or deprecated elements (like font).
    Deprecated.
    XHTML 1.0 Transitional This DTD contains all HTML elements and attributes, including presentational and deprecated elements (like font).
    Deprecated.
    XHTML 1.1 This DTD is equal to XHTML 1.0 Strict, but allows you to add modules (for example to provide ruby support for East-Asian languages).
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Deprecated.
    name of the Doctype request attribute
  • Method Summary

    Modifier and Type
    Method
    Description
    static Doctype
    Deprecated.
    Returns the current doctype of this request.
    Deprecated.
    Returns the declaration string of this doctype.
    boolean
    Deprecated.
    Checks if this doctype is XHTML.
    static boolean
    Deprecated.
    Convenience method that retieves the doctype from the request attribute and checks if the doctype is XHTML.
    void
    Deprecated.
    Sets the current doctype of this request.
    static Doctype
    Deprecated.
    Returns the enum constant of this type with the specified name.
    static Doctype[]
    Deprecated.
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • HTML_5

      public static final Doctype HTML_5
      Deprecated.
      HTML 5 doctype. The DOCTYPE declaration is <!DOCTYPE html> and is case-insensitive in the HTML syntax. DOCTYPEs from earlier versions of HTML were longer because the HTML language was SGML-based and therefore required a reference to a DTD. With HTML5 this is no longer the case and the DOCTYPE is only needed to enable standards mode for documents written using the HTML syntax. Browsers already do this for <!DOCTYPE html>..
    • HTML_401_STRICT

      public static final Doctype HTML_401_STRICT
      Deprecated.
      HTML 4.01 Strict This DTD contains all HTML elements and attributes, but does not include presentational or deprecated elements (like font). Framesets are not allowed.
    • HTML_401_TRANS

      public static final Doctype HTML_401_TRANS
      Deprecated.
      HTML 4.01 Transitional This DTD contains all HTML elements and attributes, including presentational and deprecated elements (like font). Framesets are not allowed.
    • HTML_401_FRAMESET

      public static final Doctype HTML_401_FRAMESET
      Deprecated.
      HTML 4.01 Frameset This DTD is equal to HTML 4.01 Transitional, but allows the use of frameset content.
    • XHTML_10_STRICT

      public static final Doctype XHTML_10_STRICT
      Deprecated.
      XHTML 1.0 Strict This DTD contains all HTML elements and attributes, but does not include presentational or deprecated elements (like font). Framesets are not allowed. The markup must also be written as well-formed XML.
    • XHTML_10_TRANS

      public static final Doctype XHTML_10_TRANS
      Deprecated.
      XHTML 1.0 Transitional This DTD contains all HTML elements and attributes, including presentational and deprecated elements (like font). Framesets are not allowed. The markup must also be written as well-formed XML.
    • XHTML_10_FRAMESET

      public static final Doctype XHTML_10_FRAMESET
      Deprecated.
      XHTML 1.0 Frameset This DTD is equal to XHTML 1.0 Transitional, but allows the use of frameset content.
    • XHTML_11

      public static final Doctype XHTML_11
      Deprecated.
      XHTML 1.1 This DTD is equal to XHTML 1.0 Strict, but allows you to add modules (for example to provide ruby support for East-Asian languages).
  • Field Details

    • REQUEST_ATTRIBUTE_NAME

      public static final String REQUEST_ATTRIBUTE_NAME
      Deprecated.
      name of the Doctype request attribute
  • Method Details

    • values

      public static Doctype[] values()
      Deprecated.
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static Doctype valueOf(String name)
      Deprecated.
      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
    • getDeclaration

      public String getDeclaration()
      Deprecated.
      Returns the declaration string of this doctype.
      Returns:
      declaration string
    • isXHTML

      public boolean isXHTML()
      Deprecated.
      Checks if this doctype is XHTML.
      Returns:
      true if this doctype is XHTML.
    • isXHTML

      public static boolean isXHTML(ServletRequest req)
      Deprecated.
      Convenience method that retieves the doctype from the request attribute and checks if the doctype is XHTML.
      Parameters:
      req - servlet request
      Returns:
      true if the doctype is XHTML.
      Since:
      5.3
    • fromRequest

      public static Doctype fromRequest(ServletRequest req)
      Deprecated.
      Returns the current doctype of this request.
      Parameters:
      req - servlet request
      Returns:
      current doctype or null if not set.
      Since:
      5.3
    • toRequest

      public void toRequest(ServletRequest req)
      Deprecated.
      Sets the current doctype of this request.
      Parameters:
      req - servlet request
      Since:
      5.3