LibreOffice Module xmerge (master) 1
Static Public Member Functions | Static Private Member Functions | Static Private Attributes | List of all members
org.openoffice.xmerge.util.registry.ConverterInfoMgr Class Reference

Manages the converter plug-ins that are currently active. More...

Collaboration diagram for org.openoffice.xmerge.util.registry.ConverterInfoMgr:
[legend]

Static Public Member Functions

static void addPlugIn (Iterator< ConverterInfo > jarEnum) throws RegistryException
 Adds a list of converter plug-ins to the registry. More...
 
static boolean removeByJar (String jar)
 Removes any ConverterInfo object from the registry that have the specified jar name value. More...
 
static ConverterInfo findConverterInfo (String deviceMime, String officeMime)
 Returns the ConverterInfo object that supports the specified device/office mime type conversion. More...
 
static void main (String args[])
 Main to let the user specify what plug-ins to register from jarfiles and to display the currently registered plug-ins. More...
 

Static Private Member Functions

static void addPlugIn (ConverterInfo ci) throws RegistryException
 Adds a converter plug-in to the registry. More...
 
static Iterator< ConverterInfogetConverterInfoEnumeration ()
 Returns an Enumeration of registered ConverterInfo objects. More...
 
static boolean removeByName (String name)
 Removes any ConverterInfo object from the registry that have the specified display name value. More...
 
static ConverterInfo[] findConverterInfoChain (String deviceFromMime, String deviceToMime)
 Returns an array of two ConverterInfo objects that can be chained to perform the specified mime type conversion. More...
 

Static Private Attributes

static final ArrayList< ConverterInfoconverterInfoList = new ArrayList<ConverterInfo>()
 

Detailed Description

Manages the converter plug-ins that are currently active.

This class allows plug-ins to be added or removed dynamically.

This class is a singleton (static) class, so that only one manager can exist at a time. It is final, so it may not be sub-classed.

Definition at line 32 of file ConverterInfoMgr.java.

Member Function Documentation

◆ addPlugIn() [1/2]

static void org.openoffice.xmerge.util.registry.ConverterInfoMgr.addPlugIn ( ConverterInfo  ci) throws RegistryException
inlinestaticprivate

Adds a converter plug-in to the registry.

The ConverterInfo must have a unique DisplayName and must have non-null values for DisplayName, ClassImpl, OfficeMime, and DeviceMime.

Parameters
ciA ConverterInfo object describing a plug-in.
Exceptions
RegistryExceptionIf the ConverterInfo is not valid.

Definition at line 46 of file ConverterInfoMgr.java.

References org.openoffice.xmerge.util.registry.ConverterInfoMgr.converterInfoList.

Referenced by org.openoffice.xmerge.util.registry.ConverterInfoMgr.addPlugIn(), XMergeBridge._XMergeBridge.convert(), org.openoffice.xmerge.util.ActiveSyncDriver.Convert(), org.openoffice.xmerge.test.Driver.main(), and org.openoffice.xmerge.util.registry.ConverterInfoMgr.main().

◆ addPlugIn() [2/2]

static void org.openoffice.xmerge.util.registry.ConverterInfoMgr.addPlugIn ( Iterator< ConverterInfo jarEnum) throws RegistryException
inlinestatic

Adds a list of converter plug-ins to the registry.

Each ConverterInfo in the list must have a unique DisplayName and must have non-null values for DisplayName, ClassImpl, OfficeMime, and DeviceMime.

Parameters
jarEnumAn Enumeration of ConverterInfo objects describing one or more plug-in(s).
Exceptions
RegistryExceptionIf a ConverterInfo in the Vector is not valid.

Definition at line 100 of file ConverterInfoMgr.java.

References org.openoffice.xmerge.util.registry.ConverterInfoMgr.addPlugIn().

◆ findConverterInfo()

static ConverterInfo org.openoffice.xmerge.util.registry.ConverterInfoMgr.findConverterInfo ( String  deviceMime,
String  officeMime 
)
inlinestatic

Returns the ConverterInfo object that supports the specified device/office mime type conversion.

If there are multiple ConverterInfo objects registered that support this conversion, only the first is returned.

Parameters
deviceMimeThe device mime.
officeMimeThe office mime.
Returns
The first plug-in that supports the specified conversion.

Definition at line 178 of file ConverterInfoMgr.java.

References org.openoffice.xmerge.util.registry.ConverterInfoMgr.converterInfoList, org.openoffice.xmerge.util.registry.ConverterInfo.isValidOfficeType(), and String.

Referenced by XMergeBridge._XMergeBridge.convert(), org.openoffice.xmerge.ConverterFactory.getConverter(), and org.openoffice.xmerge.util.registry.ConverterInfoMgr.main().

◆ findConverterInfoChain()

static ConverterInfo[] org.openoffice.xmerge.util.registry.ConverterInfoMgr.findConverterInfoChain ( String  deviceFromMime,
String  deviceToMime 
)
inlinestaticprivate

Returns an array of two ConverterInfo objects that can be chained to perform the specified mime type conversion.

If there are multiple ConverterInfo objects that support this conversion, only the first is returned.

Parameters
deviceFromMimeThe device from mime.
deviceToMimeThe device to mime.
Returns
An array of two ConverterInfo objects that can be chained to perform the specified conversion.

Definition at line 215 of file ConverterInfoMgr.java.

References org.openoffice.xmerge.util.registry.ConverterInfoMgr.converterInfoList, org.openoffice.xmerge.util.registry.ConverterInfo.getDeviceMime(), org.openoffice.xmerge.util.registry.ConverterInfo.getOfficeMime(), and String.

Referenced by org.openoffice.xmerge.util.registry.ConverterInfoMgr.main().

◆ getConverterInfoEnumeration()

static Iterator< ConverterInfo > org.openoffice.xmerge.util.registry.ConverterInfoMgr.getConverterInfoEnumeration ( )
inlinestaticprivate

Returns an Enumeration of registered ConverterInfo objects.

Returns
An Enumeration containing the currently registered ConverterInfo objects, an empty Vector if none exist.

Definition at line 116 of file ConverterInfoMgr.java.

References org.openoffice.xmerge.util.registry.ConverterInfoMgr.converterInfoList.

Referenced by org.openoffice.xmerge.util.registry.ConverterInfoMgr.main().

◆ main()

static void org.openoffice.xmerge.util.registry.ConverterInfoMgr.main ( String  args[])
inlinestatic

Main to let the user specify what plug-ins to register from jarfiles and to display the currently registered plug-ins.

Parameters
argsNot used.

Definition at line 279 of file ConverterInfoMgr.java.

References org.openoffice.xmerge.util.registry.ConverterInfoMgr.addPlugIn(), org.openoffice.xmerge.util.registry.ConverterInfo.canDeserialize(), org.openoffice.xmerge.util.registry.ConverterInfo.canMerge(), org.openoffice.xmerge.util.registry.ConverterInfo.canSerialize(), Exception, org.openoffice.xmerge.util.registry.ConverterInfoMgr.findConverterInfo(), org.openoffice.xmerge.util.registry.ConverterInfoMgr.findConverterInfoChain(), org.openoffice.xmerge.util.registry.ConverterInfo.getClassImpl(), org.openoffice.xmerge.util.registry.ConverterInfoMgr.getConverterInfoEnumeration(), org.openoffice.xmerge.util.registry.ConverterInfoReader.getConverterInfoEnumeration(), org.openoffice.xmerge.util.registry.ConverterInfo.getDescription(), org.openoffice.xmerge.util.registry.ConverterInfo.getDeviceMime(), org.openoffice.xmerge.util.registry.ConverterInfo.getDisplayName(), org.openoffice.xmerge.util.registry.ConverterInfo.getJarName(), org.openoffice.xmerge.util.registry.ConverterInfo.getOfficeMime(), org.openoffice.xmerge.util.registry.ConverterInfo.getVendor(), org.openoffice.xmerge.util.registry.ConverterInfo.getVersion(), org.openoffice.xmerge.util.registry.ConverterInfo.getXsltDeserial(), org.openoffice.xmerge.util.registry.ConverterInfo.getXsltSerial(), name, org.openoffice.xmerge.util.registry.ConverterInfoMgr.removeByJar(), org.openoffice.xmerge.util.registry.ConverterInfoMgr.removeByName(), String, and System.

◆ removeByJar()

static boolean org.openoffice.xmerge.util.registry.ConverterInfoMgr.removeByJar ( String  jar)
inlinestatic

Removes any ConverterInfo object from the registry that have the specified jar name value.

Parameters
jarThe name of the jarfile.
Returns
true if a ConverterInfo object was removed, false otherwise.

Definition at line 129 of file ConverterInfoMgr.java.

References org.openoffice.xmerge.util.registry.ConverterInfoMgr.converterInfoList, and org.openoffice.xmerge.util.registry.ConverterInfo.getJarName().

Referenced by XMergeBridge._XMergeBridge.convert(), and org.openoffice.xmerge.util.registry.ConverterInfoMgr.main().

◆ removeByName()

static boolean org.openoffice.xmerge.util.registry.ConverterInfoMgr.removeByName ( String  name)
inlinestaticprivate

Removes any ConverterInfo object from the registry that have the specified display name value.

Parameters
nameThe display name.
Returns
true if a ConverterInfo object was removed, false otherwise.

Definition at line 152 of file ConverterInfoMgr.java.

References org.openoffice.xmerge.util.registry.ConverterInfoMgr.converterInfoList, org.openoffice.xmerge.util.registry.ConverterInfo.getDisplayName(), and name.

Referenced by org.openoffice.xmerge.util.registry.ConverterInfoMgr.main().

Member Data Documentation

◆ converterInfoList

final ArrayList<ConverterInfo> org.openoffice.xmerge.util.registry.ConverterInfoMgr.converterInfoList = new ArrayList<ConverterInfo>()
staticprivate

The documentation for this class was generated from the following file: