Enum Class SchemaType

java.lang.Object
java.lang.Enum<SchemaType>
org.gnome.secret.SchemaType
All Implemented Interfaces:
Serializable, Comparable<SchemaType>, Constable, Enumeration

@Generated("org.javagi.JavaGI") public enum SchemaType extends Enum<SchemaType> implements Enumeration

Different types of schemas for storing secrets, intended for use with Secret.getSchema(SchemaType).

SECRETSCHEMANOTE

A predefined schema for personal passwords stored by the user in the password manager. This schema has no attributes, and the items are not meant to be used automatically by applications.

When used to search for items using this schema, it will only match items that have the same schema. Items stored via libgnome-keyring with the GNOME_KEYRING_ITEM_NOTE item type will match.

SECRETSCHEMACOMPATNETWORK

A predefined schema that is compatible with items stored via the libgnome-keyring 'network password' functions. This is meant to be used by applications migrating from libgnome-keyring which stored their secrets as 'network passwords'. It is not recommended that new code use this schema.

When used to search for items using this schema, it will only match items that have the same schema. Items stored via libgnome-keyring with the GNOME_KEYRING_ITEM_NETWORK_PASSWORD item type will match.

The following attributes exist in the schema:

Attributes:

user: The user name (string).
domain: The login domain or realm (string).
object: The object or path (string).
protocol: The protocol (a string like 'http').
port: The network port (integer).
server: The hostname or server (string).
authtype: The authentication type (string).
Since:
0.18.6
  • Enum Constant Details

    • NOTE

      public static final SchemaType NOTE
      Personal passwords
    • COMPAT_NETWORK

      public static final SchemaType COMPAT_NETWORK
      Network passwords from older libgnome-keyring storage
  • Method Details

    • values

      public static SchemaType[] 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 SchemaType 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
    • of

      public static SchemaType of(int value)
      Create a new SchemaType for the provided value
      Parameters:
      value - the enum value
      Returns:
      the enum for the provided value
    • getValue

      public int getValue()
      Get the numeric value of this enum
      Specified by:
      getValue in interface Enumeration
      Returns:
      the enum value
    • of

      public static SchemaType of(MemorySegment address)
      Create a new SchemaType for the value in the provided memory address.
      Parameters:
      address - the memory address holding a enum value
      Returns:
      the enum for the value in the provided memory address
    • getType

      public static @Nullable Type getType()
      Get the GType of the SchemaType class.
      Returns:
      the GType