Interface IDocumentPersistenceStrategy
- All Known Implementing Classes:
AmazonS3PersistenceStrategy,FileSystemPersistenceStrategy
public interface IDocumentPersistenceStrategy
Defines persistence strategies for Attachment binary data.
- Author:
- James Wennmacher, jwennmacher@unicon.net
-
Method Summary
Modifier and Type Method Description booleanisPersistenceIntoDatabaseRequired()Boolean indicating whether or not attachment data is stored into the database.StringpersistAttachmentBinary(javax.servlet.http.HttpServletRequest request, Attachment attachment)Accepts an attachment to save and persists the attachment binary data using the implemented persistence strategy.
-
Method Details
-
persistAttachmentBinary
String persistAttachmentBinary(javax.servlet.http.HttpServletRequest request, Attachment attachment) throws PersistenceExceptionAccepts an attachment to save and persists the attachment binary data using the implemented persistence strategy.- Parameters:
request- HTTPServletRequest. May be null to indicate a data import operation.attachment- attachment containing data to save- Returns:
- URL to access the attachment with. Null means did not persist the attachment.
- Throws:
PersistenceException- Exception persisting the document to the persistence store
-
isPersistenceIntoDatabaseRequired
boolean isPersistenceIntoDatabaseRequired()Boolean indicating whether or not attachment data is stored into the database. Some persistence stores, such as the local filesystem, would want the data stored into the database to allow for hydrating the data from the database in case it is not on the local file system. This is used when you have a cluster of portal servers and a server may not have the content hydrated locally. Other persistence stores, such as a network share or S3, store their data external to the portal server so there is no need to have the file data stored into a database.- Returns:
- True if the file data is stored in the database, else false.
-