public class NavHelper extends Object implements NavService, ClientApp
| Constructor and Description |
|---|
NavHelper() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getBinary(String name)
Retrieve binary icon for a plugin
|
Map<String,String> |
getClientAppLinks()
Translated string is loaded by PluginStarter
|
List<App> |
getClientApps(I2PAppContext ctx)
For HomeHelper.
|
String |
getDisplayName()
The display name of the ClientApp, used in user interfaces.
|
static NavHelper |
getInstance() |
static NavHelper |
getInstance(I2PAppContext ctx) |
String |
getName()
The generic name of the ClientApp, used for registration,
e.g.
|
ClientAppState |
getState()
The current state of the ClientApp.
|
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.
|
void |
setBinary(String name,
byte[] arr)
Store binary icon for a plugin
|
void |
shutdown(String[] args)
Do not take a long time.
|
void |
startup()
Do not take a long time.
|
void |
unregisterApp(String name) |
public byte[] getBinary(String name)
name - plugin namepublic Map<String,String> getClientAppLinks()
public List<App> getClientApps(I2PAppContext ctx)
ctx - unusedpublic String getDisplayName()
ClientAppgetDisplayName in interface ClientApppublic static NavHelper getInstance()
public static NavHelper getInstance(I2PAppContext ctx)
public String getName()
ClientApppublic ClientAppState getState()
ClientApppublic void registerApp(String appName, String displayName, String path, String tooltip, String iconpath)
registerApp in interface NavServiceappName - 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 nullpublic void setBinary(String name, byte[] arr)
name - plugin namepublic void shutdown(String[] args)
ClientApppublic void startup()
ClientApppublic void unregisterApp(String name)
unregisterApp in interface NavServicename - standard name for the app