java.lang.Object
org.klomp.snark.web.I2PSnarkServlet.FileRowContext
Enclosing class:
I2PSnarkServlet

static class I2PSnarkServlet.FileRowContextextends Object
Immutable context for rendering a single file row in the torrent file browser. Package-visible for testing.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) final String
    Decoded base URL of the directory being listed.
    (package private) final boolean
    Listing is at the torrent root, so no parent link is rendered.
    (package private) final boolean
    Priority controls are shown for this directory.
    (package private) final Storage
    The torrent's storage, null for magnet links.
  • Constructor Summary

    Constructors
    Constructor
    Description
    FileRowContext(String decodedBase, Storage storage, boolean showPriority, boolean isTopLevel)
    Captures the torrent state needed to render one file row.
  • Method Summary

    Methods inherited from class Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • decodedBase

      final String decodedBase
      Decoded base URL of the directory being listed.
    • storage

      final Storage storage
      The torrent's storage, null for magnet links.
    • showPriority

      final boolean showPriority
      Priority controls are shown for this directory.
    • isTopLevel

      final boolean isTopLevel
      Listing is at the torrent root, so no parent link is rendered.
  • Constructor Details

    • FileRowContext

      FileRowContext(String decodedBase, Storage storage, boolean showPriority, boolean isTopLevel)
      Captures the torrent state needed to render one file row.
      Parameters:
      decodedBase - decoded base URL of the directory being listed
      storage - the torrent's storage, null for magnet links
      showPriority - priority controls are shown for this directory
      isTopLevel - listing is at the torrent root, so no parent link is rendered