|
OpenOffice.org XMerge API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.openoffice.xmerge.util.registry.ConverterInfoMgr
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 subclassed.
Constructor Summary | |
ConverterInfoMgr()
|
Method Summary | |
static void |
addPlugIn(ConverterInfo ci)
Adds a converter plug-in to the registry. |
static void |
addPlugIn(java.util.Enumeration jarEnum)
Adds a Vector of converter plug-ins to the registry. |
static ConverterInfo |
findConverterInfo(java.lang.String deviceMime,
java.lang.String officeMime)
Returns the ConverterInfo object that supports
the specified device/office mime type conversion. |
static ConverterInfo[] |
findConverterInfoChain(java.lang.String deviceFromMime,
java.lang.String deviceToMime)
Returns an array of two ConverterInfo objects that
can be chained to perform the specified mime type conversion. |
static java.util.Enumeration |
getConverterInfoEnumeration()
Returns an Enumeration of registered
ConverterInfo objects. |
static void |
main(java.lang.String[] args)
main to let the user specify what plug-ins to register from jarfiles and to display the currently registered plug-ins. |
static boolean |
removeByJar(java.lang.String jar)
Removes any ConverterInfo object from the registry
that have the specified jar name value. |
static boolean |
removeByName(java.lang.String name)
Removes any ConverterInfo object from the registry
that have the specified display name value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ConverterInfoMgr()
Method Detail |
public static void addPlugIn(ConverterInfo ci) throws RegistryException
ConverterInfo
must have a unique DisplayName
and must have non-null values for DisplayName, ClassImpl,
OfficeMime, and DeviceMime.ConverterInfo
- A ConverterInfo
object
describing a plug-in.RegistryException
- If the ConverterInfo
is not valid.public static void addPlugIn(java.util.Enumeration jarEnum) throws RegistryException
Vector
of converter plug-ins to the registry.
Each ConverterInfo
in the Vector
must have
a unique DisplayName and must have non-null values for DisplayName,
ClassImpl, OfficeMime, and DeviceMime.ciVectory
- A Vector
of ConverterInfo
objects describing one or more plug-in(s).RegistryException
- If a ConverterInfo
in the
Vector
is not valid.public static ConverterInfo findConverterInfo(java.lang.String deviceMime, java.lang.String officeMime)
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.deviceMime
- The device mime.officeMime
- The office mime.public static ConverterInfo[] findConverterInfoChain(java.lang.String deviceFromMime, java.lang.String deviceToMime)
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.deviceMimeFrom
- The device from mime.deviceMimeTo
- The device to mime.ConverterInfo
objects
that can be chained to perform the specified
conversion.public static java.util.Enumeration getConverterInfoEnumeration()
Enumeration
of registered
ConverterInfo
objects.Enumeration
containing the currently registered
ConverterInfo
objects, an empty
Vector
if none exist.public static void main(java.lang.String[] args)
args
- Not used.public static boolean removeByJar(java.lang.String jar)
ConverterInfo
object from the registry
that have the specified jar name value.jar
- The name of the jarfile.ConverterInfo
object was
removed, false otherwise.public static boolean removeByName(java.lang.String name)
ConverterInfo
object from the registry
that have the specified display name value.name
- The display name.ConverterInfo
object was
removed, false otherwise.
|
OpenOffice.org XMerge API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |