Class ImportBasedFactory
java.lang.Object
org.nuxeo.ecm.platform.content.template.factories.BaseContentFactory
org.nuxeo.ecm.platform.content.template.factories.ImportBasedFactory
- All Implemented Interfaces:
ContentFactory
This factory will import a file using a path defined in the option of the factoryBinding extension point. This path
can be defined using three different prefix. absolute:myAbsolute path will reference a file on the server's
filesystem, nxData:myPath will reference a file inside nuxeo data folder and resource:myPath will reference a file in
the bundle's resources. If the file exist, it's imported by the
FileManager
service.- Author:
- ldoguin
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected FileManager
Deprecated.since 11.1.static final String
static final String
protected File
protected Boolean
Fields inherited from class org.nuxeo.ecm.platform.content.template.factories.BaseContentFactory
session
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
createContentStructure
(DocumentModel eventDoc) protected FileManager
Deprecated.since 11.1.protected void
importBlob
(File file, String parentPath) Use fileManager to import the given file.boolean
initFactory
(Map<String, String> options, List<ACEDescriptor> rootAcl, List<TemplateItemDescriptor> template) Methods inherited from class org.nuxeo.ecm.platform.content.template.factories.BaseContentFactory
initSession
-
Field Details
-
IMPORT_FILE_PATH_OPTION
- See Also:
-
IMPORT_OVERWRITE_OPTION
- See Also:
-
fileManager
Deprecated.since 11.1. UseFramework.getService(Class)
withFileManager
instead. -
options
-
importedFile
-
overwrite
-
-
Constructor Details
-
ImportBasedFactory
public ImportBasedFactory()
-
-
Method Details
-
initFactory
public boolean initFactory(Map<String, String> options, List<ACEDescriptor> rootAcl, List<TemplateItemDescriptor> template) -
createContentStructure
-
importBlob
Use fileManager to import the given file.- Parameters:
file
- to importparentPath
- of the targetDocument- Throws:
IOException
-
getFileManagerService
Deprecated.since 11.1. UseFramework.getService(Class)
withFileManager
instead.
-