|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.hd.d.pg2k.clApp.uploader.SelectedFilesDB
final class SelectedFilesDB
Database of selected files. Package-visible for direct manipulation by GUI classes.
Thread-safe.
A lock can be held on an instance to make compound atomic operations.
| Field Summary | |
|---|---|
private boolean |
changed
Flag set true when the table is changed. |
private java.util.ArrayList<SelectedFileDetails> |
files
Ordered random-access list of proposed exhibits to be uploaded; never null. |
private java.util.Set<ROByteArray> |
hashesMD5
Set of all MD5 hashes; never null. |
private java.util.Set<java.lang.String> |
localFilenames
Set of all local file names; never null. |
private java.util.Set<java.lang.String> |
shortNames
Set of all putative short exhibit names; never null. |
| Constructor Summary | |
|---|---|
SelectedFilesDB()
|
|
| Method Summary | |
|---|---|
(package private) void |
add(SelectedFileDetails newFile)
Add item, silently dropping duplicate file entries if possible. |
(package private) void |
clear()
Clear the whole DB. |
(package private) SelectedFileDetails |
get(int index)
Get given numbered entry by index; never null. |
(package private) boolean |
localFilenameInUse(java.lang.String localFilename)
Returns true if this local name is already in this DB. |
(package private) void |
remove(int index)
Remove the indicated item (shuffling any following elements down). |
(package private) boolean |
remove(SelectedFileDetails selectedFileDetails)
Remove the indicated item (shuffling any following elements down). |
(package private) void |
setDescription(int index,
java.lang.String newDescription)
Change the putative exhibit description. |
(package private) void |
setExhibitName(int index,
java.lang.String newFullName)
Change the putative exhibit name to another new syntatically-valid one. |
(package private) boolean |
shortNameInUse(java.lang.String shortName)
Returns true if an exhibit in this DB already has this short name. |
(package private) int |
size()
Get number of entries in DB; non-negative. |
(package private) boolean |
testAndClearChangedFlag()
Returns the "changed" flag value and clears it. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final java.util.ArrayList<SelectedFileDetails> files
private final java.util.Set<java.lang.String> localFilenames
private final java.util.Set<java.lang.String> shortNames
private final java.util.Set<ROByteArray> hashesMD5
private boolean changed
| Constructor Detail |
|---|
SelectedFilesDB()
| Method Detail |
|---|
void add(SelectedFileDetails newFile)
newFile - new file to add; must be nullvoid remove(int index)
boolean remove(SelectedFileDetails selectedFileDetails)
void setExhibitName(int index,
java.lang.String newFullName)
index - entry to be replacednewFullName - new unique (in this DB) valid exhibit name
void setDescription(int index,
java.lang.String newDescription)
index - entry to be replacednewDescription - new description; never nullvoid clear()
int size()
SelectedFileDetails get(int index)
boolean shortNameInUse(java.lang.String shortName)
shortName - never nullboolean localFilenameInUse(java.lang.String localFilename)
localFilename - never nullboolean testAndClearChangedFlag()
|
DHD Multimedia Gallery V1.60.69 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||