Point checkin.

Separated ephemeral results you get from comparing a workflow
sandbox to staging from the delta you'd get between 2 versions
of staging itself.  The deltas work but the merges are not
there yet so you still need to do monolithic updates 
of staging using the old api for now.  Still, this lets you
see what the deltas look like -- basically just a slightly
different way of getting manifests of files with broken links.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6012 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jon Cox
2007-06-19 04:53:34 +00:00
parent 2de8f8402c
commit a6e250cdac
2 changed files with 49 additions and 45 deletions

View File

@@ -28,58 +28,68 @@
package org.alfresco.linkvalidation; package org.alfresco.linkvalidation;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
public class HrefDifference public class HrefDifference
{ {
HrefStatusMap href_status_map_; //status of links + maybe dep info protected HrefStatusMap href_status_map_; // status of links/maybe dep info
HrefManifest href_manifest_; // overall manifest in of change protected HrefManifest href_manifest_; // overall manifest in of change
// Hrefs no longer used by the system anywhere // Lazily computed values
HashMap<String,String> obsolete_href_md5_; protected HrefManifest broken_in_newmod_; // errors in new files
protected HrefManifest broken_by_deletion_; // err via new deletions
HrefManifest broken_in_newmod_; // errors in new files // Only computed when merging diffs
HrefManifest broken_by_del_; // errors caused by new deletions protected List<String> repaired_by_delmod_; // fix by removing links
HrefManifest repaired_by_delmod_; // fix by removing links (mod or del) protected List<String> repaired_by_new_; // file satisfied broken dep
HrefManifest repaired_by_new_; // new file satisfies broken dep
// Temp values used in lazy computation
protected HashMap<String, List<String>> broken_manifest_map_;
protected HashMap<String,String> deleted_file_md5_;
public HrefDifference() // href attribute lookup prefix
String href_attr_;
String src_store_;
String dst_store_;
String src_webapp_url_base_;
String dst_webapp_url_base_;
HrefDifference(String href_attr,
String src_store,
String dst_store,
String src_webapp_url_base,
String dst_webapp_url_base)
{ {
href_manifest_ = new HrefManifest(); href_attr_ = href_attr;
href_status_map_ = new HrefStatusMap(); src_store_ = src_store;
obsolete_href_md5_ = new HashMap<String,String>(); dst_store_ = dst_store;
src_webapp_url_base_ = src_webapp_url_base;
dst_webapp_url_base_ = dst_webapp_url_base;
broken_by_del_ = new HrefManifest(); href_manifest_ = new HrefManifest();
broken_in_newmod_ = new HrefManifest(); href_status_map_ = new HrefStatusMap();
repaired_by_delmod_ = new HrefManifest();
repaired_by_new_ = new HrefManifest(); broken_manifest_map_ = new HashMap<String, List<String>>();
deleted_file_md5_ = new HashMap<String,String>();
} }
public HrefManifest getHrefManifest() { return href_manifest_; }
public HrefStatusMap getHrefStatusMap() { return href_status_map_; }
Map<String,String> getObsoleteHrefMd5() { return obsolete_href_md5_; }
public HrefManifest getBrokenByDeletionHrefManifest( ) public HrefManifest getHrefManifest() { return href_manifest_; }
{ public HrefStatusMap getHrefStatusMap() { return href_status_map_; }
return broken_by_del_;
}
public HrefManifest getBrokenInNewModHrefManifest() String getHrefAttr() { return href_attr_;}
{ String getSrcStore() { return src_store_;}
return broken_in_newmod_; String getDstStore() { return dst_store_;}
} String getSrcWebappUrlBase() { return src_webapp_url_base_; }
String getDstWebappUrlBase() { return dst_webapp_url_base_; }
public HrefManifest getRepairedByDeletionAndModHrefManifest() Map<String,String> getDeletedFileMd5() { return deleted_file_md5_; }
Map<String, List<String>> getBrokenManifestMap()
{ {
return repaired_by_delmod_; return broken_manifest_map_;
}
public HrefManifest getRepairedByNewHreManifest()
{
return repaired_by_new_;
} }
} }

View File

@@ -187,16 +187,10 @@ public interface LinkValidationService
HrefValidationProgress progress HrefValidationProgress progress
) throws AVMNotFoundException; ) throws AVMNotFoundException;
public HrefManifest getHrefManifestBrokenByDelete(HrefDifference hdiff);
public HrefManifest getHrefManifestBrokenByNewOrMod(HrefDifference hdiff);
public HrefDifference getHrefDifference( int srcVersion, public List<String> getHrefListFixedByDeleteOrMod(HrefDifference hdiff);
String srcWebappPath, public List<String> getHrefListFixedByNew(HrefDifference hdiff);
int dstVersion,
String dstWebappPath,
int connectTimeout,
int readTimeout,
int nthreads,
HrefValidationProgress progress)
throws AVMNotFoundException;
} }