public class NewsHelper extends ContentHelper
Modifier and Type | Field and Description |
---|---|
static String |
NEWS_FILE |
static String |
PROP_LAST_CHECKED |
static String |
PROP_LAST_UPDATE_TIME |
static String |
PROP_LAST_UPDATED |
static String |
PROP_TRANSLATE
Default true
|
_page
_context, _out, CHECKED, PROP_ADVANCED
Constructor and Description |
---|
NewsHelper() |
Modifier and Type | Method and Description |
---|---|
static String |
devSU3UpdateConstraint()
Translated message about new version available but constrained
|
static String |
devSU3UpdateVersion() |
static String |
devSU3VersionDownloaded()
Already downloaded but not installed version
|
static boolean |
dontInstall(RouterContext ctx) |
String |
getContent()
If we haven't downloaded news yet, use the translated initial news file
|
static String |
getUpdateStatus() |
static boolean |
isAnyUpdateInProgress()
If ANY update is in progress.
|
static boolean |
isBaseReadonly(RouterContext ctx) |
static boolean |
isDevSU3UpdateAvailable(RouterContext ctx)
Will be false if already downloaded or if dev update disabled.
|
static boolean |
isUnsignedUpdateAvailable(RouterContext ctx)
Will be false if already downloaded or if dev update disabled.
|
static boolean |
isUpdateAvailable()
Release update only.
|
static boolean |
isUpdateDisabled(RouterContext ctx) |
static boolean |
isUpdateInProgress()
If a signed or unsigned router update is in progress.
|
static long |
lastChecked(RouterContext ctx) |
static long |
lastUpdated(RouterContext ctx)
When the news was last downloaded
|
boolean |
shouldShowNews()
Is the news newer than the last time it was hidden?
|
static boolean |
shouldShowNews(RouterContext ctx) |
void |
showNews(boolean yes)
Save config with the timestamp of the current news to hide, or 0 to show
|
static void |
showNews(RouterContext ctx,
boolean yes)
Save config with the timestamp of the current news to hide, or 0 to show
|
String |
status() |
static String |
status(RouterContext ctx) |
static String |
unsignedUpdateConstraint()
Translated message about new version available but constrained
|
static String |
unsignedUpdateVersion() |
static String |
unsignedVersionDownloaded()
Already downloaded but not installed version
|
static String |
updateConstraint()
Release update only.
|
static String |
updateVersion()
Release update only.
|
static String |
updateVersionDownloaded()
Release update only.
|
getTextContent, setLang, setMaxLines, setPage, setStartAtBeginning
_t, _t, _t, _x, getChecked, isAdvanced, ngettext, setContextId, storeWriter
public static final String PROP_LAST_UPDATE_TIME
public static final String PROP_LAST_CHECKED
public static final String PROP_LAST_UPDATED
public static final String PROP_TRANSLATE
public static final String NEWS_FILE
public static boolean isAnyUpdateInProgress()
public static boolean isUpdateInProgress()
public static boolean isUpdateAvailable()
public static String updateVersion()
public static String updateConstraint()
public static String unsignedUpdateConstraint()
public static String devSU3UpdateConstraint()
public static String updateVersionDownloaded()
public static boolean isUnsignedUpdateAvailable(RouterContext ctx)
public static String unsignedUpdateVersion()
public static String unsignedVersionDownloaded()
public static boolean isDevSU3UpdateAvailable(RouterContext ctx)
public static String devSU3UpdateVersion()
public static String devSU3VersionDownloaded()
public static String getUpdateStatus()
public String getContent()
getContent
in class ContentHelper
public boolean shouldShowNews()
public static boolean shouldShowNews(RouterContext ctx)
public void showNews(boolean yes)
public static void showNews(RouterContext ctx, boolean yes)
public String status()
public static String status(RouterContext ctx)
public static boolean dontInstall(RouterContext ctx)
public static boolean isUpdateDisabled(RouterContext ctx)
public static boolean isBaseReadonly(RouterContext ctx)
public static long lastChecked(RouterContext ctx)
public static long lastUpdated(RouterContext ctx)