|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsk.baka.ambient.collection.sync.CollectionSynchronizer
public class CollectionSynchronizer
Downloads tracks from given collection which are missing in the reference
collection. All work is done in the call() method.
| Constructor Summary | |
|---|---|
CollectionSynchronizer(android.content.Context context,
ICollection reference,
ICollection downloadFrom,
TagFormatter pathFormatter,
java.lang.String rootPath,
IBackgroundTask task)
Creates new synchronizer. |
|
| Method Summary | |
|---|---|
java.lang.Void |
call()
|
void |
downloadEntireCollection()
Configures the synchronizer to download entire collection (the default). |
void |
setCategoriesToDownload(java.util.Collection<? extends CategoryItem> items)
Sets the synchronizer to download tracks from these categories, instead of performing a full synchronization. |
void |
setTracksToDownload(java.util.Collection<? extends TrackMetadataBean> tracks)
Sets the synchronizer to download these tracks, instead of performing a full synchronization. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CollectionSynchronizer(android.content.Context context,
ICollection reference,
ICollection downloadFrom,
TagFormatter pathFormatter,
java.lang.String rootPath,
IBackgroundTask task)
context - owner's context.reference - This is the reference collection, i.e. tracks which are not to
be synchronized.downloadFrom - Download excess tracks from this collection.pathFormatter - produces a relative path where the music file should be
stored. Must produce valid paths! Paths are created
automatically.rootPath - this path is automatically prepended to paths produced by the
pathFormatter formatter.task - used for progress reporting, may be null.| Method Detail |
|---|
public void setTracksToDownload(java.util.Collection<? extends TrackMetadataBean> tracks)
tracks - the tracks to download.public void setCategoriesToDownload(java.util.Collection<? extends CategoryItem> items)
items - the items to download.public void downloadEntireCollection()
public java.lang.Void call()
throws java.lang.Exception
call in interface java.util.concurrent.Callable<java.lang.Void>java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||