Package com.day.cq.replication
Interface ReplicationContentFactory
-
public interface ReplicationContentFactory
Implements a factory that creates replication content.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Closes this factory and releases all allocated resources.ReplicationContent
create(ReplicationContentFacade facade)
Creates the replication content based on a facade.ReplicationContent
create(java.lang.String mimeType, java.io.File file, boolean isTemp)
Creates binary replication content for the given file.ReplicationContent
create(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
- iftrue
file 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
- iftrue
file 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
-
-