Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)

77148: Merged PLATFORM1 (5.0/Cloud) to HEAD-BUG-FIX (5.0/Cloud)
      73957: ContentStore API cleanup
       - Removed previously-deprecated ContentStore.getWriter(ContentReader existingContentReader, String newContentUrl)
       - Removed previously-deprecated getSpaceUsed()
       - Removed previously-deprecated getTotalSize()
       - Deprecated optional and unused getUrls() and variants
       - Clean up of implementations to ignore relevant deprecations, etc


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@78004 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Mark Rogers
2014-07-23 15:57:20 +00:00
parent 7fff2b6627
commit f1310c6c8d
13 changed files with 49 additions and 230 deletions

View File

@@ -18,6 +18,7 @@
*/
package org.alfresco.repo.content.replication;
import org.alfresco.repo.content.ContentContext;
import org.alfresco.repo.content.ContentStore;
import org.alfresco.repo.content.ContentStore.ContentUrlHandler;
import org.alfresco.repo.node.index.IndexRecovery;
@@ -41,6 +42,7 @@ import org.quartz.JobExecutionException;
*
* @author Derek Hulley
*/
@SuppressWarnings("deprecation")
public class ContentStoreReplicator
{
private static Log logger = LogFactory.getLog(ContentStoreReplicator.class);
@@ -54,6 +56,7 @@ public class ContentStoreReplicator
public ContentStoreReplicator()
{
this.busy = false;
logger.warn("DEPRECATION: The ContentStoreReplicator component has been deprecated in 5.0 as it only works against optionally-implemented, deprecated APIs.");
}
/**
@@ -192,7 +195,8 @@ public class ContentStoreReplicator
return;
}
// get a writer to the target store - this can fail if the content is there now
ContentWriter writer = targetStore.getWriter(null, contentUrl);
ContentContext ctx = new ContentContext(null, contentUrl);
ContentWriter writer = targetStore.getWriter(ctx);
// get the source reader
ContentReader reader = sourceStore.getReader(contentUrl);
if (!reader.exists())

View File

@@ -377,6 +377,7 @@ public class ReplicatingContentStore extends AbstractContentStore
* Iterates over results as given by the primary store and all secondary stores. It is up to the handler to eliminate
* duplicates that will occur between the primary and secondary stores.
*/
@SuppressWarnings("deprecation")
public void getUrls(Date createdAfter, Date createdBefore, ContentUrlHandler handler) throws ContentIOException
{
// add in URLs from primary store
@@ -399,8 +400,6 @@ public class ReplicatingContentStore extends AbstractContentStore
/**
* Replicates the content upon stream closure. If the thread pool is available,
* then the process will be asynchronous.
* <p>
*
* @author Derek Hulley
*/