Package net.i2p.router.web
Class HelperBase
java.lang.Object
net.i2p.router.web.HelperBase
- Direct Known Subclasses:
CertHelper
,ConfigAdvancedHelper
,ConfigClientsHelper
,ConfigFamilyHelper
,ConfigKeyringHelper
,ConfigLoggingHelper
,ConfigNavHelper
,ConfigNetHelper
,ConfigPeerHelper
,ConfigReseedHelper
,ConfigStatsHelper
,ConfigTunnelsHelper
,ConfigUIHelper
,ConfigUpdateHelper
,ContentHelper
,CSSHelper
,FileDumpHelper
,HelpSectionHelper
,HomeHelper
,InfoHelper
,JobQueueHelper
,LogsHelper
,NewsFeedHelper
,OldConsoleHelper
,PeerHelper
,ProfilesHelper
,ReseedGenerator
,ReseedHandler
,SearchHelper
,StatHelper
,SummaryHelper
,TunnelHelper
,TunnelParticipatingHelper
,TunnelPeerCountHelper
,WizardHelper
public abstract class HelperBase extends Object
Base helper
-
Field Summary
Fields Modifier and Type Field Description protected RouterContext
_context
protected Writer
_out
static String
CHECKED
static String
PROP_ADVANCED
static String
SELECTED
-
Constructor Summary
Constructors Constructor Description HelperBase()
-
Method Summary
Modifier and Type Method Description String
_t(String s)
translate a stringString
_t(String s, Object o)
translate a string with a parameter This is a lot more expensive than _t(s), so use sparingly.String
_t(String s, Object o, Object o2)
two params @since 0.7.14static String
_x(String s)
Mark a string for extraction by xgettext and translation.protected String
getChecked(String prop)
Is a boolean property set to true?boolean
isAdvanced()
String
ngettext(String s, String p, int n)
translate (ngettext) @since 0.7.14void
setContextId(String contextId)
Configure this bean to query a particular router contextvoid
storeWriter(Writer out)
Renamed from setWriter, we realy don't want setFoo(non-String) Prevent jsp.error.beans.property.conversion 500 error for ?writer=foo
-
Field Details
-
_context
-
_out
-
PROP_ADVANCED
- Since:
- public since 0.9.33, was package private
- See Also:
- Constant Field Values
-
CHECKED
- Since:
- public since 0.9.33, was package private
- See Also:
- Constant Field Values
-
SELECTED
- Since:
- 0.9.43
- See Also:
- Constant Field Values
-
-
Constructor Details
-
HelperBase
public HelperBase()
-
-
Method Details
-
setContextId
Configure this bean to query a particular router context- Parameters:
contextId
- beginning few characters of the routerHash, or null to pick the first one we come across.
-
isAdvanced
public boolean isAdvanced()- Since:
- 0.9.9
-
storeWriter
Renamed from setWriter, we realy don't want setFoo(non-String) Prevent jsp.error.beans.property.conversion 500 error for ?writer=foo- Since:
- 0.8.2
-
getChecked
Is a boolean property set to true?- Parameters:
prop
- must default to false- Returns:
- non-null, either "" or " checked=\"checked\" "
- Since:
- 0.9.24 consolidated from various helpers
-
_t
translate a string -
_t
translate a string with a parameter This is a lot more expensive than _t(s), so use sparingly.- Parameters:
s
- string to be translated containing {0} The {0} will be replaced by the parameter. Single quotes must be doubled, i.e. ' -> '' in the string.o
- parameter, not translated. To translate parameter also, use _t("foo {0} bar", _t("baz")) Do not double the single quotes in the parameter. Use autoboxing to call with ints, longs, floats, etc.
-
_t
two params @since 0.7.14 -
ngettext
translate (ngettext) @since 0.7.14 -
_x
Mark a string for extraction by xgettext and translation. Use this only in static initializers. It does not translate!- Returns:
- s
-