Package org.alfresco.repo.importer
Interface FileImporter
-
- All Known Implementing Classes:
FileImporterImpl
public interface FileImporterInterface to load files and directories into the hub. All will be created as new - there is no detection if a file exists or has changed etc..- Author:
- andyh
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intloadFile(org.alfresco.service.cmr.repository.NodeRef container, java.io.File file)Load a single file or directory without any recursionintloadFile(org.alfresco.service.cmr.repository.NodeRef container, java.io.File file, boolean recurse)Load a file or directory into the repositoryintloadFile(org.alfresco.service.cmr.repository.NodeRef container, java.io.File file, java.io.FileFilter filter, boolean recurse)Load all files or directories that match the file filter in the given directoryintloadNamedFile(org.alfresco.service.cmr.repository.NodeRef container, java.io.File file, boolean recurse, java.lang.String name)Load a file into a given location, giving it a new name.
-
-
-
Method Detail
-
loadFile
int loadFile(org.alfresco.service.cmr.repository.NodeRef container, java.io.File file, boolean recurse) throws FileImporterExceptionLoad a file or directory into the repository- Parameters:
container- - the node into which to insert the file or directoryfile- - the start point for the importrecurse- - if the start point is a directoty then recurse- Returns:
- Returns the number of successfully imported files and directories
- Throws:
FileImporterException
-
loadFile
int loadFile(org.alfresco.service.cmr.repository.NodeRef container, java.io.File file, java.io.FileFilter filter, boolean recurse) throws FileImporterExceptionLoad all files or directories that match the file filter in the given directory- Parameters:
container- NodeReffile- Filefilter- FileFilterrecurse- boolean- Returns:
- Returns the number of successfully imported files and directories
- Throws:
FileImporterException
-
loadFile
int loadFile(org.alfresco.service.cmr.repository.NodeRef container, java.io.File file) throws FileImporterExceptionLoad a single file or directory without any recursion- Parameters:
container- NodeReffile- File- Returns:
- Returns the number of successfully imported files and directories
- Throws:
FileImporterException
-
loadNamedFile
int loadNamedFile(org.alfresco.service.cmr.repository.NodeRef container, java.io.File file, boolean recurse, java.lang.String name) throws FileImporterExceptionLoad a file into a given location, giving it a new name.- Parameters:
container- the target parent to load intofile- the source file to uploadrecurse- true to recurse into subfoldersname- the new name of the file or folder when it gets uploaded- Returns:
- Returns the number of files loaded
- Throws:
FileImporterException
-
-