mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-07 18:25:23 +00:00
15888: ETHREEOH-2617: CIFS Authenticators should not try to initialize when disabled - removed init-method declaration from cifsAuthenticatorBase 15731: ENH-524: Use JobLockService to ensure that it is only possible for LDAP sync to run on one node at a time in a cluster - Ensures that if schedule is identical on all nodes, the LDAP sync will only be run on one 15694: Fix TransactionServiceImplTest broken by 15685 15685: ETHREEOH-983: Move RepoServerMgmt JMX editable capabilities into a sysAdmin subsystem for more consistent control and cluster support - New SysAdminParams interface exported by sysAdmin subsystem through which AuthenticationService and TransactionService get at the configured parameters - The repository read only flag does not apply to the system user so that we can still persist changes to that flag through JMX! - Removed sysAdminCache and supporting configuration. 15684: Improvements to cluster support for subsystems - When a subsystem is stopped on a node for editing it is completely destroyed and deregistered from JMX on other nodes - Should the subsystem be reactivated on those other nodes (e.g. called into by code) it will be reinitialized from persisted properties and thus stay in sync with the node being edited! 15683: Fixed potential concurrency issues in HeartBeat and LicenseComponent - Discovered during cluster testing - Because these components schedule triggers in a retrying transaction, they need to unschedule the triggers beforehand, just in case a retry has happened 15617: MOB-646: JMX edits now synchronized across cluster via JGroups - When you stop a component or subsystem, it is stopped across the entire cluster - When you restart it after editing properties, the component is reinitialized from the persisted properties across the cluster git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16873 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
195 lines
9.0 KiB
Java
195 lines
9.0 KiB
Java
/*-----------------------------------------------------------------------------
|
|
* 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 LinkValidationService.java
|
|
*----------------------------------------------------------------------------*/
|
|
|
|
package org.alfresco.linkvalidation;
|
|
|
|
import java.net.SocketException;
|
|
import java.util.List;
|
|
|
|
import javax.net.ssl.SSLException;
|
|
|
|
import org.alfresco.service.cmr.avm.AVMNotFoundException;
|
|
|
|
public interface LinkValidationService
|
|
{
|
|
public void onBootstrap();
|
|
public void onShutdown();
|
|
|
|
/**
|
|
* Returns the poll interval (in milliseconds) used to check
|
|
* for new snapshots in staging.
|
|
*/
|
|
public int getPollInterval();
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
|
/**
|
|
* This function is applied to a webapp in staging, and is just a
|
|
* convenience wrapper for calling getHrefManifestEntries
|
|
* with statusGTE=400 and statusLTE=599.
|
|
* <p>
|
|
* Note: Files and urls within this list of manifests pertain to
|
|
* the latest validated snapshot of staging (which may be
|
|
* somewhat older than the very latest snapshot). The
|
|
* validation service attempts to keep the latest validated
|
|
* snapshot as new as possible, automatically.
|
|
*/
|
|
//-------------------------------------------------------------------------
|
|
public HrefManifest getBrokenHrefManifest( String webappPath)
|
|
throws AVMNotFoundException,
|
|
SocketException,
|
|
IllegalArgumentException;
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
|
/**
|
|
* This function is applied to webapps in staging and returns a manifest
|
|
* consisting of just the broken hrefs within each file containing
|
|
* one or more broken href. The HrefManifestEntry list is sorted in
|
|
* increasing lexicographic order by file name. The hrefs within each
|
|
* HrefManifestEntry are also sorted in increasing lexicographic order.
|
|
*/
|
|
//-------------------------------------------------------------------------
|
|
public HrefManifest getHrefManifest( String webappPath,
|
|
int statusGTE,
|
|
int statusLTE)
|
|
throws AVMNotFoundException,
|
|
SocketException,
|
|
IllegalArgumentException;
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
|
/**
|
|
* Fetch the difference between two areas.
|
|
* Version -1 is assumed for src; dst relies on the state of the
|
|
* link validation service updating link validity tables.
|
|
* Typically, this will be for some version close to the latest
|
|
* snapshot, but it's async, so it might be older.
|
|
*/
|
|
//-------------------------------------------------------------------------
|
|
public HrefDifference getHrefDifference(
|
|
String srcWebappPath,
|
|
String dstWebappPath,
|
|
HrefValidationProgress progress)
|
|
throws AVMNotFoundException,
|
|
SocketException,
|
|
SSLException,
|
|
LinkValidationAbortedException;
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
|
/**
|
|
* This function is applied to difference objects created by comparing
|
|
* webapps in an author or workflow store to the staging area they
|
|
* overlay.
|
|
*/
|
|
//-------------------------------------------------------------------------
|
|
public HrefManifest getBrokenHrefManifest( HrefDifference hdiff )
|
|
throws AVMNotFoundException,
|
|
SocketException;
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
|
/**
|
|
* Fetches a manifest of all hyperlinks broken in new or modified files in
|
|
* an HrefDifference. The entries in this manifest are in the 'src'
|
|
* namespace of the HrefDifference operation
|
|
* (i.e.: files & urls from alice, not staging).
|
|
*
|
|
* @param hdiff The difference between two webapps obtained
|
|
* by calling getHrefDifference().
|
|
*/
|
|
//-------------------------------------------------------------------------
|
|
public HrefManifest getHrefManifestBrokenByNewOrMod(HrefDifference hdiff);
|
|
|
|
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
|
/**
|
|
* WARNING: this function won't be part of the public interface for long.
|
|
* Updates href status and href file dependencies for path.
|
|
*
|
|
* @param path
|
|
* <ul>
|
|
* <li> If null, do all stores & all webapps in them.
|
|
* <li> If store, do all webapps in store
|
|
* <li> If webapp, do webapp.
|
|
* </ul>
|
|
*
|
|
* @param incremental
|
|
* If true, updates information incrementally, based on the
|
|
* files that have changed and prior calculations regarding
|
|
* url-to-file dependencies. If false, first deletes all URL
|
|
* info associated with the store/webapp (if any), then does
|
|
* a full rescan to update info.
|
|
*
|
|
* @validateExternal
|
|
* Currently does nothing. Perhaps one day you'll be able to
|
|
* turn off validation of external links.
|
|
*
|
|
* @param progress
|
|
* While updateHrefInfo() is a synchronous function,
|
|
* 'status' may be polled in a separate thread to
|
|
* observe its progress.
|
|
*/
|
|
//-------------------------------------------------------------------------
|
|
public void updateHrefInfo( String path,
|
|
boolean incremental,
|
|
boolean validateExternal,
|
|
HrefValidationProgress progress)
|
|
throws AVMNotFoundException,
|
|
SocketException,
|
|
SSLException,
|
|
LinkValidationAbortedException;
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
|
/**
|
|
* 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 boolean isLinkValidationDisabled();
|
|
}
|