Class DefaultDocumentModelFactory
java.lang.Object
org.nuxeo.ecm.platform.importer.factories.AbstractDocumentModelFactory
org.nuxeo.ecm.platform.importer.factories.DefaultDocumentModelFactory
- All Implemented Interfaces:
ImporterDocumentModelFactory
- Direct Known Subclasses:
ScanedFileFactory
Default implementation for DocumentModel factory The default empty constructor create Folder for folderish file and
File for other. But you can specify them using the other constructor. Also, if you are using .properties files to
setup metada, you can use the ecm:primaryType xpath to specify the type of document to create. This will override the
default ones, and works for files and folders. If no .properties file is provided of it the current node has a
.properties file but no ecm:primaryType, the default types are created. This works for leafType but also for
folderish type.
- Author:
- Thierry Delprat, Daniel Tellez, Thibaud Arguillere
-
Nested Class Summary
Nested classes/interfaces inherited from class org.nuxeo.ecm.platform.importer.factories.AbstractDocumentModelFactory
AbstractDocumentModelFactory.CompatFilenameNormalizer, AbstractDocumentModelFactory.DefaultFilenameNormalizer, AbstractDocumentModelFactory.FilenameNormalizer
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
protected String
protected String
Fields inherited from class org.nuxeo.ecm.platform.importer.factories.AbstractDocumentModelFactory
filenameNormalizer
-
Constructor Summary
ConstructorDescriptionInstantiate a DefaultDocumentModelFactory that creates Folder and FileDefaultDocumentModelFactory
(String folderishType, String leafType) Instantiate a DefaultDocumentModelFactory that creates specified types doc -
Method Summary
Modifier and TypeMethodDescriptioncreateFolderishNode
(CoreSession session, DocumentModel parent, SourceNode node) createLeafNode
(CoreSession session, DocumentModel parent, SourceNode node) protected DocumentModel
defaultCreateLeafNode
(CoreSession session, DocumentModel parent, SourceNode node) protected String
getDocTypeToUse
(BlobHolder inBH) getFacetsToUse
(BlobHolder inBH) protected String
getMimeType
(String name) Deprecated.since 10.1 seems unusedvoid
setFolderishType
(String folderishType) void
setLeafType
(String leafType) Methods inherited from class org.nuxeo.ecm.platform.importer.factories.AbstractDocumentModelFactory
getValidNameFromFileName, isTargetDocumentModelFolderish, processFolderishNodeCreationError, processLeafNodeCreationError, setDocumentProperties
-
Field Details
-
DOCTYPE_KEY_NAME
- See Also:
-
FACETS_KEY_NAME
- See Also:
-
folderishType
-
leafType
-
-
Constructor Details
-
DefaultDocumentModelFactory
public DefaultDocumentModelFactory()Instantiate a DefaultDocumentModelFactory that creates Folder and File -
DefaultDocumentModelFactory
Instantiate a DefaultDocumentModelFactory that creates specified types doc- Parameters:
folderishType
- the folderish typeleafType
- the other type
-
-
Method Details
-
createFolderishNode
public DocumentModel createFolderishNode(CoreSession session, DocumentModel parent, SourceNode node) throws IOException - Throws:
IOException
-
createLeafNode
public DocumentModel createLeafNode(CoreSession session, DocumentModel parent, SourceNode node) throws IOException - Throws:
IOException
-
defaultCreateLeafNode
protected DocumentModel defaultCreateLeafNode(CoreSession session, DocumentModel parent, SourceNode node) throws IOException - Throws:
IOException
-
getDocTypeToUse
-
getFacetsToUse
-
getMimeType
Deprecated.since 10.1 seems unusedModify this to get right mime types depending on the file input -
setFolderishType
-
setLeafType
-