public class BaseBean extends Object
| Modifier and Type | Field and Description |
|---|---|
protected I2PAppContext | _contextThe I2P application context |
protected String | actionThe current action |
protected String | lastSerialThe last serial number for CSRF |
protected String | methodThe HTTP method |
static String | PROP_PW_ENABLEProperty for password enable |
protected Properties | propertiesThe configuration properties |
protected String | serialThe serial number |
| Constructor and Description |
|---|
BaseBean()Default constructor. |
| Modifier and Type | Method and Description |
|---|---|
protected static String | _t(String s)Translate a string. |
protected static String | _t(String s,
Object o)Translate a string with one parameter. |
protected static String | _t(String s,
Object o,
Object o2)Translate a string with two parameters. |
protected File | addressbookDir()Returns the addressbook directory. |
protected File | configFile()Returns the config file. |
protected void | debug(String msg)Log a debug message. |
String | getAction()Get the action. |
String | getSerial()Generate a new random serial for CSRF protection and clear the pending action. |
String | getTheme()Returns the theme path |
String | getThemeName()Returns the theme name |
String[] | getThemes()Get all themes |
boolean | isOverrideCssActive()Determine if a user-provided override.css file is active |
protected void | loadConfig()Loads the configuration if needed. |
protected static String | ngettext(String s,
String p,
int n)Translate a string with plural form (ngettext). |
protected void | reload()Reloads the configuration from file. |
void | setAction(String action)Sets the action. |
void | setSerial(String serial)Sets the serial. |
void | storeMethod(String method)Store the HTTP method. |
boolean | useSoraFont()Checks if Sora font should be used. |
protected void | warn(Throwable t)Log a warning message. |
protected final I2PAppContext _context
protected String action
protected String lastSerial
protected String method
public static final String PROP_PW_ENABLE
protected final Properties properties
protected String serial
public BaseBean()
protected static String _t(String s)
s - the string to translateprotected static String _t(String s, Object o)
s - the string to translateo - the parameterprotected static String _t(String s, Object o, Object o2)
s - the string to translateo - the first parametero2 - the second parameterprotected File addressbookDir()
protected File configFile()
protected void debug(String msg)
msg - the message to logpublic String getAction()
public String getSerial()
public String getTheme()
public String getThemeName()
public String[] getThemes()
public boolean isOverrideCssActive()
protected void loadConfig()
protected static String ngettext(String s, String p, int n)
s - the singular formp - the plural formn - the countprotected void reload()
public void setAction(String action)
action - the action stringpublic void setSerial(String serial)
serial - the serial numberpublic void storeMethod(String method)
method - the HTTP methodpublic boolean useSoraFont()
protected void warn(Throwable t)
t - the throwable to log