Package com.day.cq.replication
Interface ReplicationContentFactory
public interface ReplicationContentFactory
Implements a factory that creates replication content.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes this factory and releases all allocated resources.create(ReplicationContentFacade facade) Creates the replication content based on a facade.Creates binary replication content for the given file.Creates binary replication content for the given file.
-
Method Details
-
create
Creates binary replication content for the given file. note we cannot use the last modified of the file, since it's low precision.- Parameters:
mimeType- the mime type of the contentfile- the file containing the dataisTemp- iftruefile is temporary file and will be removed after this call.- Returns:
- the replication content
- Throws:
IOException- if an error occurs
-
create
ReplicationContent create(String mimeType, File file, long lastModified, boolean isTemp) throws IOException Creates binary replication content for the given file. note we cannot use the last modified of the file, since it's low precision.- Parameters:
mimeType- the mime type of the contentfile- the file containing the datalastModified- the last modified time in ms.isTemp- iftruefile is temporary file and will be removed after this call.- Returns:
- the replication content
- Throws:
IOException- if an error occurs
-
create
Creates the replication content based on a facade.- Parameters:
facade- the facade- Returns:
- the replication content
-
close
void close()Closes this factory and releases all allocated resources.- Since:
- 5.4
-