Enum Class ScreenOrientationLockErrorCode
java.lang.Object
java.lang.Enum<ScreenOrientationLockErrorCode>
com.vaadin.flow.component.screenorientation.ScreenOrientationLockErrorCode
- All Implemented Interfaces:
Serializable,Comparable<ScreenOrientationLockErrorCode>,Constable
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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA newer lock or unlock call superseded this request before the browser resolved it.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).A security requirement blocked the request: the document is hidden, or orientation locking is forbidden by permissions policy or a sandboxed<iframe>that omits theallow-orientation-lockkeyword.The request failed for a reason that does not match a more specific code. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static ScreenOrientationLockErrorCode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
A security requirement blocked the request: the document is hidden, or orientation locking is forbidden by permissions policy or a sandboxed<iframe>that omits theallow-orientation-lockkeyword. Note this is distinct from the common fullscreen requirement ? a lock attempted outside fullscreen typically fails withNOT_SUPPORTEDrather than this code. -
ABORT
A newer lock or unlock call superseded this request before the browser resolved it. -
UNKNOWN
The request failed for a reason that does not match a more specific code. SeeScreenOrientationLockError.debugInfo()for the underlying browser message.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-