org.apache.sling.jcr.contentloader.internal
Class DefaultContentImporter
java.lang.Object
org.apache.sling.jcr.contentloader.internal.BaseImportLoader
org.apache.sling.jcr.contentloader.internal.DefaultContentImporter
- All Implemented Interfaces:
- ContentImporter, JcrContentHelper
@Properties(value={@Property(name="service.vendor",value="The Apache Software Foundation"),@Property(name="service.description",value="Apache Sling JCR Content Import Service")})
@Service(value=ContentImporter.class)
public class DefaultContentImporter- extends BaseImportLoader
- implements JcrContentHelper, ContentImporter
The DefaultContentImporter is the default implementation of the
ContentImporter service providing the following functionality:
- Import content into the content repository.
|
Method Summary |
java.lang.String |
getMimeType(java.lang.String name)
Returns the MIME type from the MimeTypeService for the given name |
void |
importContent(javax.jcr.Node parent,
java.lang.String name,
java.io.InputStream contentStream,
ImportOptions importOptions,
ContentImportListener importListener)
Import content into the repository by parsing the provided
content stream. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultContentImporter
public DefaultContentImporter()
importContent
public void importContent(javax.jcr.Node parent,
java.lang.String name,
java.io.InputStream contentStream,
ImportOptions importOptions,
ContentImportListener importListener)
throws javax.jcr.RepositoryException,
java.io.IOException
- Description copied from interface:
ContentImporter
- Import content into the repository by parsing the provided
content stream.
- Specified by:
importContent in interface ContentImporter
- Parameters:
parent - the root node for the imported contentname - the name of the imported content. The file extension determines the content typecontentStream - the content stream to be importedimportOptions - (optional) additional options to control the importimportListener - (optional) listener to receive callbacks for each change in the import
- Throws:
javax.jcr.RepositoryException
java.io.IOException
getMimeType
public java.lang.String getMimeType(java.lang.String name)
- Description copied from interface:
JcrContentHelper
- Returns the MIME type from the MimeTypeService for the given name
- Specified by:
getMimeType in interface JcrContentHelper
- Parameters:
name - the name of the file to get the mimeType for
Copyright © 2007-2012 The Apache Software Foundation. All Rights Reserved.