String registryPath = pathElement.getText();
int tenantId = Integer.parseInt(tenantElement.getText());
DeploymentSynchronizationManager syncManager = DeploymentSynchronizationManager.getInstance();
String filePath = MultitenantUtils.getAxis2RepositoryPath(tenantId);
DeploymentSynchronizer synchronizer = syncManager.getSynchronizer(filePath);
if (synchronizer == null || !synchronizer.isAutoCheckout()) {
log.warn("Unable to find the synchronizer for the file path: " + filePath);
return;
}
String absoluteRegistryPath = Utils.getAbsoluteRegistryPath(synchronizer.getRegistryPath());
if (absoluteRegistryPath.endsWith("/")) {
absoluteRegistryPath = absoluteRegistryPath.substring(0,
absoluteRegistryPath.lastIndexOf('/'));
}
if (registryPath.startsWith(absoluteRegistryPath)) {
try {
Date date = DATE_FORMAT.parse(timestamp);
AutoCheckoutController checkoutController = synchronizer.getAutoCheckoutController();
if (checkoutController instanceof EventingBasedAutoCheckoutController) {
((EventingBasedAutoCheckoutController) checkoutController).requestCheckout(
date.getTime());
}
} catch (ParseException e) {