Package net.i2p.router.web
Class NewsHelper
java.lang.Object
net.i2p.router.web.HelperBase
net.i2p.router.web.ContentHelper
net.i2p.router.web.NewsHelper
If news file does not exist, use file from the initialNews directory
in $I2P
- Since:
- 0.8.2
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringDefault trueFields inherited from class net.i2p.router.web.ContentHelper
_pageFields inherited from class net.i2p.router.web.HelperBase
_context, _out, CHECKED, PROP_ADVANCED, SELECTED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringTranslated message about new version available but constrainedstatic Stringstatic StringAlready downloaded but not installed versionstatic booleandontInstall(RouterContext ctx) If we haven't downloaded news yet, use the translated initial news filestatic Stringstatic booleanIf ANY update is in progress.static booleanstatic booleanWill be false if already downloaded or if dev update disabled.static booleanA router update had been downloaded and handled by an UpdatePostProcessor.static booleanWill be false if already downloaded or if dev update disabled.static booleanRelease update only.static booleanstatic booleanIf a signed or unsigned router update is in progress.static longlastChecked(RouterContext ctx) static longlastUpdated(RouterContext ctx) When the news was last downloadedbooleanIs the news newer than the last time it was hidden?static booleanvoidshowNews(boolean yes) Save config with the timestamp of the current news to hide, or 0 to showstatic voidshowNews(RouterContext ctx, boolean yes) Save config with the timestamp of the current news to hide, or 0 to showstatus()static Stringstatus(RouterContext ctx) static StringTranslated message about new version available but constrainedstatic Stringstatic StringAlready downloaded but not installed versionstatic StringRelease update only.static StringRelease update only.static StringRelease update only.Methods inherited from class net.i2p.router.web.ContentHelper
getTextContent, setLang, setMaxLines, setPage, setStartAtBeginningMethods inherited from class net.i2p.router.web.HelperBase
_t, _t, _t, _x, getChecked, isAdvanced, ngettext, setContextId, storeWriter
-
Field Details
-
PROP_LAST_UPDATE_TIME
- See Also:
-
PROP_LAST_CHECKED
- Since:
- 0.9.4
- See Also:
-
PROP_LAST_UPDATED
- Since:
- 0.9.4
- See Also:
-
PROP_LAST_NEW_ENTRY
- Since:
- 0.9.55
- See Also:
-
PROP_LAST_LANG
- Since:
- 0.9.62
- See Also:
-
PROP_TRANSLATE
Default true- Since:
- 0.9.21
- See Also:
-
NEWS_FILE
- See Also:
-
-
Constructor Details
-
NewsHelper
public NewsHelper()
-
-
Method Details
-
isAnyUpdateInProgress
public static boolean isAnyUpdateInProgress()If ANY update is in progress.- Since:
- 0.9.4 was stored in system properties
-
isUpdateInProgress
public static boolean isUpdateInProgress()If a signed or unsigned router update is in progress. Does NOT cover plugins, news, etc.- Since:
- 0.9.4 was stored in system properties
-
isUpdateAvailable
public static boolean isUpdateAvailable()Release update only. Will be false if already downloaded.- Since:
- 0.9.4 moved from NewsFetcher
-
isExternalRestartPending
public static boolean isExternalRestartPending()A router update had been downloaded and handled by an UpdatePostProcessor. It will provide wrapper-like function to install the update and restart after shutdown.- Since:
- 0.9.51
-
updateVersion
Release update only. Available version, will be null if already downloaded.- Returns:
- null if none
- Since:
- 0.9.4 moved from NewsFetcher
-
updateConstraint
Release update only. Translated message about new version available but constrained- Returns:
- null if none
- Since:
- 0.9.9
-
unsignedUpdateConstraint
Translated message about new version available but constrained- Returns:
- null if none
- Since:
- 0.9.23
-
devSU3UpdateConstraint
Translated message about new version available but constrained- Returns:
- null if none
- Since:
- 0.9.23
-
updateVersionDownloaded
Release update only. Already downloaded but not installed version.- Returns:
- null if none
- Since:
- 0.9.4
-
isUnsignedUpdateAvailable
Will be false if already downloaded or if dev update disabled.- Since:
- 0.9.4 moved from NewsFetcher
-
unsignedUpdateVersion
- Returns:
- null if none
- Since:
- 0.9.4 moved from NewsFetcher
-
unsignedVersionDownloaded
Already downloaded but not installed version- Returns:
- null if none
- Since:
- 0.9.4
-
isDevSU3UpdateAvailable
Will be false if already downloaded or if dev update disabled.- Since:
- 0.9.20
-
devSU3UpdateVersion
- Returns:
- null if none
- Since:
- 0.9.20
-
devSU3VersionDownloaded
Already downloaded but not installed version- Returns:
- null if none
- Since:
- 0.9.20
-
getUpdateStatus
- Returns:
- "" if none
- Since:
- 0.9.4 moved from UpdateHelper
-
getContent
If we haven't downloaded news yet, use the translated initial news file- Overrides:
getContentin classContentHelper
-
shouldShowNews
public boolean shouldShowNews()Is the news newer than the last time it was hidden?- Since:
- 0.8.12
-
shouldShowNews
- Since:
- 0.9.4
-
showNews
public void showNews(boolean yes) Save config with the timestamp of the current news to hide, or 0 to show- Since:
- 0.8.12
-
showNews
Save config with the timestamp of the current news to hide, or 0 to show- Since:
- 0.9.4
-
status
- Returns:
- HTML
- Since:
- 0.9.4 moved from NewsFetcher
-
status
- Returns:
- HTML
- Since:
- 0.9.4 moved from NewsFetcher
-
dontInstall
- Since:
- 0.9.4 moved from NewsFetcher
-
isUpdateDisabled
- Since:
- 0.9.9
-
isBaseReadonly
- Since:
- 0.9.9
-
lastChecked
- Since:
- 0.9.4
-
lastUpdated
When the news was last downloaded- Since:
- 0.9.4
-