java.lang.Object
i2p.susi.dns.BaseBean
i2p.susi.dns.ConfigBean
- All Implemented Interfaces:
Serializable
Bean for managing SusDNS configuration properties and file operations.
- See Also:
Field Summary
Fields inherited from class BaseBean
_context, action, lastSerial, method, PROP_PW_ENABLE, properties, serialModifier and TypeFieldDescriptionprotected final I2PAppContextThe I2P application context.protected StringThe current action.protected StringThe last serial number for CSRF.protected StringThe HTTP method.static final StringProperty for password enable.protected final PropertiesThe configuration properties.protected StringThe serial number.Constructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionGet the current configuration content.Get the config file path.Get status messages for the UI.booleanisSaved()Check if the config has been saved.protected voidreload()Reload the configuration from file.private voidsave()Save the configuration to file.voidSet the configuration content.Methods inherited from class BaseBean
_t, _t, _t, addressbookDir, configFile, debug, getAction, getSerial, getTheme, getThemeName, getThemes, isOverrideCssActive, loadConfig, ngettext, setAction, setSerial, storeMethod, useSoraFont, warnModifier and TypeMethodDescriptionprotected static StringTranslate a string.protected static StringTranslate a string with one parameter.protected static StringTranslate a string with two parameters.protected FileReturns the addressbook directory.protected FileThe addressbook configuration file.protected voidLog a debug message.Get the action.Generate a new random serial for CSRF protection and clear the pending action.getTheme()Returns the theme path.The configured console theme name.String[]Get all themes.booleanDetermine if a user-provided override.css file is active.protected voidLoads the configuration if needed.protected static StringTranslate a string with plural form (ngettext).voidSets the action.voidSets the serial.voidstoreMethod(String method) Store the HTTP method.booleanChecks if Sora font should be used.protected voidLog a warning message.
Field Details
config
Config.saved
private boolean savedSaved.
Constructor Details
ConfigBean
public ConfigBean()Creates an empty config bean.
Method Details
getfileName
isSaved
public boolean isSaved()Check if the config has been saved.- Returns:
- true if the config was saved
getConfig
reload
save
private void save()Save the configuration to file.setConfig
Set the configuration content.- Parameters:
config- the new configuration content
getMessages