1 package com.nexuiz.demorecorder.application.plugins;
\r
3 import java.util.Properties;
\r
5 import com.nexuiz.demorecorder.application.DemoRecorderApplication;
\r
6 import com.nexuiz.demorecorder.application.jobs.RecordJob;
\r
8 public interface EncoderPlugin {
\r
11 * Makes the application layer known to the plug-in, which is required so that the plug-in
\r
12 * can access the preferences of the application. Call this method first before using any
\r
15 public void setApplicationLayer(DemoRecorderApplication appLayer);
\r
18 * Returns the name of the plug-in. Must not contain a "."
\r
20 public String getName();
\r
23 * Returns true if the plug-in is enabled (checked from the preferences of the app layer)
\r
24 * @return true if the plug-in is enabled
\r
26 public boolean isEnabled();
\r
29 * Global preferences are preferences of a plug-in that are application-wide and not job-
\r
30 * specific. They should be shown in a global preferences dialog.
\r
31 * Use this method in order to tell the application layer and GUI which global settings your
\r
32 * encoder plug-in offers, and set a reasonable default. Note that for the default-values being
\r
33 * set you can either set to "true" or "false", any String (can be empty), or "filechooser" if
\r
34 * you want the user to select a file.
\r
37 public Properties getGlobalPreferences();
\r
40 * In order to influence the order of settings being displayed to the user in a UI, return an array
\r
41 * of all keys used in the Properties object returned in getGlobalPreferences(), with your desired
\r
45 public String[] getGlobalPreferencesOrder();
\r
48 * Here you can return a Properties object that contains keys for values that can be specific to each
\r
49 * individual RecordJob.
\r
52 public Properties getJobSpecificPreferences();
\r
55 * In order to influence the order of job-specific settings being displayed to the user in a UI,
\r
56 * return an array of all keys used in the Properties object returned in getJobSpecificPreferences(), with
\r
57 * your desired order.
\r
60 public String[] getJobSpecificPreferencesOrder();
\r
63 * Will be called by the application layer when a job has been successfully recorded and moved to its
\r
64 * final destination. This method has to perform the specific tasks your plug-in is supposed to do.
\r
66 * @throws EncoderPluginException
\r
68 public void executeEncoder(RecordJob job) throws EncoderPluginException;
\r