Prettier exception when virt server is down.

Optimization for initial validation (no rescan necessary on empty store).
Now emulating forgiving (non RFC-2396/3987 compliant) behavior most 
browsers exhibit on links like: <a href="mind the gap.html">...</a>
Also bumped schema version to deal with link canonicalization


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6190 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jon Cox
2007-07-08 04:03:06 +00:00
parent c5d97bfebe
commit cce11fa38b
2 changed files with 84 additions and 69 deletions

View File

@@ -1,16 +1,16 @@
/*-----------------------------------------------------------------------------
* Copyright 2007 Alfresco Inc.
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. As a special
@@ -19,8 +19,8 @@
* Software ("FLOSS") applications as described in Alfresco's FLOSS exception.
* You should have received a copy of the text describing the FLOSS exception,
* and it is also available here: http://www.alfresco.com/legal/licensing
*
*
*
*
* Author Jon Cox <jcox@alfresco.com>
* File HrefDifference.java
*----------------------------------------------------------------------------*/
@@ -36,20 +36,20 @@ import java.util.Map;
public class HrefDifference
{
/**
* The href_status_map_ is a map of URLs the tuple of their
* The href_status_map_ is a map of URLs the tuple of their
* return status & list of dependencies.
*/
protected HrefStatusMap href_status_map_; // status of links/maybe dep info
/**
/**
* The href_manifest_ contains a List<HrefManifestEntry> objects.
* Each HrefManifestEntry contains a file name,
* and possibly a list of hrefs within that file.
*/
protected HrefManifest href_manifest_;
protected HrefManifest href_manifest_;
// Lazily computed values
protected HrefManifest broken_in_newmod_; // errors in new files
// Lazily computed values
protected HrefManifest broken_in_newmod_; // errors in new files
protected HrefManifest broken_by_deletion_; // err via new deletions
// Only computed when merging diffs
@@ -60,28 +60,40 @@ public class HrefDifference
protected HashMap<String, List<String>> broken_manifest_map_;
protected HashMap<String,String> deleted_file_md5_;
String href_attr_; // href attribute lookup prefix
String src_store_;
int src_version_;
String src_store_;
int dst_version_;
String dst_store_;
String src_webapp_url_base_;
String dst_webapp_url_base_;
HrefDifference(String href_attr,
int src_version,
String src_store,
int dst_version,
String dst_store,
String src_webapp_url_base,
String dst_webapp_url_base)
{
href_attr_ = href_attr;
src_version_ = src_version;
src_store_ = src_store;
dst_version_ = dst_version;
dst_store_ = dst_store;
src_webapp_url_base_ = src_webapp_url_base;
dst_webapp_url_base_ = dst_webapp_url_base;
href_manifest_ = new HrefManifest();
href_status_map_ = new HrefStatusMap();
broken_manifest_map_ = new HashMap<String, List<String>>();
deleted_file_md5_ = new HashMap<String,String>();
}
@@ -89,17 +101,19 @@ public class HrefDifference
public HrefManifest getHrefManifest() { return href_manifest_; }
public HrefStatusMap getHrefStatusMap() { return href_status_map_; }
public int getSrcVersion() { return src_version_;}
public int getDstVersion() { return dst_version_;}
String getHrefAttr() { return href_attr_;}
String getSrcStore() { return src_store_;}
String getDstStore() { return dst_store_;}
String getSrcWebappUrlBase() { return src_webapp_url_base_; }
String getDstWebappUrlBase() { return dst_webapp_url_base_; }
String getHrefAttr() { return href_attr_;}
String getSrcStore() { return src_store_;}
String getDstStore() { return dst_store_;}
String getSrcWebappUrlBase() { return src_webapp_url_base_; }
String getDstWebappUrlBase() { return dst_webapp_url_base_; }
Map<String,String> getDeletedFileMd5() { return deleted_file_md5_; }
Map<String, List<String>> getBrokenManifestMap()
{
Map<String, List<String>> getBrokenManifestMap()
{
return broken_manifest_map_;
}
}