mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Added the notion of a ContentContext to select the content store to write to.
Added AbstractRoutingContentStore as a start base implementation. Added warnings to drive config away from disused setTransactionService towards setRetryingTransactionHelper. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5734 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -32,6 +32,7 @@ import java.util.Set;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.repo.content.AbstractContentStore;
|
||||
import org.alfresco.repo.content.ContentContext;
|
||||
import org.alfresco.service.cmr.repository.ContentIOException;
|
||||
import org.alfresco.service.cmr.repository.ContentReader;
|
||||
import org.alfresco.service.cmr.repository.ContentWriter;
|
||||
@@ -39,10 +40,11 @@ import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
/**
|
||||
* Provides a store of node content directly to the file system.
|
||||
* Provides a store of node content directly to the file system. The writers
|
||||
* are generated using information from the {@link ContentContext simple content context}.
|
||||
* <p>
|
||||
* The file names obey, as they must, the URL naming convention
|
||||
* as specified in the {@link org.alfresco.repo.content.ContentStore}.
|
||||
* as specified in the {@link org.alfresco.repo.content.ContentStore ContentStore interface}.
|
||||
*
|
||||
* @author Derek Hulley
|
||||
*/
|
||||
@@ -241,8 +243,10 @@ public class FileContentStore extends AbstractContentStore
|
||||
/**
|
||||
* @return Returns a writer onto a location based on the date
|
||||
*/
|
||||
public ContentWriter getWriter(ContentReader existingContentReader, String newContentUrl)
|
||||
public ContentWriter getWriter(ContentContext ctx)
|
||||
{
|
||||
ContentReader existingContentReader = ctx.getExistingContentReader();
|
||||
String newContentUrl = ctx.getContentUrl();
|
||||
try
|
||||
{
|
||||
File file = null;
|
||||
|
Reference in New Issue
Block a user