Package Torello.Browser
Class Browser.PermissionDescriptor
- java.lang.Object
-
- Torello.Java.JSON.BaseType
-
- Torello.Browser.Browser.PermissionDescriptor
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- Browser
public static class Browser.PermissionDescriptor extends BaseType implements java.io.Serializable
Definition of PermissionDescriptor defined in the Permissions API: https://w3c.github.io/permissions/#dictdef-permissiondescriptor.
EXPERIMENTAL- See Also:
- Serialized Form
Hi-Lited Source-Code:- View Here: Torello/Browser/Browser.java
- Open New Browser-Tab: Torello/Browser/Browser.java
File Size: 5,256 Bytes Line Count: 130 '\n' Characters Found
-
-
Field Summary
Serializable ID Modifier and Type Field protected static long
serialVersionUID
For Object Serialization.Type Properties Modifier and Type Field Boolean
allowWithoutSanitization
For "clipboard" permission, may specify allowWithoutSanitization.String
name
Name of permission.Boolean
panTiltZoom
For "camera" permission, may specify panTiltZoom.Boolean
sysex
For "midi" permission, may also specify sysex control.Boolean
userVisibleOnly
For "push" permission, may specify userVisibleOnly.
-
Constructor Summary
Constructors Constructor Description PermissionDescriptor(String name, Boolean sysex, Boolean userVisibleOnly, Boolean allowWithoutSanitization, Boolean panTiltZoom)
ConstructorPermissionDescriptor(JsonObject jo)
JSON Object Constructor
-
Method Summary
Generate Array that Indicates which Parameter are Optional Modifier and Type Method boolean[]
optionals()
Implementing this method allows sub-classes to specify which JSON Properties may be absent or null.Methods: class java.lang.Object Modifier and Type Method boolean
equals(Object other)
Checks whether'this'
equals an input Java-Object
int
hashCode()
Generates a Hash-Code for'this'
instance
-
-
-
Field Detail
-
serialVersionUID
protected static final long serialVersionUID
For Object Serialization. java.io.Serializable- See Also:
- Constant Field Values
-
name
public final java.lang.String name
Name of permission. See https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/permissions/permission_descriptor.idl for valid permission names.
-
sysex
public final java.lang.Boolean sysex
For "midi" permission, may also specify sysex control.
OPTIONAL
-
userVisibleOnly
public final java.lang.Boolean userVisibleOnly
For "push" permission, may specify userVisibleOnly. Note that userVisibleOnly = true is the only currently supported type.
OPTIONAL
-
allowWithoutSanitization
public final java.lang.Boolean allowWithoutSanitization
For "clipboard" permission, may specify allowWithoutSanitization.
OPTIONAL
-
panTiltZoom
public final java.lang.Boolean panTiltZoom
For "camera" permission, may specify panTiltZoom.
OPTIONAL
-
-
Constructor Detail
-
PermissionDescriptor
public PermissionDescriptor(java.lang.String name, java.lang.Boolean sysex, java.lang.Boolean userVisibleOnly, java.lang.Boolean allowWithoutSanitization, java.lang.Boolean panTiltZoom)
Constructor- Parameters:
name
- Name of permission. See https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/permissions/permission_descriptor.idl for valid permission names.sysex
- For "midi" permission, may also specify sysex control.
OPTIONALuserVisibleOnly
- For "push" permission, may specify userVisibleOnly. Note that userVisibleOnly = true is the only currently supported type.
OPTIONALallowWithoutSanitization
- For "clipboard" permission, may specify allowWithoutSanitization.
OPTIONALpanTiltZoom
- For "camera" permission, may specify panTiltZoom.
OPTIONAL
-
PermissionDescriptor
public PermissionDescriptor(JsonObject jo)
JSON Object Constructor- Parameters:
jo
- A Json-Object having data about an instance of'PermissionDescriptor'
.
-
-
Method Detail
-
optionals
public boolean[] optionals()
Description copied from class:BaseType
Implementing this method allows sub-classes to specify which JSON Properties may be absent or null. When binding aJsonObject
to a Java-Object, if some of the expected fields for the Java-Object map to Properties which might be left-out or omitted, then that may be indicated by setting that fields array positionTRUE
.
NOTE: This array should have a length equal to the number of fields contained by the Java Object. The first boolean in the array should specify whether the first Object Field may by absent. The second boolean should specify whether the second Object Field is optional in the JSON - and so on and so forth...
-
equals
public boolean equals(java.lang.Object other)
Checks whether'this'
equals an input Java-Object
- Overrides:
equals
in classjava.lang.Object
- Code:
- Exact Method Body:
if (other == null) return false; if (other.getClass() != this.getClass()) return false; PermissionDescriptor o = (PermissionDescriptor) other; return Objects.equals(this.name, o.name) && Objects.equals(this.sysex, o.sysex) && Objects.equals(this.userVisibleOnly, o.userVisibleOnly) && Objects.equals(this.allowWithoutSanitization, o.allowWithoutSanitization) && Objects.equals(this.panTiltZoom, o.panTiltZoom);
-
hashCode
public int hashCode()
Generates a Hash-Code for'this'
instance- Overrides:
hashCode
in classjava.lang.Object
- Code:
- Exact Method Body:
return Objects.hashCode(this.name) + Objects.hashCode(this.sysex) + Objects.hashCode(this.userVisibleOnly) + Objects.hashCode(this.allowWithoutSanitization) + Objects.hashCode(this.panTiltZoom);
-
-