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

static class I2PSnarkServlet.CommentsContextextends Object
Immutable parameters for rendering the comments/ratings section. Package-visible for testing.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) final String
    Name to attribute new comments to, may be empty.
    (package private) final boolean
    Comments are on for this torrent and an author name is set.
    (package private) final boolean
    Comments are enabled globally.
    (package private) final boolean
    Ratings are enabled globally.
    (package private) final boolean
    Comments are enabled for this torrent.
    (package private) final Snark
    The torrent whose comments are being rendered.
  • Constructor Summary

    Constructors
    Constructor
    Description
    CommentsContext(Snark snark, boolean er, boolean ec, boolean esc, String authorName, boolean canRate)
    Captures the comment and rating settings in force for one torrent.
  • Method Summary

    Methods inherited from class Object

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

    • snark

      final Snark snark
      The torrent whose comments are being rendered.
    • er

      final boolean er
      Ratings are enabled globally.
    • ec

      final boolean ec
      Comments are enabled globally.
    • esc

      final boolean esc
      Comments are enabled for this torrent.
    • authorName

      final String authorName
      Name to attribute new comments to, may be empty.
    • canRate

      final boolean canRate
      Comments are on for this torrent and an author name is set.
  • Constructor Details

    • CommentsContext

      CommentsContext(Snark snark, boolean er, boolean ec, boolean esc, String authorName, boolean canRate)
      Captures the comment and rating settings in force for one torrent.
      Parameters:
      snark - the torrent whose comments are being rendered
      er - ratings are enabled globally
      ec - comments are enabled globally
      esc - comments are enabled for this torrent
      authorName - name to attribute new comments to, may be empty
      canRate - comments are on for this torrent and an author name is set