Top Inners Fields Methods
org.freedesktop.secret.interfaces

public Interface Collection

extends DBusInterface
Known Direct Implementers
org.freedesktop.secret.Collection
Annotations
@DBusInterfaceName:org.freedesktop.Secret.Collection
Imports
org.freedesktop.dbus.DBusPath, .ObjectPath, org.freedesktop.dbus.annotations.DBusInterfaceName, org.freedesktop.dbus.exceptions.DBusException, org.freedesktop.dbus.interfaces.DBusInterface, org.freedesktop.dbus.messages.DBusSignal, org.freedesktop.dbus.types.UInt64, .Variant, org.freedesktop.secret.Pair, .Secret, .Static, java.util.List, .Map

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class
public static class

Field Summary

Modifier and TypeField and Description
public static final String
LABEL

The key of the D-Bus properties for the label of a collection.

Method Summary

Modifier and TypeMethod and Description
public UInt64

Returns:

The unix time when the collection was created.
created
()

public Pair<ObjectPath, ObjectPath>

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:
org.freedesktop.secret.Collection#createProperties(String label)
org.freedesktop.secret.Item#createProperties(String label, Map attributes)
createItem
(Map<String, Variant<T>>
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.

properties
,
Secret
The secret to store in the item, encoded with the included session.
secret
,
boolean
Whether to replace an item with the same attributes or not.
replace
)

Create an item with the given attributes, secret and label.

public ObjectPath

Returns:

prompt — A prompt to delete the collection, or the special value '/' when no prompt is necessary.
delete
()
References Deprecated ObjectPath is deprecated or references (maybe indirectly) at least one deprecated element.

Delete this collection.

public List<ObjectPath>

Returns:

Items in this collection.
getItems
()

Items is a D-Bus Property.

public String

Returns:

The displayable label of this collection.

Note

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

getLabel
()

Label is a D-Bus Property.

public boolean

Returns:

Whether the collection is locked and must be authenticated by the client application.
isLocked
()

public UInt64

Returns:

The unix time when the collection was last modified.
modified
()

public List<ObjectPath>

Returns:

results — Items that matched the attributes.
searchItems
(Map<String, String>
Attributes to match.
attributes
)

Search for items in this collection matching the lookup attributes.

public void
setLabel(String
The displayable label of this collection.

Note

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

label
)

Label is a D-Bus Property.

Inherited from org.freedesktop.dbus.interfaces.DBusInterface:
getObjectPathisRemote

Field Detail

LABELback to summary
public static final String LABEL

The key of the D-Bus properties for the label of a collection.

Method Detail

createdback to summary
public UInt64 created()
Returns:UInt64

The unix time when the collection was created.

createItemback to summary
public Pair<ObjectPath, ObjectPath> createItem(Map<String, Variant<T>> 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:Map<String, Variant<T>>

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:Secret

The secret to store in the item, encoded with the included session.

replace:boolean

Whether to replace an item with the same attributes or not.

Returns:Pair<ObjectPath, ObjectPath>

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:
org.freedesktop.secret.Collection#createProperties(String label)
org.freedesktop.secret.Item#createProperties(String label, Map attributes)

See Also
Pair, ObjectPath, Secret, Item
deleteback to summary
public ObjectPath delete()

References Deprecated

ObjectPath is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Delete this collection.

Returns:ObjectPath

prompt — A prompt to delete the collection, or the special value '/' when no prompt is necessary.

See Also
ObjectPath
getItemsback to summary
public List<ObjectPath> getItems()

Items is a D-Bus Property.

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

Returns:List<ObjectPath>

Items in this collection.

getLabelback to summary
public String getLabel()

Label is a D-Bus Property.

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

Returns:String

The displayable label of this collection.

Note

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

isLockedback to summary
public boolean isLocked()
Returns:boolean

Whether the collection is locked and must be authenticated by the client application.

modifiedback to summary
public UInt64 modified()
Returns:UInt64

The unix time when the collection was last modified.

searchItemsback to summary
public List<ObjectPath> searchItems(Map<String, String> attributes)

Search for items in this collection matching the lookup attributes.

Parameters
attributes:Map<String, String>

Attributes to match.

Returns:List<ObjectPath>

results — Items that matched the attributes.

See Also
ObjectPath, Secret, Item
setLabelback to summary
public void setLabel(String label)

Label is a D-Bus Property.

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

Parameters
label:String

The displayable label of this collection.

Note

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

org.freedesktop.secret.interfaces back to summary

public Class Collection.ItemChanged

extends DBusSignal
Class Inheritance

Field Summary

Modifier and TypeField and Description
public final DBusPath

Constructor Summary

AccessConstructor and Description
public
ItemChanged(String
The path to the object this is emitted from.
path
,
DBusPath
The item that was changed.
item
)

An item in this collection changed.

Method Summary

Inherited from org.freedesktop.dbus.messages.DBusSignal:
appendbodycreateReal

Field Detail

itemback to summary
public final DBusPath item

Constructor Detail

ItemChangedback to summary
public ItemChanged(String path, DBusPath item) throws DBusException

An item in this collection changed.

Parameters
path:String

The path to the object this is emitted from.

item:DBusPath

The item that was changed.

Exceptions
DBusException:
Could not communicate properly with the D-Bus.
org.freedesktop.secret.interfaces back to summary

public Class Collection.ItemCreated

extends DBusSignal
Class Inheritance

Field Summary

Modifier and TypeField and Description
public final DBusPath

Constructor Summary

AccessConstructor and Description
public
ItemCreated(String
The path to the object this is emitted from.
path
,
DBusPath
The item that was created.
item
)

A new item in this collection was created.

Method Summary

Inherited from org.freedesktop.dbus.messages.DBusSignal:
appendbodycreateReal

Field Detail

itemback to summary
public final DBusPath item

Constructor Detail

ItemCreatedback to summary
public ItemCreated(String path, DBusPath item) throws DBusException

A new item in this collection was created.

Parameters
path:String

The path to the object this is emitted from.

item:DBusPath

The item that was created.

Exceptions
DBusException:
Could not communicate properly with the D-Bus.
org.freedesktop.secret.interfaces back to summary

public Class Collection.ItemDeleted

extends DBusSignal
Class Inheritance

Field Summary

Modifier and TypeField and Description
public final DBusPath

Constructor Summary

AccessConstructor and Description
public
ItemDeleted(String
The path to the object this is emitted from.
path
,
DBusPath
The item that was deleted.
item
)

An item in this collection was deleted.

Method Summary

Inherited from org.freedesktop.dbus.messages.DBusSignal:
appendbodycreateReal

Field Detail

itemback to summary
public final DBusPath item

Constructor Detail

ItemDeletedback to summary
public ItemDeleted(String path, DBusPath item) throws DBusException

An item in this collection was deleted.

Parameters
path:String

The path to the object this is emitted from.

item:DBusPath

The item that was deleted.

Exceptions
DBusException:
Could not communicate properly with the D-Bus.