public interface Entry<D extends Database<D,G,E,I>,G extends Group<D,G,E,I>,E extends Entry<D,G,E,I>,I extends Icon>
Entries have a UUID and have an Icon, which are not properties.
Support for additional textual properties may be provided by a database implementation.
Entries provide support for tracking when they are used. At some point support for accessing a history of modifications may be added to this interface
| Modifier and Type | Interface and Description |
|---|---|
static interface |
Entry.Matcher
Interface to implement when using the
match(Entry.Matcher)
method |
| Modifier and Type | Field and Description |
|---|---|
static String |
STANDARD_PROPERTY_NAME_NOTES |
static String |
STANDARD_PROPERTY_NAME_PASSWORD |
static String |
STANDARD_PROPERTY_NAME_TITLE |
static String |
STANDARD_PROPERTY_NAME_URL |
static String |
STANDARD_PROPERTY_NAME_USER_NAME
Standard properties are attributes of Entries that are accessible either by
dedicated methods, such as getPassword, or by
getProperty(String) |
static List<String> |
STANDARD_PROPERTY_NAMES |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getBinaryProperty(String name)
Gets the value of a binary property.
|
List<String> |
getBinaryPropertyNames()
Returns a list of binary property names known to the entry.
|
Date |
getCreationTime() |
boolean |
getExpires() |
Date |
getExpiryTime() |
I |
getIcon()
Returns the
Icon associated with this entry. |
Date |
getLastAccessTime() |
Date |
getLastModificationTime() |
String |
getNotes()
Gets the notes field for this entry.
|
G |
getParent()
Get the parent of this entry
|
String |
getPassword()
Gets the (unencrypted) password field for this entry.
|
String |
getPath()
Returns an XPath-like representation of this
entry's ancestor groups and the title of this entry.
|
String |
getProperty(String name)
Gets the value of a property.
|
List<String> |
getPropertyNames()
Returns a list of property names known to the entry.
|
String |
getTitle()
Gets the title of this entry.
|
String |
getUrl()
Gets the URL for this entry.
|
String |
getUsername()
Get the username field of this entry
|
UUID |
getUuid()
Get the UUID of this entry.
|
boolean |
match(Entry.Matcher matcher)
Returns the result of applying the matcher to this Entry
|
boolean |
match(String text)
Determines if an entry matches the text supplied.
|
boolean |
matchNotes(String text)
Returns true if the notes to lowercase contains the passed string to lowercase.
|
boolean |
matchTitle(String text)
Returns true if this title to lowercase contains the passed title to lowercase.
|
boolean |
matchUrl(String url)
Returns true if this url to lowercase contains the passed url to lowercase.
|
boolean |
matchUsername(String username)
Returns true if this username to lowercase contains the passed username to lowercase.
|
void |
setBinaryProperty(String name,
byte[] value)
Sets the value of a binary property.
|
void |
setIcon(I icon)
Sets the
Icon associated with this entry. |
void |
setNotes(String notes)
Sets the notes for this Entry.
|
void |
setPassword(String pass)
Sets the plaintext password for this Entry.
|
void |
setProperty(String name,
String value)
Sets the value of a property.
|
void |
setTitle(String title)
Sets the title for this Entry.
|
void |
setUrl(String url)
Sets the url for this Entry.
|
void |
setUsername(String username)
set the username
|
static final String STANDARD_PROPERTY_NAME_USER_NAME
getProperty(String)static final String STANDARD_PROPERTY_NAME_PASSWORD
static final String STANDARD_PROPERTY_NAME_URL
static final String STANDARD_PROPERTY_NAME_TITLE
static final String STANDARD_PROPERTY_NAME_NOTES
boolean match(String text)
text - the text to findboolean match(Entry.Matcher matcher)
matcher - the matcher to useString getPath()
String getProperty(String name)
All implementations of Entry are required to support reading and writing of
STANDARD_PROPERTY_NAMES.
name - the name of the property to getvoid setProperty(String name, String value)
Other than the STANDARD_PROPERTY_NAMES support for this methd is optional.
name - the name of the property to setvalue - the value to set it toUnsupportedOperationException - if the name is not one of the standard properties and
non-standard properties are not supported.List<String> getPropertyNames()
All implementations of Entry are required to support reading and writing of
STANDARD_PROPERTY_NAMES.
byte[] getBinaryProperty(String name)
Support for this method is optional.
name - the name of the property to getvoid setBinaryProperty(String name, byte[] value)
Support for this method is optional.
name - the name of the property to setvalue - the value to set it toUnsupportedOperationException - if binary properties are not supported.List<String> getBinaryPropertyNames()
All implementations of Entry are required to support reading and writing of
STANDARD_PROPERTY_NAMES.
UnsupportedOperationException - if binary properties are not supported.G getParent()
UUID getUuid()
String getUsername()
void setUsername(String username)
username - username to setboolean matchUsername(String username)
username - a username to matchString getPassword()
Implementations should Touch LastAccessedTime when this method is called.
void setPassword(String pass)
Implementations should Touch LastModifiedTime when this method is called.
pass - a passwordString getUrl()
Implementations should Touch LastAccessedTime when this method is called.
void setUrl(String url)
Implementations should Touch LastModifiedTime when this method is called.
url - the value to setboolean matchUrl(String url)
url - a string to matchString getTitle()
Implementations should Touch LastAccessedTime when this method is called.
void setTitle(String title)
Implementations should Touch LastModifiedTime when this method is called.
title - the value to setboolean matchTitle(String text)
text - a string to matchString getNotes()
Implementations should Touch LastAccessedTime when this method is called.
void setNotes(String notes)
Implementations should Touch LastModifiedTime when this method is called.
notes - the value to setboolean matchNotes(String text)
text - a string to matchDate getLastAccessTime()
Date getCreationTime()
boolean getExpires()
Date getExpiryTime()
Date getLastModificationTime()
Copyright © 2016. All rights reserved.