Point checkin for link validation & changed AVMSyncServiceClient to AVMSyncServiceRemote.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5872 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jon Cox 2007-06-06 22:06:38 +00:00
parent 078bdd4b4a
commit d4b3b42cab
5 changed files with 96 additions and 10 deletions

View File

@ -27,7 +27,7 @@
</property> </property>
</bean> </bean>
<bean id="avmSyncService" class="org.alfresco.repo.remote.AVMSyncServiceClient"> <bean id="avmSyncService" class="org.alfresco.repo.remote.AVMSyncServiceRemote">
<property name="avmSyncServiceTransport"> <property name="avmSyncServiceTransport">
<ref bean="avmSyncServiceTransport"/> <ref bean="avmSyncServiceTransport"/>
</property> </property>

View File

@ -42,7 +42,7 @@
</property> </property>
</bean> </bean>
<bean id="avmSyncService" class="org.alfresco.repo.remote.AVMSyncServiceClient"> <bean id="avmSyncService" class="org.alfresco.repo.remote.AVMSyncServiceRemote">
<property name="avmSyncServiceTransport"> <property name="avmSyncServiceTransport">
<ref bean="avmSyncServiceTransport"/> <ref bean="avmSyncServiceTransport"/>
</property> </property>

View File

@ -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 <jcox@alfresco.com>
* File BrokenHrefConcordanceDifference.java
*----------------------------------------------------------------------------*/
package org.alfresco.linkvalidation;
import java.util.List;
import java.util.ArrayList;
public class BrokenHrefConcordanceDifference
{
List<HrefConcordanceEntry> repaired_;
List<HrefConcordanceEntry> newly_broken_;
public BrokenHrefConcordanceDifference()
{
repaired_ = new ArrayList<HrefConcordanceEntry>();
newly_broken_ = new ArrayList<HrefConcordanceEntry>();
}
public List<HrefConcordanceEntry> getRepairedHrefConcordanceEntries()
{
return repaired_;
}
public List<HrefConcordanceEntry> getNewlyBrokenHrefConcordanceEntries( )
{
return newly_broken_;
}
}

View File

@ -30,6 +30,7 @@ package org.alfresco.linkvalidation;
import java.util.List; import java.util.List;
import org.alfresco.service.cmr.avm.AVMNotFoundException; import org.alfresco.service.cmr.avm.AVMNotFoundException;
import org.alfresco.util.NameMatcher;
public interface LinkValidationService public interface LinkValidationService
{ {
@ -80,7 +81,7 @@ public interface LinkValidationService
* to a webapp. This function is just a convenience wrapper for calling * to a webapp. This function is just a convenience wrapper for calling
* getHrefConcordance with statusGTE=400 and statusLTE=599. * getHrefConcordance with statusGTE=400 and statusLTE=599.
*/ */
public List<HrefConcordanceEntry> getBrokenHrefConcordance( public List<HrefConcordanceEntry> getBrokenHrefConcordanceEntries(
String storeNameOrWebappPath String storeNameOrWebappPath
) throws AVMNotFoundException; ) throws AVMNotFoundException;
@ -101,7 +102,7 @@ public interface LinkValidationService
* <li> storeNameOrWebappPath="mysite:/www/avm_webapps/ROOT" * <li> storeNameOrWebappPath="mysite:/www/avm_webapps/ROOT"
* <li> statusGTE=400 * <li> statusGTE=400
* <li> statusLTE=599 * <li> statusLTE=599
* <ul> * </ul>
* <p> * <p>
* Example 2:<br> * Example 2:<br>
* The following parameters will fetch all the links whose return status * The following parameters will fetch all the links whose return status
@ -111,22 +112,23 @@ public interface LinkValidationService
* <li> storeNameOrWebappPath="mysite" * <li> storeNameOrWebappPath="mysite"
* <li> statusGTE=200 * <li> statusGTE=200
* <li> statusLTE=299 * <li> statusLTE=299
* <ul> * </ul>
* <p>
* Example 3:<br> * Example 3:<br>
* The following parameters will fetch all the links whose return status * 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' * is 200 (OK) within the ROOT webapp in the staging area of the 'mysite'
* web project * web project:
* <ul> * <ul>
* <li> storeNameOrWebappPath="mysite:/www/avm_webapps/ROOT" * <li> storeNameOrWebappPath="mysite:/www/avm_webapps/ROOT"
* <li> statusGTE=200 * <li> statusGTE=200
* <li> statusLTE=200 * <li> statusLTE=200
* <ul> * </ul>
* <p> * <p>
* For details regarding HTTP status codes, see: * For details regarding HTTP status codes, see:
* http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html * http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
* *
*/ */
public List<HrefConcordanceEntry> getHrefConcordance( public List<HrefConcordanceEntry> getHrefConcordanceEntries(
String storeNameOrWebappPath, String storeNameOrWebappPath,
int statusGTE, int statusGTE,
int statusLTE int statusLTE
@ -180,6 +182,35 @@ public interface LinkValidationService
AVMNotFoundException; 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
* <code>mysite:/www/avm_webapps/ROOT/assets/footer.html</code> are:
* <pre>
* 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
* </pre>
* 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<String> getHrefsDependentUponFile(String path); public List<String> 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;
} }

View File

@ -14,7 +14,7 @@ import org.alfresco.util.NameMatcher;
* Client side wrapper around the RMI based AVMSyncServiceTransport. * Client side wrapper around the RMI based AVMSyncServiceTransport.
* @author britt * @author britt
*/ */
public class AVMSyncServiceClient implements AVMSyncService public class AVMSyncServiceRemote implements AVMSyncService
{ {
/** /**
* The instance of AVMSyncServiceTransport. * The instance of AVMSyncServiceTransport.
@ -29,7 +29,7 @@ public class AVMSyncServiceClient implements AVMSyncService
/** /**
* Default constructor. * Default constructor.
*/ */
public AVMSyncServiceClient() public AVMSyncServiceRemote()
{ {
} }