mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
WebScripts: replace custom cloneEmpty with standard Spring factory pattern (follow-on from r8293 & r8335)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8349 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -56,6 +56,7 @@ import org.alfresco.web.scripts.Description.RequiredAuthentication;
|
||||
import org.alfresco.web.scripts.Description.RequiredTransaction;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.beans.factory.ObjectFactory;
|
||||
|
||||
|
||||
/**
|
||||
@@ -76,14 +77,24 @@ public class RepositoryContainer extends AbstractRuntimeContainer implements Ten
|
||||
private PermissionService permissionService;
|
||||
private DescriptorService descriptorService;
|
||||
private TenantDeployerService tenantDeployerService;
|
||||
|
||||
private ObjectFactory registryFactory;
|
||||
private SimpleCache<String, Registry> webScriptsRegistryCache;
|
||||
|
||||
/**
|
||||
* @param webScriptsRegistryCache
|
||||
*/
|
||||
public void setWebScriptsRegistryCache(SimpleCache<String, Registry> webScriptsRegistryCache)
|
||||
{
|
||||
this.webScriptsRegistryCache = webScriptsRegistryCache;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param registryFactory
|
||||
*/
|
||||
public void setRegistryFactory(ObjectFactory registryFactory) {
|
||||
this.registryFactory = registryFactory;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param repository
|
||||
*/
|
||||
@@ -366,7 +377,7 @@ public class RepositoryContainer extends AbstractRuntimeContainer implements Ten
|
||||
{
|
||||
tenantDeployerService.register(this);
|
||||
|
||||
Registry registry = super.getRegistry().cloneEmpty();
|
||||
Registry registry = (Registry)registryFactory.getObject();
|
||||
webScriptsRegistryCache.put(tenantDeployerService.getCurrentUserDomain(), registry);
|
||||
|
||||
super.reset();
|
||||
|
Reference in New Issue
Block a user