Interface Collection

All Superinterfaces:
org.freedesktop.dbus.interfaces.DBusInterface
All Known Implementing Classes:
Collection

public interface Collection extends org.freedesktop.dbus.interfaces.DBusInterface
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
     
    static class 
     
    static class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The key of the D-Bus properties for the label of a collection.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.freedesktop.dbus.types.UInt64
     
    Pair<org.freedesktop.dbus.ObjectPath,org.freedesktop.dbus.ObjectPath>
    createItem(Map<String,org.freedesktop.dbus.types.Variant> properties, Secret secret, boolean replace)
    Create an item with the given attributes, secret and label.
    org.freedesktop.dbus.ObjectPath
    Delete this collection.
    List<org.freedesktop.dbus.ObjectPath>
    Items is a D-Bus Property.
    Label is a D-Bus Property.
    boolean
     
    org.freedesktop.dbus.types.UInt64
     
    List<org.freedesktop.dbus.ObjectPath>
    Search for items in this collection matching the lookup attributes.
    void
    Label is a D-Bus Property.

    Methods inherited from interface org.freedesktop.dbus.interfaces.DBusInterface

    getObjectPath, isRemote
  • Field Details

  • Method Details

    • delete

      org.freedesktop.dbus.ObjectPath delete()
      Delete this collection.
      Returns:
      prompt — A prompt to delete the collection, or the special value '/' when no prompt is necessary.
      See Also:
      • ObjectPath
    • searchItems

      List<org.freedesktop.dbus.ObjectPath> searchItems(Map<String,String> attributes)
      Search for items in this collection matching the lookup attributes.
      Parameters:
      attributes - Attributes to match.
      Returns:
      results — Items that matched the attributes.
      See Also:
    • createItem

      Pair<org.freedesktop.dbus.ObjectPath,org.freedesktop.dbus.ObjectPath> createItem(Map<String,org.freedesktop.dbus.types.Variant> properties, Secret secret, boolean replace)
      Create an item with the given attributes, secret and label. If replace is set, then it replaces an item already present with the same values for the attributes.
      Parameters:
      properties - The properties for the new item.

      This allows setting the new item's properties upon its creation. All READWRITE properties are useable. Specify the property names in full interface.Property form.

      Example 13.2. Example for properties of an item:
      properties = {
        "org.freedesktop.Secret.Item.Label": "MyItem",
        "org.freedesktop.Secret.Item.Attributes": {
          "Attribute1": "Value1",
          "Attribute2": "Value2"
        }
      }

      Note: Please note that there is a distinction between the terms Property, which refers to D-Bus properties of an object, and Attribute, which refers to one of a secret item's string-valued attributes.

      secret - The secret to store in the item, encoded with the included session.
      replace - Whether to replace an item with the same attributes or not.
      Returns:
      Pair<item, prompt>

      item — The item created, or the special value '/' if a prompt is necessary.

      prompt — A prompt object, or the special value '/' if no prompt is necessary.

      See Also:
      Collection.createProperties(String label)
      Item.createProperties(String label, Map attributes)
      See Also:
    • getItems

      List<org.freedesktop.dbus.ObjectPath> getItems()
      Items is a D-Bus Property.

      It is managed by using the org.freedesktop.DBus.Properties interface.

      Returns:
      Items in this collection.
    • getLabel

      String getLabel()
      Label is a D-Bus Property.

      It is managed by using the org.freedesktop.DBus.Properties interface.

      Returns:
      The displayable label of this collection.

      Note: The displayable label can differ from the actual name of a collection.

    • setLabel

      void setLabel(String label)
      Label is a D-Bus Property.

      It is managed by using the org.freedesktop.DBus.Properties interface.

      Parameters:
      label - The displayable label of this collection.

      Note: The displayable label can differ from the actual name of a collection.

    • isLocked

      boolean isLocked()
      Returns:
      Whether the collection is locked and must be authenticated by the client application.
    • created

      org.freedesktop.dbus.types.UInt64 created()
      Returns:
      The unix time when the collection was created.
    • modified

      org.freedesktop.dbus.types.UInt64 modified()
      Returns:
      The unix time when the collection was last modified.