diff --git a/config/alfresco/clt-context.xml b/config/alfresco/clt-context.xml index 0efadfafcb..8892f4bc82 100644 --- a/config/alfresco/clt-context.xml +++ b/config/alfresco/clt-context.xml @@ -27,7 +27,7 @@ - + diff --git a/config/alfresco/remote-avm-test-context.xml b/config/alfresco/remote-avm-test-context.xml index 432f833013..cb400249da 100644 --- a/config/alfresco/remote-avm-test-context.xml +++ b/config/alfresco/remote-avm-test-context.xml @@ -42,7 +42,7 @@ - + diff --git a/source/java/org/alfresco/linkvalidation/BrokenHrefConcordanceDifference.java b/source/java/org/alfresco/linkvalidation/BrokenHrefConcordanceDifference.java new file mode 100644 index 0000000000..980f83a373 --- /dev/null +++ b/source/java/org/alfresco/linkvalidation/BrokenHrefConcordanceDifference.java @@ -0,0 +1,55 @@ +/*----------------------------------------------------------------------------- +* 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 +* exception to the terms and conditions of version 2.0 of the GPL, you may +* redistribute this Program in connection with Free/Libre and Open Source +* 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 +* File BrokenHrefConcordanceDifference.java +*----------------------------------------------------------------------------*/ + +package org.alfresco.linkvalidation; + +import java.util.List; +import java.util.ArrayList; + +public class BrokenHrefConcordanceDifference +{ + + List repaired_; + List newly_broken_; + + public BrokenHrefConcordanceDifference() + { + repaired_ = new ArrayList(); + newly_broken_ = new ArrayList(); + } + + public List getRepairedHrefConcordanceEntries() + { + return repaired_; + } + + public List getNewlyBrokenHrefConcordanceEntries( ) + { + return newly_broken_; + } +} + diff --git a/source/java/org/alfresco/linkvalidation/LinkValidationService.java b/source/java/org/alfresco/linkvalidation/LinkValidationService.java index fd287b4140..645460d36d 100644 --- a/source/java/org/alfresco/linkvalidation/LinkValidationService.java +++ b/source/java/org/alfresco/linkvalidation/LinkValidationService.java @@ -30,6 +30,7 @@ package org.alfresco.linkvalidation; import java.util.List; import org.alfresco.service.cmr.avm.AVMNotFoundException; +import org.alfresco.util.NameMatcher; public interface LinkValidationService { @@ -80,7 +81,7 @@ public interface LinkValidationService * to a webapp. This function is just a convenience wrapper for calling * getHrefConcordance with statusGTE=400 and statusLTE=599. */ - public List getBrokenHrefConcordance( + public List getBrokenHrefConcordanceEntries( String storeNameOrWebappPath ) throws AVMNotFoundException; @@ -101,7 +102,7 @@ public interface LinkValidationService *
  • storeNameOrWebappPath="mysite:/www/avm_webapps/ROOT" *
  • statusGTE=400 *
  • statusLTE=599 - *
      + *
    *

    * Example 2:
    * The following parameters will fetch all the links whose return status @@ -111,22 +112,23 @@ public interface LinkValidationService *

  • storeNameOrWebappPath="mysite" *
  • statusGTE=200 *
  • statusLTE=299 - *
      + *
    + *

    * Example 3:
    * The following parameters will fetch all the links whose return status * is 200 (OK) within the ROOT webapp in the staging area of the 'mysite' - * web project + * web project: *

      *
    • storeNameOrWebappPath="mysite:/www/avm_webapps/ROOT" *
    • statusGTE=200 *
    • statusLTE=200 - *
        + *
      *

      * For details regarding HTTP status codes, see: * http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html * */ - public List getHrefConcordance( + public List getHrefConcordanceEntries( String storeNameOrWebappPath, int statusGTE, int statusLTE @@ -180,6 +182,35 @@ public interface LinkValidationService AVMNotFoundException; + /** + * Fetch all hyperlinks that rely upon the existence of the file specified + * by 'path', directly or indirectly. The list of hrefs returnd is + * sorted in increasing lexicographic order. For example, in + * alfresco-sample-website.war, the hrefs dependent upon + * mysite:/www/avm_webapps/ROOT/assets/footer.html are: + *

      +    *     http://mysite.www--sandbox.version--v-1.127-0-0-1.ip.alfrescodemo.net:8180/
      +    *     http://mysite.www--sandbox.version--v-1.127-0-0-1.ip.alfrescodemo.net:8180/assets/footer.html
      +    *     http://mysite.www--sandbox.version--v-1.127-0-0-1.ip.alfrescodemo.net:8180/index.jsp
      +    *     http://mysite.www--sandbox.version--v-1.127-0-0-1.ip.alfrescodemo.net:8180/media/releases/index.jsp
      +    *  
      + * Note that this list may contain links that are functionally equivalent + * (e.g.: the first and third links), and may also contain links that + * don't actually appear an any web page, but are implicitly present + * in the site because any asset can be "dead reckoned". + * + * + */ public List getHrefsDependentUponFile(String path); + + + /** + * Don't use yet - does nothing at the moment. + */ + public BrokenHrefConcordanceDifference getBrokenHrefConcordanceDifference( + int srcVersion, String srcPath, + int dstVersion, String dstPath, + NameMatcher excluder) + throws AVMNotFoundException; } diff --git a/source/java/org/alfresco/repo/remote/AVMSyncServiceClient.java b/source/java/org/alfresco/repo/remote/AVMSyncServiceRemote.java similarity index 96% rename from source/java/org/alfresco/repo/remote/AVMSyncServiceClient.java rename to source/java/org/alfresco/repo/remote/AVMSyncServiceRemote.java index db91874091..aeadde6327 100644 --- a/source/java/org/alfresco/repo/remote/AVMSyncServiceClient.java +++ b/source/java/org/alfresco/repo/remote/AVMSyncServiceRemote.java @@ -14,7 +14,7 @@ import org.alfresco.util.NameMatcher; * Client side wrapper around the RMI based AVMSyncServiceTransport. * @author britt */ -public class AVMSyncServiceClient implements AVMSyncService +public class AVMSyncServiceRemote implements AVMSyncService { /** * The instance of AVMSyncServiceTransport. @@ -29,7 +29,7 @@ public class AVMSyncServiceClient implements AVMSyncService /** * Default constructor. */ - public AVMSyncServiceClient() + public AVMSyncServiceRemote() { }