* minor changes

This commit is contained in:
dhrn
2020-11-03 21:20:11 +05:30
parent 2933d45eff
commit d9de437e68
5 changed files with 10 additions and 3 deletions

3
.gitignore vendored
View File

@@ -35,3 +35,6 @@ target
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
*/alf_data

View File

@@ -72,9 +72,9 @@ public class SendModeratedInviteDelegate extends AbstractInvitationDelegate
Map<String, Object> variables = execution.getVariables();
String clientName = (String) variables.get(WorkflowModelModeratedInvitation.wfVarClientName);
ClientAppConfig.ClientApp clientApp = clientAppConfig.getClient(clientName);
if(clientApp != null)
if(clientName != null && clientAppConfig.getClient(clientName) != null)
{
ClientAppConfig.ClientApp clientApp = clientAppConfig.getClient(clientName);
final String path = clientApp.getProperty("inviteModeratedTemplatePath");
final String templatePath = emailHelper.getEmailTemplate(clientApp.getName(), path, EMAIL_TEMPLATE_REF);
invitationService.sendModeratedInvitation(invitationId, templatePath, EMAIL_SUBJECT_KEY, variables);

View File

@@ -47,7 +47,6 @@
<import resource="classpath:alfresco/notification-services-context.xml"/>
<import resource="classpath:alfresco/activities/activities-feed-context.xml" />
<import resource="classpath:alfresco/tagging-services-context.xml"/>
<import resource="classpath:alfresco/invitation-service-context.xml"/>
<import resource="classpath:alfresco/webdav-context.xml"/>
<import resource="classpath*:alfresco/patch/*-context.xml" />
<import resource="classpath*:alfresco/dbscripts/*-context.xml" />

View File

@@ -39,6 +39,7 @@
<import resource="classpath*:alfresco/domain/*-context.xml" />
<import resource="classpath*:alfresco/smartfolder-context.xml" />
<import resource="classpath*:alfresco/reset-password-context.xml" />
<import resource="classpath:alfresco/invitation-service-context.xml"/>
<import resource="classpath:alfresco/heartbeat/heartbeat-repo-collector-context.xml"/>
<import resource="classpath*:alfresco/enterprise/heartbeat/heartbeat-enterprise-repo-collector-context.xml" />
<import resource="classpath*:alfresco/deprecated-model-bootstrap-context.xml" />

View File

@@ -44,6 +44,8 @@ import junit.framework.TestCase;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.action.executer.MailActionExecuter;
import org.alfresco.repo.admin.SysAdminParams;
import org.alfresco.repo.admin.SysAdminParamsImpl;
import org.alfresco.repo.i18n.MessageService;
import org.alfresco.repo.invitation.WorkflowModelModeratedInvitation;
import org.alfresco.repo.invitation.activiti.SendModeratedInviteDelegate;
@@ -175,6 +177,7 @@ public class InviteModeratedSenderTest extends TestCase
SearchService mockSearchService = mockSearchService();
SiteService mockSiteService = mockSiteService();
FileFolderService mockFileFolderService = mockFileFolderService();
SysAdminParams sysAdminParams = new SysAdminParamsImpl();
ServiceRegistry services = mock(ServiceRegistry.class);
when(services.getActionService()).thenReturn(mockActionService);
@@ -183,6 +186,7 @@ public class InviteModeratedSenderTest extends TestCase
when(services.getSearchService()).thenReturn(mockSearchService);
when(services.getSiteService()).thenReturn(mockSiteService);
when(services.getFileFolderService()).thenReturn(mockFileFolderService);
when(services.getSysAdminParams()).thenReturn(sysAdminParams);
return services;
}