java.lang.Object
org.klomp.snark.web.I2PSnarkServlet.CommentsContext
- Enclosing class:
I2PSnarkServlet
Immutable parameters for rendering the comments/ratings section. Package-visible for testing.
Field Summary
FieldsModifier and TypeFieldDescription(package private) final StringName to attribute new comments to, may be empty.(package private) final booleanComments are on for this torrent and an author name is set.(package private) final booleanComments are enabled globally.(package private) final booleanRatings are enabled globally.(package private) final booleanComments are enabled for this torrent.(package private) final SnarkThe torrent whose comments are being rendered.Constructor Summary
ConstructorsConstructorDescriptionCommentsContext(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
Field Details
snark
The torrent whose comments are being rendered.er
final boolean erRatings are enabled globally.ec
final boolean ecComments are enabled globally.esc
final boolean escComments are enabled for this torrent.authorName
Name to attribute new comments to, may be empty.canRate
final boolean canRateComments 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 rendereder- ratings are enabled globallyec- comments are enabled globallyesc- comments are enabled for this torrentauthorName- name to attribute new comments to, may be emptycanRate- comments are on for this torrent and an author name is set