Class ManagerUtils
java.lang.Object
com.biglybt.ui.swt.views.utils.ManagerUtils
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interfaceprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static AsyncDispatcherprivate static AsyncDispatcherprivate static Map<DownloadManager, WebPlugin> private static final booleanprivate static List<TextViewerWindow> private static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final longprivate static final longprivate static final Objectprivate static ManagerUtils.RunDownloadManagerprivate static List<TextViewerWindow> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidadvancedRename(DownloadManager[] dms) private static voidadvancedRename(List<DownloadManager> list) static voidallocate(DownloadManager[] dms) static voidstatic voidstatic voidstatic voidasyncPauseForPeriod(int seconds) static voidasyncPauseForPeriod(List<DownloadManager> dms, int seconds) static voidstatic voidstatic voidstatic voidstatic voidasyncStop(DownloadManager dm, int stateAfterStopped) static voidstatic voidasyncStopDelete(DownloadManager dm, int stateAfterStopped, boolean bDeleteTorrent, boolean bDeleteData, AERunnable deleteFailed) static Stringbrowse(DiskManagerFileInfo file) static Stringbrowse(DiskManagerFileInfo file, boolean anon, boolean launch) static Stringstatic Stringbrowse(DownloadManager dm, boolean anon, boolean launch) static Stringbrowse(DownloadManager dm, DiskManagerFileInfo _file, boolean anon, boolean launch) static booleanstatic booleanprivate static intbuildFileMap(TextViewerWindow viewer, File dir, Map<Long, Set<File>> map, long[] log_details, boolean[] quit) static booleanstatic booleanstatic booleanstatic booleanstatic DownloadManager[]cleanUp(DownloadManager[] dms) static voidfindMoreLikeThis(DiskManagerFileInfo file, org.eclipse.swt.widgets.Shell shell) private static voidfindMoreLikeThis(DownloadManager dm, DiskManagerFileInfo file, org.eclipse.swt.widgets.Shell shell) static voidfindMoreLikeThis(DownloadManager dm, org.eclipse.swt.widgets.Shell shell) static voidprivate static booleanprivate static DiskManagerFileInfostatic URLstatic voidhost(Core core, DownloadManager dm) Host a DownloadManager on our Tracker.static booleanstatic booleanisForceStartable(DownloadManager dm, boolean allow_error) static booleanstatic booleanstatic booleanisStartable(DownloadManager dm, boolean allow_error) static booleanstatic booleanstatic voidlocateFiles(DownloadManager[] dms, DiskManagerFileInfo[][] dm_files, org.eclipse.swt.widgets.Shell shell) private static voidlocateFiles(DownloadManager[] dms, DiskManagerFileInfo[][] dm_files, org.eclipse.swt.widgets.Shell shell, String[] initial_search_roots, int mode, int link_type, int tolerance, boolean include_skipped, boolean test_only) static voidlocateFiles(DownloadManager[] dms, org.eclipse.swt.widgets.Shell shell) private static voidlocateFilesSupport(DownloadManager[] dms, DiskManagerFileInfo[][] dm_files, List<TorrentOpenOptions> torrents, Consumer<File[]> listener, org.eclipse.swt.widgets.Shell shell) static voidlocateSaveLocations(List<TorrentOpenOptions> torrents, org.eclipse.swt.widgets.Shell shell, Consumer<File[]> listener) static voidlocateSavePaths(List<TorrentOpenOptions> torrents, org.eclipse.swt.widgets.Shell shell, String[] roots, Consumer<File[]> listener) private static voidlog(TextViewerWindow viewer, int indent, String str) private static voidlogLine(TextViewerWindow viewer, int indent, String str) static voidstatic voidmoveToArchive(List<Download> downloads, ManagerUtils.ArchiveCallback _run_when_complete) static voidopen(DiskManagerFileInfo file, boolean open_containing_folder_mode) static voidopen(DownloadManager dm) Opens the parent folder of dm's pathstatic voidopen(DownloadManager dm, boolean open_containing_folder_mode) static voidstatic voidstatic voidpause(DownloadManager dm, org.eclipse.swt.widgets.Shell shell) static voidpublish(Core core, DownloadManager dm) Publish a DownloadManager on our Tracker.static voidqueue(DownloadManager dm) static voidrestoreFromArchive(List<DownloadStub> downloads, boolean start, ManagerUtils.ArchiveCallback _run_when_complete) static voidrun(DownloadManager dm) static voidsetFileSkipped(DiskManagerFileInfo file_info, boolean skipped) Takes account of whether the download has ever been started and if not selects between normal/delete as opposed to normal/do-not-downloadstatic voidsetFilesSkipped(List<DiskManagerFileInfo> file_infos, boolean skipped) Takes account of whether the download has ever been started and if not selects between normal/delete as opposed to normal/do-not-downloadstatic voidstatic voidstart(DownloadManager dm) static voidstop(DownloadManager dm, org.eclipse.swt.widgets.Shell shell) static voidstop(DownloadManager dm, org.eclipse.swt.widgets.Shell shell, int stateAfterStopped) static voidviewDebug(DownloadManager[] dms) static voidviewLinks(DownloadManager[] dms)
-
Field Details
-
run
-
browse_plugins
-
alloc_dispatcher
-
async
-
LOCATE_MODE_LINK
private static final int LOCATE_MODE_LINK- See Also:
-
LOCATE_MODE_COPY
private static final int LOCATE_MODE_COPY- See Also:
-
LOCATE_MODE_MOVE
private static final int LOCATE_MODE_MOVE- See Also:
-
LOCATE_MODE_PIECE
private static final int LOCATE_MODE_PIECE- See Also:
-
LOCATE_MODE_RELOCATE
private static final int LOCATE_MODE_RELOCATE- See Also:
-
LOCATE_MODE_LINK_BLANK
private static final int LOCATE_MODE_LINK_BLANK- See Also:
-
LOCATE_MODE_LINK_INTERNAL
private static final int LOCATE_MODE_LINK_INTERNAL- See Also:
-
LOCATE_MODE_LINK_HARD
private static final int LOCATE_MODE_LINK_HARD- See Also:
-
lf_windows
-
sp_windows
-
lf_reuse
private static final boolean lf_reuse -
LOG_TICK_DOT_MIN
private static final long LOG_TICK_DOT_MIN- See Also:
-
LOG_TICK_DOT_MAX
private static final long LOG_TICK_DOT_MAX- See Also:
-
LOW_RES_RECHECK_KEY
-
-
Constructor Details
-
ManagerUtils
public ManagerUtils()
-
-
Method Details
-
setRunRunnable
-
run
-
open
Opens the parent folder of dm's path- Parameters:
dm- DownloadManager instance
-
open
-
open
-
open
-
open
-
getBrowseAnon
-
getBrowseHomePage
-
browseWebsite
-
browseWebsite
-
browse
-
browse
-
browse
-
browse
-
browse
public static String browse(DownloadManager dm, DiskManagerFileInfo _file, boolean anon, boolean launch) -
getMediaServerContentURL
-
isStartable
-
isStartable
-
isStopable
-
isPauseable
-
isStopped
-
isForceStartable
-
isForceStartable
-
canForceRecheck
-
forceRecheck
-
host
Host a DownloadManager on our Tracker.Doesn't require SWT Thread
-
publish
Publish a DownloadManager on our Tracker.Doesn't require SWT Thread
-
start
-
canAllocate
-
allocate
-
queue
-
pause
-
stop
-
stop
public static void stop(DownloadManager dm, org.eclipse.swt.widgets.Shell shell, int stateAfterStopped) -
asyncStopDelete
public static void asyncStopDelete(DownloadManager dm, int stateAfterStopped, boolean bDeleteTorrent, boolean bDeleteData, AERunnable deleteFailed) -
asyncStop
-
asyncPause
-
asyncRecheck
-
asyncQueue
-
asyncForceStart
-
asyncStartAll
public static void asyncStartAll() -
asyncStopAll
public static void asyncStopAll() -
asyncPause
public static void asyncPause() -
asyncPauseForPeriod
public static void asyncPauseForPeriod(int seconds) -
asyncResume
public static void asyncResume() -
asyncPauseForPeriod
-
moveToArchive
public static void moveToArchive(List<Download> downloads, ManagerUtils.ArchiveCallback _run_when_complete) -
restoreFromArchive
public static void restoreFromArchive(List<DownloadStub> downloads, boolean start, ManagerUtils.ArchiveCallback _run_when_complete) -
cleanUp
-
locateFiles
-
locateFiles
public static void locateFiles(DownloadManager[] dms, DiskManagerFileInfo[][] dm_files, org.eclipse.swt.widgets.Shell shell) -
locateFilesSupport
private static void locateFilesSupport(DownloadManager[] dms, DiskManagerFileInfo[][] dm_files, List<TorrentOpenOptions> torrents, Consumer<File[]> listener, org.eclipse.swt.widgets.Shell shell) -
locateFiles
private static void locateFiles(DownloadManager[] dms, DiskManagerFileInfo[][] dm_files, org.eclipse.swt.widgets.Shell shell, String[] initial_search_roots, int mode, int link_type, int tolerance, boolean include_skipped, boolean test_only) -
locateSavePaths
public static void locateSavePaths(List<TorrentOpenOptions> torrents, org.eclipse.swt.widgets.Shell shell, String[] roots, Consumer<File[]> listener) -
locateSaveLocations
public static void locateSaveLocations(List<TorrentOpenOptions> torrents, org.eclipse.swt.widgets.Shell shell, Consumer<File[]> listener) -
logLine
-
log
-
buildFileMap
-
canFindMoreLikeThis
public static boolean canFindMoreLikeThis() -
findMoreLikeThis
-
findMoreLikeThis
-
findMoreLikeThis
private static void findMoreLikeThis(DownloadManager dm, DiskManagerFileInfo file, org.eclipse.swt.widgets.Shell shell) -
setFileSkipped
Takes account of whether the download has ever been started and if not selects between normal/delete as opposed to normal/do-not-download- Parameters:
file_info-skipped-
-
setFilesSkipped
Takes account of whether the download has ever been started and if not selects between normal/delete as opposed to normal/do-not-download- Parameters:
file_infos-skipped-
-
canLowResourceRecheck
-
lowResourceRecheck
-
advancedRename
-
advancedRename
-
viewLinks
-
viewDebug
-