|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.router.web.HelperBase
public abstract class HelperBase
Base helper
Field Summary | |
---|---|
protected RouterContext |
_context
|
protected Writer |
_out
|
(package private) static String |
PROP_ADVANCED
|
Constructor Summary | |
---|---|
HelperBase()
|
Method Summary | |
---|---|
String |
_t(String s)
translate a string |
String |
_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.14 |
static String |
_x(String s)
Mark a string for extraction by xgettext and translation. |
boolean |
isAdvanced()
|
String |
ngettext(String s,
String p,
int n)
translate (ngettext) @since 0.7.14 |
void |
setContextId(String contextId)
Configure this bean to query a particular router context |
void |
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected RouterContext _context
protected Writer _out
static final String PROP_ADVANCED
Constructor Detail |
---|
public HelperBase()
Method Detail |
---|
public void setContextId(String contextId)
contextId
- beginning few characters of the routerHash, or null to pick
the first one we come across.public boolean isAdvanced()
public void storeWriter(Writer out)
public String _t(String s)
public String _t(String s, Object o)
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.public String _t(String s, Object o, Object o2)
public String ngettext(String s, String p, int n)
public static String _x(String s)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |