Class Plugin
in package de.infoasset.platform.services
- Declaration
- public abstract class Plugin
- extends AbstractPlugin
- Hierarchy
java.lang.Object
de.infoasset.platform.util.AbstractInitializable
de.infoasset.platform.services.AbstractPlugin
de.infoasset.platform.services.Plugin- All Implemented Interfaces
- de.infoasset.imf.blackbox.Configurable
- de.infoasset.imf.blackbox.Initializable
- de.infoasset.imf.blackbox.PostInitializable
- Known Direct Subclasses
Plugins
Tricia is built in a modular way, and can be extended by the means of plugins.Technically speaking, a Tricia plugin is an Eclipse project. By a convention, the name of the plugin folder should be equals the name of the Eclipse plugin.
A plugin uses and extends functionality from other plugins. Plugins form a depends relationship, which is expressed through the Eclipse project dependency. The following picture shows the dependency graph of some existing Tricia core plugins.
The basic Tricia plugin is called tricia and defines the basic infrastructure used by all plugins.
Code and Style Plugins
There are two different kinds of plugins: code plugins and style plugins. As the name implies, code plugins define behavior, whereas style plugins merely define look and feel.The following class diagram shows the Java classes, which realize the plugin concept.
For each code plugin, there is a specific subclass of Plugin, which defines all extensions specified by the plugin (see Extension). This class has to be implemented as a singleton.
Plugin Structure
All Tricia plugins are organized the same way. This enables the use of conventions, also known as convention over configuration. This document gives a list of these conventions.The following conventions apply to both style and code plugins:
- There is an Eclipse project description for all Tricia plugins, so plugins can be easily imported into the Eclipse IDE. The Eclipse project name is the same as the folder name.
- Templates (see Template) are at /templates. At the next level, there are themes (see ThemesDoc).
- The Java code files start at /src/classes.
- Java code is in the package de.infoasset.%PLUGIN_NAME%.*
- The main plugin singleton is defined in a class de.infoasset.%PLUGIN_NAME%.%PLUGIN_NAME_IN_CAMEL_CASE%Plugin.java . The file plugin as shown in the dependency graph above has a singleton class specified in de.infoasset.file.FilePlugin
- External libraries are at /lib. If available, there should be the source could too, and it should be linked in the Eclipse project.
- All Handler of a project are in the package de.infoasset.%PLUGIN_NAME%.handler
- All Assets of a project are in the package de.infoasset.%PLUGIN_NAME%.assets
- The configuration files are in the folder /config (see RunTriciaDoc).
Creating a new Plugin
There exist two Ant targets in the build.xml of the core plugin for creating new plugins from a template:- clone emptyPlugin creates a new code plugin,
- clone emptyStyle creates a new style plugin.
Further Reading
Plugins have impact on the following topics:- Template identification (see TemplateFinder)
- Extension points (see Extension)
- ClassLoader hierarchy
Inner Class Summary
| static class | Plugin.ExtensionAndName |
|---|
Field Summary
| protected List |
|---|
Constructor Summary
|
Method Summary
| File |
|
|---|---|
| List |
|
| List |
|
| PluginI18Status | |
| static Plugin |
|
| String |
|
| static String |
|
| void | |
| String |
|
Field Detail
defaultThemeNames
protected List defaultThemeNames
Constructor Detail
Plugin
public Plugin()
Method Detail
getName
public String getName()
initPluginAfterInitData
public void initPluginAfterInitData()
getI18Status
public PluginI18Status getI18Status()
toString
public String toString()
|
Referenced by
(22)
|
0 Comments