Merged V2.2 to HEAD

8372: Merged V2.1 to V2.2
      8314: Merged V2.0 to V2.1
         7750: Fix for ACT-475: ContentStoreCleaner causes OutOfMemoryError
      8332: Made content URL column larger to accommodate the extra locale info present in 2.1
      8334: Build fix: V2.1 tighter on authentication for getTempWriter
   8376: Merged V2.1 to V2.2
      8325: Fix for AWC-1089
      8361: Workaround for WCM-882: All metadata extracters can now handle zero length files


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8497 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2008-03-11 06:22:28 +00:00
parent ceed05d26f
commit cda4e6105f
33 changed files with 1102 additions and 246 deletions

View File

@@ -25,7 +25,6 @@
package org.alfresco.repo.content;
import java.util.Date;
import java.util.Set;
import org.alfresco.service.cmr.repository.ContentIOException;
import org.alfresco.service.cmr.repository.ContentReader;
@@ -150,27 +149,24 @@ public abstract class AbstractContentStore implements ContentStore
}
/**
* Searches for URLs using null dates.
*
* @see ContentStore#getUrls(java.util.Date, java.util.Date)
* @see #getUrls(Date, Date, ContentUrlHandler)
*/
public final Set<String> getUrls()
public final void getUrls(ContentUrlHandler handler) throws ContentIOException
{
return getUrls(null, null);
getUrls(null, null, handler);
}
/**
* Override if the derived class supports the operation.
* Override to provide an implementation. If no implementation is supplied, then the store will not support
* cleaning of orphaned content binaries.
*
* @throws UnsupportedOperationException always
*
* @since 2.1
* @throws UnsupportedOperationException always
*/
public Set<String> getUrls(Date createdAfter, Date createdBefore)
public void getUrls(Date createdAfter, Date createdBefore, ContentUrlHandler handler) throws ContentIOException
{
throw new UnsupportedOperationException();
}
/**
* Implement to supply a store-specific writer for the given existing content
* and optional target content URL.
@@ -255,6 +251,16 @@ public abstract class AbstractContentStore implements ContentStore
}
return writer;
}
/**
* @see ContentContext
* @see ContentStore#getWriter(ContentContext)
*/
public final ContentWriter getWriter(ContentReader existingContentReader, String newContentUrl)
{
ContentContext ctx = new ContentContext(existingContentReader, newContentUrl);
return getWriter(ctx);
}
/**
* Simple implementation that uses the
@@ -266,14 +272,4 @@ public abstract class AbstractContentStore implements ContentStore
ContentReader reader = getReader(contentUrl);
return reader.exists();
}
/**
* @see ContentContext
* @see ContentStore#getWriter(ContentContext)
*/
public final ContentWriter getWriter(ContentReader existingContentReader, String newContentUrl)
{
ContentContext ctx = new ContentContext(existingContentReader, newContentUrl);
return getWriter(ctx);
}
}