mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-06-16 17:55:15 +00:00
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:
parent
078bdd4b4a
commit
d4b3b42cab
@ -27,7 +27,7 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="avmSyncService" class="org.alfresco.repo.remote.AVMSyncServiceClient">
|
||||
<bean id="avmSyncService" class="org.alfresco.repo.remote.AVMSyncServiceRemote">
|
||||
<property name="avmSyncServiceTransport">
|
||||
<ref bean="avmSyncServiceTransport"/>
|
||||
</property>
|
||||
|
@ -42,7 +42,7 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="avmSyncService" class="org.alfresco.repo.remote.AVMSyncServiceClient">
|
||||
<bean id="avmSyncService" class="org.alfresco.repo.remote.AVMSyncServiceRemote">
|
||||
<property name="avmSyncServiceTransport">
|
||||
<ref bean="avmSyncServiceTransport"/>
|
||||
</property>
|
||||
|
@ -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_;
|
||||
}
|
||||
}
|
||||
|
@ -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<HrefConcordanceEntry> getBrokenHrefConcordance(
|
||||
public List<HrefConcordanceEntry> getBrokenHrefConcordanceEntries(
|
||||
String storeNameOrWebappPath
|
||||
) throws AVMNotFoundException;
|
||||
|
||||
@ -101,7 +102,7 @@ public interface LinkValidationService
|
||||
* <li> storeNameOrWebappPath="mysite:/www/avm_webapps/ROOT"
|
||||
* <li> statusGTE=400
|
||||
* <li> statusLTE=599
|
||||
* <ul>
|
||||
* </ul>
|
||||
* <p>
|
||||
* Example 2:<br>
|
||||
* The following parameters will fetch all the links whose return status
|
||||
@ -111,22 +112,23 @@ public interface LinkValidationService
|
||||
* <li> storeNameOrWebappPath="mysite"
|
||||
* <li> statusGTE=200
|
||||
* <li> statusLTE=299
|
||||
* <ul>
|
||||
* </ul>
|
||||
* <p>
|
||||
* Example 3:<br>
|
||||
* 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:
|
||||
* <ul>
|
||||
* <li> storeNameOrWebappPath="mysite:/www/avm_webapps/ROOT"
|
||||
* <li> statusGTE=200
|
||||
* <li> statusLTE=200
|
||||
* <ul>
|
||||
* </ul>
|
||||
* <p>
|
||||
* For details regarding HTTP status codes, see:
|
||||
* http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
|
||||
*
|
||||
*/
|
||||
public List<HrefConcordanceEntry> getHrefConcordance(
|
||||
public List<HrefConcordanceEntry> 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
|
||||
* <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);
|
||||
|
||||
|
||||
/**
|
||||
* Don't use yet - does nothing at the moment.
|
||||
*/
|
||||
public BrokenHrefConcordanceDifference getBrokenHrefConcordanceDifference(
|
||||
int srcVersion, String srcPath,
|
||||
int dstVersion, String dstPath,
|
||||
NameMatcher excluder)
|
||||
throws AVMNotFoundException;
|
||||
}
|
||||
|
||||
|
@ -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()
|
||||
{
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user