public abstract class TVCPluginAdapter extends java.lang.Object implements TVCPluginWithLifecycle
An abstract adapter class for TVCPlugins.
This class exists as a convenience for creating TVCPlugins, all methods in this class returns null, hence you can override those methods that you need.
As a minimum requirement, you need to implement the getName() method
in order to return a unique name for your plugin.
There is also a convenient way to setup the logger from this plugin. The
logger functionality can be used inside your custom code. This is simply done
by calling the setupLogger() or
setupLogger(String, String, Level) from your plugin constructor.
| Constructor and Description |
|---|
TVCPluginAdapter() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
This method does nothing
|
java.net.URL |
getActionConfigURL()
Returns null by default.
|
java.net.URL |
getAjaxConfigURL()
Returns null by default.
|
java.lang.String |
getDescription()
Returns null by default.
|
java.lang.String |
getDisplayName()
Returns same as
getName() by default. |
abstract java.lang.String |
getName()
Should return the name of this plugin.
|
java.lang.String |
getStringResourceName()
Returns null by default.
|
java.net.URL |
getThemeConfigURL()
Returns null by default.
|
java.net.URL |
getTypeMappingsURL()
Returns null by default.
|
void |
init()
This method does nothing
|
protected void |
setupLogger()
This method can be called in order to setup the logging, in the default
way, for this plugin
|
protected void |
setupLogger(java.lang.String logFormat,
java.lang.String loggerName,
com.technia.tvc.log4j.Level defaultLevel)
Setups the logger based upon the arguments passed to this method.
|
protected void setupLogger()
Calling this method, is identical as calling
setupLogger(null, null, null);
protected void setupLogger(java.lang.String logFormat,
java.lang.String loggerName,
com.technia.tvc.log4j.Level defaultLevel)
logFormat - The format of the generated log statements. If null, the
default log format will be used:
[name] [%t]%x %5p %d{HH:mm:ss,SSS} (%F:%L) - %m%n
getName()loggerName - The name of the logger. If null, the package name of
the plugin will be used.defaultLevel - The default logger level. If null, then DEBUG will be
used if TVC is running in development mode, otherwise ERROR is
used.public abstract java.lang.String getName()
public java.lang.String getDisplayName()
getName() by default.getDisplayName in interface TVCPluginTVCPlugin.getName()public java.lang.String getDescription()
getDescription in interface TVCPluginTVCPlugin.getDescription()public java.net.URL getActionConfigURL()
getActionConfigURL in interface TVCPluginTVCPlugin.getActionConfigURL()public java.net.URL getAjaxConfigURL()
getAjaxConfigURL in interface TVCPluginTVCPlugin.getAjaxConfigURL()public java.net.URL getTypeMappingsURL()
getTypeMappingsURL in interface TVCPluginTVCPlugin.getTypeMappingsURL()public java.lang.String getStringResourceName()
getStringResourceName in interface TVCPluginTVCPlugin.getStringResourceName()public java.net.URL getThemeConfigURL()
public void init()
init in interface TVCPluginWithLifecyclepublic void destroy()
destroy in interface TVCPluginWithLifecycleCopyright ? Technia AB. All Rights Reserved.