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