Class NoteImporter
java.lang.Object
org.nuxeo.ecm.platform.filemanager.service.extension.AbstractFileImporter
org.nuxeo.ecm.platform.filemanager.service.extension.NoteImporter
- All Implemented Interfaces:
Serializable,Comparable<FileImporter>,FileImporter
Imports the string content of a blob as text for the content of the "note" field of a new Note document.
If an existing document with the same title is found the existing Note document is updated instead.
- See Also:
-
Field Summary
Fields inherited from class org.nuxeo.ecm.platform.filemanager.service.extension.AbstractFileImporter
DISABLE_AUDIT_LOGGER, docType, enabled, filters, name, order, patterns, SKIP_UPDATE_AUDIT_LOGGING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDefault document type to use when the plugin XML configuration does not specify one.protected Stringprotected static StringguessEncoding(Blob blob) booleanWhether document overwrite is detected by checking title or filename.voidupdateDocument(DocumentModel doc, Blob content) Updates the document (sets its properties).booleanupdateDocumentIfPossible(DocumentModel doc, Blob content) Tries to update the documentdocwith the blobcontent.Methods inherited from class org.nuxeo.ecm.platform.filemanager.service.extension.AbstractFileImporter
checkAllowedSubtypes, checkSecurity, compareTo, createDocument, createOrUpdate, doSecurityCheck, doSecurityCheck, getBlob, getDocType, getDocType, getFilters, getName, getNearestContainerPath, getOrder, isEnabled, isOneToMany, matches, setDocType, setEnabled, setFilters, setName, setOrder
-
Constructor Details
-
NoteImporter
public NoteImporter()
-
-
Method Details
-
getDefaultDocType
Description copied from class:AbstractFileImporterDefault document type to use when the plugin XML configuration does not specify one.To implement when the default
AbstractFileImporter.createOrUpdate(FileImporterContext)method is used.- Overrides:
getDefaultDocTypein classAbstractFileImporter
-
isOverwriteByTitle
public boolean isOverwriteByTitle()Description copied from class:AbstractFileImporterWhether document overwrite is detected by checking title or filename.To implement when the default
AbstractFileImporter.createOrUpdate(FileImporterContext)method is used.- Overrides:
isOverwriteByTitlein classAbstractFileImporter
-
updateDocumentIfPossible
Description copied from class:AbstractFileImporterTries to update the documentdocwith the blobcontent.Returns
trueif the document is really updated.- Overrides:
updateDocumentIfPossiblein classAbstractFileImporter
-
updateDocument
Description copied from class:AbstractFileImporterUpdates the document (sets its properties).Default implementation sets the content.
- Overrides:
updateDocumentin classAbstractFileImporter
-
getString
- Throws:
IOException
-
guessEncoding
- Throws:
IOException
-