[ English ] | [ Česky ] |
[ Home ] | [ News ] | [ Screenshots ] | [ Features ] | [ Tips ] | [ FAQ ] | [ Download ] | [ Help ] | [ About ] | [ Links ] |
[ Basic ] | [ Advanced ] | [ Data management ] | [ Plugin development ] |
To write new plugin you have to know only one thing - Java. If you know Java, plugin development is very easy if you don't know java you can still make plugins, interface is very intuitive, it may be enough to know C of C# or Basic or whatever.
Some basics:
Each plugin need only to extend one class and define one method
Each plugin works with PMediums and PTracks, PMedium represents medium and PTrack movie. Each
PMedium contains array of movies(PTracks) named "tracks".
PMedium and PTrack are by default filled by "standardized" names(eg. country codes instead for country
names) because of international use, each translation has own name for genre Comedy, but all of
them should have as standardized name set "Comedy" so plugin can be universal for all translations.
For converting between normal and standardized names you should use provided class AbstractConvert,
so you can print country names etc. in user's native lanugage.
For example of plugins you can look into downloaded package, one example is empty one: "ExamplePlugin.jar", it may be found in default directory of Movietheque. Another example is more complex, its default plugin used by application, it may be found in directory named "Plugins" in default directory of Movietheque - name of plugin is: "DefaultPlugin.jar"
Plugin is installed by copying it into directory "Plugins" in Movietheque's default directory (may be changed in settings.xml)
Movietheque know two types of plugins: WWW plugin and Print plugin.
If you want to create new WWW plugin you will have to create class WWWPlugin in package cz.muni.fi.xkarmaz.movietheque.plugin.www which extends class AbstractWWWPlugin which is defined in same package in file "PluginInterface.jar" which you should add to your classpath. In class WWWPlugin you must declare at least one function: public PTrack update(Frame parent, PTrack track), there you can do whatever you want to "track" and application will use item which you return as new track.
If you want to create new Print plugin you will have to create class PrintPlugin in package cz.muni.fi.xkarmaz.movietheque.plugin.print which extends class AbstractPrintPlugin which is defined in same package in file "PluginInterface.jar" which you should add to your classpath. In class PrintPlugin you must declare at least one function: public void print(Frame parent, ArrayList<PMedium> mediums), there you can do whatever you want to "mediums" sent for printing.
If you don't want to bother with Java, you can use example plugin, rename jar file, edit functions as you want and compile it. Probably simplest way to create new plugins is to download whole movietheque project in eclipse(in downloads section), edit it in eclipse and build it by included ant buildfile, then only send me resultant jar file and if it's good i will add it to these pages.
For complete documentation see PluginInterface.jar, it has some javadoc, sources, etc.
Made by Richard Karmazín. |
Made in Czech Republic |