Class Item
- All Implemented Interfaces:
org.freedesktop.dbus.interfaces.DBusInterface,Item
public class Item extends Messaging implements Item
-
Field Summary
Fields inherited from class org.freedesktop.secret.handlers.Messaging
connection, interfaceName, msg, objectPath, serviceName, sh -
Constructor Summary
-
Method Summary
Modifier and Type Method Description org.freedesktop.dbus.types.UInt64created()static Map<String,org.freedesktop.dbus.types.Variant>createProperties(String label, Map<String,String> attributes)Create properties for a new item.org.freedesktop.dbus.ObjectPathdelete()Delete this item.Map<String,String>getAttributes()The lookup attributes for this item.StringgetId()StringgetLabel()Label is a D-Bus Property.StringgetObjectPath()SecretgetSecret(org.freedesktop.dbus.ObjectPath session)Retrieve the secret for this item.StringgetType()booleanisLocked()booleanisRemote()org.freedesktop.dbus.types.UInt64modified()voidsetAttributes(Map<String,String> attributes)The lookup attributes for this item.voidsetLabel(String label)Label is a D-Bus Property.voidsetSecret(Secret secret)Set the secret for this item.Methods inherited from class org.freedesktop.secret.handlers.Messaging
getAllProperties, getConnection, getInterfaceName, getMessageHandler, getPath, getProperty, getServiceName, getSignalHandler, send, send, setProperty
-
Constructor Details
-
Method Details
-
createProperties
public static Map<String,org.freedesktop.dbus.types.Variant> createProperties(String label, Map<String,String> attributes)Create properties for a new item.- Parameters:
label- The displayable label of the item.attributes- String-valued attributes of the item.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.
- Returns:
- properties — The properties for an item.
Example:
properties = {
"org.freedesktop.Secret.Item.Label": "MyItem",
"org.freedesktop.Secret.Item.Attributes": {
"Attribute1": "Value1",
"Attribute2": "Value2"
}
}Note: Properties for a collection and properties for an item are not the same.
See Also:
Item.getAttributes()
Item.setAttributes(Map attributes)
Collection.createItem(Map properties, Secret secret, boolean replace)
Collection.createProperties(String label)
Service.createCollection(Map properties)
Service.createCollection(Map properties, String alias)
-
delete
public org.freedesktop.dbus.ObjectPath delete()Description copied from interface:ItemDelete this item. -
getSecret
Description copied from interface:ItemRetrieve the secret for this item. -
setSecret
Description copied from interface:ItemSet the secret for this item. -
isLocked
public boolean isLocked() -
getAttributes
Description copied from interface:ItemThe lookup attributes for this item. Attributes is a D-Bus Property.It is managed by using the
org.freedesktop.DBus.Propertiesinterface.- Specified by:
getAttributesin interfaceItem- Returns:
- The attributes of the item.
-
setAttributes
Description copied from interface:ItemThe lookup attributes for this item. Attributes is a D-Bus Property.It is managed by using the
org.freedesktop.DBus.Propertiesinterface.- Specified by:
setAttributesin interfaceItem- Parameters:
attributes- The attributes of the item.
-
getLabel
Description copied from interface:ItemLabel is a D-Bus Property.It is managed by using the
org.freedesktop.DBus.Propertiesinterface. -
setLabel
Description copied from interface:ItemLabel is a D-Bus Property.It is managed by using the
org.freedesktop.DBus.Propertiesinterface. -
getType
-
created
public org.freedesktop.dbus.types.UInt64 created() -
modified
public org.freedesktop.dbus.types.UInt64 modified() -
isRemote
public boolean isRemote()- Specified by:
isRemotein interfaceorg.freedesktop.dbus.interfaces.DBusInterface
-
getObjectPath
- Specified by:
getObjectPathin interfaceorg.freedesktop.dbus.interfaces.DBusInterface- Overrides:
getObjectPathin classMessaging
-
getId
-