Class TorrentOpenOptions

java.lang.Object
com.biglybt.core.torrent.impl.TorrentOpenOptions

public class TorrentOpenOptions extends Object
Class to store one Torrent file's info. Used to populate table and store user's choices.

This was copied out of the UI code, and still contains some crap code

  • Field Details

    • PARAM_DEFSAVEPATH

      private static final String PARAM_DEFSAVEPATH
      See Also:
    • PARAM_MOVEWHENDONE

      private static final String PARAM_MOVEWHENDONE
      See Also:
    • PARAM_QUEUEPOSITION

      private static final String PARAM_QUEUEPOSITION
      See Also:
    • QUEUELOCATION_TOP

      public static final int QUEUELOCATION_TOP
      See Also:
    • QUEUELOCATION_BOTTOM

      public static final int QUEUELOCATION_BOTTOM
      See Also:
    • QUEUELOCATION_AUTO

      public static final int QUEUELOCATION_AUTO
      See Also:
    • STARTMODE_KEYS

      public static final String[] STARTMODE_KEYS
    • STARTMODE_QUEUED

      public static final int STARTMODE_QUEUED
      See Also:
    • STARTMODE_STOPPED

      public static final int STARTMODE_STOPPED
      See Also:
    • STARTMODE_PAUSED

      public static final int STARTMODE_PAUSED
      See Also:
    • STARTMODE_FORCESTARTED

      public static final int STARTMODE_FORCESTARTED
      See Also:
    • STARTMODE_SEEDING

      public static final int STARTMODE_SEEDING
      See Also:
    • STARTMODE_ALLOCATED_AND_STOPPED

      public static final int STARTMODE_ALLOCATED_AND_STOPPED
      See Also:
    • STARTMODE_ALLOCATED_AND_PAUSED

      public static final int STARTMODE_ALLOCATED_AND_PAUSED
      See Also:
    • STARTMODE_VALUES

      public static final int[] STARTMODE_VALUES
    • sOriginatingLocation

      public String sOriginatingLocation
    • sFileName

      private String sFileName
    • sDestDir

      private String sDestDir
    • manualRename

      private String manualRename
    • sDestSubDir

      private String sDestSubDir
    • explicitDataDir

      private boolean explicitDataDir
    • removedTopLevel

      private boolean removedTopLevel
    • disableAutoRename

      private boolean disableAutoRename
    • torrent

      private TOTorrent torrent
    • totalSize

      private long totalSize
    • iStartID

      private int iStartID
    • iQueueLocation

      private int iQueueLocation
    • bSequentialDownload

      private boolean bSequentialDownload
    • isValid

      public boolean isValid
    • cancelDisabled

      private volatile boolean cancelDisabled
    • bDeleteFileOnCancel

      private boolean bDeleteFileOnCancel
    • bDeleteFileOnCancelSet

      private boolean bDeleteFileOnCancelSet
    • files

      private TorrentOpenFileOptions[] files
    • disableIPFilter

      public boolean disableIPFilter
    • initial_linkage_map

      private Map<Integer,File> initial_linkage_map
    • fileListeners

      private final CopyOnWriteList<TorrentOpenOptions.FileListener> fileListeners
    • peerSource

      public Map<String,Boolean> peerSource
    • enabledNetworks

      private Map<String,Boolean> enabledNetworks
    • userComment

      private String userComment
    • initialTags

      private List<Tag> initialTags
    • autoTags

      private Set<Tag> autoTags
    • swarmTags

      private List<String> swarmTags
    • autoTaggingApplied

      private boolean autoTaggingApplied
    • initialMetadata

      private Map<String,Object> initialMetadata
    • updatedTrackers

      private List<List<String>> updatedTrackers
    • max_up

      private int max_up
    • max_down

      private int max_down
    • move_on_complete

      private File move_on_complete
    • hide_errors

      private boolean hide_errors
    • CA_NONE

      public static final int CA_NONE
      See Also:
    • CA_ACCEPT

      public static final int CA_ACCEPT
      See Also:
    • CA_REJECT

      public static final int CA_REJECT
      See Also:
    • complete_action

      private int complete_action
    • dirty

      private boolean dirty
  • Constructor Details

    • TorrentOpenOptions

      public TorrentOpenOptions(String sFileName, TOTorrent torrent, boolean bDeleteFileOnCancel, Map<String,Object> options)
      Init
      Parameters:
      sFileName -
      torrent -
      bDeleteFileOnCancel -
    • TorrentOpenOptions

      public TorrentOpenOptions(Map<String,Object> options)
    • TorrentOpenOptions

      private TorrentOpenOptions(Map<String,Object> map, boolean fake)
    • TorrentOpenOptions

      private TorrentOpenOptions(TorrentOpenOptions toBeCloned)
      clones everything except files and torrent
      Parameters:
      toBeCloned -
  • Method Details

    • exportToMap

      public Map<String,Object> exportToMap()
    • importFromMap

      public static TorrentOpenOptions importFromMap(Map<String,Object> map)
    • getClone

      public TorrentOpenOptions getClone()
    • getDefaultStartMode

      public static int getDefaultStartMode()
    • getInitialLinkage

      public File getInitialLinkage(int index)
    • getParentDir

      public String getParentDir()
    • setParentDir

      public void setParentDir(String parentDir)
    • setManualRename

      public void setManualRename(String manualRename)
    • getManualRename

      public String getManualRename()
    • setDeleteFileOnCancel

      public void setDeleteFileOnCancel(boolean b)
    • deleteTorrent

      public void deleteTorrent()
    • getDefaultSubDir

      public String getDefaultSubDir()
    • getSubDir

      public String getSubDir()
    • setSubDir

      public void setSubDir(String str)
    • setExplicitDataDir

      public void setExplicitDataDir(String parent_dir, String sub_dir, boolean _removedTopLevel)
    • isExplicitDataDir

      public boolean isExplicitDataDir()
    • isRemovedTopLevel

      public boolean isRemovedTopLevel()
    • setDisableAutoRename

      public void setDisableAutoRename(boolean b)
    • isSimpleTorrent

      public boolean isSimpleTorrent()
    • getStartMode

      public int getStartMode()
    • setStartMode

      public void setStartMode(int m)
    • getDefaultQueueLocation

      public int getDefaultQueueLocation()
    • getQueueLocation

      public int getQueueLocation()
    • setQueueLocation

      public void setQueueLocation(int l)
    • getSequentialDownload

      public boolean getSequentialDownload()
    • setSequentialDownload

      public void setSequentialDownload(boolean b)
    • getEnabledNetworks

      public Map<String,Boolean> getEnabledNetworks()
    • getNetworkEnabled

      public boolean getNetworkEnabled(String net)
    • setNetworkEnabled

      public void setNetworkEnabled(String net, boolean enabled)
    • getUserComment

      public String getUserComment()
    • setUserComment

      public void setUserComment(String str)
    • getDataDir

      public String getDataDir()
    • getSmartDestDir

      private String getSmartDestDir()
    • getInitialTags

      public List<Tag> getInitialTags()
    • setInitialTags

      public void setInitialTags(List<Tag> tags)
    • addSwarmTag

      public void addSwarmTag(String tag)
    • getAutoQueuePositionTime

      public long getAutoQueuePositionTime()
    • getInitialMetadata

      public Map<String,Object> getInitialMetadata()
    • setDirty

      public void setDirty()
    • getAndClearDirt

      public boolean getAndClearDirt()
    • getTrackers

      public List<List<String>> getTrackers(boolean if_updated)
    • setTrackers

      public void setTrackers(List<List<String>> trackers)
    • setMaxUploadSpeed

      public void setMaxUploadSpeed(int kbs)
    • getMaxUploadSpeed

      public int getMaxUploadSpeed()
    • setMaxDownloadSpeed

      public void setMaxDownloadSpeed(int kbs)
    • getMaxDownloadSpeed

      public int getMaxDownloadSpeed()
    • getMoveOnComplete

      public File getMoveOnComplete()
    • setMoveOnComplete

      public void setMoveOnComplete(File f)
    • setHideErrors

      public void setHideErrors(boolean h)
    • getHideErrors

      public boolean getHideErrors()
    • getFiles

      public TorrentOpenFileOptions[] getFiles()
    • rebuildOriginalNames

      public void rebuildOriginalNames()
    • applyPriorityAndSkipConfig

      public void applyPriorityAndSkipConfig()
    • canDeselectTag

      public boolean canDeselectTag(Tag tag)
    • applyAutoTagging

      public void applyAutoTagging()
    • getTotalSize

      public long getTotalSize()
    • getTorrentName

      public String getTorrentName()
    • updateTorrentFileName

      private void updateTorrentFileName(String name)
    • getDisplayName

      public String getDisplayName()
    • setDisplayName

      public void setDisplayName(String name)
    • allFilesMoving

      public boolean allFilesMoving()
    • allFilesExist

      public boolean allFilesExist()
    • renameDuplicates

      public void renameDuplicates()
    • okToDisableAll

      public boolean okToDisableAll()
    • getTorrentFile

      public String getTorrentFile()
    • setTorrentFile

      public void setTorrentFile(String str)
    • getTorrent

      public TOTorrent getTorrent()
    • setTorrent

      public void setTorrent(TOTorrent torrent)
    • addListener

      public void addListener(TorrentOpenOptions.FileListener l)
    • removeListener

      public void removeListener(TorrentOpenOptions.FileListener l)
    • fileDownloadStateChanged

      public void fileDownloadStateChanged(TorrentOpenFileOptions torrentOpenFileOptions, boolean toDownload)
    • filePriorityStateChanged

      public void filePriorityStateChanged(TorrentOpenFileOptions torrentOpenFileOptions, int priority)
    • parentDirChanged

      public void parentDirChanged()
    • initialTagsChanged

      public void initialTagsChanged()
    • startOptionsChanged

      public void startOptionsChanged()
    • setCompleteAction

      public void setCompleteAction(int ca)
    • getCompleteAction

      public int getCompleteAction()
    • setCancelDisabled

      public void setCancelDisabled(boolean b)
    • cancel

      public void cancel()
    • addModePreCreate

      public static int addModePreCreate(int startMode)
    • addModeDuringCreate

      public static void addModeDuringCreate(int startMode, DownloadManager dm)
    • addModePostCreate

      public static void addModePostCreate(int startMode, DownloadManager dm)
    • addToDownloadManager

      public boolean addToDownloadManager()