public class CSSHelper extends HelperBase
| Modifier and Type | Class and Description |
|---|---|
static class | CSSHelper.StringFormatterCapitalize first letter of each word of string
https://www.javatpoint.com/java-program-to-capitalize-each-word-in-string |
_context, _out, CHECKED, PROP_ADVANCED, SELECTED| Constructor and Description |
|---|
CSSHelper() |
| Modifier and Type | Method and Description |
|---|---|
boolean | allowIFrame(String ua)Should we allow a refreshing IFrame? |
boolean | embedApps()Returns whether app embedding is enabled or disabled |
boolean | enableStickySidebar()Returns whether we should use a unified sidebar |
boolean | enableUnifiedSidebar()Returns whether we should use a unified sidebar |
boolean | getDisableRefresh() |
String | getLang()needed for conditional css loads for zh |
static String | getNonce()Get current CSRF nonce, rotating every 5 minutes. |
static String | getNonce(HttpSession session)Session-bound nonce generation - replaces static consoleNonce, updateNonce, reseedNonce, systemNonce |
static String | getRecentNonce(int index)Get recent nonce for backward compatibility. |
String | getRefresh() |
String | getSidebarGraphDirection()Returns the sidebar graph render direction ("ltr" or "rtl"). |
int | getSidebarGraphMinutes()Returns the sidebar graph time period in minutes (2–30). |
String | getTheme(String userAgent) |
boolean | isAdvancedMode() |
void | setDisableRefresh(String r)change disable refresh boolean and save it |
void | setLang(String lang)change default language for the router AND save it |
void | setNews(String val)Show / hide news on home page |
void | setRefresh(String r)change refresh and save it |
void | setSoraDisplayFont()Save config for alternative display font if enabled |
boolean | shouldSendXFrame()Should we send X_Frame_Options=SAMEORIGIN
Default true |
String | title(String s)translate the title and display consistently |
boolean | useLegacySidebarGraph()Returns whether to use the legacy RRD4J minigraph renderer. |
boolean | useSidebarGraphContinuous()Returns whether the sidebar graph uses continuous scroll mode. |
boolean | useSidebarGraphSplit()Returns whether the sidebar graph uses split mode (inbound top, outbound bottom). |
boolean | useSoraDisplayFont()Returns whether we should use Sora display font |
boolean | useStickySidebar()Returns whether we should use a sticky sidebar when the sidebar height is less than the height of the viewport |
boolean | useUnifiedSidebar()Returns whether we should use a unified sidebar |
static boolean | validateNonce(HttpSession session,
String nonce)Session-bound nonce validation - replaces static nonce validation |
static boolean | validateNonce(HttpSession session,
String nonce,
boolean preserve)Session-bound nonce validation with preserve option |
_t, _t, _t, _x, getChecked, isAdvanced, ngettext, setContextId, storeWriterpublic static final String BASE_THEME_PATH
public static final boolean DEFAULT_ENABLE_SORA_FONT
public static final String DEFAULT_REFRESH
public static final boolean DEFAULT_SIDEBAR_GRAPH_LEGACY
public static final boolean DEFAULT_STICKY_SIDEBAR
public static final String DEFAULT_THEME
public static final boolean DEFAULT_UNIFIED_SIDEBAR
public static final int MIN_REFRESH
public static final String PROP_DISABLE_REFRESH
public static final String PROP_EMBED_APPS
public static final String PROP_ENABLE_SORA_FONT
public static final String PROP_FORCE_MOBILE_CONSOLE
public static final String PROP_REFRESH
public static final String PROP_SIDEBAR_GRAPH_CONTINUOUS
public static final String PROP_SIDEBAR_GRAPH_DIRECTION
public static final String PROP_SIDEBAR_GRAPH_LEGACY
public static final String PROP_SIDEBAR_GRAPH_MINUTES
public static final String PROP_SIDEBAR_GRAPH_SPLIT
public static final String PROP_STICKY_SIDEBAR
public static final String PROP_THEME_NAME
public static final String PROP_THEME_PFX
public static final String PROP_UNIFIED_SIDEBAR
public static final String PROP_UNIVERSAL_THEMING
public boolean allowIFrame(String ua)
public boolean embedApps()
public boolean enableStickySidebar()
public boolean enableUnifiedSidebar()
public boolean getDisableRefresh()
public String getLang()
public static String getNonce()
public static String getNonce(HttpSession session)
session - returns an invalid nonce if nullpublic static String getRecentNonce(int index)
index - 0 for most recent, 1 for second most recentpublic String getRefresh()
public String getSidebarGraphDirection()
public int getSidebarGraphMinutes()
public boolean isAdvancedMode()
public void setDisableRefresh(String r)
public void setLang(String lang)
lang - xx OR xx_XX OR xxx OR xxx_XXpublic void setNews(String val)
val - if non-null, "1" to show, else hidepublic void setRefresh(String r)
public void setSoraDisplayFont()
public boolean shouldSendXFrame()
public boolean useLegacySidebarGraph()
public boolean useSidebarGraphContinuous()
public boolean useSidebarGraphSplit()
public boolean useSoraDisplayFont()
public boolean useStickySidebar()
public boolean useUnifiedSidebar()
public static boolean validateNonce(HttpSession session, String nonce)
nonce - returns false if nullsession - returns false if nullpublic static boolean validateNonce(HttpSession session, String nonce, boolean preserve)
nonce - returns false if nullsession - returns false if nullpreserve - if true, do not delete the nonce. Use for early checks in jsps.