mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)
76911: Merged PLATFORM1 (5.0/Cloud) to HEAD-BUG-FIX (5.0/Cloud) 66893: Clean up use of deprecated 'UserRegistrySynchronizer.synchronize' and general code clean up git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@77754 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2010 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2014 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
@@ -34,25 +34,18 @@ import org.quartz.JobExecutionException;
|
||||
*/
|
||||
public class UserRegistrySynchronizerJob implements Job
|
||||
{
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.quartz.Job#execute(org.quartz.JobExecutionContext)
|
||||
*/
|
||||
public void execute(JobExecutionContext executionContext) throws JobExecutionException
|
||||
{
|
||||
final UserRegistrySynchronizer userRegistrySynchronizer = (UserRegistrySynchronizer) executionContext
|
||||
.getJobDetail().getJobDataMap().get("userRegistrySynchronizer");
|
||||
final String synchronizeChangesOnly = (String) executionContext.getJobDetail().getJobDataMap().get(
|
||||
"synchronizeChangesOnly");
|
||||
final String synchronizeChangesOnly = (String) executionContext.getJobDetail().getJobDataMap().get("synchronizeChangesOnly");
|
||||
AuthenticationUtil.runAs(new RunAsWork<Object>()
|
||||
{
|
||||
public Object doWork() throws Exception
|
||||
{
|
||||
userRegistrySynchronizer.synchronize(synchronizeChangesOnly == null
|
||||
|| !Boolean.parseBoolean(synchronizeChangesOnly), true, true);
|
||||
userRegistrySynchronizer.synchronize(synchronizeChangesOnly == null || !Boolean.parseBoolean(synchronizeChangesOnly), true);
|
||||
return null;
|
||||
}
|
||||
}, AuthenticationUtil.getSystemUserName());
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user