mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Fixed AR-525:
basePatch bean has the following beans injected and held as protected fields transactionService namespaceService searchService nodeService authenticationComponent git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2643 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -17,28 +17,18 @@
|
||||
package org.alfresco.repo.admin.patch.impl;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Serializable;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.alfresco.i18n.I18NUtil;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.admin.patch.AbstractPatch;
|
||||
import org.alfresco.repo.importer.ACPImportPackageHandler;
|
||||
import org.alfresco.repo.importer.ImporterBootstrap;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationComponent;
|
||||
import org.alfresco.service.cmr.admin.PatchException;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.repository.StoreRef;
|
||||
import org.alfresco.service.cmr.search.SearchService;
|
||||
import org.alfresco.service.cmr.view.ImporterService;
|
||||
import org.alfresco.service.cmr.view.Location;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.springframework.context.MessageSource;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
|
||||
@@ -64,11 +54,7 @@ public class EmailTemplatesContentPatch extends AbstractPatch
|
||||
public static final String PROPERTY_EMAIL_TEMPLATES_CHILDNAME = "spaces.templates.email.childname";
|
||||
|
||||
private ImporterBootstrap importerBootstrap;
|
||||
private NamespaceService namespaceService;
|
||||
private SearchService searchService;
|
||||
private ImporterService importerService;
|
||||
private AuthenticationComponent authComponent;
|
||||
private NodeService nodeService;
|
||||
private MessageSource messageSource;
|
||||
|
||||
protected Properties configuration;
|
||||
@@ -81,31 +67,11 @@ public class EmailTemplatesContentPatch extends AbstractPatch
|
||||
this.importerBootstrap = importerBootstrap;
|
||||
}
|
||||
|
||||
public void setNamespaceService(NamespaceService namespaceService)
|
||||
{
|
||||
this.namespaceService = namespaceService;
|
||||
}
|
||||
|
||||
public void setSearchService(SearchService searchService)
|
||||
{
|
||||
this.searchService = searchService;
|
||||
}
|
||||
|
||||
public void setImporterService(ImporterService importerService)
|
||||
{
|
||||
this.importerService = importerService;
|
||||
}
|
||||
|
||||
public void setNodeService(NodeService nodeService)
|
||||
{
|
||||
this.nodeService = nodeService;
|
||||
}
|
||||
|
||||
public void setAuthenticationComponent(AuthenticationComponent authComponent)
|
||||
{
|
||||
this.authComponent = authComponent;
|
||||
}
|
||||
|
||||
public void setMessageSource(MessageSource messageSource)
|
||||
{
|
||||
this.messageSource = messageSource;
|
||||
@@ -124,34 +90,10 @@ public class EmailTemplatesContentPatch extends AbstractPatch
|
||||
*/
|
||||
protected void checkRequiredProperties() throws Exception
|
||||
{
|
||||
if (importerBootstrap == null)
|
||||
{
|
||||
throw new PatchException("'importerBootstrap' property has not been set");
|
||||
}
|
||||
if (namespaceService == null)
|
||||
{
|
||||
throw new PatchException("'namespaceService' property has not been set");
|
||||
}
|
||||
if (searchService == null)
|
||||
{
|
||||
throw new PatchException("'searchService' property has not been set");
|
||||
}
|
||||
if (nodeService == null)
|
||||
{
|
||||
throw new PatchException("'nodeService' property has not been set");
|
||||
}
|
||||
if (importerService == null)
|
||||
{
|
||||
throw new PatchException("'importerService' property has not been set");
|
||||
}
|
||||
if (messageSource == null)
|
||||
{
|
||||
throw new PatchException("'messageSource' property has not been set");
|
||||
}
|
||||
if (templatesACP == null || templatesACP.length() == 0)
|
||||
{
|
||||
throw new PatchException("'templatesACP' property has not been set");
|
||||
}
|
||||
checkPropertyNotNull(importerBootstrap, "importerBootstrap");
|
||||
checkPropertyNotNull(importerService, "importerService");
|
||||
checkPropertyNotNull(messageSource, "messageSource");
|
||||
checkPropertyNotNull(templatesACP, "templatesACP");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -29,10 +29,7 @@ import org.alfresco.repo.importer.ImporterBootstrap;
|
||||
import org.alfresco.service.cmr.admin.PatchException;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.repository.StoreRef;
|
||||
import org.alfresco.service.cmr.search.SearchService;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.springframework.context.MessageSource;
|
||||
|
||||
@@ -62,9 +59,6 @@ public class EmailTemplatesFolderPatch extends AbstractPatch
|
||||
private static final String PROPERTY_ICON = "space-icon-default";
|
||||
|
||||
private ImporterBootstrap importerBootstrap;
|
||||
private NamespaceService namespaceService;
|
||||
private SearchService searchService;
|
||||
private NodeService nodeService;
|
||||
private MessageSource messageSource;
|
||||
|
||||
protected NodeRef dictionaryNodeRef;
|
||||
@@ -76,21 +70,6 @@ public class EmailTemplatesFolderPatch extends AbstractPatch
|
||||
this.importerBootstrap = importerBootstrap;
|
||||
}
|
||||
|
||||
public void setNamespaceService(NamespaceService namespaceService)
|
||||
{
|
||||
this.namespaceService = namespaceService;
|
||||
}
|
||||
|
||||
public void setSearchService(SearchService searchService)
|
||||
{
|
||||
this.searchService = searchService;
|
||||
}
|
||||
|
||||
public void setNodeService(NodeService nodeService)
|
||||
{
|
||||
this.nodeService = nodeService;
|
||||
}
|
||||
|
||||
public void setMessageSource(MessageSource messageSource)
|
||||
{
|
||||
this.messageSource = messageSource;
|
||||
@@ -101,22 +80,8 @@ public class EmailTemplatesFolderPatch extends AbstractPatch
|
||||
*/
|
||||
protected void checkCommonProperties() throws Exception
|
||||
{
|
||||
if (importerBootstrap == null)
|
||||
{
|
||||
throw new PatchException("'importerBootstrap' property has not been set");
|
||||
}
|
||||
else if (namespaceService == null)
|
||||
{
|
||||
throw new PatchException("'namespaceService' property has not been set");
|
||||
}
|
||||
else if (searchService == null)
|
||||
{
|
||||
throw new PatchException("'searchService' property has not been set");
|
||||
}
|
||||
else if (nodeService == null)
|
||||
{
|
||||
throw new PatchException("'nodeService' property has not been set");
|
||||
}
|
||||
checkPropertyNotNull(importerBootstrap, "importerBootstrap");
|
||||
checkPropertyNotNull(messageSource, "messageSource");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -25,10 +25,7 @@ import org.alfresco.repo.admin.patch.AbstractPatch;
|
||||
import org.alfresco.repo.importer.ImporterBootstrap;
|
||||
import org.alfresco.service.cmr.admin.PatchException;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.repository.StoreRef;
|
||||
import org.alfresco.service.cmr.search.SearchService;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
|
||||
/**
|
||||
* Generic patch that uses existing {@link org.alfresco.repo.importer.ImporterBootstrap importers}
|
||||
@@ -46,28 +43,10 @@ public class GenericBootstrapPatch extends AbstractPatch
|
||||
private static final String MSG_CREATED = "patch.genericBootstrap.result.created";
|
||||
private static final String ERR_MULTIPLE_FOUND = "patch.genericBootstrap.err.multiple_found";
|
||||
|
||||
private NamespaceService namespaceService;
|
||||
private NodeService nodeService;
|
||||
private SearchService searchService;
|
||||
private ImporterBootstrap importerBootstrap;
|
||||
private String checkPath;
|
||||
private Properties bootstrapView;
|
||||
|
||||
public void setNamespaceService(NamespaceService namespaceService)
|
||||
{
|
||||
this.namespaceService = namespaceService;
|
||||
}
|
||||
|
||||
public void setNodeService(NodeService nodeService)
|
||||
{
|
||||
this.nodeService = nodeService;
|
||||
}
|
||||
|
||||
public void setSearchService(SearchService searchService)
|
||||
{
|
||||
this.searchService = searchService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param importerBootstrap the bootstrap bean that performs the user store bootstrap
|
||||
*/
|
||||
@@ -100,9 +79,6 @@ public class GenericBootstrapPatch extends AbstractPatch
|
||||
@Override
|
||||
protected void checkProperties()
|
||||
{
|
||||
checkPropertyNotNull(namespaceService, "blah");
|
||||
checkPropertyNotNull(nodeService, "nodeService");
|
||||
checkPropertyNotNull(searchService, "searchService");
|
||||
checkPropertyNotNull(importerBootstrap, "importerBootstrap");
|
||||
checkPropertyNotNull(checkPath, "checkPath");
|
||||
checkPropertyNotNull(bootstrapView, "bootstrapView");
|
||||
|
@@ -29,10 +29,7 @@ import org.alfresco.repo.importer.ImporterBootstrap;
|
||||
import org.alfresco.service.cmr.admin.PatchException;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.repository.StoreRef;
|
||||
import org.alfresco.service.cmr.search.SearchService;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.springframework.context.MessageSource;
|
||||
|
||||
@@ -62,9 +59,6 @@ public class SavedSearchFolderPatch extends AbstractPatch
|
||||
private static final String PROPERTY_ICON = "space-icon-default";
|
||||
|
||||
private ImporterBootstrap importerBootstrap;
|
||||
private NamespaceService namespaceService;
|
||||
private SearchService searchService;
|
||||
private NodeService nodeService;
|
||||
private MessageSource messageSource;
|
||||
|
||||
protected NodeRef dictionaryNodeRef;
|
||||
@@ -76,21 +70,6 @@ public class SavedSearchFolderPatch extends AbstractPatch
|
||||
this.importerBootstrap = importerBootstrap;
|
||||
}
|
||||
|
||||
public void setNamespaceService(NamespaceService namespaceService)
|
||||
{
|
||||
this.namespaceService = namespaceService;
|
||||
}
|
||||
|
||||
public void setSearchService(SearchService searchService)
|
||||
{
|
||||
this.searchService = searchService;
|
||||
}
|
||||
|
||||
public void setNodeService(NodeService nodeService)
|
||||
{
|
||||
this.nodeService = nodeService;
|
||||
}
|
||||
|
||||
public void setMessageSource(MessageSource messageSource)
|
||||
{
|
||||
this.messageSource = messageSource;
|
||||
|
Reference in New Issue
Block a user