Class AbstractDocumentModelFactory

    • Constructor Detail

      • AbstractDocumentModelFactory

        public AbstractDocumentModelFactory()
    • Method Detail

      • processFolderishNodeCreationError

        public boolean processFolderishNodeCreationError​(CoreSession session,
                                                         DocumentModel parent,
                                                         SourceNode node)
        By default there is no process bound to a folderish node creation error, and the global import task will continue.

        You should override this method if you want a specific process to be executed after such an error and/or if you want the global import task to stop immediately after the error occurs, in which case the method should return false.

        Specified by:
        processFolderishNodeCreationError in interface ImporterDocumentModelFactory
        Returns:
        true if the global import task should continue after processing the error, false if it should be stopped immediately after processing the error.
      • processLeafNodeCreationError

        public boolean processLeafNodeCreationError​(CoreSession session,
                                                    DocumentModel parent,
                                                    SourceNode node)
        By default there is no process bound to a leaf node creation error, and the global import task will continue.

        You should override this method if you want a specific process to be executed after such an error and/or if you want the global import task to stop immediately after the error occurs, in which case the method should return false.

        Specified by:
        processLeafNodeCreationError in interface ImporterDocumentModelFactory
        Returns:
        true if the global import task should continue after processing the error, false if it should be stopped immediately after processing the error.
      • getValidNameFromFileName

        protected String getValidNameFromFileName​(String fileName)
        Returns a valid Nuxeo name from the given fileName.