Class Collection
- java.lang.Object
-
- org.freedesktop.secret.handlers.Messaging
-
- org.freedesktop.secret.interfaces.AbstractInterface
-
- org.freedesktop.secret.interfaces.Collection
-
- All Implemented Interfaces:
org.freedesktop.dbus.interfaces.DBusInterface
- Direct Known Subclasses:
Collection
public abstract class Collection extends AbstractInterface implements org.freedesktop.dbus.interfaces.DBusInterface
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCollection.ItemChangedstatic classCollection.ItemCreatedstatic classCollection.ItemDeleted
-
Field Summary
Fields Modifier and Type Field Description static StringLABELThe key of the D-Bus properties for the label of a collection.-
Fields inherited from class org.freedesktop.secret.handlers.Messaging
connection, interfaceName, msg, objectPath, serviceName, sh
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract org.freedesktop.dbus.types.UInt64created()abstract 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.static Map<String,org.freedesktop.dbus.types.Variant>createProperties(String label)Create propterties for a new collection.abstract org.freedesktop.dbus.ObjectPathdelete()Delete this collection.abstract List<org.freedesktop.dbus.ObjectPath>getItems()Items is a D-Bus Property.abstract StringgetLabel()Label is a D-Bus Property.abstract booleanisLocked()abstract org.freedesktop.dbus.types.UInt64modified()abstract List<org.freedesktop.dbus.ObjectPath>searchItems(Map<String,String> attributes)Search for items in this collection matching the lookup attributes.abstract voidsetLabel(String label)Label is a D-Bus Property.-
Methods inherited from class org.freedesktop.secret.handlers.Messaging
getAllProperties, getConnection, getInterfaceName, getMessageHandler, getObjectPath, getPath, getProperty, getServiceName, getSignalHandler, send, send, setProperty
-
-
-
-
Field Detail
-
LABEL
public static final String LABEL
The key of the D-Bus properties for the label of a collection.- See Also:
- Constant Field Values
-
-
Method Detail
-
createProperties
public static Map<String,org.freedesktop.dbus.types.Variant> createProperties(String label)
Create propterties for a new collection.- Parameters:
label- The displayable label of this collection.Note: The displayable
labelcan differ from the actualnameof a collection.- Returns:
- properties — The propterties for a collection.
{org.freedesktop.Secret.Collection.Label: label}Note: Properties for a collection and properties for an item are not the same.
See Also:
createItem(Map properties, Secret secret, boolean replace)
Service.createCollection(Map properties)
Service.createCollection(Map properties, String alias)
Item.createProperties(String label, Map attributes)
-
delete
public abstract 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
public abstract List<org.freedesktop.dbus.ObjectPath> searchItems(Map<String,String> attributes)
Search for items in this collection matching the lookup attributes.
-
createItem
public abstract 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.Propertyform.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:
createProperties(String label)
Item.createProperties(String label, Map attributes) - See Also:
Pair,ObjectPath,Secret,Item
-
getItems
public abstract List<org.freedesktop.dbus.ObjectPath> getItems()
Items is a D-Bus Property.It is managed by using the
org.freedesktop.DBus.Propertiesinterface.- Returns:
- Items in this collection.
-
getLabel
public abstract String getLabel()
Label is a D-Bus Property.It is managed by using the
org.freedesktop.DBus.Propertiesinterface.- Returns:
- The displayable label of this collection.
Note: The displayable
labelcan differ from the actualnameof a collection.
-
setLabel
public abstract void setLabel(String label)
Label is a D-Bus Property.It is managed by using the
org.freedesktop.DBus.Propertiesinterface.- Parameters:
label- The displayable label of this collection.Note: The displayable
labelcan differ from the actualnameof a collection.
-
isLocked
public abstract boolean isLocked()
- Returns:
- Whether the collection is locked and must be authenticated by the client application.
-
created
public abstract org.freedesktop.dbus.types.UInt64 created()
- Returns:
- The unix time when the collection was created.
-
modified
public abstract org.freedesktop.dbus.types.UInt64 modified()
- Returns:
- The unix time when the collection was last modified.
-
-