Class FilesystemContentDataFactory
java.lang.Object
org.alfresco.repo.bulkimport.impl.FilesystemContentDataFactory
- All Implemented Interfaces:
ContentDataFactory,org.springframework.beans.factory.InitializingBean
public class FilesystemContentDataFactory
extends Object
implements ContentDataFactory, org.springframework.beans.factory.InitializingBean
Factory that creates
The mimetype will be guessed from the file extension, or fall back to binary. The encoding will be guessed from the file itself, or fall back to
ContentData out of :
- a
ContentStore - a
Filelocated within that store's root
The mimetype will be guessed from the file extension, or fall back to binary. The encoding will be guessed from the file itself, or fall back to
defaultEncoding.- Since:
- 4.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateContentData(ContentStore store, File contentFile) Create aContentDataby combining the givenContentStore's root location and theFile's path within that store.voidsetDefaultEncoding(String defaultEncoding) voidsetMimetypeService(MimetypeService mimetypeService) voidsetStoreProtocol(String storeProtocol)
-
Constructor Details
-
FilesystemContentDataFactory
public FilesystemContentDataFactory()
-
-
Method Details
-
setMimetypeService
-
setDefaultEncoding
-
setStoreProtocol
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
createContentData
Create aContentDataby combining the givenContentStore's root location and theFile's path within that store. The given file must therefore be accessible within the content store's configured root location. The encoding and mimetype will be guessed from the given file.- Specified by:
createContentDatain interfaceContentDataFactory- Parameters:
store- TheContentStorein which the file should becontentFile- TheFileto check- Returns:
- the constructed
ContentData
-