Package net.i2p.router.web
Class NavHelper
java.lang.Object
net.i2p.router.web.NavHelper
public class NavHelper extends Object
-
Constructor Summary
Constructors Constructor Description NavHelper()
-
Method Summary
Modifier and Type Method Description static byte[]
getBinary(String name)
Retrieve binary icon for a pluginstatic Map<String,String>
getClientAppLinks()
Translated string is loaded by PluginStarterstatic List<App>
getClientApps(I2PAppContext ctx)
For HomeHelper.static void
registerApp(String appName, String displayName, String path, String tooltip, String iconpath)
To register a new client application so that it shows up on the router console's nav bar, it should be registered with this singleton.static void
setBinary(String name, byte[] arr)
Store binary icon for a pluginstatic void
unregisterApp(String name)
-
Constructor Details
-
NavHelper
public NavHelper()
-
-
Method Details
-
registerApp
public static void registerApp(String appName, String displayName, String path, String tooltip, String iconpath)To register a new client application so that it shows up on the router console's nav bar, it should be registered with this singleton.- Parameters:
appName
- standard name for the app (plugin)displayName
- translated name the app will be called in the link warning, this is the display name aka ConsoleLinkName, not the plugin namepath
- full path pointing to the application's root (e.g. /i2ptunnel/index.jsp), non-nulltooltip
- HTML escaped text or nulliconpath
- path-only URL starting with /, HTML escaped, or null- Since:
- 0.9.20 added iconpath parameter
-
unregisterApp
- Parameters:
name
- standard name for the app
-
getBinary
Retrieve binary icon for a plugin- Parameters:
name
- plugin name- Returns:
- null if not found
- Since:
- 0.9.25
-
setBinary
Store binary icon for a plugin- Parameters:
name
- plugin name- Since:
- 0.9.25
-
getClientAppLinks
Translated string is loaded by PluginStarter- Returns:
- map of translated name to HTML string, or null if none
-
getClientApps
For HomeHelper. 32x32 icon paths.- Parameters:
ctx
- unused- Returns:
- non-null, possibly empty, unsorted
- Since:
- 0.9, public since 0.9.33, was package private
-