Clearspace API (1.7.0) Core Javadocs

com.jivesoftware.community.importer
Class ImporterFactory

java.lang.Object
  extended by com.jivesoftware.community.importer.ImporterFactory

public class ImporterFactory
extends java.lang.Object

A factory for Importers. Custom importers can be added at runtime via calls to the addImporter(Importer) method or at startup via a jive property 'jive.importers.yourimporter' = 'com.acme.clearspace.importer.YourImporterClassName


Method Summary
 void addImporter(Importer importer)
          Add an importer to the list of available importers.
 Importer getImporter(java.lang.Class<?> importer)
          Returns an importer instance given the importer class.
 java.util.Collection<java.lang.Class<?>> getImporters()
          Returns a collection of Class's corresponding to the available importers.
static ImporterFactory getInstance()
          Returns an instance of this factory.
 void removeImporter(Importer importer)
          Removes an importer from the list of available importers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ImporterFactory getInstance()
Returns an instance of this factory.

Returns:
an instance of this factory.

addImporter

public void addImporter(Importer importer)
Add an importer to the list of available importers. This is per JVM instance and does not persist across application restarts. To have an importer be available across restarts set a child jive property (jive.importers.yourimporter) to the fully qualified class name of the importer. For example: com.acme.clearspace.importer.TheBestImporterEver

Parameters:
importer - an importer to add to the list of available importers.

removeImporter

public void removeImporter(Importer importer)
Removes an importer from the list of available importers. This is per JVM instance and does not persist across application restarts.

Parameters:
importer - an importer to remove from the list of available importers.

getImporters

public java.util.Collection<java.lang.Class<?>> getImporters()
Returns a collection of Class's corresponding to the available importers.

Returns:
a collection of Class's corresponding to the available importers.

getImporter

public Importer getImporter(java.lang.Class<?> importer)
Returns an importer instance given the importer class. If the provided class is not an importer this method will return null.

Parameters:
importer - the importer class to return an instance of
Returns:
an importer instance given the importer class.

Clearspace Project Page

Copyright © 1999-2007 Jive Software.