java.lang.Object
net.i2p.router.web.HelperBase
net.i2p.router.web.NewsFeedHelper
HTML-formatted full news entries.
Field Summary
FieldsFields inherited from class HelperBase
_context, _log, _out, CHECKED, PROP_ADVANCED, SELECTEDModifier and TypeFieldDescriptionprotected RouterContextThe router context.protected LogThe log instance.protected WriterThe writer for output.static final StringChecked attribute for HTML checkboxes.static final StringProperty key for advanced mode.static final StringSelected attribute for HTML select options.Constructor Summary
ConstructorsConstructorDescriptionCreate the helper; the superclass constructor sets up the request context.Method Summary
Modifier and TypeMethodDescriptionGet the formatted HTML entries.(package private) static StringgetEntries(I2PAppContext ctx, int start, int max, long ageLimit) Get the formatted HTML entries.voidsetLimit(int limit) Less than or equal to zero means all.voidsetStart(int start) Starting index.Methods inherited from class HelperBase
_t, _t, _t, _x, getChecked, isAdvanced, ngettext, setContextId, storeWriterModifier and TypeMethodDescriptionTranslate a string.Translate a string with a parameter.Translate a string with two parameters.static StringMark a string for extraction by xgettext and translation.protected StringgetChecked(String prop) Get the checked attribute for a boolean property.booleanCheck if advanced mode is enabled.Translate a string with plural forms (ngettext).voidsetContextId(String contextId) Configure this bean to query a particular router context.voidstoreWriter(Writer out) Store the writer for output.
Field Details
_start
private int _startIndex of the first item to show._limit
private int _limitHow many items to show.
Constructor Details
NewsFeedHelper
public NewsFeedHelper()Create the helper; the superclass constructor sets up the request context.
Method Details
setLimit
public void setLimit(int limit) Less than or equal to zero means all.- Parameters:
limit- less than or equal to zero means all
setStart
public void setStart(int start) Starting index.- Parameters:
start- the starting index
getEntries
getEntries
Get the formatted HTML entries.- Parameters:
ctx- the router contextstart- the starting indexmax- less than or equal to zero means allageLimit- time before now, less than or equal to zero means all (after the first)- Returns:
- non-null, "" if none