Package com.day.cq.replication
Interface ReplicationContentFactory
-
public interface ReplicationContentFactoryImplements a factory that creates replication content.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Closes this factory and releases all allocated resources.ReplicationContentcreate(ReplicationContentFacade facade)Creates the replication content based on a facade.ReplicationContentcreate(java.lang.String mimeType, java.io.File file, boolean isTemp)Creates binary replication content for the given file.ReplicationContentcreate(java.lang.String mimeType, java.io.File file, long lastModified, boolean isTemp)Creates binary replication content for the given file.
-
-
-
Method Detail
-
create
ReplicationContent create(java.lang.String mimeType, java.io.File file, boolean isTemp) throws java.io.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 dataisTemp- iftruefile is temporary file and will be removed after this call.- Returns:
- the replication content
- Throws:
java.io.IOException- if an error occurs
-
create
ReplicationContent create(java.lang.String mimeType, java.io.File file, long lastModified, boolean isTemp) throws java.io.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:
java.io.IOException- if an error occurs
-
create
ReplicationContent create(ReplicationContentFacade facade)
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
-
-