|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xnap.io.Library
public class Library
Field Summary | |
---|---|
static java.lang.String |
FILENAME
The name of the file where the library is stored. |
static int |
VERSION
The current version of the library. |
Constructor Summary | |
---|---|
Library()
|
Method Summary | |
---|---|
void |
addListListener(ListListener listener)
Listener is notified when a new file is
added. |
void |
addMetaInfoProvider(MetaInfoProvider provider)
Provider is notified when a file is added or not uptodate. |
MetaInfoFile |
get(java.io.File file)
Returns a MetaInfoFile object if file is part of library. |
MetaInfoFile |
get(int index)
Returns a file by index. |
MetaInfoFile |
get(java.lang.String filename,
int index)
Returns file at index and compares it to the given
filename. |
static Library |
getInstance()
|
int |
indexOf(java.io.File file)
|
boolean |
isPartOfRepository(java.io.File file)
Returns false, if file is the incomplete folder
or its name starts with a dot. |
boolean |
isRead()
|
boolean |
isShared(java.io.File file)
Returns true, if file is part of repository and shared. |
boolean |
isUpdateRunning()
|
void |
propertyChange(java.beans.PropertyChangeEvent e)
|
void |
removeListListener(ListListener listener)
Removes listener . |
void |
removeMetaInfoProvider(MetaInfoProvider provider)
Removes provider . |
MetaInfoFile[] |
search(java.lang.String searchText)
|
java.io.File[] |
search(java.lang.String searchText,
long filesize)
|
void |
setStatusListener(StatusListener newValue)
|
int |
size()
|
void |
updateLater()
Updates the repository. |
void |
updateStatus()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String FILENAME
public static int VERSION
Constructor Detail |
---|
public Library()
Method Detail |
---|
public static Library getInstance()
public void addListListener(ListListener listener)
Listener
is notified when a new file is
added.
public void addMetaInfoProvider(MetaInfoProvider provider)
Provider
is notified when a file is added or not uptodate.
public MetaInfoFile get(int index)
public MetaInfoFile get(java.io.File file)
public MetaInfoFile get(java.lang.String filename, int index)
index
and compares it to the given
filename. If filenames match returns the file.
public int indexOf(java.io.File file)
public boolean isShared(java.io.File file)
public boolean isRead()
public boolean isPartOfRepository(java.io.File file)
file
is the incomplete folder
or its name starts with a dot.
public boolean isUpdateRunning()
public void propertyChange(java.beans.PropertyChangeEvent e)
propertyChange
in interface java.beans.PropertyChangeListener
public void removeListListener(ListListener listener)
listener
.
public void removeMetaInfoProvider(MetaInfoProvider provider)
provider
.
public MetaInfoFile[] search(java.lang.String searchText)
public java.io.File[] search(java.lang.String searchText, long filesize)
public int size()
public void updateLater()
public void setStatusListener(StatusListener newValue)
public void updateStatus()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |