Package com.xmlmind.w2x.processor
Class Plugin
- java.lang.Object
-
- com.xmlmind.w2x.processor.Plugin
-
-
Field Summary
Fields Modifier and Type Field Description static Plugin[]EMPTY_LISTA ready-to-use empty array of plugins.booleanmultiFileOutputtrueif this plugin creates multiple output files (like Web Help);falseif this plugin creates a single output file (like EPUB).StringnameThe unique name (a single word) of the plugin.StringoutputDescriptionA short description (just a few words) of the output files created by this plugin.StringoutputExtensionThe suggested file extension, without a leading dot, for the output files created by this plugin.String[]w2xArgumentsSomew2xcommand-line arguments specifying what does this plugin.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Pluginload(URL url)Load the plugin found in specified location.static Plugin[]loadAll(URL[] urls, List<String> errorList)Load all the plugins found in specified locations.StringtoString()Returns a parsable representation of this plugin, that is, the content of a.w2x_pluginfile.
-
-
-
Field Detail
-
name
public final String name
The unique name (a single word) of the plugin. Example: "rss".
-
outputDescription
public final String outputDescription
A short description (just a few words) of the output files created by this plugin. Example: "RSS 2.0". May benull.
-
outputExtension
public final String outputExtension
The suggested file extension, without a leading dot, for the output files created by this plugin. Example: "xml".
-
multiFileOutput
public final boolean multiFileOutput
trueif this plugin creates multiple output files (like Web Help);falseif this plugin creates a single output file (like EPUB).
-
w2xArguments
public final String[] w2xArguments
Somew2xcommand-line arguments specifying what does this plugin. May not be an empty array.
-
EMPTY_LIST
public static final Plugin[] EMPTY_LIST
A ready-to-use empty array of plugins.
-
-
Method Detail
-
toString
public String toString()
Returns a parsable representation of this plugin, that is, the content of a.w2x_pluginfile.
-
loadAll
public static Plugin[] loadAll(URL[] urls, List<String> errorList)
Load all the plugins found in specified locations.- Parameters:
urls- locations of.w2x_pluginfiles.errorList- error messages reported while loading the plugins are added to this list.- Returns:
- loaded plugins.
- See Also:
load(java.net.URL)
-
load
public static Plugin load(URL url) throws IOException, UsageException
Load the plugin found in specified location.- Parameters:
url- location of a.w2x_pluginfile.- Returns:
- loaded plugin.
- Throws:
IOException- problem reading the file or missing plugin fieldsUsageException- syntax errors in loadedw2xcommand-line arguments- See Also:
loadAll(java.net.URL[], java.util.List<java.lang.String>)
-
-