org.jdesktop.wonderland.client.content.spi
Interface ContentImporterSPI

All Known Implementing Classes:
AbstractContentImporter

public interface ContentImporterSPI

Handler for various flavors of content to import. Classes implement this interface and register themselves with the ContentImportManager and are called when content is being imported into the world.

Author:
Jordan Slott

Method Summary
 java.lang.String[] getExtensions()
          Returns an array of string extensions supported by the content importer.
 java.lang.String importFile(java.io.File file, java.lang.String extension)
          Imports a given File into the system for the extension type and creates a corresponding cell.
 java.lang.String importFile(java.io.File file, java.lang.String extension, boolean createCell)
          Imports a given File into the system for the extension type.
 

Method Detail

getExtensions

java.lang.String[] getExtensions()
Returns an array of string extensions supported by the content importer. Return an empty array if none.

Returns:
An array of String file extension

importFile

java.lang.String importFile(java.io.File file,
                            java.lang.String extension)
Imports a given File into the system for the extension type and creates a corresponding cell. Returns a uri that represents the imported file.

Calling this method is equivalent to calling importFile(file, extension, true)

Parameters:
file - The File to import
extension - The extension of the file
Returns:
A URI that represents the importer file

importFile

java.lang.String importFile(java.io.File file,
                            java.lang.String extension,
                            boolean createCell)
Imports a given File into the system for the extension type. Returns a uri that represents the imported file.

Parameters:
file - The File to import
extension - The extension of the file
createCell - if true, create a cell to handle the file
Returns:
A URI that represents the importer file


Open Wonderland - http://openwonderland.org