From a64ff1af7eb55503d34e133c81e8042faa4089aa Mon Sep 17 00:00:00 2001 From: Gavin Cornwell Date: Thu, 3 Sep 2009 21:41:23 +0000 Subject: [PATCH] Exported ACP files are now importable (thumbnail, disposition lifecycle and declared record aspects are no longer included for exported nodes) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16084 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../web/scripts/content/StreamArchive.java | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/source/java/org/alfresco/repo/web/scripts/content/StreamArchive.java b/source/java/org/alfresco/repo/web/scripts/content/StreamArchive.java index 3516ca88cc..637332a54a 100644 --- a/source/java/org/alfresco/repo/web/scripts/content/StreamArchive.java +++ b/source/java/org/alfresco/repo/web/scripts/content/StreamArchive.java @@ -214,10 +214,7 @@ public class StreamArchive extends StreamContent dataFile, contentDir, this.mimetypeService); // setup parameters for export - ExporterCrawlerParameters params = new ExporterCrawlerParameters(); - params.setCrawlSelf(true); - params.setCrawlChildNodes(true); - params.setCrawlAssociations(false); + ExporterCrawlerParameters params = setupCrawlerParameters(); params.setExportFrom(new Location(nodeRefs)); // perform the actual export @@ -234,4 +231,23 @@ public class StreamArchive extends StreamContent "Failed to create archive", fnfe); } } + + /** + * Creates and sets up a ExporterCrawlerParameters object to + * use to create the archive, subclasses can override this + * method to change the output of the generated archive. + *

+ * NOTE: The location and includeContent flag will be setup + * after this method is called. + * + * @return ExporterCrawlerParameters object + */ + protected ExporterCrawlerParameters setupCrawlerParameters() + { + ExporterCrawlerParameters params = new ExporterCrawlerParameters(); + params.setCrawlSelf(true); + params.setCrawlChildNodes(true); + params.setCrawlAssociations(false); + return params; + } } \ No newline at end of file