public class NoteImporter extends AbstractFileImporter
If an existing document with the same title is found the existing Note document is updated instead.
DISABLE_AUDIT_LOGGER, docType, enabled, fileManagerService, filters, name, order, patterns, SKIP_UPDATE_AUDIT_LOGGING| Constructor and Description | 
|---|
NoteImporter()  | 
| Modifier and Type | Method and Description | 
|---|---|
String | 
getDefaultDocType()
Default document type to use when the plugin XML configuration does not specify one. 
 | 
protected String | 
getString(Blob blob)  | 
protected static String | 
guessEncoding(Blob blob)  | 
boolean | 
isOverwriteByTitle()
Whether document overwrite is detected by checking title or filename. 
 | 
void | 
updateDocument(DocumentModel doc,
              Blob content)
Updates the document (sets its properties). 
 | 
boolean | 
updateDocumentIfPossible(DocumentModel doc,
                        Blob content)
Tries to update the document  
doc with the blob content. | 
checkIn, checkInAfterAdd, compareTo, create, createDocument, createOrUpdate, doSecurityCheck, doSecurityCheck, getBlob, getDocType, getDocType, getFileManagerService, getFilters, getName, getNearestContainerPath, getOrder, isEnabled, isOneToMany, matches, setDocType, setEnabled, setFileManagerService, setFilters, setName, setOrder, skipCheckInForBlobpublic NoteImporter()
public String getDefaultDocType()
AbstractFileImporter
 To implement when the default AbstractFileImporter.createOrUpdate(FileImporterContext) method is used.
getDefaultDocType in class AbstractFileImporterpublic boolean isOverwriteByTitle()
AbstractFileImporter
 To implement when the default AbstractFileImporter.createOrUpdate(FileImporterContext) method is used.
isOverwriteByTitle in class AbstractFileImporterpublic boolean updateDocumentIfPossible(DocumentModel doc, Blob content)
AbstractFileImporterdoc with the blob content.
 
 Returns true if the document is really updated.
updateDocumentIfPossible in class AbstractFileImporterpublic void updateDocument(DocumentModel doc, Blob content)
AbstractFileImporterDefault implementation sets the content.
updateDocument in class AbstractFileImporterprotected String getString(Blob blob) throws IOException
IOExceptionprotected static String guessEncoding(Blob blob) throws IOException
IOExceptionCopyright © 2019 Nuxeo. All rights reserved.