Enum Class ScreenOrientationLockErrorCode

java.lang.Object
java.lang.Enum<ScreenOrientationLockErrorCode>
com.vaadin.flow.component.screenorientation.ScreenOrientationLockErrorCode
All Implemented Interfaces:
Serializable, Comparable<ScreenOrientationLockErrorCode>, Constable

public enum ScreenOrientationLockErrorCode extends Enum<ScreenOrientationLockErrorCode>
Typed reasons why a screen-orientation lock request can fail.

Returned by ScreenOrientationLockError.errorCode(). The client maps the browser failure to one of these constants before reporting it to the server, so application code can branch with an exhaustive switch instead of inspecting browser-specific error strings.

Since:
25.2
  • Enum Constant Details

    • NOT_SUPPORTED

      public static final ScreenOrientationLockErrorCode NOT_SUPPORTED
      The browser does not implement the Screen Orientation API, or does not allow locking on this device (for example a desktop that has no physical orientation to lock to).
    • SECURITY

      public static final ScreenOrientationLockErrorCode SECURITY
      A security requirement blocked the request: the document is hidden, or orientation locking is forbidden by permissions policy or a sandboxed <iframe> that omits the allow-orientation-lock keyword. Note this is distinct from the common fullscreen requirement ? a lock attempted outside fullscreen typically fails with NOT_SUPPORTED rather than this code.
    • ABORT

      public static final ScreenOrientationLockErrorCode ABORT
      A newer lock or unlock call superseded this request before the browser resolved it.
    • UNKNOWN

      public static final ScreenOrientationLockErrorCode UNKNOWN
      The request failed for a reason that does not match a more specific code. See ScreenOrientationLockError.debugInfo() for the underlying browser message.
  • Method Details

    • values

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

      public static ScreenOrientationLockErrorCode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null