public class DefaultDocumentModelFactory extends AbstractDocumentModelFactory
AbstractDocumentModelFactory.CompatFilenameNormalizer, AbstractDocumentModelFactory.DefaultFilenameNormalizer, AbstractDocumentModelFactory.FilenameNormalizer
Modifier and Type | Field and Description |
---|---|
static String |
DOCTYPE_KEY_NAME |
static String |
FACETS_KEY_NAME |
protected String |
folderishType |
protected String |
leafType |
filenameNormalizer
Constructor and Description |
---|
DefaultDocumentModelFactory()
Instantiate a DefaultDocumentModelFactory that creates Folder and File
|
DefaultDocumentModelFactory(String folderishType,
String leafType)
Instantiate a DefaultDocumentModelFactory that creates specified types doc
|
Modifier and Type | Method and Description |
---|---|
DocumentModel |
createFolderishNode(CoreSession session,
DocumentModel parent,
SourceNode node) |
DocumentModel |
createLeafNode(CoreSession session,
DocumentModel parent,
SourceNode node) |
protected DocumentModel |
defaultCreateLeafNode(CoreSession session,
DocumentModel parent,
SourceNode node) |
protected String |
getDocTypeToUse(BlobHolder inBH) |
protected List<String> |
getFacetsToUse(BlobHolder inBH) |
protected String |
getMimeType(String name)
Modify this to get right mime types depending on the file input
|
void |
setFolderishType(String folderishType) |
void |
setLeafType(String leafType) |
getValidNameFromFileName, isTargetDocumentModelFolderish, processFolderishNodeCreationError, processLeafNodeCreationError, setDocumentProperties
public static final String DOCTYPE_KEY_NAME
public static final String FACETS_KEY_NAME
protected String folderishType
public DefaultDocumentModelFactory()
public DefaultDocumentModelFactory(String folderishType, String leafType)
folderishType
- the folderish typeleafType
- the other typepublic DocumentModel createFolderishNode(CoreSession session, DocumentModel parent, SourceNode node) throws IOException
IOException
public DocumentModel createLeafNode(CoreSession session, DocumentModel parent, SourceNode node) throws IOException
IOException
protected DocumentModel defaultCreateLeafNode(CoreSession session, DocumentModel parent, SourceNode node) throws IOException
IOException
protected String getDocTypeToUse(BlobHolder inBH)
protected List<String> getFacetsToUse(BlobHolder inBH)
protected String getMimeType(String name)
public void setFolderishType(String folderishType)
public void setLeafType(String leafType)
Copyright © 2017 Nuxeo. All rights reserved.