You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by aw...@apache.org on 2019/06/06 07:09:51 UTC

[fineract-cn-notifications] branch develop updated (857f39c -> 6250a32)

This is an automated email from the ASF dual-hosted git repository.

awasum pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-notifications.git.


    from 857f39c  Merge pull request #13 from ebenezergraham/FINCN-157
     new 6b136f4  Refactored the authentication process to use permitted-feign-client
     new e4e2585  Merge branch 'dev-merge' into permitted-feign-client-auth
     new 184aea0  Changed Notification Admin to OrgAdmin
     new f3deeaa  Added travis configurations
     new 1fba099  Merge branch 'develop' into permitted-feign-client-auth
     new 76e9930  Merge branch 'develop' into permitted-feign-client-auth
     new 76605f3  Merge branch 'develop' into permitted-feign-client-auth
     new c96fd87  Merge remote-tracking branch 'ebenezergraham/permitted-feign-client-auth' into permitted-feign-client-auth
     new da55668  Merge branch 'develop' into permitted-feign-client-auth
     new 7c85f01  Merge remote-tracking branch 'ebenezergraham/permitted-feign-client-auth' into permitted-feign-client-auth
     new 6250a32  Merge pull request #10 from ebenezergraham/permitted-feign-client-auth

The 36 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .gitignore                                         |  16 +--
 .travis.yml                                        |   3 +-
 NOTICE.txt                                         |   4 +-
 README.md                                          |   3 +-
 api/build.gradle                                   |   3 +-
 .../notification/api/v1/PermittableGroupIds.class  | Bin 261 -> 0 bytes
 .../api/v1/client/NotificationManager.class        | Bin 1940 -> 0 bytes
 .../api/v1/domain/EmailConfiguration.class         | Bin 4391 -> 0 bytes
 .../api/v1/domain/SMSConfiguration.class           | Bin 3305 -> 0 bytes
 .../api/v1/events/NotificationEventConstants.class | Bin 1609 -> 0 bytes
 .../notification/api/v1/PermittableGroupIds.java   |   5 +
 .../v1/client/ConfigurationNotFoundException.java  |   8 +-
 .../api/v1/client/NotificationManager.java         |  51 ++++++--
 .../api/v1/domain/EmailConfiguration.java          |   4 +-
 .../api/v1/domain/SMSConfiguration.java            |   2 +-
 .../api/v1/events/NotificationEventConstants.java  |  22 +++-
 component-test/build.gradle                        |  16 ++-
 .../cn/notification/AbstractNotificationTest.java  |  18 ++-
 .../cn/notification/EmailApiDocumentation.java     |  81 ++++++++++--
 .../cn/notification/SmsApiDocumentation.java       |  94 ++++++++++----
 .../cn/notification/SuiteTestEnvironment.java      |   2 +
 .../fineract/cn/notification/TestEmailService.java |  64 +++++-----
 .../fineract/cn/notification/TestSMSService.java   |  68 +++++-----
 .../apache/fineract/cn/notification/TestSuite.java |   2 +
 .../cn/notification/listener/EventListener.java    | 103 +++++++++++++++
 .../listener/NotificationEventListener.java        |  60 ---------
 .../notification/util/DomainObjectGenerator.java   |  18 +--
 gradle/wrapper/gradle-wrapper.jar                  | Bin 54212 -> 54212 bytes
 gradle/wrapper/gradle-wrapper.properties           |   2 +-
 service/build.gradle                               |   1 +
 service/out/production/resources/application.yml   |  88 -------------
 service/out/production/resources/bootstrap.yml     |  22 ----
 .../db/migrations/mariadb/V1__initial_setup.sql    |  56 ---------
 .../service/NotificationApplication.java           |   1 +
 .../cn/notification/service/ServiceConstants.java  |  11 ++
 ...nCommand.java => DeleteApplicationCommand.java} |  45 ++++---
 ...d.java => DeleteEmailConfigurationCommand.java} |  10 +-
 ...and.java => DeleteSMSConfigurationCommand.java} |  10 +-
 ...ionCommand.java => SaveApplicationCommand.java} |  45 ++++---
 ...d.java => UpdateEmailConfigurationCommand.java} |   6 +-
 ...and.java => UpdateSMSConfigurationCommand.java} |   6 +-
 ...gregate.java => ApplicationCommandHandler.java} |  42 ++++---
 ....java => EmailConfigurationCommandHandler.java} |  30 ++++-
 ...Aggregate.java => MigrationCommandHandler.java} |  10 +-
 ...te.java => SMSConfigurationCommandHandler.java} |  26 +++-
 .../config}/NotificationConfiguration.java         |  18 ++-
 .../internal/config/NotificationProperties.java    |  69 +++++++++++
 .../internal/identity/CustomerPermittedClient.java |  46 +++++++
 .../identity/NotificationAuthentication.java       |  89 +++++++++++++
 .../internal/mapper/EmailConfigurationMapper.java  |   2 +-
 .../internal/repository/ApplicationEntity.java     | 106 ++++++++++++++++
 ...eRepository.java => ApplicationRepository.java} |   9 +-
 .../EmailGatewayConfigurationRepository.java       |   5 +
 .../SMSGatewayConfigurationRepository.java         |   5 +
 .../service/internal/service/EmailService.java     | 138 +++++++++++++++++----
 .../service/internal/service/EventHelper.java      |  49 ++++----
 .../internal/service/NotificationService.java      |  83 ++++---------
 .../service/internal/service/SMSService.java       |  91 ++++++++++----
 .../CustomerService.java}                          |   6 +-
 .../helperservice/NotificationAuthentication.java  |  60 ---------
 .../service/listener/CustomerEventListener.java    |  26 ++--
 .../service/listener/PortfolioEventListener.java   |  76 +++++++-----
 ...roller.java => EmailServiceRestController.java} |  97 +++++----------
 .../service/rest/NotificationRestController.java   |  94 --------------
 ...ntroller.java => SMSServiceRestController.java} | 107 ++++++----------
 service/src/main/resources/application.yml         |   7 +-
 .../db/migrations/mariadb/V1__initial_setup.sql    |  20 ++-
 .../mariadb/V2__sms_gateway_configurations.sql     |  20 ---
 .../mariadb/V3__email_gateway_configurations.sql   |  20 ---
 shared.gradle                                      |  40 +++---
 70 files changed, 1339 insertions(+), 1002 deletions(-)
 delete mode 100644 api/out/production/classes/org/apache/fineract/cn/notification/api/v1/PermittableGroupIds.class
 delete mode 100644 api/out/production/classes/org/apache/fineract/cn/notification/api/v1/client/NotificationManager.class
 delete mode 100644 api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/EmailConfiguration.class
 delete mode 100644 api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/SMSConfiguration.class
 delete mode 100644 api/out/production/classes/org/apache/fineract/cn/notification/api/v1/events/NotificationEventConstants.class
 create mode 100644 component-test/src/main/java/org/apache/fineract/cn/notification/listener/EventListener.java
 delete mode 100644 component-test/src/main/java/org/apache/fineract/cn/notification/listener/NotificationEventListener.java
 delete mode 100644 service/out/production/resources/application.yml
 delete mode 100644 service/out/production/resources/bootstrap.yml
 delete mode 100644 service/out/production/resources/db/migrations/mariadb/V1__initial_setup.sql
 copy service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/{CreateEmailConfigurationCommand.java => DeleteApplicationCommand.java} (54%)
 copy service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/{PostSMSCommand.java => DeleteEmailConfigurationCommand.java} (83%)
 rename service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/{PostSMSCommand.java => DeleteSMSConfigurationCommand.java} (84%)
 copy service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/{CreateEmailConfigurationCommand.java => SaveApplicationCommand.java} (54%)
 copy service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/{CreateEmailConfigurationCommand.java => UpdateEmailConfigurationCommand.java} (89%)
 copy service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/{CreateSMSConfigurationCommand.java => UpdateSMSConfigurationCommand.java} (89%)
 rename service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/{EventsAggregate.java => ApplicationCommandHandler.java} (55%)
 rename service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/{EmailConfigurationAggregate.java => EmailConfigurationCommandHandler.java} (57%)
 rename service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/{MigrationAggregate.java => MigrationCommandHandler.java} (88%)
 rename service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/{SMSConfigurationAggregate.java => SMSConfigurationCommandHandler.java} (63%)
 rename service/src/main/java/org/apache/fineract/cn/notification/service/{ => internal/config}/NotificationConfiguration.java (87%)
 create mode 100644 service/src/main/java/org/apache/fineract/cn/notification/service/internal/config/NotificationProperties.java
 create mode 100644 service/src/main/java/org/apache/fineract/cn/notification/service/internal/identity/CustomerPermittedClient.java
 create mode 100644 service/src/main/java/org/apache/fineract/cn/notification/service/internal/identity/NotificationAuthentication.java
 create mode 100644 service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/ApplicationEntity.java
 copy service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/{TemplateRepository.java => ApplicationRepository.java} (68%)
 copy component-test/src/main/java/org/apache/fineract/cn/notification/listener/MigrationEventListener.java => service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/EventHelper.java (50%)
 rename service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/{helperservice/CustomerAdaptor.java => externalServiceClients/CustomerService.java} (94%)
 delete mode 100644 service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/helperservice/NotificationAuthentication.java
 copy service/src/main/java/org/apache/fineract/cn/notification/service/rest/{NotificationRestController.java => EmailServiceRestController.java} (56%)
 copy service/src/main/java/org/apache/fineract/cn/notification/service/rest/{NotificationRestController.java => SMSServiceRestController.java} (53%)
 delete mode 100644 service/src/main/resources/db/migrations/mariadb/V2__sms_gateway_configurations.sql
 delete mode 100644 service/src/main/resources/db/migrations/mariadb/V3__email_gateway_configurations.sql


[fineract-cn-notifications] 28/36: Adding the DockerFile to the notification service

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

awasum pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-notifications.git

commit 4530fc017d399cdd0747f235e16fb62d4386678e
Author: ebenezergraham <eg...@alustudent.com>
AuthorDate: Wed May 29 20:25:42 2019 +0400

    Adding the DockerFile to the notification service
---
 .dockerignore | 17 +++++++++++++++++
 Dockerfile    | 31 +++++++++++++++++++++++++++++++
 shared.gradle |  3 ++-
 3 files changed, 50 insertions(+), 1 deletion(-)

diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000..8d88495
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,17 @@
+api/
+component-test/
+gradle/
+gradlew.bat
+LICENSE
+README.md
+settings.gradle
+build.gradle
+docs/
+gradlew
+HEADER
+NOTICE.txt
+service/
+.git/
+.gradle/
+.gitignore
+shared.gradle
\ No newline at end of file
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..fd34bc2
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,31 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+FROM openjdk:8-jdk-alpine
+
+ARG notification_port=2031
+
+ENV server.max-http-header-size=16384 \
+    cassandra.clusterName="Test Cluster" \
+    server.port=$notification_port \
+    system.initialclientid=service-runner
+
+WORKDIR /tmp
+COPY notification-service-boot-0.1.0-BUILD-SNAPSHOT.jar .
+
+CMD ["java", "-jar", "notification-service-boot-0.1.0-BUILD-SNAPSHOT.jar"]
diff --git a/shared.gradle b/shared.gradle
index 3cdcce8..033a13f 100644
--- a/shared.gradle
+++ b/shared.gradle
@@ -120,7 +120,8 @@ rat {
             "**/build/**",
             "gradlew",
             "gradlew.bat",
-            "README.md"
+            "README.md",
+            ".dockerignore"
     ]
 }
 


[fineract-cn-notifications] 08/36: update to testSample

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

awasum pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-notifications.git

commit 75d298aed0d5d4621a0f098a20316e184c6777ab
Author: Ebenezer Graham <eg...@alustudent.com>
AuthorDate: Fri Jun 15 00:35:33 2018 +0400

    update to testSample
---
 .../src/main/java/org/apache/fineract/cn/notification/TestSample.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/TestSample.java b/component-test/src/main/java/org/apache/fineract/cn/notification/TestSample.java
index cc39439..3b2811e 100644
--- a/component-test/src/main/java/org/apache/fineract/cn/notification/TestSample.java
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/TestSample.java
@@ -21,11 +21,11 @@ package org.apache.fineract.cn.notification;
 import org.apache.fineract.cn.notification.api.v1.client.NotificationManager;
 import org.apache.fineract.cn.notification.api.v1.domain.Sample;
 import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
-import com.amazonaws.services.autoscaling.model.NotificationConfiguration;
 import java.util.List;
 import org.apache.commons.lang3.RandomStringUtils;
 import org.apache.fineract.cn.anubis.test.v1.TenantApplicationSecurityEnvironmentTestRule;
 import org.apache.fineract.cn.api.context.AutoUserContext;
+import org.apache.fineract.cn.notification.service.NotificationConfiguration;
 import org.apache.fineract.cn.test.fixture.TenantDataStoreContextTestRule;
 import org.apache.fineract.cn.test.listener.EnableEventRecording;
 import org.apache.fineract.cn.test.listener.EventRecorder;


[fineract-cn-notifications] 16/36: Creates unit and component test for domains and services respectively

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

awasum pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-notifications.git

commit 6b1b5f7c568c5c874d2dfff854d148b9d7284308
Author: Ebenezer Graham <eg...@alustudent.com>
AuthorDate: Mon Sep 10 18:55:33 2018 +0400

    Creates unit and component test for domains and services respectively
    
    Unit and component Tests,Rest and command
    
    added dependencies to shared Gradle file
    
    Created  new group IDs for SMS and Email management
    
    Added creation and finding operations to the client manager
    
    Created modified Email and SMS configuration domain objects
    
    Created SMS and Email pages to support fims operations
    
    Created Post and Get Constants for creating and retrieving Configuration entitiies
    
    Created Unit tests for Email and SMS confiurations objects
    
    Created component tests to test SMS and Email services
    
    Created Domain Object Generator to help with testing
    
    Created Command and command handlers, created mappers and refactored repositories
    
    Grouped the Email and SMS service inside the notification service
    
    Created SQL scripts the repository and added sample configuration data
    
    removed sample class and other event listeners
    
    Delete system-analysis.mdj
    
    Delete .travis.yml
    
    changed active mq concurrency to 1-1 and added sanity checks in customerlistener
    
    formatted the code to use 2 line implementation and debugged SMS and Email Repository and Entities
    
    Added component tests
    
    refactored test sms
    
    testing porfolio triggers
    
    testing unsecured email sign in
    
    debugged tests and added address updated event
    
    Used operator for auth
    
    update
---
 .gitignore                                         |   10 +-
 .travis.yml                                        |   49 -
 .../notification/api/v1/PermittableGroupIds.class  |  Bin 328 -> 261 bytes
 .../api/v1/client/IamATeapotException.class        |  Bin 392 -> 0 bytes
 .../api/v1/client/NotificationManager.class        |  Bin 1474 -> 1940 bytes
 .../api/v1/domain/EmailConfiguration.class         |  Bin 3790 -> 4391 bytes
 .../notification/api/v1/domain/Notification.class  |  Bin 1820 -> 0 bytes
 .../api/v1/domain/SMSConfiguration.class           |  Bin 2972 -> 3305 bytes
 .../cn/notification/api/v1/domain/Sample.class     |  Bin 1752 -> 0 bytes
 .../api/v1/events/NotificationEventConstants.class |  Bin 666 -> 1609 bytes
 .../notification/api/v1/PermittableGroupIds.java   |    3 +-
 ...on.java => ConfigurationNotFoundException.java} |    9 +-
 .../api/v1/client/NotificationManager.java         |   80 +-
 .../api/v1/domain/EmailConfiguration.java          |  283 +-
 .../cn/notification/api/v1/domain/EmailPage.java   |   81 +
 .../cn/notification/api/v1/domain/Event.java       |   69 +
 .../api/v1/domain/SMSConfiguration.java            |  202 +-
 .../cn/notification/api/v1/domain/SMSPage.java     |   81 +
 .../cn/notification/api/v1/domain/Sample.java      |   72 -
 .../api/v1/events/NotificationEventConstants.java  |   30 +-
 ...SampleTest.java => EmailConfigurationTest.java} |   69 +-
 .../domain/{SampleTest.java => EmailPageTest.java} |   71 +-
 .../v1/domain/{SampleTest.java => EventTest.java}  |   59 +-
 .../api/v1/domain/SMSConfigurationTest.java        |   65 +
 .../domain/{SampleTest.java => SMSPageTest.java}   |   66 +-
 .../cn/notification/api/v1/domain}/TestSuite.java  |   11 +-
 component-test/build.gradle                        |    2 +-
 .../cn/notification/SuiteTestEnvironment.java      |   24 +-
 .../fineract/cn/notification/TestEmailService.java |   96 +
 .../fineract/cn/notification/TestNotification.java |  112 +
 .../fineract/cn/notification/TestSMSService.java   |  102 +
 .../fineract/cn/notification/TestSample.java       |  137 -
 .../apache/fineract/cn/notification/TestSuite.java |    4 +-
 .../listener/MigrationEventListener.java           |   36 +-
 ...istener.java => NotificationEventListener.java} |   48 +-
 .../notification/util/DomainObjectGenerator.java   |   53 +
 service/build.gradle                               |   15 +-
 service/out/production/resources/application.yml   |   26 +-
 .../db/migrations/mariadb/V1__initial_setup.sql    |   74 +-
 .../service/NotificationApplication.java           |   16 +-
 .../service/NotificationConfiguration.java         |  131 +-
 .../cn/notification/service/ServiceConstants.java  |    9 +-
 ...d.java => CreateEmailConfigurationCommand.java} |   40 +-
 ...and.java => CreateSMSConfigurationCommand.java} |   40 +-
 .../internal/command/InitializeServiceCommand.java |   18 +-
 .../{SampleCommand.java => PostSMSCommand.java}    |   40 +-
 .../handler/EmailConfigurationAggregate.java       |   57 +
 .../internal/command/handler/EventsAggregate.java  |   49 +
 .../command/handler/MigrationAggregate.java        |   63 +-
 .../command/handler/SMSConfigurationAggregate.java |   56 +
 .../internal/command/handler/SampleAggregate.java  |   68 -
 .../internal/mapper/EmailConfigurationMapper.java  |   59 +-
 .../internal/mapper/SMSConfigurationMapper.java    |   50 +-
 .../service/internal/mapper/SampleMapper.java      |   46 -
 .../repository/EmailGatewayConfiguration.java      |  124 -
 .../EmailGatewayConfigurationEntity.java           |  134 +
 .../EmailGatewayConfigurationRepository.java       |    9 +-
 .../repository/SMSGatewayConfiguration.java        |   94 -
 .../repository/SMSGatewayConfigurationEntity.java  |   94 +
 .../SMSGatewayConfigurationRepository.java         |    9 +-
 .../internal/repository/SampleJpaEntity.java       |   64 -
 .../internal/repository/TemplateEntity.java        |  102 +
 ...tityRepository.java => TemplateRepository.java} |    7 +-
 .../service/internal/service/EmailSender.java      |   60 -
 .../service/internal/service/EmailService.java     |   79 +
 .../internal/service/NotificationService.java      |  118 +
 .../service/internal/service/SMSSender.java        |   57 -
 .../service/internal/service/SMSService.java       |   68 +
 .../service/internal/service/SampleService.java    |   48 -
 .../service/helperservice/CustomerAdaptor.java     |   55 +
 .../helperservice/NotificationAuthentication.java  |   60 +
 .../service/listener/AccountingEventListener.java  |  124 -
 .../service/listener/ChequeEventListener.java      |   85 -
 .../service/listener/CustomerEventListener.java    |  515 ++-
 .../service/listener/DepositEventListener.java     |   61 -
 .../service/listener/IdentityEventListener.java    |   87 -
 .../service/listener/OfficeEventListener.java      |  137 -
 .../service/listener/PayrollEventListener.java     |   61 -
 .../service/listener/PortfolioEventListener.java   |  252 +-
 .../service/listener/TellerEventListener.java      |  146 -
 .../service/rest/NotificationRestController.java   |  219 +-
 service/src/main/resources/application.yml         |   23 +-
 .../db/migrations/mariadb/V1__initial_setup.sql    |   74 +-
 .../mariadb/V2__sms_gateway_configurations.sql     |   20 +
 .../mariadb/V3__email_gateway_configurations.sql   |   20 +
 service/src/main/resources/logback.xml             |   58 +
 shared.gradle                                      |    8 +-
 system-analysis.mdj                                | 4104 --------------------
 88 files changed, 3162 insertions(+), 6795 deletions(-)

diff --git a/.gitignore b/.gitignore
index 99b514a..3f7ccae 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,7 +2,13 @@
 .idea
 build/
 target/
-detail
+build/out
+service/out
+component-test/out
+api/out
+service/build
+component-test/build
+api/build
 
 # Ignore Gradle GUI config
 gradle-app.setting
@@ -15,3 +21,5 @@ gradle-app.setting
 *.log
 
 *.toDelete
+
+*.class
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 1ee78cd..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-language: java
-
-jdk: oraclejdk8
-
-sudo: enabled
-
-branches:
-  only:
-    - develop
-
-
-cache:
-  directories:
-  - $HOME/.m2
-
-install:
- - gradle install
-
-notifications:
-  email: true
-
-  deploy:
-    -
-      on:
-        branch: develop
-      provider: bintray
-      skip_cleanup: true
-      #file: target/bin/bintray.json
-      user: ebenezergraham
-      # key: $BINTRAY_API_KEY
\ No newline at end of file
diff --git a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/PermittableGroupIds.class b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/PermittableGroupIds.class
index a1dee5e..7f31257 100644
Binary files a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/PermittableGroupIds.class and b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/PermittableGroupIds.class differ
diff --git a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/client/IamATeapotException.class b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/client/IamATeapotException.class
deleted file mode 100644
index a197a0a..0000000
Binary files a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/client/IamATeapotException.class and /dev/null differ
diff --git a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/client/NotificationManager.class b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/client/NotificationManager.class
index 741d5f5..fb44545 100644
Binary files a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/client/NotificationManager.class and b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/client/NotificationManager.class differ
diff --git a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/EmailConfiguration.class b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/EmailConfiguration.class
index dd410b5..68d087d 100644
Binary files a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/EmailConfiguration.class and b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/EmailConfiguration.class differ
diff --git a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/Notification.class b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/Notification.class
deleted file mode 100644
index afe7f46..0000000
Binary files a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/Notification.class and /dev/null differ
diff --git a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/SMSConfiguration.class b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/SMSConfiguration.class
index f7e3f18..b0e8563 100644
Binary files a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/SMSConfiguration.class and b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/SMSConfiguration.class differ
diff --git a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/Sample.class b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/Sample.class
deleted file mode 100644
index 818a105..0000000
Binary files a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/Sample.class and /dev/null differ
diff --git a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/events/NotificationEventConstants.class b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/events/NotificationEventConstants.class
index 6b2a09d..0600369 100644
Binary files a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/events/NotificationEventConstants.class and b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/events/NotificationEventConstants.class differ
diff --git a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/PermittableGroupIds.java b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/PermittableGroupIds.java
index a854460..a5c9de2 100644
--- a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/PermittableGroupIds.java
+++ b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/PermittableGroupIds.java
@@ -20,6 +20,5 @@ package org.apache.fineract.cn.notification.api.v1;
 
 @SuppressWarnings("unused")
 public interface PermittableGroupIds {
-  String SAMPLE_MANAGEMENT = "notification__v1__samples";
-  String SELF_MANAGEMENT = "notification__v1__self";
+	String SELF_MANAGEMENT = "notification__v1__self";
 }
diff --git a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/client/IamATeapotException.java b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/client/ConfigurationNotFoundException.java
similarity index 80%
rename from api/src/main/java/org/apache/fineract/cn/notification/api/v1/client/IamATeapotException.java
rename to api/src/main/java/org/apache/fineract/cn/notification/api/v1/client/ConfigurationNotFoundException.java
index 9265ed4..4f5d185 100644
--- a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/client/IamATeapotException.java
+++ b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/client/ConfigurationNotFoundException.java
@@ -18,6 +18,11 @@
  */
 package org.apache.fineract.cn.notification.api.v1.client;
 
-@SuppressWarnings("WeakerAccess")
-public class IamATeapotException extends RuntimeException {
+import org.apache.fineract.cn.api.util.NotFoundException;
+
+public final class ConfigurationNotFoundException extends NotFoundException {
+	
+	public ConfigurationNotFoundException(String reason) {
+		super(reason);
+	}
 }
diff --git a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/client/NotificationManager.java b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/client/NotificationManager.java
index 6d0a7b1..b169cfd 100644
--- a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/client/NotificationManager.java
+++ b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/client/NotificationManager.java
@@ -18,42 +18,62 @@
  */
 package org.apache.fineract.cn.notification.api.v1.client;
 
-import org.apache.fineract.cn.notification.api.v1.domain.Sample;
-import java.util.List;
-import org.apache.fineract.cn.api.annotation.ThrowsException;
 import org.apache.fineract.cn.api.util.CustomFeignClientsConfiguration;
+import org.apache.fineract.cn.notification.api.v1.domain.EmailConfiguration;
+import org.apache.fineract.cn.notification.api.v1.domain.SMSConfiguration;
 import org.springframework.cloud.netflix.feign.FeignClient;
-import org.springframework.http.HttpStatus;
 import org.springframework.http.MediaType;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 
 @SuppressWarnings("unused")
-@FeignClient(value="notification-v1", path="/notification/v1", configuration = CustomFeignClientsConfiguration.class)
+@FeignClient(value = "notification-v1", path = "/notification/v1", configuration = CustomFeignClientsConfiguration.class)
 public interface NotificationManager {
-
-  @RequestMapping(
-          value = "/notification",
-          method = RequestMethod.GET,
-          produces = MediaType.ALL_VALUE,
-          consumes = MediaType.APPLICATION_JSON_VALUE
-  )
-  List<Sample> findAllEntities();
-
-  @RequestMapping(
-          value = "/notification/{identifier}",
-          method = RequestMethod.GET,
-          produces = MediaType.ALL_VALUE,
-          consumes = MediaType.APPLICATION_JSON_VALUE)
-  Sample getEntity(@PathVariable("identifier") final String identifier);
-
-  @RequestMapping(
-      value = "/notification",
-      method = RequestMethod.POST,
-      produces = MediaType.APPLICATION_JSON_VALUE,
-      consumes = MediaType.APPLICATION_JSON_VALUE
-  )
-  @ThrowsException(status = HttpStatus.I_AM_A_TEAPOT, exception = IamATeapotException.class)
-  void createEntity(final Sample sample);
-}
+	
+	@RequestMapping(
+			value = "/notification/sms/active",
+			method = RequestMethod.GET,
+			produces = MediaType.ALL_VALUE,
+			consumes = MediaType.APPLICATION_JSON_VALUE)
+	SMSConfiguration findAllActiveSMSConfigurationEntities();
+	
+	@RequestMapping(
+			value = "/notification/email/active",
+			method = RequestMethod.GET,
+			produces = MediaType.ALL_VALUE,
+			consumes = MediaType.APPLICATION_JSON_VALUE)
+	EmailConfiguration findAllActiveEmailConfigurationEntities();
+	
+	@RequestMapping(
+			value = "/notification/sms/create",
+			method = RequestMethod.POST,
+			produces = MediaType.APPLICATION_JSON_VALUE,
+			consumes = MediaType.APPLICATION_JSON_VALUE
+	)
+	void createSMSConfiguration(final SMSConfiguration smsConfiguration);
+	
+	@RequestMapping(
+			value = "/notification/email/create",
+			method = RequestMethod.POST,
+			produces = MediaType.APPLICATION_JSON_VALUE,
+			consumes = MediaType.APPLICATION_JSON_VALUE
+	)
+	void createEmailConfiguration(final EmailConfiguration emailConfiguration);
+	
+	@RequestMapping(
+			value = "/notification/sms/{identifier}",
+			method = RequestMethod.GET,
+			produces = MediaType.APPLICATION_JSON_VALUE,
+			consumes = MediaType.APPLICATION_JSON_VALUE
+	)
+	SMSConfiguration findSMSConfigurationByIdentifier(@PathVariable("identifier") final String identifier);
+	
+	@RequestMapping(
+			value = "/notification/email/{identifier}",
+			method = RequestMethod.GET,
+			produces = MediaType.APPLICATION_JSON_VALUE,
+			consumes = MediaType.APPLICATION_JSON_VALUE
+	)
+	EmailConfiguration findEmailConfigurationByIdentifier(@PathVariable("identifier") final String identifier);
+}
\ No newline at end of file
diff --git a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/EmailConfiguration.java b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/EmailConfiguration.java
index 24aa0dc..6b95afd 100644
--- a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/EmailConfiguration.java
+++ b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/EmailConfiguration.java
@@ -25,138 +25,153 @@ import java.util.Objects;
 
 @SuppressWarnings({"WeakerAccess", "unused"})
 public class EmailConfiguration {
-  @ValidIdentifier
-  private String identifier;
-  @Length(max = 512)
-  private String payload;
-  @Length(max = 512)
-  private String host;
-  @Length(max = 512)
-  private String port;
-  @Length(max = 512)
-  private String username;
-  @Length(max = 512)
-  private String app_id;
-  @Length(max = 512)
-  private String smtp_auth;
-  @Length(max = 512)
-  private String start_tls;
-  @Length(max = 512)
-  private String option;
-
-  public EmailConfiguration(){
-    super();
-  }
-
-  public static EmailConfiguration create (String identifier, String payload,
-                            String host, String port,
-                            String username, String app_id,
-                            String smtp_auth, String start_tls,
-                            String option) {
-    EmailConfiguration emailConfiguration = new EmailConfiguration();
-    emailConfiguration.setIdentifier(identifier);
-    emailConfiguration.setPayload(payload);
-    emailConfiguration.setHost(host);
-    emailConfiguration.setPort(port);
-    emailConfiguration.setUsername(username);
-    emailConfiguration.setApp_id(app_id);
-    emailConfiguration.setSmtp_auth(smtp_auth);
-    emailConfiguration.setStart_tls(start_tls);
-    emailConfiguration.setOption(option);
-    return emailConfiguration;
-  }
-
-  public String getIdentifier() {
-    return identifier;
-  }
-
-  public void setIdentifier(String identifier) {
-    this.identifier = identifier;
-  }
-
-  public String getPayload() {
-    return payload;
-  }
-
-  public void setPayload(String payload) {
-    this.payload = payload;
-  }
-
-  public String getHost() {
-    return host;
-  }
-
-  public void setHost(String host) {
-    this.host = host;
-  }
-
-  public String getPort() {
-    return port;
-  }
-
-  public void setPort(String port) {
-    this.port = port;
-  }
-
-  public String getUsername() {
-    return username;
-  }
-
-  public void setUsername(String username) {
-    this.username = username;
-  }
-
-  public String getApp_id() {
-    return app_id;
-  }
-
-  public void setApp_id(String app_id) {
-    this.app_id = app_id;
-  }
-
-  public String getSmtp_auth() {
-    return smtp_auth;
-  }
-
-  public void setSmtp_auth(String smtp_auth) {
-    this.smtp_auth = smtp_auth;
-  }
-
-  public String getStart_tls() {
-    return start_tls;
-  }
-
-  public void setStart_tls(String start_tls) {
-    this.start_tls = start_tls;
-  }
-
-  public String getOption() {
-    return option;
-  }
-
-  public void setOption(String option) {
-    this.option = option;
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    if (this == o) return true;
-    if (o == null || getClass() != o.getClass()) return false;
-    EmailConfiguration that = (EmailConfiguration) o;
-    return Objects.equals(identifier, that.identifier) &&
-            Objects.equals(payload, that.payload) &&
-            Objects.equals(host, that.host) &&
-            Objects.equals(port, that.port) &&
-            Objects.equals(username, that.username) &&
-            Objects.equals(app_id, that.app_id) &&
-            Objects.equals(smtp_auth, that.smtp_auth) &&
-            Objects.equals(start_tls, that.start_tls) &&
-            Objects.equals(option, that.option);
-  }
-
-  @Override
-  public int hashCode() {
-    return Objects.hash(identifier, payload, host, port, username,
-            app_id, smtp_auth, start_tls, option);
-  }
+	@ValidIdentifier
+	@Length(max = 11)
+	private String identifier;
+	@Length(max = 45)
+	private String host;
+	@Length(max = 45)
+	private String port;
+	@Length(max = 45)
+	private String protocol;
+	@Length(max = 45)
+	private String username;
+	@Length(max = 255)
+	private String app_password;
+	@Length(max = 45)
+	private String smtp_auth;
+	@Length(max = 45)
+	private String start_tls;
+	@Length(max = 45)
+	private String state;
+	
+	public EmailConfiguration() {
+		super();
+	}
+	
+	public static EmailConfiguration create(String identifier,
+	                                        String host, String port,
+	                                        String protocol, String username,
+	                                        String app_password, String smtp_auth,
+	                                        String start_tls, String state) {
+		EmailConfiguration emailConfiguration = new EmailConfiguration();
+		emailConfiguration.setIdentifier(identifier);
+		emailConfiguration.setHost(host);
+		emailConfiguration.setPort(port);
+		emailConfiguration.setProtocol(protocol);
+		emailConfiguration.setUsername(username);
+		emailConfiguration.setApp_password(app_password);
+		emailConfiguration.setSmtp_auth(smtp_auth);
+		emailConfiguration.setStart_tls(start_tls);
+		emailConfiguration.setState(state);
+		return emailConfiguration;
+	}
+	
+	public String getIdentifier() {
+		return identifier;
+	}
+	
+	public void setIdentifier(String identifier) {
+		this.identifier = identifier;
+	}
+	
+	public String getHost() {
+		return host;
+	}
+	
+	public void setHost(String host) {
+		this.host = host;
+	}
+	
+	public String getPort() {
+		return port;
+	}
+	
+	public void setPort(String port) {
+		this.port = port;
+	}
+	
+	public String getProtocol() {
+		return protocol;
+	}
+	
+	public void setProtocol(String protocol) {
+		this.protocol = protocol;
+	}
+	
+	public String getUsername() {
+		return username;
+	}
+	
+	public void setUsername(String username) {
+		this.username = username;
+	}
+	
+	public String getApp_password() {
+		return app_password;
+	}
+	
+	public void setApp_password(String app_password) {
+		this.app_password = app_password;
+	}
+	
+	public String getSmtp_auth() {
+		return smtp_auth;
+	}
+	
+	public void setSmtp_auth(String smtp_auth) {
+		this.smtp_auth = smtp_auth;
+	}
+	
+	public String getStart_tls() {
+		return start_tls;
+	}
+	
+	public void setStart_tls(String start_tls) {
+		this.start_tls = start_tls;
+	}
+	
+	public String getState() {
+		return state;
+	}
+	
+	public void setState(String state) {
+		this.state = state;
+	}
+	
+	@Override
+	public boolean equals(Object o) {
+		if (this == o) return true;
+		if (o == null || getClass() != o.getClass()) return false;
+		EmailConfiguration that = (EmailConfiguration) o;
+		return Objects.equals(identifier, that.identifier) &&
+				Objects.equals(host, that.host) &&
+				Objects.equals(port, that.port) &&
+				Objects.equals(protocol, that.protocol) &&
+				Objects.equals(username, that.username) &&
+				Objects.equals(app_password, that.app_password) &&
+				Objects.equals(smtp_auth, that.smtp_auth) &&
+				Objects.equals(start_tls, that.start_tls) &&
+				Objects.equals(state, that.state);
+	}
+	
+	@Override
+	public int hashCode() {
+		return Objects.hash(identifier, host, port, protocol, username, app_password, smtp_auth, start_tls, state);
+	}
+	
+	@Override
+	public String toString() {
+		return "EmailConfiguration{" +
+				"identifier='" + identifier + '\'' +
+				", host='" + host + '\'' +
+				", port='" + port + '\'' +
+				", protocol='" + protocol + '\'' +
+				", username='" + username + '\'' +
+				", app_password='" + app_password + '\'' +
+				", smtp_auth='" + smtp_auth + '\'' +
+				", start_tls='" + start_tls + '\'' +
+				", state='" + state + '\'' +
+				'}';
+	}
 }
diff --git a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/EmailPage.java b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/EmailPage.java
new file mode 100644
index 0000000..f57ee35
--- /dev/null
+++ b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/EmailPage.java
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.api.v1.domain;
+
+import java.util.List;
+import java.util.Objects;
+
+public class EmailPage {
+	
+	private List<EmailConfiguration> emailConfigurations;
+	private Integer totalPages;
+	private Long totalElements;
+	
+	public EmailPage() {
+		super();
+	}
+	
+	public List<EmailConfiguration> getEmailConfiguration() {
+		return this.emailConfigurations;
+	}
+	
+	public void setEmailConfiguration(final List<EmailConfiguration> emailConfiguration) {
+		this.emailConfigurations = emailConfigurations;
+	}
+	
+	public Integer getTotalPages() {
+		return this.totalPages;
+	}
+	
+	public void setTotalPages(final Integer totalPages) {
+		this.totalPages = totalPages;
+	}
+	
+	public Long getTotalElements() {
+		return this.totalElements;
+	}
+	
+	public void setTotalElements(final Long totalElements) {
+		this.totalElements = totalElements;
+	}
+	
+	@Override
+	public boolean equals(Object o) {
+		if (this == o) return true;
+		if (o == null || getClass() != o.getClass()) return false;
+		EmailPage emailPage = (EmailPage) o;
+		return Objects.equals(emailConfigurations, emailPage.emailConfigurations) &&
+				Objects.equals(totalPages, emailPage.totalPages) &&
+				Objects.equals(totalElements, emailPage.totalElements);
+	}
+	
+	@Override
+	public int hashCode() {
+		return Objects.hash(emailConfigurations, totalPages, totalElements);
+	}
+	
+	@Override
+	public String toString() {
+		return "EmailPage{" +
+				"emailConfigurations=" + emailConfigurations +
+				", totalPages=" + totalPages +
+				", totalElements=" + totalElements +
+				'}';
+	}
+}
diff --git a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/Event.java b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/Event.java
new file mode 100644
index 0000000..cb3fc5f
--- /dev/null
+++ b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/Event.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.api.v1.domain;
+/*
+ebenezergraham created on 8/19/18
+*/
+
+import java.util.Objects;
+
+public class Event {
+	private final String identifier;
+	private boolean enabled;
+	
+	public Event(String identifier, boolean enabled) {
+		super();
+		this.identifier = identifier;
+		this.enabled = enabled;
+	}
+	
+	public String getIdentifier() {
+		return identifier;
+	}
+	
+	public boolean isEnabled() {
+		return enabled;
+	}
+	
+	public void setEnabled(boolean state) {
+		this.enabled = state;
+	}
+	
+	@Override
+	public boolean equals(Object o) {
+		if (this == o) return true;
+		if (o == null || getClass() != o.getClass()) return false;
+		Event event = (Event) o;
+		return enabled == event.enabled &&
+				Objects.equals(identifier, event.identifier);
+	}
+	
+	@Override
+	public int hashCode() {
+		return Objects.hash(identifier, enabled);
+	}
+	
+	@Override
+	public String toString() {
+		return "Event{" +
+				"identifier='" + identifier + '\'' +
+				", enabled=" + enabled +
+				'}';
+	}
+}
diff --git a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/SMSConfiguration.java b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/SMSConfiguration.java
index cef7f57..dd76852 100644
--- a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/SMSConfiguration.java
+++ b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/SMSConfiguration.java
@@ -25,98 +25,112 @@ import java.util.Objects;
 
 @SuppressWarnings({"WeakerAccess", "unused"})
 public class SMSConfiguration {
-  @ValidIdentifier
-  private String identifier;
-  @Length(max = 512)
-  private String payload;
-  @Length(max = 512)
-  private String organisation;
-  @Length(max = 512)
-  private String auth_token;
-  @Length(max = 512)
-  private String accountid;
-  @Length(max = 256)
-  private String option;
-
-  public SMSConfiguration() {
-    super();
-  }
-
-  public static SMSConfiguration create(String identifier, String payload, String organisation, String auth_token, String accountid, String option) {
-    SMSConfiguration smsconfiguration = new SMSConfiguration();
-    smsconfiguration.setIdentifier(identifier);
-    smsconfiguration.setPayload(payload);
-    smsconfiguration.setOrganisation(organisation);
-    smsconfiguration.setAuth_token(auth_token);
-    smsconfiguration.setAccountid(accountid);
-    smsconfiguration.setOption(option);
-    return smsconfiguration;
-  }
-
-  public String getIdentifier() {
-    return identifier;
-  }
-
-  public void setIdentifier(String identifier) {
-    this.identifier = identifier;
-  }
-
-  public String getPayload() {
-    return payload;
-  }
-
-  public void setPayload(String payload) {
-    this.payload = payload;
-  }
-
-  public String getOrganisation() {
-    return organisation;
-  }
-
-  public void setOrganisation(String organisation) {
-    this.organisation = organisation;
-  }
-
-  public String getAuth_token() {
-    return auth_token;
-  }
-
-  public void setAuth_token(String auth_token) {
-    this.auth_token = auth_token;
-  }
-
-  public String getAccountid() {
-    return accountid;
-  }
-
-  public void setAccountid(String accountid) {
-    this.accountid = accountid;
-  }
-
-  public String getOption() {
-    return option;
-  }
-
-  public void setOption(String option) {
-    this.option = option;
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    if (this == o) return true;
-    if (o == null || getClass() != o.getClass()) return false;
-    SMSConfiguration that = (SMSConfiguration) o;
-    return Objects.equals(identifier, that.identifier) &&
-            Objects.equals(payload, that.payload) &&
-            Objects.equals(organisation, that.organisation) &&
-            Objects.equals(auth_token, that.auth_token) &&
-            Objects.equals(accountid, that.accountid) &&
-            Objects.equals(option, that.option);
-  }
-
-  @Override
-  public int hashCode() {
-
-    return Objects.hash(identifier, payload, organisation, auth_token, accountid, option);
-  }
+	@ValidIdentifier
+	@Length(max = 45)
+	private String identifier;
+	@Length(max = 255)
+	private String auth_token;
+	@Length(max = 255)
+	private String account_sid;
+	@Length(max = 45)
+	private String sender_number;
+	@Length(max = 45)
+	private String state;
+	
+	public SMSConfiguration() {
+		super();
+	}
+	
+	public static SMSConfiguration create(String identifier,
+	                                      String auth_token,
+	                                      String account_sid,
+	                                      String sender_number,
+	                                      String state) {
+		SMSConfiguration smsconfiguration = new SMSConfiguration();
+		smsconfiguration.setIdentifier(identifier);
+		smsconfiguration.setAuth_token(auth_token);
+		smsconfiguration.setAccount_sid(account_sid);
+		smsconfiguration.setSender_number(sender_number);
+		smsconfiguration.setState(state);
+		return smsconfiguration;
+	}
+	
+	public String getIdentifier() {
+		return identifier;
+	}
+	
+	public void setIdentifier(String identifier) {
+		this.identifier = identifier;
+	}
+	
+	public String getAuth_token() {
+		return auth_token;
+	}
+	
+	public void setAuth_token(String auth_token) {
+		this.auth_token = auth_token;
+	}
+	
+	public String getAccount_sid() {
+		return account_sid;
+	}
+	
+	public void setAccount_sid(String account_sid) {
+		this.account_sid = account_sid;
+	}
+	
+	public String getSender_number() {
+		return sender_number;
+	}
+	
+	public void setSender_number(String sender_number) {
+		this.sender_number = sender_number;
+	}
+	
+	public String getState() {
+		return state;
+	}
+	
+	public void setState(String state) {
+		this.state = state;
+	}
+	
+	public String getType() {
+		return null;
+	}
+	
+	@Override
+	public boolean equals(Object o) {
+		if (this == o) return true;
+		if (o == null || getClass() != o.getClass()) return false;
+		SMSConfiguration that = (SMSConfiguration) o;
+		return Objects.equals(identifier, that.identifier) &&
+				Objects.equals(auth_token, that.auth_token) &&
+				Objects.equals(account_sid, that.account_sid) &&
+				Objects.equals(state, that.state);
+	}
+	
+	@Override
+	public int hashCode() {
+		return Objects.hash(identifier, auth_token, auth_token, account_sid, state);
+	}
+	
+	@Override
+	public String toString() {
+		return "SMSConfiguration{" +
+				"identifier='" + identifier + '\'' +
+				", auth_token='" + auth_token + '\'' +
+				", account_sid='" + account_sid + '\'' +
+				", sender_number='" + sender_number + '\'' +
+				", state='" + state + '\'' +
+				'}';
+	}
+	
+	private enum State {
+		ACTIVE,
+		DEACTIVATED;
+		
+		State() {
+		}
+	}
 }
diff --git a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/SMSPage.java b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/SMSPage.java
new file mode 100644
index 0000000..9e7ef8d
--- /dev/null
+++ b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/SMSPage.java
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.api.v1.domain;
+
+import java.util.List;
+import java.util.Objects;
+
+public class SMSPage {
+	
+	private List<SMSConfiguration> smsConfigurations;
+	private Integer totalPages;
+	private Long totalElements;
+	
+	public SMSPage() {
+		super();
+	}
+	
+	public List<SMSConfiguration> getSmsConfigurations() {
+		return this.smsConfigurations;
+	}
+	
+	public void setSmsConfigurations(final List<SMSConfiguration> smsConfigurations) {
+		this.smsConfigurations = smsConfigurations;
+	}
+	
+	public Integer getTotalPages() {
+		return this.totalPages;
+	}
+	
+	public void setTotalPages(final Integer totalPages) {
+		this.totalPages = totalPages;
+	}
+	
+	public Long getTotalElements() {
+		return this.totalElements;
+	}
+	
+	public void setTotalElements(final Long totalElements) {
+		this.totalElements = totalElements;
+	}
+	
+	@Override
+	public boolean equals(Object o) {
+		if (this == o) return true;
+		if (o == null || getClass() != o.getClass()) return false;
+		SMSPage smsPage = (SMSPage) o;
+		return Objects.equals(smsConfigurations, smsPage.smsConfigurations) &&
+				Objects.equals(totalPages, smsPage.totalPages) &&
+				Objects.equals(totalElements, smsPage.totalElements);
+	}
+	
+	@Override
+	public int hashCode() {
+		return Objects.hash(smsConfigurations, totalPages, totalElements);
+	}
+	
+	@Override
+	public String toString() {
+		return "SMSPage{" +
+				"smsConfigurations=" + smsConfigurations +
+				", totalPages=" + totalPages +
+				", totalElements=" + totalElements +
+				'}';
+	}
+}
diff --git a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/Sample.java b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/Sample.java
deleted file mode 100644
index 644dda9..0000000
--- a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/Sample.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.fineract.cn.notification.api.v1.domain;
-
-import java.util.Objects;
-import org.apache.fineract.cn.lang.validation.constraints.ValidIdentifier;
-import org.hibernate.validator.constraints.Length;
-
-@SuppressWarnings({"WeakerAccess", "unused"})
-public class Sample {
-  @ValidIdentifier
-  private String identifier;
-  @Length(max = 512)
-  private String payload;
-
-  public Sample() {
-    super();
-  }
-
-  public static Sample create(final String identifier, final String payload) {
-    final Sample sample = new Sample();
-    sample.setIdentifier(identifier);
-    sample.setPayload(payload);
-    return sample;
-  }
-
-  public String getIdentifier() {
-    return this.identifier;
-  }
-
-  public void setIdentifier(final String identifier) {
-    this.identifier = identifier;
-  }
-
-  public String getPayload() {
-    return payload;
-  }
-
-  public void setPayload(String payload) {
-    this.payload = payload;
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    if (this == o) return true;
-    if (o == null || getClass() != o.getClass()) return false;
-    Sample sample = (Sample) o;
-    return Objects.equals(identifier, sample.identifier) &&
-            Objects.equals(payload, sample.payload);
-  }
-
-  @Override
-  public int hashCode() {
-    return Objects.hash(identifier, payload);
-  }
-}
diff --git a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/events/NotificationEventConstants.java b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/events/NotificationEventConstants.java
index 39c6eb0..f4d1be1 100644
--- a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/events/NotificationEventConstants.java
+++ b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/events/NotificationEventConstants.java
@@ -20,12 +20,26 @@ package org.apache.fineract.cn.notification.api.v1.events;
 
 @SuppressWarnings("unused")
 public interface NotificationEventConstants {
-
-    String DESTINATION = "notification-v1";
-    String SELECTOR_NAME = "action";
-    String INITIALIZE = "initialize";
-    String POST_SAMPLE = "post-sample";
-    String SELECTOR_INITIALIZE = SELECTOR_NAME + " = '" + INITIALIZE + "'";
-    String SELECTOR_POST_SAMPLE = SELECTOR_NAME + " = '" + POST_SAMPLE + "'";
-
+	
+	String DESTINATION = "notification-v1";
+	String SELECTOR_NAME = "action";
+	String INITIALIZE = "initialize";
+	
+	String POST_SMS_CONFIGURATION = "post-sms-configuration";
+	String POST_EMAIL_CONFIGURATION = "post-email-configuration";
+	String POST_SMS_NOTIFICATION = "post-sms-notification";
+	String POST_EMAIL_NOTIFICATION = "post-email-notification";
+	
+	String POST_ENABLE_CUSTOMER_CREATED_EVENT = "post-enable-customer-created-event";
+	String POST_ENABLE_CUSTOMER_UPDATED_EVENT = "post-enable-customer-updated-event";
+	String POST_ENABLE_CUSTOMER_CLOSED_EVENT = "post-enable-customer-closed-event";
+	String POST_ENABLE_CUSTOMER_LOCKED_EVENT = "post-enable-customer-locked-event";
+	String POST_ENABLE_CUSTOMER_ACTIVATED_EVENT = "post-enable-customer-activated-event";
+	String POST_ENABLE_CUSTOMER__EVENT = "post-enable-customer--event";
+	
+	String SELECTOR_INITIALIZE = SELECTOR_NAME + " = '" + INITIALIZE + "'";
+	String SELECTOR_POST_SMS_CONFIGURATION = SELECTOR_NAME + " = '" + POST_SMS_CONFIGURATION + "'";
+	String SELECTOR_POST_EMAIL_CONFIGURATION = SELECTOR_NAME + " = '" + POST_EMAIL_CONFIGURATION + "'";
+	String SELECTOR_POST_SMS_NOTIFICATION = SELECTOR_NAME + " = '" + POST_SMS_NOTIFICATION + "'";
+	String SELECTOR_POST_EMAIL_NOTIFICATION = SELECTOR_NAME + " = '" + POST_EMAIL_NOTIFICATION + "'";
 }
diff --git a/api/src/test/java/org/apache/fineract/cn/notification/api/v1/domain/SampleTest.java b/api/src/test/java/org/apache/fineract/cn/notification/api/v1/domain/EmailConfigurationTest.java
similarity index 51%
copy from api/src/test/java/org/apache/fineract/cn/notification/api/v1/domain/SampleTest.java
copy to api/src/test/java/org/apache/fineract/cn/notification/api/v1/domain/EmailConfigurationTest.java
index 65cd1ac..294877a 100644
--- a/api/src/test/java/org/apache/fineract/cn/notification/api/v1/domain/SampleTest.java
+++ b/api/src/test/java/org/apache/fineract/cn/notification/api/v1/domain/EmailConfigurationTest.java
@@ -18,40 +18,47 @@
  */
 package org.apache.fineract.cn.notification.api.v1.domain;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import org.apache.commons.lang.RandomStringUtils;
 import org.apache.fineract.cn.test.domain.ValidationTest;
 import org.apache.fineract.cn.test.domain.ValidationTestCase;
 import org.junit.runners.Parameterized;
 
-public class SampleTest extends ValidationTest<Sample> {
-
-  public SampleTest(ValidationTestCase<Sample> testCase) {
-    super(testCase);
-  }
-
-  @Override
-  protected Sample createValidTestSubject() {
-    return Sample.create("xxxx", "yyy");
-  }
-
-  @Parameterized.Parameters
-  public static Collection testCases() {
-    final Collection<ValidationTestCase> ret = new ArrayList<>();
-    ret.add(new ValidationTestCase<Sample>("basicCase")
-            .adjustment(x -> {})
-            .valid(true));
-    ret.add(new ValidationTestCase<Sample>("nullIdentifier")
-            .adjustment(x -> x.setIdentifier(null))
-            .valid(false));
-    ret.add(new ValidationTestCase<Sample>("tooShortIdentifier")
-            .adjustment(x -> x.setIdentifier("z"))
-            .valid(false));
-    ret.add(new ValidationTestCase<Sample>("tooLongPayload")
-            .adjustment(x -> x.setPayload(RandomStringUtils.randomAlphanumeric(513)))
-            .valid(false));
-    return ret;
-  }
+import java.util.ArrayList;
+import java.util.Collection;
 
+public class EmailConfigurationTest extends ValidationTest<EmailConfiguration> {
+	
+	public EmailConfigurationTest(ValidationTestCase<EmailConfiguration> testCase) {
+		super(testCase);
+	}
+	
+	@Parameterized.Parameters
+	public static Collection testCases() {
+		final Collection<ValidationTestCase> ret = new ArrayList<>();
+		ret.add(new ValidationTestCase<EmailConfiguration>("basicCase")
+				.adjustment(x -> {
+				})
+				.valid(true));
+		ret.add(new ValidationTestCase<EmailConfiguration>("nullIdentifier")
+				.adjustment(x -> x.setIdentifier(null))
+				.valid(false));
+		ret.add(new ValidationTestCase<EmailConfiguration>("tooShortIdentifier")
+				.adjustment(x -> x.setIdentifier("z"))
+				.valid(false));
+		return ret;
+	}
+	
+	
+	protected EmailConfiguration createValidTestSubject() {
+		return EmailConfiguration.create("EmailTest",
+				"smtp.google.com",
+				"123",
+				"example",
+				"egraham",
+				"asdfaegw4t3rwg5w",
+				"true",
+				"true",
+				"ACTIVE");
+	}
+	
+	
 }
\ No newline at end of file
diff --git a/api/src/test/java/org/apache/fineract/cn/notification/api/v1/domain/SampleTest.java b/api/src/test/java/org/apache/fineract/cn/notification/api/v1/domain/EmailPageTest.java
similarity index 51%
copy from api/src/test/java/org/apache/fineract/cn/notification/api/v1/domain/SampleTest.java
copy to api/src/test/java/org/apache/fineract/cn/notification/api/v1/domain/EmailPageTest.java
index 65cd1ac..f871958 100644
--- a/api/src/test/java/org/apache/fineract/cn/notification/api/v1/domain/SampleTest.java
+++ b/api/src/test/java/org/apache/fineract/cn/notification/api/v1/domain/EmailPageTest.java
@@ -18,40 +18,49 @@
  */
 package org.apache.fineract.cn.notification.api.v1.domain;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import org.apache.commons.lang.RandomStringUtils;
 import org.apache.fineract.cn.test.domain.ValidationTest;
 import org.apache.fineract.cn.test.domain.ValidationTestCase;
 import org.junit.runners.Parameterized;
 
-public class SampleTest extends ValidationTest<Sample> {
-
-  public SampleTest(ValidationTestCase<Sample> testCase) {
-    super(testCase);
-  }
-
-  @Override
-  protected Sample createValidTestSubject() {
-    return Sample.create("xxxx", "yyy");
-  }
-
-  @Parameterized.Parameters
-  public static Collection testCases() {
-    final Collection<ValidationTestCase> ret = new ArrayList<>();
-    ret.add(new ValidationTestCase<Sample>("basicCase")
-            .adjustment(x -> {})
-            .valid(true));
-    ret.add(new ValidationTestCase<Sample>("nullIdentifier")
-            .adjustment(x -> x.setIdentifier(null))
-            .valid(false));
-    ret.add(new ValidationTestCase<Sample>("tooShortIdentifier")
-            .adjustment(x -> x.setIdentifier("z"))
-            .valid(false));
-    ret.add(new ValidationTestCase<Sample>("tooLongPayload")
-            .adjustment(x -> x.setPayload(RandomStringUtils.randomAlphanumeric(513)))
-            .valid(false));
-    return ret;
-  }
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
 
+public class EmailPageTest extends ValidationTest<EmailPage> {
+	
+	EmailConfiguration emailConfiguration;
+	
+	public EmailPageTest(ValidationTestCase<EmailPage> testCase) {
+		super(testCase);
+	}
+	
+	@Parameterized.Parameters
+	public static Collection testCases() {
+		final Collection<ValidationTestCase> ret = new ArrayList<>();
+		ret.add(new ValidationTestCase<EmailPage>("basicCase")
+				.adjustment(x -> {
+				})
+				.valid(true));
+		ret.add(new ValidationTestCase<EmailPage>("getEmailConfiguration")
+				.adjustment(x -> x.getEmailConfiguration())
+				.valid(true));
+		return ret;
+	}
+	
+	@Override
+	protected EmailPage createValidTestSubject() {
+		EmailPage emailPage = new EmailPage();
+		emailConfiguration = new EmailConfiguration();
+		emailConfiguration.create("EmailTest",
+				"smtp.google.com",
+				"123",
+				"example",
+				"ebez",
+				"asdfaegw4t3rwg5w",
+				"true",
+				"true",
+				"ACTIVE");
+		emailPage.setEmailConfiguration(Arrays.asList(emailConfiguration));
+		return emailPage;
+	}
 }
\ No newline at end of file
diff --git a/api/src/test/java/org/apache/fineract/cn/notification/api/v1/domain/SampleTest.java b/api/src/test/java/org/apache/fineract/cn/notification/api/v1/domain/EventTest.java
similarity index 51%
copy from api/src/test/java/org/apache/fineract/cn/notification/api/v1/domain/SampleTest.java
copy to api/src/test/java/org/apache/fineract/cn/notification/api/v1/domain/EventTest.java
index 65cd1ac..6983f14 100644
--- a/api/src/test/java/org/apache/fineract/cn/notification/api/v1/domain/SampleTest.java
+++ b/api/src/test/java/org/apache/fineract/cn/notification/api/v1/domain/EventTest.java
@@ -18,40 +18,37 @@
  */
 package org.apache.fineract.cn.notification.api.v1.domain;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import org.apache.commons.lang.RandomStringUtils;
 import org.apache.fineract.cn.test.domain.ValidationTest;
 import org.apache.fineract.cn.test.domain.ValidationTestCase;
 import org.junit.runners.Parameterized;
 
-public class SampleTest extends ValidationTest<Sample> {
-
-  public SampleTest(ValidationTestCase<Sample> testCase) {
-    super(testCase);
-  }
-
-  @Override
-  protected Sample createValidTestSubject() {
-    return Sample.create("xxxx", "yyy");
-  }
-
-  @Parameterized.Parameters
-  public static Collection testCases() {
-    final Collection<ValidationTestCase> ret = new ArrayList<>();
-    ret.add(new ValidationTestCase<Sample>("basicCase")
-            .adjustment(x -> {})
-            .valid(true));
-    ret.add(new ValidationTestCase<Sample>("nullIdentifier")
-            .adjustment(x -> x.setIdentifier(null))
-            .valid(false));
-    ret.add(new ValidationTestCase<Sample>("tooShortIdentifier")
-            .adjustment(x -> x.setIdentifier("z"))
-            .valid(false));
-    ret.add(new ValidationTestCase<Sample>("tooLongPayload")
-            .adjustment(x -> x.setPayload(RandomStringUtils.randomAlphanumeric(513)))
-            .valid(false));
-    return ret;
-  }
+import java.util.ArrayList;
+import java.util.Collection;
 
+public class EventTest extends ValidationTest<Event> {
+	
+	public EventTest(ValidationTestCase<Event> testCase) {
+		super(testCase);
+	}
+	
+	@Parameterized.Parameters
+	public static Collection testCases() {
+		final Collection<ValidationTestCase> ret = new ArrayList<>();
+		ret.add(new ValidationTestCase<Event>("basicCase")
+				.adjustment(x -> {
+				})
+				.valid(true));
+		ret.add(new ValidationTestCase<Event>("nullIdentifier")
+				.adjustment(x -> x.getIdentifier().equals("customerCreated"))
+				.valid(true));
+		ret.add(new ValidationTestCase<Event>("Is Enabled")
+				.adjustment(x -> x.isEnabled())
+				.valid(true));
+		return ret;
+	}
+	
+	@Override
+	protected Event createValidTestSubject() {
+		return new Event("customerCreated", true);
+	}
 }
\ No newline at end of file
diff --git a/api/src/test/java/org/apache/fineract/cn/notification/api/v1/domain/SMSConfigurationTest.java b/api/src/test/java/org/apache/fineract/cn/notification/api/v1/domain/SMSConfigurationTest.java
new file mode 100644
index 0000000..9b3b0c7
--- /dev/null
+++ b/api/src/test/java/org/apache/fineract/cn/notification/api/v1/domain/SMSConfigurationTest.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.api.v1.domain;
+
+import org.apache.commons.lang3.RandomStringUtils;
+import org.apache.fineract.cn.test.domain.ValidationTest;
+import org.apache.fineract.cn.test.domain.ValidationTestCase;
+import org.junit.runners.Parameterized;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+public class SMSConfigurationTest extends ValidationTest<SMSConfiguration> {
+	
+	public SMSConfigurationTest(ValidationTestCase<SMSConfiguration> testCase) {
+		super(testCase);
+	}
+	
+	@Parameterized.Parameters
+	public static Collection testCases() {
+		final Collection<ValidationTestCase> ret = new ArrayList<>();
+		ret.add(new ValidationTestCase<SMSConfiguration>("basicCase")
+				.adjustment(x -> {
+				})
+				.valid(false));
+		ret.add(new ValidationTestCase<SMSConfiguration>("nullIdentifier")
+				.adjustment(x -> x.setIdentifier(null))
+				.valid(false));
+		ret.add(new ValidationTestCase<SMSConfiguration>("tooShortIdentifier")
+				.adjustment(x -> x.setIdentifier("z"))
+				.valid(false));
+		ret.add(new ValidationTestCase<SMSConfiguration>("LongToken")
+				.adjustment(x -> x.getAccount_sid())
+				.valid(false));
+		ret.add(new ValidationTestCase<SMSConfiguration>("tooLongSID")
+				.adjustment(x -> x.getAccount_sid())
+				.valid(false));
+		return ret;
+	}
+	
+	@Override
+	protected SMSConfiguration createValidTestSubject() {
+		return SMSConfiguration.create("test",
+				RandomStringUtils.randomAlphanumeric(300),
+				RandomStringUtils.randomAlphanumeric(300),
+				"ACTIVE",
+				"SMS");
+	}
+}
\ No newline at end of file
diff --git a/api/src/test/java/org/apache/fineract/cn/notification/api/v1/domain/SampleTest.java b/api/src/test/java/org/apache/fineract/cn/notification/api/v1/domain/SMSPageTest.java
similarity index 51%
rename from api/src/test/java/org/apache/fineract/cn/notification/api/v1/domain/SampleTest.java
rename to api/src/test/java/org/apache/fineract/cn/notification/api/v1/domain/SMSPageTest.java
index 65cd1ac..58535bb 100644
--- a/api/src/test/java/org/apache/fineract/cn/notification/api/v1/domain/SampleTest.java
+++ b/api/src/test/java/org/apache/fineract/cn/notification/api/v1/domain/SMSPageTest.java
@@ -18,40 +18,44 @@
  */
 package org.apache.fineract.cn.notification.api.v1.domain;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import org.apache.commons.lang.RandomStringUtils;
 import org.apache.fineract.cn.test.domain.ValidationTest;
 import org.apache.fineract.cn.test.domain.ValidationTestCase;
 import org.junit.runners.Parameterized;
 
-public class SampleTest extends ValidationTest<Sample> {
-
-  public SampleTest(ValidationTestCase<Sample> testCase) {
-    super(testCase);
-  }
-
-  @Override
-  protected Sample createValidTestSubject() {
-    return Sample.create("xxxx", "yyy");
-  }
-
-  @Parameterized.Parameters
-  public static Collection testCases() {
-    final Collection<ValidationTestCase> ret = new ArrayList<>();
-    ret.add(new ValidationTestCase<Sample>("basicCase")
-            .adjustment(x -> {})
-            .valid(true));
-    ret.add(new ValidationTestCase<Sample>("nullIdentifier")
-            .adjustment(x -> x.setIdentifier(null))
-            .valid(false));
-    ret.add(new ValidationTestCase<Sample>("tooShortIdentifier")
-            .adjustment(x -> x.setIdentifier("z"))
-            .valid(false));
-    ret.add(new ValidationTestCase<Sample>("tooLongPayload")
-            .adjustment(x -> x.setPayload(RandomStringUtils.randomAlphanumeric(513)))
-            .valid(false));
-    return ret;
-  }
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
 
+public class SMSPageTest extends ValidationTest<SMSPage> {
+	
+	SMSConfiguration smsConfiguration;
+	
+	public SMSPageTest(ValidationTestCase<SMSPage> testCase) {
+		super(testCase);
+	}
+	
+	@Parameterized.Parameters
+	public static Collection testCases() {
+		final Collection<ValidationTestCase> ret = new ArrayList<>();
+		ret.add(new ValidationTestCase<SMSPage>("basicCase")
+				.adjustment(x -> {
+				})
+				.valid(true));
+		ret.add(new ValidationTestCase<SMSPage>("getSMSConfiguration")
+				.adjustment(x -> x.getSmsConfigurations())
+				.valid(true));
+		return ret;
+	}
+	
+	protected SMSPage createValidTestSubject() {
+		SMSPage smsPage = new SMSPage();
+		smsConfiguration = new SMSConfiguration();
+		SMSConfiguration.create("EmailTest",
+				"dfghjklpytredfghjkloi8u7y6trfdghjklop",
+				"ghjklp098iuyhgbnmkoiuytgtrdcfvghj",
+				"ACTIVE",
+				"SMS");
+		smsPage.setSmsConfigurations(Arrays.asList(smsConfiguration));
+		return smsPage;
+	}
 }
\ No newline at end of file
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/TestSuite.java b/api/src/test/java/org/apache/fineract/cn/notification/api/v1/domain/TestSuite.java
similarity index 80%
copy from component-test/src/main/java/org/apache/fineract/cn/notification/TestSuite.java
copy to api/src/test/java/org/apache/fineract/cn/notification/api/v1/domain/TestSuite.java
index a4d42bf..d6fcf81 100644
--- a/component-test/src/main/java/org/apache/fineract/cn/notification/TestSuite.java
+++ b/api/src/test/java/org/apache/fineract/cn/notification/api/v1/domain/TestSuite.java
@@ -16,15 +16,18 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.fineract.cn.notification;
+package org.apache.fineract.cn.notification.api.v1.domain;
 
 import org.junit.runner.RunWith;
 import org.junit.runners.Suite;
 
 @RunWith(Suite.class)
 @Suite.SuiteClasses({
-    TestSample.class,
-    //TODO: when you create a new component test, add it here so you can run it with the suite.
+		EmailConfigurationTest.class,
+		SMSConfigurationTest.class,
+		EmailPageTest.class,
+		EventTest.class,
+		SMSPageTest.class
 })
-public class TestSuite extends SuiteTestEnvironment {
+public class TestSuite {
 }
diff --git a/component-test/build.gradle b/component-test/build.gradle
index 0348f06..2e29cf4 100644
--- a/component-test/build.gradle
+++ b/component-test/build.gradle
@@ -43,7 +43,7 @@ dependencies {
             [group: 'org.apache.fineract.cn', name: 'api', version: versions.frameworkapi],
             [group: 'org.apache.fineract.cn', name: 'test', version: versions.frameworktest],
             [group: 'org.apache.fineract.cn', name: 'lang', version: versions.frameworklang],
-            [group: 'org.springframework.boot', name: 'spring-boot-starter-test']
+            [group: 'org.springframework.boot', name: 'spring-boot-starter-test'],
     )
 }
 
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/SuiteTestEnvironment.java b/component-test/src/main/java/org/apache/fineract/cn/notification/SuiteTestEnvironment.java
index 5f2b5f4..5063d2e 100644
--- a/component-test/src/main/java/org/apache/fineract/cn/notification/SuiteTestEnvironment.java
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/SuiteTestEnvironment.java
@@ -33,16 +33,16 @@ import org.junit.rules.TestRule;
  * initializing and de-initializing external resources.
  */
 public class SuiteTestEnvironment {
-  static final String APP_VERSION = "1";
-  static final String APP_NAME = "notification-v" + APP_VERSION;
-
-  static final TestEnvironment testEnvironment = new TestEnvironment(APP_NAME);
-  static final CassandraInitializer cassandraInitializer = new CassandraInitializer();
-  static final MariaDBInitializer mariaDBInitializer = new MariaDBInitializer();
-
-  @ClassRule
-  public static TestRule orderClassRules = RuleChain
-      .outerRule(new RunExternalResourceOnce(testEnvironment))
-      .around(new RunExternalResourceOnce(cassandraInitializer))
-      .around(new RunExternalResourceOnce(mariaDBInitializer));
+	static final String APP_VERSION = "1";
+	static final String APP_NAME = "notification-v" + APP_VERSION;
+	
+	static final TestEnvironment testEnvironment = new TestEnvironment(APP_NAME);
+	static final CassandraInitializer cassandraInitializer = new CassandraInitializer();
+	static final MariaDBInitializer mariaDBInitializer = new MariaDBInitializer();
+	
+	@ClassRule
+	public static TestRule orderClassRules = RuleChain
+			.outerRule(new RunExternalResourceOnce(testEnvironment))
+			.around(new RunExternalResourceOnce(cassandraInitializer))
+			.around(new RunExternalResourceOnce(mariaDBInitializer));
 }
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/TestEmailService.java b/component-test/src/main/java/org/apache/fineract/cn/notification/TestEmailService.java
new file mode 100644
index 0000000..90f73c7
--- /dev/null
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/TestEmailService.java
@@ -0,0 +1,96 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification;
+
+import org.apache.commons.lang3.RandomStringUtils;
+import org.apache.fineract.cn.api.util.NotFoundException;
+import org.apache.fineract.cn.customer.api.v1.client.CustomerNotFoundException;
+import org.apache.fineract.cn.notification.api.v1.client.ConfigurationNotFoundException;
+import org.apache.fineract.cn.notification.api.v1.client.NotificationManager;
+import org.apache.fineract.cn.notification.api.v1.domain.EmailConfiguration;
+import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
+import org.apache.fineract.cn.notification.service.internal.service.NotificationService;
+import org.apache.fineract.cn.notification.util.DomainObjectGenerator;
+import org.apache.fineract.cn.test.listener.EventRecorder;
+import org.junit.Assert;
+import org.junit.Test;
+import org.springframework.beans.factory.annotation.Autowired;
+
+public class TestEmailService extends TestNotification {
+	
+	private final String configIdentifier = "Gmail";
+	@Autowired
+	private NotificationService notificationService;
+	@Autowired
+	private NotificationManager notificationManager;
+	@Autowired
+	private EventRecorder eventRecorder;
+	
+	public TestEmailService() {
+		super();
+	}
+	
+	@Test
+	public void sendEmail() throws InterruptedException{
+		this.logger.info("Send Email Notification");
+		notificationService.sendEmail("fineractcnnotificationdemo@gmail.com",
+				"egraham15@alustudent.com",
+				"Address Details Changed",
+				"Dear Valued Customer," +
+						"\n\nYour address has been changed successfully" +
+						"\nStreet: Test Street"+
+						"\nCity: Test City"+
+						"\nState: Test State"+
+						"\nCountry: Mauritius"+
+						"\n\nBest Regards" +
+						"\nMFI");
+	}
+	
+	@Test
+	public void shouldRetrieveEmailConfigurationEntity() {
+		logger.info("Create and retrieve Email Gateway configuration");
+		EmailConfiguration sampleRetrieved = this.notificationManager.findEmailConfigurationByIdentifier(configIdentifier);
+		Assert.assertNotNull(sampleRetrieved);
+		Assert.assertEquals(sampleRetrieved.getIdentifier(), configIdentifier);
+	}
+	
+	@Test
+	public void shouldCreateNewEmailConfigurationEntity() throws InterruptedException{
+		logger.info("Create Email Gateway configuration");
+		this.notificationManager.createEmailConfiguration(DomainObjectGenerator.emailConfiguration());
+		
+		eventRecorder.wait(NotificationEventConstants.POST_EMAIL_CONFIGURATION,EmailConfiguration.class);
+	}
+	
+	@Test(expected = NotFoundException.class)
+	public void emailConfigurationNotFound() throws CustomerNotFoundException {
+		logger.info("Configuration not found");
+		try {
+			this.notificationManager.findEmailConfigurationByIdentifier(RandomStringUtils.randomAlphanumeric(8));
+		} catch (final ConfigurationNotFoundException ex) {
+			logger.info("Error Asserted");
+		}
+	}
+	
+	@Test
+	public void checkEmailConfigurationEntityExist() {
+		logger.info("Email Gateway configuration Exist");
+		Assert.assertTrue(this.notificationService.emailConfigurationExists(configIdentifier));
+	}
+}
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/TestNotification.java b/component-test/src/main/java/org/apache/fineract/cn/notification/TestNotification.java
new file mode 100644
index 0000000..6a6bf6b
--- /dev/null
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/TestNotification.java
@@ -0,0 +1,112 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification;
+
+import org.apache.fineract.cn.anubis.test.v1.TenantApplicationSecurityEnvironmentTestRule;
+import org.apache.fineract.cn.api.context.AutoUserContext;
+import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
+import org.apache.fineract.cn.notification.service.NotificationConfiguration;
+import org.apache.fineract.cn.test.fixture.TenantDataStoreContextTestRule;
+import org.apache.fineract.cn.test.listener.EnableEventRecording;
+import org.apache.fineract.cn.test.listener.EventRecorder;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.Rule;
+import org.junit.runner.RunWith;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.cloud.netflix.feign.EnableFeignClients;
+import org.springframework.cloud.netflix.ribbon.RibbonClient;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Import;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.security.interfaces.RSAPrivateKey;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT,
+		classes = {TestNotification.TestConfiguration.class})
+public class TestNotification extends SuiteTestEnvironment {
+	
+	@ClassRule
+	public final static TenantDataStoreContextTestRule tenantDataStoreContext = TenantDataStoreContextTestRule.forRandomTenantName(cassandraInitializer, mariaDBInitializer);
+	private static final String LOGGER_NAME = "test-logger";
+	private static final String TEST_USER = "homer";
+	@SuppressWarnings("WeakerAccess")
+	@Autowired
+	@Qualifier(LOGGER_NAME)
+	Logger logger;
+	private AutoUserContext userContext;
+	@Autowired
+	private EventRecorder eventRecorder;
+	@Rule
+	public final TenantApplicationSecurityEnvironmentTestRule tenantApplicationSecurityEnvironment
+			= new TenantApplicationSecurityEnvironmentTestRule(testEnvironment, this::waitForInitialize);
+	
+	public TestNotification() {
+		super();
+	}
+	
+	@Before
+	public void prepTest() {
+		userContext = tenantApplicationSecurityEnvironment.createAutoUserContext(TestNotification.TEST_USER);
+		final RSAPrivateKey tenantPrivateKey = tenantApplicationSecurityEnvironment.getSystemSecurityEnvironment().tenantPrivateKey();
+		logger.info("tenantPrivateKey = {}", tenantPrivateKey);
+	}
+	
+	@After
+	public void cleanTest() {
+		userContext.close();
+		eventRecorder.clear();
+	}
+	
+	public boolean waitForInitialize() {
+		try {
+			return this.eventRecorder.wait(NotificationEventConstants.INITIALIZE, APP_VERSION);
+		} catch (final InterruptedException e) {
+			throw new IllegalStateException(e);
+		}
+	}
+	
+	@Configuration
+	@EnableEventRecording
+	@EnableFeignClients(basePackages = {"org.apache.fineract.cn.notification.api.v1.client"})
+	@RibbonClient(name = APP_NAME)
+	@ComponentScan({"org.apache.fineract.cn.notification.listener",
+			"org.apache.fineract.cn.notification.service.internal.service",
+			"org.apache.fineract.cn.notification.service.internal.service.helperservice"
+	})
+	@Import({NotificationConfiguration.class})
+	public static class TestConfiguration {
+		public TestConfiguration() {
+			super();
+		}
+		
+		@Bean(name = LOGGER_NAME)
+		public Logger logger() {
+			return LoggerFactory.getLogger(LOGGER_NAME);
+		}
+	}
+}
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/TestSMSService.java b/component-test/src/main/java/org/apache/fineract/cn/notification/TestSMSService.java
new file mode 100644
index 0000000..e25a3e8
--- /dev/null
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/TestSMSService.java
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification;
+
+import org.apache.commons.lang3.RandomStringUtils;
+import org.apache.fineract.cn.api.util.NotFoundException;
+import org.apache.fineract.cn.customer.api.v1.client.CustomerNotFoundException;
+import org.apache.fineract.cn.notification.api.v1.client.ConfigurationNotFoundException;
+import org.apache.fineract.cn.notification.api.v1.client.NotificationManager;
+import org.apache.fineract.cn.notification.api.v1.domain.EmailConfiguration;
+import org.apache.fineract.cn.notification.api.v1.domain.SMSConfiguration;
+import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
+import org.apache.fineract.cn.notification.service.internal.service.NotificationService;
+import org.apache.fineract.cn.notification.util.DomainObjectGenerator;
+import org.apache.fineract.cn.test.listener.EventRecorder;
+import org.junit.Assert;
+import org.junit.Test;
+import org.springframework.beans.factory.annotation.Autowired;
+
+public class TestSMSService extends TestNotification {
+	
+	@Autowired
+	private NotificationService notificationService;
+	
+	@Autowired
+	private NotificationManager notificationManager;
+	
+	@Autowired
+	private EventRecorder eventRecorder;
+	
+	private String configIdentifier = "Twilio";
+	
+	public TestSMSService() {
+		super();
+	}
+	
+	
+	@Test
+	public void shouldCreateNewSMSConfigurationEntity() throws InterruptedException{
+		logger.info("Create SMS Gateway configuration");
+		this.notificationManager.createSMSConfiguration(DomainObjectGenerator.smsConfiguration());
+		
+		eventRecorder.wait(NotificationEventConstants.POST_EMAIL_CONFIGURATION, SMSConfiguration.class);
+	}
+	
+	@Test
+	public void shouldTriggerCustomerCreated() throws InterruptedException{
+		logger.info("Create SMS Gateway configuration");
+		
+		eventRecorder.wait(NotificationEventConstants.POST_EMAIL_CONFIGURATION, SMSConfiguration.class);
+	}
+	
+	@Test(expected = NotFoundException.class)
+	public void smsConfigurationNotFound() throws CustomerNotFoundException {
+		logger.info("SMS Gateway configuration Not Found");
+		try {
+			this.notificationManager.findSMSConfigurationByIdentifier(RandomStringUtils.randomAlphanumeric(8));
+		} catch (final ConfigurationNotFoundException ex) {
+			logger.info("Error Asserted");
+		}
+	}
+	
+	@Test
+	public void sendSMS() {
+		this.logger.info("Send SMS Notification");
+		this.notificationService.sendSMS("+23058409206",
+				"Dear Valued Customer\n\nTalk is cheap show me the code\n\nBest Regards\nYour MFI");
+}
+	
+	@Test
+	public void shouldCreateAndRetrieveSMSConfigurationEntity() {
+		logger.info("Create and Retrieve SMS Gateway configuration");
+		final SMSConfiguration smsConfiguration = DomainObjectGenerator.smsConfiguration();
+		this.notificationManager.createSMSConfiguration(smsConfiguration);
+		
+		SMSConfiguration sampleRetrieved = this.notificationManager.findSMSConfigurationByIdentifier(configIdentifier);
+		Assert.assertNotNull(sampleRetrieved);
+		Assert.assertEquals(sampleRetrieved.getIdentifier(), configIdentifier);
+	}
+	
+	@Test
+	public void checkSMSConfigurationEntityExist() {
+		logger.info("SMS Gateway configuration Exist");
+		Assert.assertTrue(this.notificationService.smsConfigurationExists(configIdentifier));
+	}
+}
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/TestSample.java b/component-test/src/main/java/org/apache/fineract/cn/notification/TestSample.java
deleted file mode 100644
index 3b2811e..0000000
--- a/component-test/src/main/java/org/apache/fineract/cn/notification/TestSample.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.fineract.cn.notification;
-
-import org.apache.fineract.cn.notification.api.v1.client.NotificationManager;
-import org.apache.fineract.cn.notification.api.v1.domain.Sample;
-import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
-import java.util.List;
-import org.apache.commons.lang3.RandomStringUtils;
-import org.apache.fineract.cn.anubis.test.v1.TenantApplicationSecurityEnvironmentTestRule;
-import org.apache.fineract.cn.api.context.AutoUserContext;
-import org.apache.fineract.cn.notification.service.NotificationConfiguration;
-import org.apache.fineract.cn.test.fixture.TenantDataStoreContextTestRule;
-import org.apache.fineract.cn.test.listener.EnableEventRecording;
-import org.apache.fineract.cn.test.listener.EventRecorder;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.ClassRule;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.cloud.netflix.feign.EnableFeignClients;
-import org.springframework.cloud.netflix.ribbon.RibbonClient;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ComponentScan;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Import;
-import org.springframework.test.context.junit4.SpringRunner;
-
-@RunWith(SpringRunner.class)
-@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
-public class TestSample extends SuiteTestEnvironment {
-  private static final String LOGGER_NAME = "test-logger";
-  private static final String TEST_USER = "homer";
-
-
-  @Configuration
-  @EnableEventRecording
-  @EnableFeignClients(basePackages = {"org.apache.fineract.cn.notification.api.v1.client"})
-  @RibbonClient(name = APP_NAME)
-  @Import({NotificationConfiguration.class})
-  @ComponentScan("org.apache.fineract.cn.notification.listener")
-  public static class TestConfiguration {
-    public TestConfiguration() {
-      super();
-    }
-
-    @Bean(name = LOGGER_NAME)
-    public Logger logger() {
-      return LoggerFactory.getLogger(LOGGER_NAME);
-    }
-  }
-
-  @ClassRule
-  public final static TenantDataStoreContextTestRule tenantDataStoreContext = TenantDataStoreContextTestRule.forRandomTenantName(cassandraInitializer, mariaDBInitializer);
-
-  @Rule
-  public final TenantApplicationSecurityEnvironmentTestRule tenantApplicationSecurityEnvironment
-          = new TenantApplicationSecurityEnvironmentTestRule(testEnvironment, this::waitForInitialize);
-
-  private AutoUserContext userContext;
-
-  @Autowired
-  private NotificationManager testSubject;
-
-  @Autowired
-  private EventRecorder eventRecorder;
-
-  @SuppressWarnings("WeakerAccess")
-  @Autowired
-  @Qualifier(LOGGER_NAME)
-  Logger logger;
-
-  public TestSample() {
-    super();
-  }
-
-  @Before
-  public void prepTest() {
-    userContext = tenantApplicationSecurityEnvironment.createAutoUserContext(TestSample.TEST_USER);
-  }
-
-  @After
-  public void cleanTest() {
-    userContext.close();
-    eventRecorder.clear();
-  }
-
-  public boolean waitForInitialize() {
-    try {
-      return this.eventRecorder.wait(NotificationEventConstants.INITIALIZE, APP_VERSION);
-    } catch (final InterruptedException e) {
-      throw new IllegalStateException(e);
-    }
-  }
-
-  @Test
-  public void shouldCreateSample() throws InterruptedException {
-    logger.info("Running test shouldCreateSample.");
-    final Sample sample = Sample.create(RandomStringUtils.randomAlphanumeric(8), RandomStringUtils.randomAlphanumeric(512));
-    this.testSubject.createEntity(sample);
-
-    Assert.assertTrue(this.eventRecorder.wait(NotificationEventConstants.POST_SAMPLE, sample.getIdentifier()));
-
-    final Sample createdSample = this.testSubject.getEntity(sample.getIdentifier());
-    Assert.assertEquals(sample, createdSample);
-  }
-
-  @Test
-  public void shouldListSamples() {
-    logger.info("Running test shouldListSamples.");
-    final List<Sample> allEntities = this.testSubject.findAllEntities();
-    Assert.assertNotNull(allEntities);
-  }
-}
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/TestSuite.java b/component-test/src/main/java/org/apache/fineract/cn/notification/TestSuite.java
index a4d42bf..868e949 100644
--- a/component-test/src/main/java/org/apache/fineract/cn/notification/TestSuite.java
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/TestSuite.java
@@ -23,8 +23,8 @@ import org.junit.runners.Suite;
 
 @RunWith(Suite.class)
 @Suite.SuiteClasses({
-    TestSample.class,
-    //TODO: when you create a new component test, add it here so you can run it with the suite.
+		TestEmailService.class,
+		TestSMSService.class,
 })
 public class TestSuite extends SuiteTestEnvironment {
 }
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/listener/MigrationEventListener.java b/component-test/src/main/java/org/apache/fineract/cn/notification/listener/MigrationEventListener.java
index c24b97c..38e2c8d 100644
--- a/component-test/src/main/java/org/apache/fineract/cn/notification/listener/MigrationEventListener.java
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/listener/MigrationEventListener.java
@@ -29,22 +29,22 @@ import org.springframework.stereotype.Component;
 @SuppressWarnings("unused")
 @Component
 public class MigrationEventListener {
-
-  private final EventRecorder eventRecorder;
-
-  @Autowired
-  public MigrationEventListener(@SuppressWarnings("SpringJavaAutowiringInspection") final EventRecorder eventRecorder) {
-    super();
-    this.eventRecorder = eventRecorder;
-  }
-
-  @JmsListener(
-      subscription = NotificationEventConstants.DESTINATION,
-      destination = NotificationEventConstants.DESTINATION,
-      selector = NotificationEventConstants.SELECTOR_INITIALIZE
-  )
-  public void onInitialization(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                               final String payload) {
-    this.eventRecorder.event(tenant, NotificationEventConstants.INITIALIZE, payload, String.class);
-  }
+	
+	private final EventRecorder eventRecorder;
+	
+	@Autowired
+	public MigrationEventListener(@SuppressWarnings("SpringJavaAutowiringInspection") final EventRecorder eventRecorder) {
+		super();
+		this.eventRecorder = eventRecorder;
+	}
+	
+	@JmsListener(
+			subscription = NotificationEventConstants.DESTINATION,
+			destination = NotificationEventConstants.DESTINATION,
+			selector = NotificationEventConstants.SELECTOR_INITIALIZE
+	)
+	public void onInitialization(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+	                             final String payload) {
+		this.eventRecorder.event(tenant, NotificationEventConstants.INITIALIZE, payload, String.class);
+	}
 }
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/listener/SampleEventListener.java b/component-test/src/main/java/org/apache/fineract/cn/notification/listener/NotificationEventListener.java
similarity index 52%
rename from component-test/src/main/java/org/apache/fineract/cn/notification/listener/SampleEventListener.java
rename to component-test/src/main/java/org/apache/fineract/cn/notification/listener/NotificationEventListener.java
index 85abe9e..838b2c7 100644
--- a/component-test/src/main/java/org/apache/fineract/cn/notification/listener/SampleEventListener.java
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/listener/NotificationEventListener.java
@@ -28,23 +28,33 @@ import org.springframework.stereotype.Component;
 
 @SuppressWarnings("unused")
 @Component
-public class SampleEventListener {
-
-  private final EventRecorder eventRecorder;
-
-  @Autowired
-  public SampleEventListener(@SuppressWarnings("SpringJavaAutowiringInspection") final EventRecorder eventRecorder) {
-    super();
-    this.eventRecorder = eventRecorder;
-  }
-
-  @JmsListener(
-      subscription = NotificationEventConstants.DESTINATION,
-      destination = NotificationEventConstants.DESTINATION,
-      selector = NotificationEventConstants.SELECTOR_POST_SAMPLE
-  )
-  public void onCreateSample(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                             final String payload) {
-    this.eventRecorder.event(tenant, NotificationEventConstants.POST_SAMPLE, payload, String.class);
-  }
+public class NotificationEventListener {
+	
+	private final EventRecorder eventRecorder;
+	
+	@Autowired
+	public NotificationEventListener(@SuppressWarnings("SpringJavaAutowiringInspection") final EventRecorder eventRecorder) {
+		super();
+		this.eventRecorder = eventRecorder;
+	}
+	
+	@JmsListener(
+			subscription = NotificationEventConstants.DESTINATION,
+			destination = NotificationEventConstants.DESTINATION,
+			selector = NotificationEventConstants.SELECTOR_POST_SMS_NOTIFICATION
+	)
+	public void onPostSMS(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+	                      final String payload) {
+		this.eventRecorder.event(tenant, NotificationEventConstants.POST_SMS_NOTIFICATION, payload, String.class);
+	}
+	
+	@JmsListener(
+			subscription = NotificationEventConstants.DESTINATION,
+			destination = NotificationEventConstants.DESTINATION,
+			selector = NotificationEventConstants.SELECTOR_POST_SMS_CONFIGURATION
+	)
+	public void onCreateSMSConfiguration(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+	                                     final String payload) {
+		this.eventRecorder.event(tenant, NotificationEventConstants.POST_SMS_NOTIFICATION, payload, String.class);
+	}
 }
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/util/DomainObjectGenerator.java b/component-test/src/main/java/org/apache/fineract/cn/notification/util/DomainObjectGenerator.java
new file mode 100644
index 0000000..d323eea
--- /dev/null
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/util/DomainObjectGenerator.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.util;
+/*
+ebenezergraham created on 8/20/18
+*/
+
+import org.apache.commons.lang.RandomStringUtils;
+import org.apache.fineract.cn.notification.api.v1.domain.EmailConfiguration;
+import org.apache.fineract.cn.notification.api.v1.domain.SMSConfiguration;
+
+public class DomainObjectGenerator {
+	
+	public static EmailConfiguration emailConfiguration() {
+		EmailConfiguration emailConfiguration = EmailConfiguration.create("emailtest",
+				"smtp.google.com",
+				"1233",
+				"smtp",
+				"example",
+				RandomStringUtils.randomAlphanumeric(16),
+				"true",
+				"true",
+				"ACTIVE");
+		return emailConfiguration;
+	}
+	
+	public static SMSConfiguration smsConfiguration() {
+		SMSConfiguration smsConfiguration = SMSConfiguration.create(
+				RandomStringUtils.randomAlphanumeric(8),
+				RandomStringUtils.randomAlphanumeric(16),
+				RandomStringUtils.randomAlphanumeric(16),
+				"+309483932",
+				"ACTIVE");
+		
+		return smsConfiguration;
+	}
+}
diff --git a/service/build.gradle b/service/build.gradle
index 42b1c6f..cb2d88c 100644
--- a/service/build.gradle
+++ b/service/build.gradle
@@ -45,20 +45,13 @@ springBoot {
 
 dependencies {
     compile(
-            [group: 'com.twilio.sdk', name: 'twilio', version: '7.17.+'],
-            [group: 'org.springframework.boot', name: 'spring-boot-starter-mail', version: '1.4.3.RELEASE'],
+            [group: 'com.twilio.sdk', name: 'twilio', version: versions.twilioapi],
+            [group: 'org.springframework.boot', name: 'spring-boot-starter-mail', version: versions.springjavamail],
 
             [group: 'org.apache.fineract.cn.customer', name: 'api', version: versions.fineractcncustomer],
-            [group: 'org.apache.fineract.cn.office', name: 'api', version: versions.fineractcnoffice],
             [group: 'org.apache.fineract.cn.portfolio', name: 'api', version: versions.fineractcnportfolio],
-            [group: 'org.apache.fineract.cn.group', name: 'api', version: versions.fineractcngroup],
-
-            //[group: 'org.apache.fineract.cn.deposit-account-management', name: 'api', version: versions.fineractcndeposit],
-            //[group: 'org.apache.fineract.cn.teller', name: 'api', version: versions.fineractcnteller],
-            //[group: 'org.apache.fineract.cn.reporting', name: 'api', version: versions.fineractcnreporting],
-            //[group: 'org.apache.fineract.cn.cheques', name: 'api', version: versions.kuelapcheques],
-            //[group: 'org.apache.fineract.cn.payroll', name: 'api', version: versions.fineractcnpayroll],
-            //[group: 'org.apache.fineract.cn.notification', name: 'api', version: versions.fineractcnnotification],
+            [group: 'org.apache.fineract.cn.office', name: 'api', version: versions.fineractcnoffice],
+            [group: 'org.apache.fineract.cn.identity', name: 'api', version: versions.fineractcnidentity],
 
             [group: 'org.springframework.cloud', name: 'spring-cloud-starter-config'],
             [group: 'org.springframework.cloud', name: 'spring-cloud-starter-eureka'],
diff --git a/service/out/production/resources/application.yml b/service/out/production/resources/application.yml
index 37acaaf..fa7165e 100644
--- a/service/out/production/resources/application.yml
+++ b/service/out/production/resources/application.yml
@@ -23,6 +23,20 @@ spring:
       enabled: false
     config:
       enabled: false
+    mail:
+      host: smtp.gmail.com
+      port: 587
+      username:
+      password:
+      properties:
+        debug: true
+        mail:
+          smtp:
+            auth: true
+            starttls:
+              enable: true
+
+
 
 eureka:
   client:
@@ -68,11 +82,7 @@ async:
 flyway:
   enabled: false
 
-fineract:
-  customer:
-    accountcreated:
-      message: Dear Valued Customer, Your account has been created.
-    accountclosed:
-      message: Dear Valued Customer, Your account has been successfully closed.
-
-
+smssender:
+  accountSID: AC1fde2c6f26f367b93231c5fdb944c908
+  authToken: bc9a53e41745b8471e0ecafc859d86aa
+  senderNumber: +1 510-944-1898
diff --git a/service/out/production/resources/db/migrations/mariadb/V1__initial_setup.sql b/service/out/production/resources/db/migrations/mariadb/V1__initial_setup.sql
index ff9a61f..57cefe1 100644
--- a/service/out/production/resources/db/migrations/mariadb/V1__initial_setup.sql
+++ b/service/out/production/resources/db/migrations/mariadb/V1__initial_setup.sql
@@ -18,55 +18,39 @@
 --
 
 -- -----------------------------------------------------
--- Table `fineract-cn-notification`.`email_gateway_configurations`
+-- Table wada_sms_gateway_configurations
 -- -----------------------------------------------------
-CREATE TABLE IF NOT EXISTS `fineract-cn-notification`.`email_gateway_configurations` (
-  `id` INT(11) NOT NULL AUTO_INCREMENT,
-  `identifer` VARCHAR(45) NULL DEFAULT NULL,
-  `host` VARCHAR(45) NOT NULL,
-  `port` VARCHAR(45) NOT NULL,
-  `username` VARCHAR(45) NOT NULL,
-  `app_id` VARCHAR(45) NOT NULL,
-  PRIMARY KEY (`id`))
-ENGINE = InnoDB
-DEFAULT CHARACTER SET = latin1;
-
+CREATE TABLE wada_sms_gateway_configurations (
+  id INT(11) NOT NULL AUTO_INCREMENT,
+  identifier VARCHAR(45) NULL DEFAULT NULL,
+  account_sid VARCHAR(255) NOT NULL,
+  auth_token VARCHAR(255) NOT NULL,
+  sender_number VARCHAR(45) NOT NULL,
+  state VARCHAR(45) NULL DEFAULT NULL,
+  PRIMARY KEY (id));
 
 -- -----------------------------------------------------
--- Table `fineract-cn-notification`.`sms_gateway_configurations`
+-- Table wada_email_gateway_configurations
 -- -----------------------------------------------------
-CREATE TABLE IF NOT EXISTS `fineract-cn-notification`.`sms_gateway_configurations` (
-  `id` INT(11) NOT NULL AUTO_INCREMENT,
-  `identifier` VARCHAR(45) NULL DEFAULT NULL,
-  `accountsid` VARCHAR(255) NOT NULL,
-  `auth_token` VARCHAR(255) NOT NULL,
-  `option` VARCHAR(45) NULL DEFAULT NULL,
-  PRIMARY KEY (`id`))
-ENGINE = InnoDB
-DEFAULT CHARACTER SET = latin1;
-
+CREATE TABLE wada_email_gateway_configurations (
+  id INT(11) NOT NULL AUTO_INCREMENT,
+  identifier VARCHAR(45) NULL DEFAULT NULL,
+  host VARCHAR(45) NOT NULL,
+  port VARCHAR(45) NOT NULL,
+  username VARCHAR(45) NOT NULL,
+  app_password VARCHAR(255) NOT NULL,
+  protocol VARCHAR(45)NOT NULL,
+  smtp_auth VARCHAR (45)NOT NULL,
+  start_tls VARCHAR (45)NOT NULL,
+  state VARCHAR(45)NOT NULL,
+  PRIMARY KEY (id));
 
 -- -----------------------------------------------------
--- Table `fineract-cn-notification`.`templates`
+-- Table wada_templates
 -- -----------------------------------------------------
-CREATE TABLE IF NOT EXISTS `fineract-cn-notification`.`templates` (
-  `id` INT(11) NOT NULL AUTO_INCREMENT,
-  PRIMARY KEY (`id`))
-ENGINE = InnoDB
-DEFAULT CHARACTER SET = latin1;
-
--- ------------------------------------------------------
-
-CREATE TABLE sample (
-  id BIGINT NOT NULL AUTO_INCREMENT,
-  identifier VARCHAR(8) NOT NULL,
-  payload VARCHAR(512) NULL,
-  CONSTRAINT notification_pk PRIMARY KEY (id)
-);
-
-CREATE TABLE template_sample (
-  id BIGINT NOT NULL AUTO_INCREMENT,
-  identifier VARCHAR(8) NOT NULL,
-  payload VARCHAR(512) NULL,
-  CONSTRAINT template_sample_pk PRIMARY KEY (id)
-);
\ No newline at end of file
+CREATE TABLE wada_templates (
+  id INT(11) NOT NULL AUTO_INCREMENT,
+  identifier VARCHAR(45) NULL DEFAULT NULL,
+  event VARCHAR(45) NULL DEFAULT NULL,
+  url VARCHAR(255) NOT NULL,
+  PRIMARY KEY (id));
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/NotificationApplication.java b/service/src/main/java/org/apache/fineract/cn/notification/service/NotificationApplication.java
index 5968d0d..29d448b 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/NotificationApplication.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/NotificationApplication.java
@@ -21,12 +21,12 @@ package org.apache.fineract.cn.notification.service;
 import org.springframework.boot.SpringApplication;
 
 public class NotificationApplication {
-
-  public NotificationApplication() {
-    super();
-  }
-
-  public static void main(String[] args) {
-    SpringApplication.run(NotificationConfiguration.class, args);
-  }
+	
+	public NotificationApplication() {
+		super();
+	}
+	
+	public static void main(String[] args) {
+		SpringApplication.run(NotificationConfiguration.class, args);
+	}
 }
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/NotificationConfiguration.java b/service/src/main/java/org/apache/fineract/cn/notification/service/NotificationConfiguration.java
index cdc55ce..4f9a63c 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/NotificationConfiguration.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/NotificationConfiguration.java
@@ -18,32 +18,37 @@
  */
 package org.apache.fineract.cn.notification.service;
 
+import org.apache.activemq.command.ActiveMQTopic;
+import org.apache.activemq.jms.pool.PooledConnectionFactory;
+import org.apache.activemq.spring.ActiveMQConnectionFactory;
+import org.apache.fineract.cn.identity.api.v1.client.IdentityManager;
 import org.apache.fineract.cn.anubis.config.EnableAnubis;
 import org.apache.fineract.cn.async.config.EnableAsync;
 import org.apache.fineract.cn.cassandra.config.EnableCassandra;
 import org.apache.fineract.cn.command.config.EnableCommandProcessing;
+import org.apache.fineract.cn.customer.api.v1.client.CustomerManager;
+import org.apache.fineract.cn.lang.ApplicationName;
 import org.apache.fineract.cn.lang.config.EnableServiceException;
 import org.apache.fineract.cn.lang.config.EnableTenantContext;
 import org.apache.fineract.cn.mariadb.config.EnableMariaDB;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
-import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.boot.autoconfigure.domain.EntityScan;
 import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
+import org.springframework.cloud.netflix.feign.EnableFeignClients;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.ComponentScan;
 import org.springframework.context.annotation.Configuration;
+import org.springframework.core.env.Environment;
 import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
 import org.springframework.jms.annotation.EnableJms;
 import org.springframework.jms.config.DefaultJmsListenerContainerFactory;
-import org.springframework.mail.javamail.JavaMailSender;
-import org.springframework.mail.javamail.JavaMailSenderImpl;
+import org.springframework.jms.config.JmsListenerContainerFactory;
+import org.springframework.jms.core.JmsTemplate;
 import org.springframework.web.servlet.config.annotation.PathMatchConfigurer;
 import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
 
-import java.util.Properties;
-
 @SuppressWarnings("WeakerAccess")
 @Configuration
 @EnableAutoConfiguration
@@ -56,55 +61,75 @@ import java.util.Properties;
 @EnableAnubis
 @EnableServiceException
 @EnableJms
+@EnableFeignClients(
+		clients = {
+				CustomerManager.class,
+				IdentityManager.class
+		}
+)
 @ComponentScan({
-    "org.apache.fineract.cn.notification.service.rest",
-    "org.apache.fineract.cn.notification.service.internal.service",
-    "org.apache.fineract.cn.notification.service.internal.repository",
-    "org.apache.fineract.cn.notification.service.internal.command.handler"
-})
+		"org.apache.fineract.cn.notification.service.rest",
+		"org.apache.fineract.cn.notification.service.listener",
+		"org.apache.fineract.cn.notification.service.internal.service",
+		"org.apache.fineract.cn.notification.service.internal.repository",
+		"org.apache.fineract.cn.notification.service.internal.command.handler",
+}
+)
 @EnableJpaRepositories({
-    "org.apache.fineract.cn.notification.service.internal.repository"
+		"org.apache.fineract.cn.notification.service.internal.repository"
 })
+@EntityScan(basePackages = "org.apache.fineract.cn.notification.service.internal.repository")
 public class NotificationConfiguration extends WebMvcConfigurerAdapter {
-
-  public NotificationConfiguration() {
-    super();
-  }
-
-  @Bean(name = ServiceConstants.LOGGER_NAME)
-  public Logger logger() {
-    return LoggerFactory.getLogger(ServiceConstants.LOGGER_NAME);
-  }
-
-//  @Bean
-//  public DefaultJmsListenerContainerFactory myJmsListenerContainerFactory() {
-//    DefaultJmsListenerContainerFactory factory = new DefaultJmsListenerContainerFactory();
-//    return factory;
-//  }
-  @Override
-  public void configurePathMatch(final PathMatchConfigurer configurer) {
-    configurer.setUseSuffixPatternMatch(Boolean.FALSE);
-  }
-
-
-
-  @Bean
-  @Qualifier("gmail")
-  public JavaMailSender getJavaMailSender() {
-
-    JavaMailSenderImpl mailSender = new JavaMailSenderImpl();
-    mailSender.setHost("smtp.gmail.com");
-    mailSender.setPort(587);
-
-    mailSender.setUsername("ebenezergraham69@gmail.com");
-    mailSender.setPassword("fdzmzbhbmtkafzvq");
-
-    Properties props = mailSender.getJavaMailProperties();
-    props.put("mail.transport.protocol", "smtp");
-    props.put("mail.smtp.auth", "true");
-    props.put("mail.smtp.starttls.enable", "true");
-    props.put("mail.debug", "true");
-
-    return mailSender;
-  }
+	
+	private final Environment environment;
+	
+	public NotificationConfiguration(Environment environment) {
+		super();
+		this.environment = environment;
+	}
+	
+	
+	@Override
+	public void configurePathMatch(final PathMatchConfigurer configurer) {
+		configurer.setUseSuffixPatternMatch(Boolean.FALSE);
+	}
+	
+	@Bean
+	public PooledConnectionFactory jmsFactory() {
+		PooledConnectionFactory pooledConnectionFactory = new PooledConnectionFactory();
+		ActiveMQConnectionFactory activeMQConnectionFactory = new ActiveMQConnectionFactory();
+		activeMQConnectionFactory.setBrokerURL(this.environment.getProperty("activemq.brokerUrl", "vm://localhost?broker.persistent=falseac"));
+		pooledConnectionFactory.setConnectionFactory(activeMQConnectionFactory);
+		return pooledConnectionFactory;
+	}
+	
+	@Bean
+	public JmsListenerContainerFactory jmsListenerContainerFactory(PooledConnectionFactory jmsFactory) {
+		DefaultJmsListenerContainerFactory factory = new DefaultJmsListenerContainerFactory();
+		factory.setPubSubDomain(true);
+		factory.setConnectionFactory(jmsFactory);
+		factory.setErrorHandler(ex -> {
+			loggerBean().error(ex.getCause().toString());
+		});
+		factory.setConcurrency(this.environment.getProperty("activemq.concurrency", "1-1"));
+		return factory;
+	}
+	
+	@Bean
+	public JmsTemplate jmsTemplate(ApplicationName applicationName, PooledConnectionFactory jmsFactory) {
+		ActiveMQTopic activeMQTopic = new ActiveMQTopic(applicationName.toString());
+		JmsTemplate jmsTemplate = new JmsTemplate();
+		jmsTemplate.setPubSubDomain(true);
+		jmsTemplate.setConnectionFactory(jmsFactory);
+		jmsTemplate.setDefaultDestination(activeMQTopic);
+		return jmsTemplate;
+	}
+	
+	@Bean(
+			name = {ServiceConstants.LOGGER_NAME}
+	)
+	public Logger loggerBean() {
+		return LoggerFactory.getLogger(ServiceConstants.LOGGER_NAME);
+	}
+	
 }
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/ServiceConstants.java b/service/src/main/java/org/apache/fineract/cn/notification/service/ServiceConstants.java
index cb4e902..dc96c42 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/ServiceConstants.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/ServiceConstants.java
@@ -19,5 +19,12 @@
 package org.apache.fineract.cn.notification.service;
 
 public interface ServiceConstants {
-  String LOGGER_NAME = "rest-logger";
+	String LOGGER_NAME = "notification-logger";
+	
+	String MAIL_TRANSPORT_PROTOCOL_PROPERTY = "mail.transport.protocol";
+	String MAIL_TRANSPORT_PROTOCOL_VALUE = "smtp";
+	String MAIL_SMTP_AUTH_PROPERTY = "mail.smtp.auth";
+	String MAIL_SMTP_AUTH_VALUE = "true";
+	String MAIL_SMTP_STARTTLS_ENABLE_PROPERTY = "mail.smtp.starttls.enable";
+	String MAIL_SMTP_STARTTLS_ENABLE_VALUE = "true";
 }
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/SampleCommand.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/CreateEmailConfigurationCommand.java
similarity index 60%
copy from service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/SampleCommand.java
copy to service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/CreateEmailConfigurationCommand.java
index 3fa3aac..828ba4e 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/SampleCommand.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/CreateEmailConfigurationCommand.java
@@ -18,25 +18,25 @@
  */
 package org.apache.fineract.cn.notification.service.internal.command;
 
-import org.apache.fineract.cn.notification.api.v1.domain.Sample;
+import org.apache.fineract.cn.notification.api.v1.domain.EmailConfiguration;
 
-public class SampleCommand {
-
-  private final Sample sample;
-
-  public SampleCommand(final Sample sample) {
-    super();
-    this.sample = sample;
-  }
-
-  public Sample sample() {
-    return this.sample;
-  }
-
-  @Override
-  public String toString() {
-    return "SampleCommand{" +
-        "sample=" + sample.getIdentifier() +
-        '}';
-  }
+public class CreateEmailConfigurationCommand {
+	
+	private final EmailConfiguration emailConfiguration;
+	
+	public CreateEmailConfigurationCommand(final EmailConfiguration emailConfiguration) {
+		super();
+		this.emailConfiguration = emailConfiguration;
+	}
+	
+	public EmailConfiguration getEmailConfiguration() {
+		return this.emailConfiguration;
+	}
+	
+	@Override
+	public String toString() {
+		return "CreateEmailConfigurationCommand{"
+				+ "EmailConfiguration=" + emailConfiguration.getIdentifier()
+				+ '}';
+	}
 }
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/SampleCommand.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/CreateSMSConfigurationCommand.java
similarity index 61%
copy from service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/SampleCommand.java
copy to service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/CreateSMSConfigurationCommand.java
index 3fa3aac..ef206c8 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/SampleCommand.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/CreateSMSConfigurationCommand.java
@@ -18,25 +18,25 @@
  */
 package org.apache.fineract.cn.notification.service.internal.command;
 
-import org.apache.fineract.cn.notification.api.v1.domain.Sample;
+import org.apache.fineract.cn.notification.api.v1.domain.SMSConfiguration;
 
-public class SampleCommand {
-
-  private final Sample sample;
-
-  public SampleCommand(final Sample sample) {
-    super();
-    this.sample = sample;
-  }
-
-  public Sample sample() {
-    return this.sample;
-  }
-
-  @Override
-  public String toString() {
-    return "SampleCommand{" +
-        "sample=" + sample.getIdentifier() +
-        '}';
-  }
+public class CreateSMSConfigurationCommand {
+	
+	private final SMSConfiguration smsConfiguration;
+	
+	public CreateSMSConfigurationCommand(final SMSConfiguration smsConfiguration) {
+		super();
+		this.smsConfiguration = smsConfiguration;
+	}
+	
+	public SMSConfiguration getSMSConfiguration() {
+		return this.smsConfiguration;
+	}
+	
+	@Override
+	public String toString() {
+		return "CreateSMSConfigurationCommand{"
+				+ "SMSConfiguration=" + smsConfiguration.getIdentifier()
+				+ '}';
+	}
 }
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/InitializeServiceCommand.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/InitializeServiceCommand.java
index 21335ac..9ab4d6f 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/InitializeServiceCommand.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/InitializeServiceCommand.java
@@ -19,13 +19,13 @@
 package org.apache.fineract.cn.notification.service.internal.command;
 
 public class InitializeServiceCommand {
-
-  public InitializeServiceCommand() {
-    super();
-  }
-
-  @Override
-  public String toString() {
-    return "InitializeServiceCommand{}";
-  }
+	
+	public InitializeServiceCommand() {
+		super();
+	}
+	
+	@Override
+	public String toString() {
+		return "InitializeServiceCommand{}";
+	}
 }
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/SampleCommand.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/PostSMSCommand.java
similarity index 68%
rename from service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/SampleCommand.java
rename to service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/PostSMSCommand.java
index 3fa3aac..2ffc416 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/SampleCommand.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/PostSMSCommand.java
@@ -18,25 +18,23 @@
  */
 package org.apache.fineract.cn.notification.service.internal.command;
 
-import org.apache.fineract.cn.notification.api.v1.domain.Sample;
-
-public class SampleCommand {
-
-  private final Sample sample;
-
-  public SampleCommand(final Sample sample) {
-    super();
-    this.sample = sample;
-  }
-
-  public Sample sample() {
-    return this.sample;
-  }
-
-  @Override
-  public String toString() {
-    return "SampleCommand{" +
-        "sample=" + sample.getIdentifier() +
-        '}';
-  }
+public class PostSMSCommand {
+	
+	private final String identifier;
+	
+	public PostSMSCommand(final String identifier) {
+		super();
+		this.identifier = identifier;
+	}
+	
+	public String getIdentifier() {
+		return this.identifier;
+	}
+	
+	@Override
+	public String toString() {
+		return "PostSMSCommand{"
+				+ "PostSMS=" + identifier
+				+ '}';
+	}
 }
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/EmailConfigurationAggregate.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/EmailConfigurationAggregate.java
new file mode 100644
index 0000000..6cc80d0
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/EmailConfigurationAggregate.java
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.command.handler;
+
+import org.apache.fineract.cn.command.annotation.Aggregate;
+import org.apache.fineract.cn.command.annotation.CommandHandler;
+import org.apache.fineract.cn.command.annotation.CommandLogLevel;
+import org.apache.fineract.cn.command.annotation.EventEmitter;
+import org.apache.fineract.cn.notification.api.v1.domain.EmailConfiguration;
+import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
+import org.apache.fineract.cn.notification.service.internal.command.CreateEmailConfigurationCommand;
+import org.apache.fineract.cn.notification.service.internal.mapper.EmailConfigurationMapper;
+import org.apache.fineract.cn.notification.service.internal.repository.EmailGatewayConfigurationEntity;
+import org.apache.fineract.cn.notification.service.internal.repository.EmailGatewayConfigurationRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+
+@SuppressWarnings("unused")
+@Aggregate
+public class EmailConfigurationAggregate {
+	
+	private final EmailGatewayConfigurationRepository emailGatewayConfigurationRepository;
+	
+	@Autowired
+	public EmailConfigurationAggregate(EmailGatewayConfigurationRepository emailGatewayConfigurationRepository) {
+		super();
+		this.emailGatewayConfigurationRepository = emailGatewayConfigurationRepository;
+	}
+	
+	@CommandHandler(logStart = CommandLogLevel.DEBUG, logFinish = CommandLogLevel.DEBUG)
+	@Transactional
+	@EventEmitter(selectorName = NotificationEventConstants.SELECTOR_NAME, selectorValue = NotificationEventConstants.POST_EMAIL_CONFIGURATION)
+	public String createEmailConfiguration(final CreateEmailConfigurationCommand createEmailConfigurationCommand) {
+		
+		EmailConfiguration emailConfiguration = createEmailConfigurationCommand.getEmailConfiguration();
+		final EmailGatewayConfigurationEntity entity = EmailConfigurationMapper.map(emailConfiguration);
+		this.emailGatewayConfigurationRepository.save(entity);
+		
+		return emailConfiguration.getIdentifier();
+	}
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/EventsAggregate.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/EventsAggregate.java
new file mode 100644
index 0000000..27f129b
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/EventsAggregate.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.command.handler;
+
+import org.apache.fineract.cn.command.annotation.Aggregate;
+import org.apache.fineract.cn.command.annotation.CommandHandler;
+import org.apache.fineract.cn.command.annotation.CommandLogLevel;
+import org.apache.fineract.cn.command.annotation.EventEmitter;
+import org.apache.fineract.cn.notification.api.v1.domain.SMSConfiguration;
+import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
+import org.apache.fineract.cn.notification.service.internal.command.CreateSMSConfigurationCommand;
+import org.apache.fineract.cn.notification.service.internal.command.PostSMSCommand;
+import org.apache.fineract.cn.notification.service.internal.mapper.SMSConfigurationMapper;
+import org.apache.fineract.cn.notification.service.internal.repository.SMSGatewayConfigurationEntity;
+import org.apache.fineract.cn.notification.service.internal.repository.SMSGatewayConfigurationRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+
+@SuppressWarnings("unused")
+@Aggregate
+public class EventsAggregate {
+	
+	public EventsAggregate() {
+		super();
+	}
+	
+	@CommandHandler(logStart = CommandLogLevel.INFO, logFinish = CommandLogLevel.INFO)
+	@Transactional
+	@EventEmitter(selectorName = NotificationEventConstants.SELECTOR_NAME, selectorValue = NotificationEventConstants.POST_SMS_NOTIFICATION)
+	public String postSMS(final PostSMSCommand postSMSCommand) {
+		return postSMSCommand.getIdentifier();
+	}
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/MigrationAggregate.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/MigrationAggregate.java
index da7cc6e..1abc754 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/MigrationAggregate.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/MigrationAggregate.java
@@ -18,50 +18,51 @@
  */
 package org.apache.fineract.cn.notification.service.internal.command.handler;
 
-import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
-import org.apache.fineract.cn.notification.service.ServiceConstants;
-import org.apache.fineract.cn.notification.service.internal.command.InitializeServiceCommand;
-import javax.sql.DataSource;
 import org.apache.fineract.cn.command.annotation.Aggregate;
 import org.apache.fineract.cn.command.annotation.CommandHandler;
 import org.apache.fineract.cn.command.annotation.CommandLogLevel;
 import org.apache.fineract.cn.command.annotation.EventEmitter;
 import org.apache.fineract.cn.lang.ApplicationName;
 import org.apache.fineract.cn.mariadb.domain.FlywayFactoryBean;
+import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
+import org.apache.fineract.cn.notification.service.ServiceConstants;
+import org.apache.fineract.cn.notification.service.internal.command.InitializeServiceCommand;
 import org.slf4j.Logger;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.transaction.annotation.Transactional;
 
+import javax.sql.DataSource;
+
 @SuppressWarnings({
-    "unused"
+		"unused"
 })
 @Aggregate
 public class MigrationAggregate {
-
-  private final Logger logger;
-  private final DataSource dataSource;
-  private final FlywayFactoryBean flywayFactoryBean;
-  private final ApplicationName applicationName;
-
-  @Autowired
-  public MigrationAggregate(@Qualifier(ServiceConstants.LOGGER_NAME) final Logger logger,
-                            final DataSource dataSource,
-                            final FlywayFactoryBean flywayFactoryBean,
-                            final ApplicationName applicationName) {
-    super();
-    this.logger = logger;
-    this.dataSource = dataSource;
-    this.flywayFactoryBean = flywayFactoryBean;
-    this.applicationName = applicationName;
-  }
-
-  @CommandHandler(logStart = CommandLogLevel.INFO, logFinish = CommandLogLevel.INFO)
-  @Transactional
-  @EventEmitter(selectorName = NotificationEventConstants.SELECTOR_NAME, selectorValue = NotificationEventConstants.INITIALIZE)
-  public String initialize(final InitializeServiceCommand initializeServiceCommand) {
-    this.logger.debug("Start service migration.");
-    this.flywayFactoryBean.create(this.dataSource).migrate();
-    return this.applicationName.getVersionString();
-  }
+	
+	private final Logger logger;
+	private final DataSource dataSource;
+	private final FlywayFactoryBean flywayFactoryBean;
+	private final ApplicationName applicationName;
+	
+	@Autowired
+	public MigrationAggregate(@Qualifier(ServiceConstants.LOGGER_NAME) final Logger logger,
+	                          final DataSource dataSource,
+	                          final FlywayFactoryBean flywayFactoryBean,
+	                          final ApplicationName applicationName) {
+		super();
+		this.logger = logger;
+		this.dataSource = dataSource;
+		this.flywayFactoryBean = flywayFactoryBean;
+		this.applicationName = applicationName;
+	}
+	
+	@CommandHandler(logStart = CommandLogLevel.INFO, logFinish = CommandLogLevel.INFO)
+	@Transactional
+	@EventEmitter(selectorName = NotificationEventConstants.SELECTOR_NAME, selectorValue = NotificationEventConstants.INITIALIZE)
+	public String initialize(final InitializeServiceCommand initializeServiceCommand) {
+		this.logger.debug("Start service migration.");
+		this.flywayFactoryBean.create(this.dataSource).migrate();
+		return this.applicationName.getVersionString();
+	}
 }
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/SMSConfigurationAggregate.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/SMSConfigurationAggregate.java
new file mode 100644
index 0000000..1d240fb
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/SMSConfigurationAggregate.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.command.handler;
+
+import org.apache.fineract.cn.command.annotation.Aggregate;
+import org.apache.fineract.cn.command.annotation.CommandHandler;
+import org.apache.fineract.cn.command.annotation.CommandLogLevel;
+import org.apache.fineract.cn.command.annotation.EventEmitter;
+import org.apache.fineract.cn.notification.api.v1.domain.SMSConfiguration;
+import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
+import org.apache.fineract.cn.notification.service.internal.command.CreateSMSConfigurationCommand;
+import org.apache.fineract.cn.notification.service.internal.mapper.SMSConfigurationMapper;
+import org.apache.fineract.cn.notification.service.internal.repository.SMSGatewayConfigurationEntity;
+import org.apache.fineract.cn.notification.service.internal.repository.SMSGatewayConfigurationRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+
+@SuppressWarnings("unused")
+@Aggregate
+public class SMSConfigurationAggregate {
+	
+	private final SMSGatewayConfigurationRepository smsGatewayConfigurationRepository;
+	
+	@Autowired
+	public SMSConfigurationAggregate(SMSGatewayConfigurationRepository smsGatewayConfigurationRepository) {
+		super();
+		this.smsGatewayConfigurationRepository = smsGatewayConfigurationRepository;
+	}
+	
+	@CommandHandler(logStart = CommandLogLevel.INFO, logFinish = CommandLogLevel.INFO)
+	@Transactional
+	@EventEmitter(selectorName = NotificationEventConstants.SELECTOR_NAME, selectorValue = NotificationEventConstants.POST_SMS_CONFIGURATION)
+	public String createSMSConfiguration(final CreateSMSConfigurationCommand createSMSConfigurationCommand) {
+		SMSConfiguration smsConfiguration = createSMSConfigurationCommand.getSMSConfiguration();
+		final SMSGatewayConfigurationEntity entity = SMSConfigurationMapper.map(smsConfiguration);
+		this.smsGatewayConfigurationRepository.save(entity);
+		
+		return smsConfiguration.getIdentifier();
+	}
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/SampleAggregate.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/SampleAggregate.java
deleted file mode 100644
index a21589d..0000000
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/SampleAggregate.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.fineract.cn.notification.service.internal.command.handler;
-
-import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
-import org.apache.fineract.cn.notification.service.internal.command.SampleCommand;
-import org.apache.fineract.cn.command.annotation.Aggregate;
-import org.apache.fineract.cn.command.annotation.CommandHandler;
-import org.apache.fineract.cn.command.annotation.CommandLogLevel;
-import org.apache.fineract.cn.command.annotation.EventEmitter;
-import org.apache.fineract.cn.notification.service.internal.repository.SampleJpaEntity;
-import org.apache.fineract.cn.notification.service.internal.repository.SampleJpaEntityRepository;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.transaction.annotation.Transactional;
-
-@SuppressWarnings("unused")
-@Aggregate
-public class SampleAggregate {
-
-  private final SampleJpaEntityRepository sampleJpaEntityRepository;
-
-  @Autowired
-  public SampleAggregate(final SampleJpaEntityRepository sampleJpaEntityRepository) {
-    super();
-    this.sampleJpaEntityRepository = sampleJpaEntityRepository;
-  }
-
-  //TODO: Think about your command handler logging, then delete this comment.
-  // The log levels provided in the command handler cause log messages to be emitted each time this
-  // command handler is called before and after the call. Before the call, the command is logged
-  // using its toString() method, and after the call, the emitted event is logged via its toString()
-  // method.
-  //
-  // If you wish to adjust the information in the log messages, do so via the toString() methods.
-  // Financial transactions, passwords, and customer address data are examples of information which
-  // should not be placed in the logs.
-  //
-  // If a command handler should not emit a log message, change logStart and logFinish to:
-  // CommandLogLevel.NONE.
-  @CommandHandler(logStart = CommandLogLevel.INFO, logFinish = CommandLogLevel.INFO)
-  @Transactional
-  @EventEmitter(selectorName = NotificationEventConstants.SELECTOR_NAME, selectorValue = NotificationEventConstants.POST_SAMPLE)
-  public String sample(final SampleCommand sampleCommand) {
-
-    final SampleJpaEntity entity = new SampleJpaEntity();
-    entity.setIdentifier(sampleCommand.sample().getIdentifier());
-    entity.setPayload(sampleCommand.sample().getPayload());
-    this.sampleJpaEntityRepository.save(entity);
-
-    return sampleCommand.sample().getIdentifier();
-  }
-}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/mapper/EmailConfigurationMapper.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/mapper/EmailConfigurationMapper.java
index 10e4a86..d9c5649 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/mapper/EmailConfigurationMapper.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/mapper/EmailConfigurationMapper.java
@@ -16,34 +16,51 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+
 package org.apache.fineract.cn.notification.service.internal.mapper;
 
 import org.apache.fineract.cn.notification.api.v1.domain.EmailConfiguration;
-import org.apache.fineract.cn.notification.service.internal.repository.EmailGatewayConfiguration;
+import org.apache.fineract.cn.notification.service.internal.repository.EmailGatewayConfigurationEntity;
 
 import java.util.ArrayList;
 import java.util.List;
 import java.util.stream.Collectors;
 
 public class EmailConfigurationMapper {
-
-  private EmailConfigurationMapper() {
-    super();
-  }
-
-  public static EmailConfiguration map(final EmailGatewayConfiguration emailGatewayConfiguration) {
-    final EmailConfiguration emailConfiguration = new EmailConfiguration();
-    emailConfiguration.setIdentifier(emailGatewayConfiguration.getIdentifier());
-    emailConfiguration.setHost(emailGatewayConfiguration.getHost());
-    emailConfiguration.setPort(emailGatewayConfiguration.getPort());
-    emailConfiguration.setUsername(emailGatewayConfiguration.getUsername());
-    emailConfiguration.setApp_id(emailGatewayConfiguration.getApp_id());
-    return emailConfiguration;
-  }
-
-//  public static List<EmailGatewayConfiguration> map(final List<EmailGatewayConfiguration> emailGatewayConfiguration) {
-//    final ArrayList<EmailGatewayConfiguration> entities = new ArrayList<>(emailGatewayConfiguration.size());
-//    entities.addAll(emailGatewayConfiguration.stream().map(EmailGatewayConfiguration::map).collect(Collectors.toList()));
-//    return entities;
-//  }
+	
+	private EmailConfigurationMapper() {
+		super();
+	}
+	
+	public static EmailConfiguration map(final EmailGatewayConfigurationEntity emailGatewayConfigurationEntity) {
+		final EmailConfiguration emailConfiguration = new EmailConfiguration();
+		emailConfiguration.setIdentifier(emailGatewayConfigurationEntity.getIdentifier());
+		emailConfiguration.setHost(emailGatewayConfigurationEntity.getHost());
+		emailConfiguration.setPort(emailGatewayConfigurationEntity.getPort());
+		emailConfiguration.setUsername(emailGatewayConfigurationEntity.getUsername());
+		emailConfiguration.setApp_password(emailGatewayConfigurationEntity.getApp_password());
+		return emailConfiguration;
+	}
+	
+	public static EmailGatewayConfigurationEntity map(final EmailConfiguration emailConfiguration) {
+		final EmailGatewayConfigurationEntity emailGatewayConfigurationEntity = new EmailGatewayConfigurationEntity();
+		emailGatewayConfigurationEntity.setIdentifier(emailConfiguration.getIdentifier());
+		emailGatewayConfigurationEntity.setHost(emailConfiguration.getHost());
+		emailGatewayConfigurationEntity.setPort(emailConfiguration.getPort());
+		emailGatewayConfigurationEntity.setProtocol(emailConfiguration.getProtocol());
+		emailGatewayConfigurationEntity.setApp_password(emailConfiguration.getApp_password());
+		emailGatewayConfigurationEntity.setUsername(emailConfiguration.getUsername());
+		emailGatewayConfigurationEntity.setSmtp_auth(emailConfiguration.getSmtp_auth());
+		emailGatewayConfigurationEntity.setStart_tls(emailConfiguration.getStart_tls());
+		emailGatewayConfigurationEntity.setState(emailConfiguration.getState());
+		return emailGatewayConfigurationEntity;
+	}
+	
+	public static List<EmailConfiguration> map(final List<EmailGatewayConfigurationEntity> emailGatewayConfigurationEntity) {
+		final ArrayList<EmailConfiguration> emailConfigurationList = new ArrayList<>(emailGatewayConfigurationEntity.size());
+		emailConfigurationList.addAll(emailGatewayConfigurationEntity.stream().map(EmailConfigurationMapper::map).collect(Collectors.toList()));
+		return emailConfigurationList;
+	}
+	
 }
+
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/mapper/SMSConfigurationMapper.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/mapper/SMSConfigurationMapper.java
index 43e6c1c..60418e8 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/mapper/SMSConfigurationMapper.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/mapper/SMSConfigurationMapper.java
@@ -19,29 +19,41 @@
 package org.apache.fineract.cn.notification.service.internal.mapper;
 
 import org.apache.fineract.cn.notification.api.v1.domain.SMSConfiguration;
-import org.apache.fineract.cn.notification.service.internal.repository.SMSGatewayConfiguration;
+import org.apache.fineract.cn.notification.service.internal.repository.SMSGatewayConfigurationEntity;
 
 import java.util.ArrayList;
 import java.util.List;
 import java.util.stream.Collectors;
 
 public class SMSConfigurationMapper {
-
-  private SMSConfigurationMapper() {
-    super();
-  }
-
-  public static SMSConfiguration map(final SMSGatewayConfiguration smsGatewayConfiguration) {
-    final SMSConfiguration smsConfiguration = new SMSConfiguration();
-    smsConfiguration.setIdentifier(smsGatewayConfiguration.getIdentifier());
-    smsConfiguration.setAccountid(smsGatewayConfiguration.getAccountid());
-    smsConfiguration.setAuth_token(smsGatewayConfiguration.getAuth_token());
-    return smsConfiguration;
-  }
-
-//  public static List<SMSGatewayConfiguration> map(final List<SMSGatewayConfiguration> smsGatewayConfiguration) {
-//    final ArrayList<SMSGatewayConfiguration> entities = new ArrayList<>(smsGatewayConfiguration.size());
-//    entities.addAll(smsGatewayConfiguration.stream().map(SMSConfigurationMapper::map).collect(Collectors.toList()));
-//    return entities;
-//  }
+	
+	private SMSConfigurationMapper() {
+		super();
+	}
+	
+	public static SMSConfiguration map(final SMSGatewayConfigurationEntity smsGatewayConfigurationEntity) {
+		final SMSConfiguration smsConfiguration = new SMSConfiguration();
+		smsConfiguration.setIdentifier(smsGatewayConfigurationEntity.getIdentifier());
+		smsConfiguration.setAccount_sid(smsGatewayConfigurationEntity.getAccount_sid());
+		smsConfiguration.setAuth_token(smsGatewayConfigurationEntity.getAuth_token());
+		smsConfiguration.setSender_number(smsGatewayConfigurationEntity.getSender_number());
+		smsConfiguration.setState(smsGatewayConfigurationEntity.getState());
+		return smsConfiguration;
+	}
+	
+	public static SMSGatewayConfigurationEntity map(final SMSConfiguration smsConfiguration) {
+		final SMSGatewayConfigurationEntity smsGatewayConfigurationEntity = new SMSGatewayConfigurationEntity();
+		smsGatewayConfigurationEntity.setIdentifier(smsConfiguration.getIdentifier());
+		smsGatewayConfigurationEntity.setAccount_sid(smsConfiguration.getAccount_sid());
+		smsGatewayConfigurationEntity.setAuth_token(smsConfiguration.getAuth_token());
+		smsGatewayConfigurationEntity.setSender_number(smsConfiguration.getSender_number());
+		smsGatewayConfigurationEntity.setState(smsConfiguration.getState());
+		return smsGatewayConfigurationEntity;
+	}
+	
+	public static List<SMSConfiguration> map(final List<SMSGatewayConfigurationEntity> smsGatewayConfigurationEntity) {
+		final ArrayList<SMSConfiguration> smsConfigurationList = new ArrayList<>(smsGatewayConfigurationEntity.size());
+		smsConfigurationList.addAll(smsGatewayConfigurationEntity.stream().map(SMSConfigurationMapper::map).collect(Collectors.toList()));
+		return smsConfigurationList;
+	}
 }
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/mapper/SampleMapper.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/mapper/SampleMapper.java
deleted file mode 100644
index a56b7aa..0000000
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/mapper/SampleMapper.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.fineract.cn.notification.service.internal.mapper;
-
-import org.apache.fineract.cn.notification.api.v1.domain.Sample;
-import org.apache.fineract.cn.notification.service.internal.repository.SampleJpaEntity;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.stream.Collectors;
-
-public class SampleMapper {
-
-  private SampleMapper() {
-    super();
-  }
-
-  public static Sample map(final SampleJpaEntity sampleJpaEntity) {
-    final Sample sample = new Sample();
-    sample.setIdentifier(sampleJpaEntity.getIdentifier());
-    sample.setPayload(sampleJpaEntity.getPayload());
-    return sample;
-  }
-
-  public static List<Sample> map(final List<SampleJpaEntity> sampleJpaEntities) {
-    final ArrayList<Sample> samples = new ArrayList<>(sampleJpaEntities.size());
-    samples.addAll(sampleJpaEntities.stream().map(SampleMapper::map).collect(Collectors.toList()));
-    return samples;
-  }
-}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/EmailGatewayConfiguration.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/EmailGatewayConfiguration.java
deleted file mode 100644
index c344708..0000000
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/EmailGatewayConfiguration.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.fineract.cn.notification.service.internal.repository;
-
-import javax.persistence.*;
-
-@SuppressWarnings("unused")
-@Entity
-@Table(name = "email_gateway_configuration")
-public class EmailGatewayConfiguration {
-
-  @Id
-  @GeneratedValue(strategy = GenerationType.IDENTITY)
-  @Column(name = "id")
-  private Long id;
-  @Column(name = "identifier")
-  private String identifier;
-  @Column(name = "host")
-  private String host;
-  @Column(name = "port")
-  private String port;
-  @Column(name = "username")
-  private String username;
-  @Column(name = "app_id")
-  private String app_id;
-  @Column(name = "smtp_auth")
-  private String smtp_auth;
-  @Column(name = "start_tls")
-  private String start_tls;
-  @Column(name = "option")
-  private String option;
-
-  public EmailGatewayConfiguration() {
-    super();
-  }
-
-  public Long getId() {
-    return id;
-  }
-
-  public void setId(Long id) {
-    this.id = id;
-  }
-
-  public String getIdentifier() {
-    return this.identifier;
-  }
-
-  public void setIdentifier(final String identifier) {
-    this.identifier = identifier;
-  }
-
-  public String getHost() {
-    return host;
-  }
-
-  public void setHost(String host) {
-    this.host = host;
-  }
-
-  public String getPort() {
-    return port;
-  }
-
-  public void setPort(String port) {
-    this.port = port;
-  }
-
-  public String getUsername() {
-    return username;
-  }
-
-  public void setUsername(String username) {
-    this.username = username;
-  }
-
-  public String getApp_id() {
-    return app_id;
-  }
-
-  public void setApp_id(String app_id) {
-    this.app_id = app_id;
-  }
-
-  public String getSmtp_auth() {
-    return smtp_auth;
-  }
-
-  public void setSmtp_auth(String smtp_auth) {
-    this.smtp_auth = smtp_auth;
-  }
-
-  public String getStart_tls() {
-    return start_tls;
-  }
-
-  public void setStart_tls(String start_tls) {
-    this.start_tls = start_tls;
-  }
-
-  public String getOption() {
-    return option;
-  }
-
-  public void setOption(String option) {
-    this.option = option;
-  }
-}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/EmailGatewayConfigurationEntity.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/EmailGatewayConfigurationEntity.java
new file mode 100644
index 0000000..2697a2b
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/EmailGatewayConfigurationEntity.java
@@ -0,0 +1,134 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.repository;
+
+import javax.persistence.*;
+
+@SuppressWarnings("unused")
+@Entity
+@Table(name = "wada_email_gateway_configurations")
+public class EmailGatewayConfigurationEntity {
+	
+	@Id
+	@GeneratedValue(strategy = GenerationType.IDENTITY)
+	@Column(name = "id")
+	private Long id;
+	@Column(name = "identifier")
+	private String identifier;
+	@Column(name = "host")
+	private String host;
+	@Column(name = "port")
+	private String port;
+	@Column(name = "username")
+	private String username;
+	@Column(name = "app_password")
+	private String app_password;
+	@Column(name = "protocol")
+	private String protocol;
+	@Column(name = "smtp_auth")
+	private String smtp_auth;
+	@Column(name = "start_tls")
+	private String start_tls;
+	@Column(name = "state")
+	private String state;
+	
+	public EmailGatewayConfigurationEntity() {
+		super();
+	}
+	
+	public Long getId() {
+		return id;
+	}
+	
+	public void setId(Long id) {
+		this.id = id;
+	}
+	
+	public String getIdentifier() {
+		return this.identifier;
+	}
+	
+	public void setIdentifier(final String identifier) {
+		this.identifier = identifier;
+	}
+	
+	public String getHost() {
+		return host;
+	}
+	
+	public void setHost(String host) {
+		this.host = host;
+	}
+	
+	public String getPort() {
+		return port;
+	}
+	
+	public void setPort(String port) {
+		this.port = port;
+	}
+	
+	public String getProtocol() {
+		return protocol;
+	}
+	
+	public void setProtocol(String protocol) {
+		this.protocol = protocol;
+	}
+	
+	public String getUsername() {
+		return username;
+	}
+	
+	public void setUsername(String username) {
+		this.username = username;
+	}
+	
+	public String getApp_password() {
+		return app_password;
+	}
+	
+	public void setApp_password(String app_password) {
+		this.app_password = app_password;
+	}
+	
+	public String getSmtp_auth() {
+		return smtp_auth;
+	}
+	
+	public void setSmtp_auth(String smtp_auth) {
+		this.smtp_auth = smtp_auth;
+	}
+	
+	public String getStart_tls() {
+		return start_tls;
+	}
+	
+	public void setStart_tls(String start_tls) {
+		this.start_tls = start_tls;
+	}
+	
+	public String getState() {
+		return state;
+	}
+	
+	public void setState(String state) {
+		this.state = state;
+	}
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/EmailGatewayConfigurationRepository.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/EmailGatewayConfigurationRepository.java
index b380def..1a5af4c 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/EmailGatewayConfigurationRepository.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/EmailGatewayConfigurationRepository.java
@@ -19,11 +19,16 @@
 package org.apache.fineract.cn.notification.service.internal.repository;
 
 import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.Query;
+import org.springframework.data.repository.query.Param;
 import org.springframework.stereotype.Repository;
 
 import java.util.Optional;
 
 @Repository
-public interface EmailGatewayConfigurationRepository extends JpaRepository<EmailGatewayConfiguration, Long> {
-  Optional<EmailGatewayConfiguration> findByIdentifier(String identifier);
+public interface EmailGatewayConfigurationRepository extends JpaRepository<EmailGatewayConfigurationEntity, Long> {
+	Optional<EmailGatewayConfigurationEntity> findByIdentifier(String identifier);
+	
+	@Query("SELECT CASE WHEN COUNT(c) > 0 THEN 'true' ELSE 'false' END FROM EmailGatewayConfigurationEntity c WHERE c.identifier = :identifier")
+	Boolean existsByIdentifier(@Param("identifier") final String identifier);
 }
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SMSGatewayConfiguration.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SMSGatewayConfiguration.java
deleted file mode 100644
index 770db6a..0000000
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SMSGatewayConfiguration.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.fineract.cn.notification.service.internal.repository;
-
-import javax.persistence.*;
-
-@SuppressWarnings("unused")
-@Entity
-@Table(name = "sms_gateway_configuration")
-public class SMSGatewayConfiguration {
-
-  @Id
-  @GeneratedValue(strategy = GenerationType.IDENTITY)
-  @Column(name = "id")
-  private Long id;
-  @Column(name = "identifier")
-  private String identifier;
-  @Column(name = "organisation")
-  private String organisation;
-  @Column(name = "auth_token")
-  private String auth_token;
-  @Column(name = "accountid")
-  private String accountid;
-  @Column(name = "option")
-  private String option;
-
-  public SMSGatewayConfiguration() {
-    super();
-  }
-
-  public Long getId() {
-    return id;
-  }
-
-  public void setId(Long id) {
-    this.id = id;
-  }
-
-  public String getIdentifier() {
-    return this.identifier;
-  }
-
-  public void setIdentifier(final String identifier) {
-    this.identifier = identifier;
-  }
-
-  public String getOrganisation() {
-    return organisation;
-  }
-
-  public void setOrganisation(String organisation) {
-    this.organisation = organisation;
-  }
-
-  public String getAuth_token() {
-    return auth_token;
-  }
-
-  public void setAuth_token(String auth_token) {
-    this.auth_token = auth_token;
-  }
-
-  public String getAccountid() {
-    return accountid;
-  }
-
-  public void setAccountid(String accountid) {
-    this.accountid = accountid;
-  }
-
-  public String getOption() {
-    return option;
-  }
-
-  public void setOption(String option) {
-    this.option = option;
-  }
-}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SMSGatewayConfigurationEntity.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SMSGatewayConfigurationEntity.java
new file mode 100644
index 0000000..dcf3301
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SMSGatewayConfigurationEntity.java
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.repository;
+
+import javax.persistence.*;
+
+@SuppressWarnings("unused")
+@Entity
+@Table(name = "wada_sms_gateway_configurations")
+public class SMSGatewayConfigurationEntity {
+	
+	@Id
+	@GeneratedValue(strategy = GenerationType.IDENTITY)
+	@Column(name = "id")
+	private Long id;
+	@Column(name = "identifier")
+	private String identifier;
+	@Column(name = "account_sid")
+	private String account_sid;
+	@Column(name = "auth_token")
+	private String auth_token;
+	@Column(name = "sender_number")
+	private String sender_number;
+	@Column(name = "state")
+	private String state;
+	
+	public SMSGatewayConfigurationEntity() {
+		super();
+	}
+	
+	public Long getId() {
+		return id;
+	}
+	
+	public void setId(Long id) {
+		this.id = id;
+	}
+	
+	public String getIdentifier() {
+		return this.identifier;
+	}
+	
+	public void setIdentifier(final String identifier) {
+		this.identifier = identifier;
+	}
+	
+	public String getAuth_token() {
+		return auth_token;
+	}
+	
+	public void setAuth_token(String auth_token) {
+		this.auth_token = auth_token;
+	}
+	
+	public String getAccount_sid() {
+		return account_sid;
+	}
+	
+	public void setAccount_sid(String account_sid) {
+		this.account_sid = account_sid;
+	}
+	
+	public String getState() {
+		return state;
+	}
+	
+	public void setState(String state) {
+		this.state = state;
+	}
+	
+	public String getSender_number() {
+		return sender_number;
+	}
+	
+	public void setSender_number(String sender_number) {
+		this.sender_number = sender_number;
+	}
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SMSGatewayConfigurationRepository.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SMSGatewayConfigurationRepository.java
index 7daae78..ebac1c7 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SMSGatewayConfigurationRepository.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SMSGatewayConfigurationRepository.java
@@ -19,11 +19,16 @@
 package org.apache.fineract.cn.notification.service.internal.repository;
 
 import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.Query;
+import org.springframework.data.repository.query.Param;
 import org.springframework.stereotype.Repository;
 
 import java.util.Optional;
 
 @Repository
-public interface SMSGatewayConfigurationRepository extends JpaRepository<SMSGatewayConfiguration, Long> {
-  Optional<SMSGatewayConfiguration> findByIdentifier(String identifier);
+public interface SMSGatewayConfigurationRepository extends JpaRepository<SMSGatewayConfigurationEntity, Long> {
+	Optional<SMSGatewayConfigurationEntity> findByIdentifier(String identifier);
+	
+	@Query("SELECT CASE WHEN COUNT(c) > 0 THEN 'true' ELSE 'false' END FROM SMSGatewayConfigurationEntity c WHERE c.identifier = :identifier")
+	Boolean existsByIdentifier(@Param("identifier") final String identifier);
 }
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SampleJpaEntity.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SampleJpaEntity.java
deleted file mode 100644
index f740d85..0000000
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SampleJpaEntity.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.fineract.cn.notification.service.internal.repository;
-
-import javax.persistence.*;
-
-@SuppressWarnings("unused")
-@Entity
-@Table(name = "template_samples")
-public class SampleJpaEntity {
-
-  @Id
-  @GeneratedValue(strategy = GenerationType.IDENTITY)
-  @Column(name = "id")
-  private Long id;
-  @Column(name = "identifier")
-  private String identifier;
-  @Column(name = "payload")
-  private String payload;
-
-  public SampleJpaEntity() {
-    super();
-  }
-
-  public Long getId() {
-    return id;
-  }
-
-  public void setId(Long id) {
-    this.id = id;
-  }
-
-  public String getIdentifier() {
-    return this.identifier;
-  }
-
-  public void setIdentifier(final String identifier) {
-    this.identifier = identifier;
-  }
-
-  public String getPayload() {
-    return payload;
-  }
-
-  public void setPayload(String payload) {
-    this.payload = payload;
-  }
-}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/TemplateEntity.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/TemplateEntity.java
new file mode 100644
index 0000000..c699b9c
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/TemplateEntity.java
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.repository;
+
+import javax.persistence.*;
+import java.util.Objects;
+
+@SuppressWarnings("unused")
+@Entity
+@Table(name = "wada_templates")
+public class TemplateEntity {
+	
+	@Id
+	@GeneratedValue(strategy = GenerationType.IDENTITY)
+	@Column(name = "id")
+	private Long id;
+	@Column(name = "identifier")
+	private String identifier;
+	@Column(name = "event")
+	private String event;
+	@Column(name = "url")
+	private String url;
+	
+	
+	public TemplateEntity() {
+		super();
+	}
+	
+	public Long getId() {
+		return id;
+	}
+	
+	public void setId(Long id) {
+		this.id = id;
+	}
+	
+	public String getIdentifier() {
+		return this.identifier;
+	}
+	
+	public void setIdentifier(final String identifier) {
+		this.identifier = identifier;
+	}
+	
+	public String getEvent() {
+		return event;
+	}
+	
+	public void setEvent(String event) {
+		this.event = event;
+	}
+	
+	public String getUrl() {
+		return url;
+	}
+	
+	public void setUrl(String url) {
+		this.url = url;
+	}
+	
+	@Override
+	public boolean equals(Object o) {
+		if (this == o) return true;
+		if (o == null || getClass() != o.getClass()) return false;
+		TemplateEntity that = (TemplateEntity) o;
+		return Objects.equals(id, that.id) &&
+				Objects.equals(identifier, that.identifier) &&
+				Objects.equals(event, that.event) &&
+				Objects.equals(url, that.url);
+	}
+	
+	@Override
+	public int hashCode() {
+		return Objects.hash(id, identifier, event, url);
+	}
+	
+	@Override
+	public String toString() {
+		return "TemplateEntity{" +
+				"id=" + id +
+				", identifier='" + identifier + '\'' +
+				", event='" + event + '\'' +
+				", url='" + url + '\'' +
+				'}';
+	}
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SampleJpaEntityRepository.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/TemplateRepository.java
similarity index 87%
rename from service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SampleJpaEntityRepository.java
rename to service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/TemplateRepository.java
index b4d8abd..5e82d1f 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SampleJpaEntityRepository.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/TemplateRepository.java
@@ -18,11 +18,12 @@
  */
 package org.apache.fineract.cn.notification.service.internal.repository;
 
-import java.util.Optional;
 import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.stereotype.Repository;
 
+import java.util.Optional;
+
 @Repository
-public interface SampleJpaEntityRepository extends JpaRepository<SampleJpaEntity, Long> {
-  Optional<SampleJpaEntity> findByIdentifier(String identifier);
+public interface TemplateRepository extends JpaRepository<TemplateEntity, Long> {
+	Optional<TemplateEntity> findByIdentifier(String identifier);
 }
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/EmailSender.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/EmailSender.java
deleted file mode 100644
index bebb3c9..0000000
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/EmailSender.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.fineract.cn.notification.service.internal.service;
-
-
-import org.apache.fineract.cn.notification.service.internal.mapper.EmailConfigurationMapper;
-import org.apache.fineract.cn.notification.service.internal.repository.EmailGatewayConfiguration;
-import org.apache.fineract.cn.notification.service.internal.repository.EmailGatewayConfigurationRepository;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.mail.SimpleMailMessage;
-import org.springframework.mail.javamail.JavaMailSender;
-import org.springframework.stereotype.Service;
-
-import java.util.Optional;
-
-@Service
-public class EmailSender {
-
-    @Autowired
-    @Qualifier("gmail")
-    private JavaMailSender sender;
-
-    private final EmailGatewayConfigurationRepository emailGatewayConfigurationRepository;
-
-    @Autowired
-    public EmailSender(final EmailGatewayConfigurationRepository emailGatewayConfigurationRepository) {
-        super();
-        this.emailGatewayConfigurationRepository = emailGatewayConfigurationRepository;
-    }
-
-//    public Optional<EmailGatewayConfiguration> findByIdentifier(final String identifier) {
-//        return this.emailGatewayConfigurationRepository.findByIdentifier(identifier).map(EmailGatewayConfiguration::map);
-//    }
-
-    public void sendEmail(String to, String subject, String message) {
-        SimpleMailMessage mail = new SimpleMailMessage();
-        mail.setTo(to);
-        mail.setSubject(subject);
-        mail.setText(message);
-        sender.send(mail);
-    }
-
-}
\ No newline at end of file
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/EmailService.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/EmailService.java
new file mode 100644
index 0000000..5260e98
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/EmailService.java
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.service;
+
+import org.apache.fineract.cn.notification.service.ServiceConstants;
+import org.slf4j.Logger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.mail.MailException;
+import org.springframework.mail.SimpleMailMessage;
+import org.springframework.mail.javamail.JavaMailSender;
+import org.springframework.mail.javamail.JavaMailSenderImpl;
+import org.springframework.stereotype.Component;
+
+import java.util.Properties;
+
+@Component
+public class EmailService {
+	
+	private Logger logger;
+	
+	@Autowired
+	public EmailService(@Qualifier(ServiceConstants.LOGGER_NAME) final Logger logger) {
+		super();
+		this.logger = logger;
+	}
+	
+	public void sendEmail(String from, String to, String subject, String message) {
+		
+		JavaMailSender sender = getJavaMailSender();
+		try {
+			SimpleMailMessage mail = new SimpleMailMessage();
+			mail.setFrom(from);
+			mail.setTo(to);
+			mail.setSubject(subject);
+			mail.setText(message);
+			sender.send(mail);
+		} catch (MailException exception) {
+			logger.debug("Caused by:" + exception.getCause().toString());
+		}
+	}
+	
+	public JavaMailSender getJavaMailSender() {
+		
+		JavaMailSenderImpl mailSender = new JavaMailSenderImpl();
+		mailSender.setHost("smtp.gmail.com");
+		mailSender.setPort(587);
+		mailSender.setUsername("fineractcnnotificationdemo@gmail.com");
+		//mailSender.setPassword("pnuugpwmcibipdpw");
+		mailSender.setPassword("fineractcnnotification");
+		
+		Properties properties = mailSender.getJavaMailProperties();
+		properties.put(ServiceConstants.MAIL_TRANSPORT_PROTOCOL_PROPERTY,
+				ServiceConstants.MAIL_TRANSPORT_PROTOCOL_VALUE);
+		properties.put(ServiceConstants.MAIL_SMTP_AUTH_PROPERTY,
+				ServiceConstants.MAIL_SMTP_AUTH_VALUE);
+		properties.put(ServiceConstants.MAIL_SMTP_STARTTLS_ENABLE_PROPERTY,
+				ServiceConstants.MAIL_SMTP_STARTTLS_ENABLE_VALUE);
+		mailSender.setJavaMailProperties(properties);
+		
+		return mailSender;
+	}
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/NotificationService.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/NotificationService.java
new file mode 100644
index 0000000..8b25f1b
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/NotificationService.java
@@ -0,0 +1,118 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.service;
+
+import org.apache.fineract.cn.customer.api.v1.domain.Customer;
+import org.apache.fineract.cn.notification.api.v1.domain.EmailConfiguration;
+import org.apache.fineract.cn.notification.api.v1.domain.SMSConfiguration;
+import org.apache.fineract.cn.notification.service.ServiceConstants;
+import org.apache.fineract.cn.notification.service.internal.mapper.EmailConfigurationMapper;
+import org.apache.fineract.cn.notification.service.internal.mapper.SMSConfigurationMapper;
+import org.apache.fineract.cn.notification.service.internal.repository.EmailGatewayConfigurationRepository;
+import org.apache.fineract.cn.notification.service.internal.repository.SMSGatewayConfigurationRepository;
+import org.apache.fineract.cn.notification.service.internal.service.helperservice.CustomerAdaptor;
+import org.apache.fineract.cn.notification.service.internal.service.helperservice.NotificationAuthentication;
+import org.slf4j.Logger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Optional;
+
+@Service
+public class NotificationService {
+	private final SMSService smsService;
+	private final EmailService emailService;
+	
+	private final SMSGatewayConfigurationRepository smsGatewayConfigurationRepository;
+	private final EmailGatewayConfigurationRepository emailGatewayConfigurationRepository;
+	
+	private final NotificationAuthentication notificationAuthentication;
+	private final CustomerAdaptor customerAdaptor;
+	private final Logger logger;
+	
+	private final String configureIdentifier = "Twilio";
+	
+	@Autowired
+	public NotificationService(final SMSGatewayConfigurationRepository smsGatewayConfigurationRepository,
+	                           final EmailGatewayConfigurationRepository emailGatewayConfigurationRepository,
+	                           final CustomerAdaptor customerAdaptor,
+	                           final SMSService smsService,
+	                           final EmailService emailService,
+	                           final NotificationAuthentication notificationAuthentication,
+	                           @Qualifier(ServiceConstants.LOGGER_NAME) final Logger logger
+	) {
+		super();
+		this.smsGatewayConfigurationRepository = smsGatewayConfigurationRepository;
+		this.emailGatewayConfigurationRepository = emailGatewayConfigurationRepository;
+		this.customerAdaptor = customerAdaptor;
+		this.smsService = smsService;
+		this.emailService = emailService;
+		this.notificationAuthentication = notificationAuthentication;
+		this.logger = logger;
+		this.logger.debug("{} has been initiated", this.getClass());
+	}
+	
+	
+	public List<SMSConfiguration> findAllActiveSMSConfigurationEntities() {
+		return SMSConfigurationMapper.map(this.smsGatewayConfigurationRepository.findAll());
+	}
+	
+	public List<EmailConfiguration> findAllActiveEmailConfigurationEntities() {
+		return EmailConfigurationMapper.map(this.emailGatewayConfigurationRepository.findAll());
+	}
+	
+	public Optional<SMSConfiguration> findSMSConfigurationByIdentifier(final String identifier) {
+		return this.smsGatewayConfigurationRepository.findByIdentifier(identifier).map(SMSConfigurationMapper::map);
+	}
+	
+	
+	public Optional<EmailConfiguration> findEmailConfigurationByIdentifier(final String identifier) {
+		return this.emailGatewayConfigurationRepository.findByIdentifier(identifier).map(EmailConfigurationMapper::map);
+	}
+	
+	public Optional<Customer> findCustomer(final String customerIdentifier, String tenant) {
+		notificationAuthentication.authenticate(tenant);
+		return this.customerAdaptor.findCustomer(customerIdentifier);
+	}
+	
+	public Boolean smsConfigurationExists(final String identifier) {
+		return this.smsGatewayConfigurationRepository.existsByIdentifier(identifier);
+	}
+	
+	public Boolean emailConfigurationExists(final String identifier) {
+		return this.emailGatewayConfigurationRepository.existsByIdentifier(identifier);
+	}
+	
+	public void configureSMSSender() {
+		SMSConfiguration configuration = findSMSConfigurationByIdentifier(configureIdentifier).get();
+		smsService.configure(configuration.getAccount_sid(),
+				configuration.getAuth_token(),
+				configuration.getSender_number());
+	}
+	
+	public void sendSMS(String receiver, String template) {
+		this.smsService.sendSMS(receiver, template);
+	}
+	
+	public void sendEmail(String from, String to, String subject, String message) {
+		this.emailService.sendEmail(from, to, subject, message);
+	}
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SMSSender.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SMSSender.java
deleted file mode 100644
index ed98bea..0000000
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SMSSender.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.fineract.cn.notification.service.internal.service;
-
-
-import com.twilio.Twilio;
-import com.twilio.rest.api.v2010.account.Message;
-import com.twilio.type.PhoneNumber;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.context.annotation.Configuration;
-import com.twilio.rest.api.v2010.account.MessageCreator;
-import org.springframework.stereotype.Service;
-
-@Service
-@ConfigurationProperties(prefix ="smssender")
-public class SMSSender {
-
-    //@Value(value = "${smssender.accountSID}")
-    public String ACCOUNT_SID = "AC1fde2c6f26f367b93231c5fdb944c908";
-
-    //@Value("${smssender.authToken}")
-    public String AUTH_TOKEN = "bc9a53e41745b8471e0ecafc859d86aa";
-
-    //@Value("${smssender.senderNumber}")
-    public String sender = "+1 510-944-1898";
-
-    //@Value("${fineract.customer.accountcreated}")
-
-    public String template = "Test from the demo-server";
-
-    public void sendSMS(String receiver, String template) {
-
-        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
-
-        MessageCreator messageCreator = Message.creator(ACCOUNT_SID,new PhoneNumber(receiver), new PhoneNumber(sender), template);
-        Message message = messageCreator.create();
-        System.out.println(message.getSid());
-        System.out.println(message.getStatus());
-    }
-}
\ No newline at end of file
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SMSService.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SMSService.java
new file mode 100644
index 0000000..fca2476
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SMSService.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.service;
+
+
+import com.twilio.Twilio;
+import com.twilio.rest.api.v2010.account.Message;
+import com.twilio.rest.api.v2010.account.MessageCreator;
+import com.twilio.type.PhoneNumber;
+import org.apache.fineract.cn.notification.service.ServiceConstants;
+import org.slf4j.Logger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+
+@Service
+public class SMSService {
+	
+	private final Logger logger;
+	@Value("${smssender.accountSID}")
+	private String ACCOUNT_SID;
+	@Value("${smssender.authToken}")
+	private String AUTH_TOKEN;
+	@Value("${smssender.senderNumber}")
+	private String SENDERNUMBER;
+	
+	@Autowired
+	public SMSService(@Qualifier(ServiceConstants.LOGGER_NAME) Logger logger) {
+		super();
+		this.logger = logger;
+	}
+	
+	public void configure(String accountSID,
+	                      String authToken,
+	                      String senderNumber) {
+		ACCOUNT_SID = accountSID;
+		AUTH_TOKEN = authToken;
+		SENDERNUMBER = senderNumber;
+	}
+	
+	public void sendSMS(String receiver, String template) {
+		this.logger.debug("sendSMS invoked");
+		Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
+		MessageCreator messageCreator = Message.creator(ACCOUNT_SID,
+				new PhoneNumber(receiver),
+				new PhoneNumber(SENDERNUMBER),
+				template);
+		Message message = messageCreator.create();
+		System.out.println(message.getSid());
+	}
+}
\ No newline at end of file
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SampleService.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SampleService.java
deleted file mode 100644
index a0e4f71..0000000
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SampleService.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.fineract.cn.notification.service.internal.service;
-
-import org.apache.fineract.cn.notification.api.v1.domain.Sample;
-import org.apache.fineract.cn.notification.service.internal.mapper.SampleMapper;
-import org.apache.fineract.cn.notification.service.internal.repository.SampleJpaEntityRepository;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-import java.util.Optional;
-
-@Service
-public class SampleService {
-
-  private final SampleJpaEntityRepository sampleJpaEntityRepository;
-
-  @Autowired
-  public SampleService(final SampleJpaEntityRepository sampleJpaEntityRepository) {
-    super();
-    this.sampleJpaEntityRepository = sampleJpaEntityRepository;
-  }
-
-  public List<Sample> findAllEntities() {
-    return SampleMapper.map(this.sampleJpaEntityRepository.findAll());
-  }
-
-  public Optional<Sample> findByIdentifier(final String identifier) {
-    return this.sampleJpaEntityRepository.findByIdentifier(identifier).map(SampleMapper::map);
-  }
-}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/helperservice/CustomerAdaptor.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/helperservice/CustomerAdaptor.java
new file mode 100644
index 0000000..33a79f4
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/helperservice/CustomerAdaptor.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.service.helperservice;
+
+import org.apache.fineract.cn.customer.api.v1.client.CustomerManager;
+import org.apache.fineract.cn.customer.api.v1.client.CustomerNotFoundException;
+import org.apache.fineract.cn.customer.api.v1.domain.Customer;
+import org.apache.fineract.cn.notification.service.ServiceConstants;
+import org.slf4j.Logger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Service;
+
+import java.util.Optional;
+
+@Service
+public class CustomerAdaptor {
+	
+	private final Logger logger;
+	private final CustomerManager customerManager;
+	
+	@Autowired
+	public CustomerAdaptor(@Qualifier(ServiceConstants.LOGGER_NAME) final Logger logger,
+	                       final CustomerManager customerManager) {
+		super();
+		this.logger = logger;
+		this.customerManager = customerManager;
+	}
+	
+	public Optional<Customer> findCustomer(final String customerIdentifier) {
+		try {
+			final Customer customer = this.customerManager.findCustomer(customerIdentifier.replaceAll("\"", ""));
+			return Optional.of(customer);
+		} catch (final CustomerNotFoundException cnfex) {
+			this.logger.warn("Customer {} not found.", customerIdentifier.replaceAll("\"", ""));
+		}
+		return Optional.empty();
+	}
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/helperservice/NotificationAuthentication.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/helperservice/NotificationAuthentication.java
new file mode 100644
index 0000000..a4ab97c
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/helperservice/NotificationAuthentication.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.service.helperservice;
+
+/*
+ ebenezergraham created on 8/4/18
+*/
+
+import org.apache.fineract.cn.api.util.UserContextHolder;
+import org.apache.fineract.cn.identity.api.v1.client.IdentityManager;
+import org.apache.fineract.cn.identity.api.v1.domain.Authentication;
+import org.apache.fineract.cn.lang.TenantContextHolder;
+import org.apache.fineract.cn.notification.service.ServiceConstants;
+import org.slf4j.Logger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Component;
+import org.springframework.util.Base64Utils;
+
+@Component
+public class NotificationAuthentication {
+	private final String USER_PASSWORD = "init1@l";
+	private final String USER_IDENTIFIER = "operator";
+	
+	private IdentityManager identityManager;
+	private Logger logger;
+	
+	@Autowired
+	public NotificationAuthentication(IdentityManager identityManager,
+	                                 @Qualifier(ServiceConstants.LOGGER_NAME) final Logger logger) {
+		this.identityManager = identityManager;
+		this.logger = logger;
+		}
+	
+	public void authenticate(String tenant) {
+		TenantContextHolder.clear();
+		TenantContextHolder.setIdentifier(tenant);
+		
+		final Authentication authentication =
+				this.identityManager.login(USER_IDENTIFIER, Base64Utils.encodeToString(USER_PASSWORD.getBytes()));
+		UserContextHolder.clear();
+		UserContextHolder.setAccessToken(USER_IDENTIFIER, authentication.getAccessToken());
+	}
+}
\ No newline at end of file
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/AccountingEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/AccountingEventListener.java
deleted file mode 100644
index 9266b89..0000000
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/AccountingEventListener.java
+++ /dev/null
@@ -1,124 +0,0 @@
- /*
-         * Licensed to the Apache Software Foundation (ASF) under one
-         * or more contributor license agreements.  See the NOTICE file
-         * distributed with this work for additional information
-         * regarding copyright ownership.  The ASF licenses this file
-         * to you under the Apache License, Version 2.0 (the
-         * "License"); you may not use this file except in compliance
-         * with the License.  You may obtain a copy of the License at
-         *
-         *   http://www.apache.org/licenses/LICENSE-2.0
-         *
-         * Unless required by applicable law or agreed to in writing,
-         * software distributed under the License is distributed on an
-         * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-         * KIND, either express or implied.  See the License for the
-         * specific language governing permissions and limitations
-         * under the License.
-         */
-/*
-        package org.apache.fineract.cn.notification.service.listener;
-
-        import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
-        import org.apache.fineract.cn.accounting.service.internal.service.AccountService;
-        import org.apache.fineract.cn.notification.service.internal.service.EmailSender;
-        import org.apache.fineract.cn.notification.service.internal.service.SMSSender;
-        import org.springframework.beans.factory.annotation.Autowired;
-        import org.springframework.jms.annotation.JmsListener;
-        import org.springframework.messaging.handler.annotation.Header;
-        import org.springframework.stereotype.Component;
-        import org.apache.fineract.cn.accounting.api.v1.EventConstants;
-
-
-@SuppressWarnings("unused")
-@Component
-public class AccountingEventListener {
-
-
-    @Autowired
-    public AccountingEventListener( final AccountService accountingManager) {
-        this.accountService = accountingManager;
-    }
-
-    @JmsListener(
-            destination = EventConstants.DESTINATION,
-            selector = EventConstants.SELECTOR_POST_ACCOUNT,
-            subscription = EventConstants.DESTINATION
-    )
-    public void onCreateAccount(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant, final String payload) {
-        accountService.findAccount(tenant);
-        String receiver = "";
-        String template = "";
-        smsSender.sendSMS(receiver,template);
-        emailSender.sendEmail(receiver,"Hello", "You account has been created");
-    }
-
-
-    @JmsListener(
-            destination = EventConstants.DESTINATION,
-            selector = EventConstants.SELECTOR_PUT_ACCOUNT,
-            subscription = EventConstants.DESTINATION
-    )
-    public void onChangeAccount(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                                final String payload) {
-        this.logger.debug("Account modified.");
-        this.eventRecorder.event(tenant, EventConstants.PUT_ACCOUNT, payload, String.class);
-    }
-
-    @JmsListener(
-            destination = EventConstants.DESTINATION,
-            selector = EventConstants.SELECTOR_CLOSE_ACCOUNT,
-            subscription = EventConstants.DESTINATION
-    )
-    public void onCloseAccount(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                               final String payload) {
-        this.logger.debug("Account closed.");
-        this.eventRecorder.event(tenant, EventConstants.CLOSE_ACCOUNT, payload, String.class);
-    }
-
-    @JmsListener(
-            destination = EventConstants.DESTINATION,
-            selector = EventConstants.SELECTOR_LOCK_ACCOUNT,
-            subscription = EventConstants.DESTINATION
-    )
-    public void onLockAccount(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                              final String payload) {
-        this.logger.debug("Account locked.");
-        this.eventRecorder.event(tenant, EventConstants.LOCK_ACCOUNT, payload, String.class);
-    }
-
-    @JmsListener(
-            destination = EventConstants.DESTINATION,
-            selector = EventConstants.SELECTOR_UNLOCK_ACCOUNT,
-            subscription = EventConstants.DESTINATION
-    )
-    public void onUnlockAccount(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                                final String payload) {
-        this.logger.debug("Account unlocked.");
-        this.eventRecorder.event(tenant, EventConstants.UNLOCK_ACCOUNT, payload, String.class);
-    }
-
-    @JmsListener(
-            destination = EventConstants.DESTINATION,
-            selector = EventConstants.SELECTOR_REOPEN_ACCOUNT,
-            subscription = EventConstants.DESTINATION
-    )
-    public void onReopenAccount(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                                final String payload) {
-        this.logger.debug("Account reopened.");
-        this.eventRecorder.event(tenant, EventConstants.REOPEN_ACCOUNT, payload, String.class);
-    }
-
-    @JmsListener(
-            destination = EventConstants.DESTINATION,
-            selector = EventConstants.SELECTOR_DELETE_ACCOUNT,
-            subscription = EventConstants.DESTINATION
-    )
-    public void onDeleteAccount(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                                final String payload) {
-        this.logger.debug("Account deleted.");
-        this.eventRecorder.event(tenant, EventConstants.DELETE_ACCOUNT, payload, String.class);
-    }
-
-}
- */
\ No newline at end of file
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/ChequeEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/ChequeEventListener.java
deleted file mode 100644
index 97dd5e2..0000000
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/ChequeEventListener.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*
-package org.apache.fineract.cn.notification.service.listener;
-
-import org.apache.fineract.cn.cheque.AbstractChequeTest;
-import org.apache.fineract.cn.cheque.api.v1.EventConstants;
-import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
-import org.slf4j.Logger;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.jms.annotation.JmsListener;
-import org.springframework.messaging.handler.annotation.Header;
-import org.springframework.stereotype.Component;
-
-@Component
-public class ChequeEventListener {
-
-    private final Logger logger;
-
-    public ChequeEventListener(@Qualifier(AbstractChequeTest.TEST_LOGGER) final Logger logger) {
-        super();
-        this.logger = logger;
-    }
-
-    @JmsListener(
-            destination = EventConstants.DESTINATION,
-            selector = EventConstants.SELECTOR_ISSUE_CHEQUES,
-            subscription = EventConstants.DESTINATION
-    )
-    public void onIssueCheques(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                               final String payload) {
-        this.logger.debug("Cheques issued.");
-    }
-
-    @JmsListener(
-            destination = EventConstants.DESTINATION,
-            selector = EventConstants.SELECTOR_CHEQUE_TRANSACTION,
-            subscription = EventConstants.DESTINATION
-    )
-    public void onChequeTransaction(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                                    final String payload) {
-        this.logger.debug("Cheque transaction processed.");
-        this.eventRecorder.event(tenant, EventConstants.CHEQUE_TRANSACTION, payload, String.class);
-    }
-
-    @JmsListener(
-            destination = EventConstants.DESTINATION,
-            selector = EventConstants.SELECTOR_CHEQUE_TRANSACTION_APPROVED,
-            subscription = EventConstants.DESTINATION
-    )
-    public void onChequeApproved(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                                 final String payload) {
-        this.logger.debug("Cheque transaction approved.");
-        this.eventRecorder.event(tenant, EventConstants.CHEQUE_TRANSACTION_APPROVED, payload, String.class);
-    }
-
-    @JmsListener(
-            destination = EventConstants.DESTINATION,
-            selector = EventConstants.SELECTOR_CHEQUE_TRANSACTION_CANCELED,
-            subscription = EventConstants.DESTINATION
-    )
-    public void onChequeCanceled(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                                 final String payload) {
-        this.logger.debug("Cheque transaction canceled.");
-        this.eventRecorder.event(tenant, EventConstants.CHEQUE_TRANSACTION_CANCELED, payload, String.class);
-    }
-
-}
-*/
\ No newline at end of file
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/CustomerEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/CustomerEventListener.java
index 7db634a..d1cb4d6 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/CustomerEventListener.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/CustomerEventListener.java
@@ -16,193 +16,332 @@
      * specific language governing permissions and limitations
      * under the License.
      */
+    package org.apache.fineract.cn.notification.service.listener;
 
-package org.apache.fineract.cn.notification.service.listener;
+    import org.apache.fineract.cn.customer.api.v1.CustomerEventConstants;
+    import org.apache.fineract.cn.customer.api.v1.domain.ContactDetail;
+    import org.apache.fineract.cn.customer.api.v1.domain.Customer;
+    import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
+    import org.apache.fineract.cn.notification.service.ServiceConstants;
+    import org.apache.fineract.cn.notification.service.internal.service.NotificationService;
+    import org.slf4j.Logger;
+    import org.springframework.beans.factory.annotation.Autowired;
+    import org.springframework.beans.factory.annotation.Qualifier;
+    import org.springframework.jms.annotation.JmsListener;
+    import org.springframework.messaging.handler.annotation.Header;
+    import org.springframework.stereotype.Component;
 
-import org.apache.fineract.cn.customer.api.v1.CustomerEventConstants;
-import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
-import org.apache.fineract.cn.customer.api.v1.client.CustomerManager;
-import org.apache.fineract.cn.customer.api.v1.domain.ContactDetail;
-import org.apache.fineract.cn.customer.api.v1.domain.Customer;
-import org.apache.fineract.cn.notification.service.internal.service.EmailSender;
-import org.apache.fineract.cn.notification.service.internal.service.SMSSender;
-import org.slf4j.Logger;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.jms.annotation.JmsListener;
-import org.springframework.messaging.handler.annotation.Header;
-import org.springframework.stereotype.Component;
-
-@SuppressWarnings("unused")
-@Component
-public class CustomerEventListener {
-
-        private CustomerManager customerManager;
-        private SMSSender smsSender;
-        private EmailSender emailSender;
-        private final Logger logger;
-
-        @Autowired
-        public CustomerEventListener( final CustomerManager customerManager,
-                                      SMSSender smsSender, EmailSender emailSender, @Autowired Logger logger ) {
-            this.customerManager = customerManager;
-            this.smsSender = smsSender;
-            this.emailSender = emailSender;
-            this.logger = logger;
-            smsSender.sendSMS("+23058409206","just to be sure listen has been instantiated");
-        }
-
-        @JmsListener(
-                destination = CustomerEventConstants.DESTINATION,
-                selector = CustomerEventConstants.SELECTOR_POST_CUSTOMER
-        )
-        public void customerCreatedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                                         final String payload) {
-            System.out.println(payload);
-            Customer customer = customerManager.findCustomer(payload);
-            System.out.println("This is the customer created: "
-                    + customer.getGivenName() +"--payload" + payload +"--tenant"+ tenant);
-            this.logger.info("Logger --- This is the customer created: "
-                    + customer.getGivenName() +"--payload" + payload +"--tenant"+ tenant);
-            if (customer.getContactDetails().size() > 0) {
-                customer.getContactDetails().forEach(contactDetail -> {
-                    if (contactDetail.getType().equals(ContactDetail.Type.PHONE)) {
-                        String receiverNumber = customer.getContactDetails().get(0).getValue();
-                        // TODO: pass receiver number for templating and localization.
-                        smsSender.sendSMS(receiverNumber, "Dear Valued Customer, Your account has been created");
-                    } else if (contactDetail.getType().equals(ContactDetail.Type.EMAIL)) {
-                        String emailAddress = customer.getContactDetails().get(0).getValue();
-                        // TODO: pass email address for templating and localization.
-                        emailSender.sendEmail(emailAddress, "Account created", "Dear Valued Customer, Your account has been created");
-                    }
-                });
-            }
-        }
-
-    @JmsListener(
-            destination = CustomerEventConstants.DESTINATION,
-            selector = CustomerEventConstants.SELECTOR_ACTIVATE_CUSTOMER
-    )
-    public void customerActivatedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                                       final String payload) {
-
-        Customer customer = customerManager.findCustomer(payload);
-        System.out.println("This is the customer created: "
-                + customer.getGivenName() +"--payload" + payload +"--tenant"+ tenant);
-        this.logger.info("Logger --- This is the customer created: "
-                + customer.getGivenName() +"--payload" + payload +"--tenant"+ tenant);
-        if(customer.getCurrentState().equalsIgnoreCase("ACTIVE")){
-            customer.getContactDetails().forEach(contact-> {
-                if (contact.getType().equals(ContactDetail.Type.PHONE)) {
-                String receiverNumber = customer.getContactDetails().get(0).getValue();
-                smsSender.sendSMS(receiverNumber, "Dear Valued Customer, Your account has been Activated");
-            } else if (contact.getType().equals(ContactDetail.Type.EMAIL)) {
-                String emailAddress = customer.getContactDetails().get(0).getValue();
-                // TODO: pass email address for templating and localization.
-                emailSender.sendEmail(emailAddress, "Account created", "Dear Valued Customer, Your account has been Activated");
-            }
-            });
-        }
-    }
-
-    @JmsListener(
-            destination = CustomerEventConstants.DESTINATION,
-            selector = CustomerEventConstants.SELECTOR_LOCK_CUSTOMER
-    )
-    public void customerLockedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                                    final String payload) {
-        Customer customer = customerManager.findCustomer(payload);
-        System.out.println("This is the customer created: "
-                + customer.getGivenName() +"--payload" + payload +"--tenant"+ tenant);
-        this.logger.info("Logger --- This is the customer created: "
-                + customer.getGivenName() +"--payload" + payload +"--tenant"+ tenant);
-        if(customer.getCurrentState().equalsIgnoreCase("LOCKED")){
-            customer.getContactDetails().forEach(contact-> {
-                if (contact.getType().equals(ContactDetail.Type.PHONE)) {
-                    String receiverNumber = customer.getContactDetails().get(0).getValue();
-                    smsSender.sendSMS(receiverNumber, "Dear Valued Customer, Your account has been Locked");
-                } else if (contact.getType().equals(ContactDetail.Type.EMAIL)) {
-                    String emailAddress = customer.getContactDetails().get(0).getValue();
-                    // TODO: pass email address for templating and localization.
-                    emailSender.sendEmail(emailAddress, "Account created", "Dear Valued Customer, Your account has been Locked");
-                }
-            });
-        }
-    }
-
-    @JmsListener(
-            destination = CustomerEventConstants.DESTINATION,
-            selector = CustomerEventConstants.SELECTOR_UNLOCK_CUSTOMER
-    )
-    public void customerUnlockedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                                      final String payload) {
-        Customer customer = customerManager.findCustomer(payload);
-
-        System.out.println("This is the customer created: "
-                + customer.getGivenName() +"--payload" + payload +"--tenant"+ tenant);
-        this.logger.info("Logger --- This is the customer created: "
-                + customer.getGivenName() +"--payload" + payload +"--tenant"+ tenant);
-        if(customer.getCurrentState().equalsIgnoreCase("LOCKED")){
-            customer.getContactDetails().forEach(contact-> {
-                if (contact.getType().equals(ContactDetail.Type.PHONE)) {
-                    String receiverNumber = customer.getContactDetails().get(0).getValue();
-                    smsSender.sendSMS(receiverNumber, "Dear Valued Customer, Your account has been Unlocked");
-                } else if (contact.getType().equals(ContactDetail.Type.EMAIL)) {
-                    String emailAddress = customer.getContactDetails().get(0).getValue();
-                    // TODO: pass email address for templating and localization.
-                    emailSender.sendEmail(emailAddress, "Account created", "Dear Valued Customer, Your account has been Unlocked");
-                }
-            });
-        }
-    }
-
-    @JmsListener(
-            destination = CustomerEventConstants.DESTINATION,
-            selector = CustomerEventConstants.SELECTOR_CLOSE_CUSTOMER
-    )
-    public void customerClosedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                                    final String payload) {
-        Customer customer = customerManager.findCustomer(payload);
-        System.out.println("This is the customer created: "
-                + customer.getGivenName() +"--payload" + payload +"--tenant"+ tenant);
-        this.logger.info("Logger --- This is the customer created: "
-                + customer.getGivenName() +"--payload" + payload +"--tenant"+ tenant);
-
-        if(customer.getCurrentState().equalsIgnoreCase("CLOSED")){
-            customer.getContactDetails().forEach(contact-> {
-                if (contact.getType().equals(ContactDetail.Type.PHONE)) {
-                    String receiverNumber = customer.getContactDetails().get(0).getValue();
-                    smsSender.sendSMS(receiverNumber, "Dear Valued Customer, Your account has been Closed");
-                } else if (contact.getType().equals(ContactDetail.Type.EMAIL)) {
-                    String emailAddress = customer.getContactDetails().get(0).getValue();
-                    // TODO: pass email address for templating and localization.
-                    emailSender.sendEmail(emailAddress, "Account created", "Dear Valued Customer, Your account has been Closed");
-                }
-            });
-        }
-    }
-
-    @JmsListener(
-            destination = CustomerEventConstants.DESTINATION,
-            selector = CustomerEventConstants.SELECTOR_REOPEN_CUSTOMER
-    )
-    public void customerReopenedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                                      final String payload) {
-        Customer customer = customerManager.findCustomer(payload);
-        System.out.println("This is the customer created: "
-                + customer.getGivenName() +"--payload" + payload +"--tenant"+ tenant);
-        this.logger.info("Logger --- This is the customer created: "
-                + customer.getGivenName() +"--payload" + payload +"--tenant"+ tenant);
-        if(customer.getCurrentState().equalsIgnoreCase("LOCKED")){
-            customer.getContactDetails().forEach(contact-> {
-                if (contact.getType().equals(ContactDetail.Type.PHONE)) {
-                    String receiverNumber = customer.getContactDetails().get(0).getValue();
-                    smsSender.sendSMS(receiverNumber, "Dear Valued Customer, Your account has been reopened");
-                } else if (contact.getType().equals(ContactDetail.Type.EMAIL)) {
-                    String emailAddress = customer.getContactDetails().get(0).getValue();
-                    // TODO: pass email address for templating and localization.
-                    emailSender.sendEmail(emailAddress, "Account Reopened", "Dear Valued Customer, Your account has been reopened");
-                }
-            });
-        }
-    }
-}
+    @SuppressWarnings("unused")
+    @Component
+    public class CustomerEventListener {
+	    private final NotificationService notificationService;
+	    private final Logger logger;
+	
+	    @Autowired
+	    public CustomerEventListener(final NotificationService notificationService,
+	                                 @Qualifier(ServiceConstants.LOGGER_NAME) final Logger logger) {
+		    this.logger = logger;
+		    this.notificationService = notificationService;
+	    }
+	
+	    @JmsListener(
+			    destination = CustomerEventConstants.DESTINATION,
+			    selector = CustomerEventConstants.SELECTOR_POST_CUSTOMER
+	    )
+	    public void customerCreatedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+	                                     final String payload) {
+		    Customer customer = this.notificationService.findCustomer(payload, tenant).get();
+		    this.logger.debug("{} has been invoked", "customerCreatedEvent");
+		
+		    customer.getContactDetails().forEach(contact -> {
+			    if (contact.getType().equals(ContactDetail.Type.PHONE.toString())) {
+				    String receiverNumber = contact.getValue();
+				    // TODO: Localize message
+				    // TODO: Pass message to template
+				    notificationService.sendSMS(receiverNumber, "Dear Valued Customer," +
+						    "\n\nYour account has been created" +
+						    "\n\nBest Regards," +
+						    "\nYour MFI");
+			    } else if (contact.getType().equals(ContactDetail.Type.EMAIL.toString())) {
+				    String emailAddress = contact.getValue();
+				    // TODO: Localize message
+				    // TODO: Pass message to template
+				    notificationService.sendEmail("fineractcnnotificationdemo@gmail.com",
+						    emailAddress,
+						    "Account created",
+						    "Dear Valued Customer," +
+								    "\n\nYour account has been created" +
+								    "\n\nBest Regards," +
+								    "\nYour MFI");
+			    }
+		    });
+	    }
+	
+	    @JmsListener(
+			    destination = CustomerEventConstants.DESTINATION,
+			    selector = CustomerEventConstants.SELECTOR_PUT_CUSTOMER
+	    )
+	    public void customerUpdatedEvents(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+	                                      final String payload) {
+		    this.logger.debug("{} has been invoked", "customerUpdatedEvents");
+		    Customer customer = this.notificationService.findCustomer(payload, tenant).get();
+		
+		    customer.getContactDetails().forEach(contact -> {
+			    if (contact.getType().equals(ContactDetail.Type.PHONE.toString())) {
+				    String receiverNumber = contact.getValue();
+				    // TODO: Localize message
+				    // TODO: Pass message to template
+				    notificationService.sendSMS(receiverNumber,
+						    "Dear Valued Customer," +
+								    "\n\nYour account has been Updated" +
+								    "\n\nBest Regards," +
+								    "\nYour MFI");
+			    } else if (contact.getType().equals(ContactDetail.Type.EMAIL.toString())) {
+				    String emailAddress = contact.getValue();
+				    // TODO: Localize message
+				    // TODO: Pass message to template
+				    notificationService.sendEmail("fineractcnnotificationdemo@gmail.com",
+						    emailAddress,
+						    "Account created",
+						    "Dear Valued Customer," +
+								    "\n\nYour account has been Updated" +
+								    "\n\nBest Regards," +
+								    "\nYour MFI");
+			    }
+		    });
+	    }
+	
+	    @JmsListener(
+			    destination = CustomerEventConstants.DESTINATION,
+			    selector = CustomerEventConstants.SELECTOR_ACTIVATE_CUSTOMER
+	    )
+	    public void customerActivatedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+	                                       final String payload) {
+		    this.logger.debug("{} has been invoked", "customerActivatedEvent");
+		    Customer customer = this.notificationService.findCustomer(payload, tenant).get();
+		
+		    customer.getContactDetails().forEach(contact -> {
+			    if (contact.getType().equalsIgnoreCase(ContactDetail.Type.PHONE.toString())) {
+				    String receiverNumber = contact.getValue();
+				    notificationService.sendSMS(receiverNumber,
+						    "Dear Valued Customer," +
+								    "\n\nYour account has been Activated" +
+								    "\n\nBest Regards," +
+								    "\nYour MFI");
+			    } else if (contact.getType().equals(ContactDetail.Type.EMAIL.toString())) {
+				    String emailAddress = contact.getValue();
+				    // TODO: Localize message
+				    // TODO: Pass message to template
+				    notificationService.sendEmail("fineractcnnotificationdemo@gmail.com",
+						    emailAddress,
+						    "Account created",
+						    "Dear Valued Customer," +
+								    "\n\nYour account has been Activated" +
+								    "\n\nBest Regards," +
+								    "\nYour MFI");
+			    }
+		    });
+	    }
+	
+	    @JmsListener(
+			    destination = CustomerEventConstants.DESTINATION,
+			    selector = CustomerEventConstants.SELECTOR_LOCK_CUSTOMER
+	    )
+	    public void customerLockedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+	                                    final String payload) {
+		    this.logger.debug("{} has been invoked", "customerLockedEvent");
+		    Customer customer = this.notificationService.findCustomer(payload, tenant).get();
+		
+		    customer.getContactDetails().forEach(contact -> {
+			    if (contact.getType().equals(ContactDetail.Type.PHONE.toString())) {
+				    String receiverNumber = contact.getValue();
+				    notificationService.sendSMS(receiverNumber,
+						    "Dear Valued Customer," +
+								    "\n\nYour account has been Locked" +
+								    "\n\nBest Regards," +
+								    "\nYour MFI");
+			    } else if (contact.getType().equals(ContactDetail.Type.EMAIL.toString())) {
+				    String emailAddress = contact.getValue();
+				    // TODO: Localize message
+				    // TODO: Pass message to template
+				    notificationService.sendEmail("fineractcnnotificationdemo@gmail.com",
+						    emailAddress, "Account created",
+						    "Dear Valued Customer," +
+								    "\n\nYour account has been Locked" +
+								    "\n\nBest Regards," +
+								    "\nYour MFI");
+			    }
+		    });
+	    }
+	    
+	    @JmsListener(
+			    destination = CustomerEventConstants.DESTINATION,
+			    selector = CustomerEventConstants.SELECTOR_UNLOCK_CUSTOMER
+	    )
+	    public void customerUnlockedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+	                                      final String payload) {
+		    this.logger.debug("{} has been invoked", "customerUnlockedEvent");
+		    Customer customer = this.notificationService.findCustomer(payload, tenant).get();
+		
+		    customer.getContactDetails().forEach(contact -> {
+			    if (contact.getType().equals(ContactDetail.Type.PHONE.toString())) {
+				    String receiverNumber = contact.getValue();
+				    notificationService.sendSMS(receiverNumber,
+						    "Dear Valued Customer," +
+						    "\n\nYour account has been Unlocked" +
+								    "\n\nBest Regards," +
+								    "\nYour MFI");
+			    } else if (contact.getType().equals(ContactDetail.Type.EMAIL.toString())) {
+				    String emailAddress = contact.getValue();
+				    // TODO: Localize message
+				    // TODO: Pass message to template
+				    notificationService.sendEmail("fineractcnnotificationdemo@gmail.com",
+						    emailAddress,
+						    "Account created",
+						    "Dear Valued Customer," +
+								    "\n\nYour account has been Unlocked" +
+								    "\n\nBest Regards," +
+								    "\nYour MFI");
+			    }
+		    });
+	    }
+	
+	    @JmsListener(
+			    destination = CustomerEventConstants.DESTINATION,
+			    selector = CustomerEventConstants.SELECTOR_CLOSE_CUSTOMER
+	    )
+	    public void customerClosedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+	                                    final String payload) {
+		    this.logger.debug("{} has been invoked", "customerClosedEvent");
+		    Customer customer = this.notificationService.findCustomer(payload, tenant).get();
+		
+		    customer.getContactDetails().forEach(contact -> {
+			    if (contact.getType().equals(ContactDetail.Type.PHONE.toString())) {
+				    String receiverNumber = contact.getValue();
+				    notificationService.sendSMS(receiverNumber,
+						    "Dear Valued Customer," +
+						    "\n\nYour account has been Closed" +
+								    "\n\nBest Regards" +
+								    "\nYour MFI");
+			    } else if (contact.getType().equals(ContactDetail.Type.EMAIL.toString())) {
+				    String emailAddress = contact.getValue();
+				    // TODO: Localize message
+				    // TODO: Pass message to template
+				    notificationService.sendEmail("fineractcnnotificationdemo@gmail.com",
+						    emailAddress, "Account created",
+						    "Dear Valued Customer," +
+								    "\n\nYour account has been Closed" +
+								    "\n\nBest Regards," +
+								    "\nYour MFI");
+			    }
+		    });
+	    }
+	
+	    @JmsListener(
+			    destination = CustomerEventConstants.DESTINATION,
+			    selector = CustomerEventConstants.SELECTOR_REOPEN_CUSTOMER
+	    )
+	    public void customerReopenedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+	                                      final String payload) {
+		    this.logger.debug("{} has been invoked", "customerReopenedEvent");
+		    Customer customer = this.notificationService.findCustomer(payload, tenant).get();
+		
+		    customer.getContactDetails().forEach(contact -> {
+			    if (contact.getType().equals(ContactDetail.Type.PHONE.toString())) {
+				    String receiverNumber = contact.getValue();
+				    notificationService.sendSMS(receiverNumber,
+						    "Dear Valued Customer," +
+								    "\n\nYour account has been reopened" +
+								    "\n\nBest Regards," +
+								    "\nYour MFI");
+			    } else if (contact.getType().equals(ContactDetail.Type.EMAIL.toString())) {
+				    String emailAddress = contact.getValue();
+				    // TODO: Localize message
+				    // TODO: Pass message to template
+				    notificationService.sendEmail("fineractcnnotificationdemo@gmail.com",
+						    emailAddress,
+						    "Account Reopened",
+						    "Dear Valued Customer," +
+								    "\n\nYour account has been reopened" +
+								    "\n\nBest Regards," +
+								    "\nYour MFI");
+			    }
+		    });
+	    }
+	
+	    @JmsListener(
+			    destination = CustomerEventConstants.DESTINATION,
+			    selector = CustomerEventConstants.SELECTOR_PUT_CONTACT_DETAILS
+	    )
+	    public void contactDetailsChangedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+	                                           final String payload) {
+		    this.logger.debug("{} has been invoked", "contactDetailsChangedEvent");
+		    Customer customer = this.notificationService.findCustomer(payload, tenant).get();
+		
+		    customer.getContactDetails().forEach(contact -> {
+			    if (contact.getType().equals(ContactDetail.Type.PHONE.toString())) {
+				    String receiverNumber = contact.getValue();
+				    notificationService.sendSMS(receiverNumber,
+						    "Dear Valued Customer," +
+								    "\n\nYour contact has been changed successfully" +
+								    "\nNew Contact: "+receiverNumber+
+								    "\n\nBest Regards," +
+								    "\nYour MFI");
+			    } else if (contact.getType().equals(ContactDetail.Type.EMAIL.toString())) {
+				    String emailAddress = contact.getValue();
+				    // TODO: Localize message
+				    // TODO: Pass message to template
+				    notificationService.sendEmail("fineractcnnotificationdemo@gmail.com",
+						    emailAddress,
+						    "Contact Details Changed",
+						    "Dear Valued Customer," +
+								    "\n\nYour contact has been changed successfully" +
+								    "\n\tNew Contact: "+emailAddress+
+								    "\n\nBest Regards" +
+								    "\nYour MFI");
+			    }
+		    });
+	    }
+	
+	    @JmsListener(
+			    destination = CustomerEventConstants.DESTINATION,
+			    selector = CustomerEventConstants.SELECTOR_PUT_ADDRESS
+	    )
+	    public void addressChangedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+	                                    final String payload) {
+		    this.logger.debug("{} has been invoked", "addressChangedEvent");
+		
+		    Customer customer = this.notificationService.findCustomer(payload, tenant).get();
+		
+		    customer.getContactDetails().forEach(contact -> {
+			    if (contact.getType().equals(ContactDetail.Type.PHONE.toString())) {
+				    String receiverNumber = contact.getValue();
+				    notificationService.sendSMS(receiverNumber,
+						    "Dear Valued Customer," +
+								    "\n\nYour address has been changed successfully" +
+								    "\n\tStreet: "+ customer.getAddress().getStreet()+
+								    "\n\tCity: "+ customer.getAddress().getCity()+
+								    "\n\tState: "+ customer.getAddress().getRegion()+
+								    "\n\tCountry: "+ customer.getAddress().getCountry()+
+								    "\n\nBest Regards," +
+								    "\nYour MFI");
+			    } else if (contact.getType().equals(ContactDetail.Type.EMAIL.toString())) {
+				    String emailAddress = contact.getValue();
+				    // TODO: Localize message
+				    // TODO: Pass message to template
+				    notificationService.sendEmail("fineractcnnotificationdemo@gmail.com",
+						    emailAddress,
+						    "Contact Details Changed" +
+								    "New Contact: "+emailAddress,
+						    "Dear Valued Customer," +
+								    "\n\nYour address has been changed successfully" +
+								    "\nStreet: "+ customer.getAddress().getStreet() +
+								    "\nCity: "+ customer.getAddress().getCity() +
+								    "\nState: "+ customer.getAddress().getRegion() +
+								    "\nCountry: "+ customer.getAddress().getCountry() +
+								    "\n\nBest Regards" +
+								    "\nYour MFI");
+			    }
+		    });
+	    }
+    }
\ No newline at end of file
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/DepositEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/DepositEventListener.java
deleted file mode 100644
index fa66ace..0000000
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/DepositEventListener.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*
-package org.apache.fineract.cn.deposit.listener;
-
-import org.apache.fineract.cn.deposit.api.v1.EventConstants;
-import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
-import org.slf4j.Logger;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.jms.annotation.JmsListener;
-import org.springframework.messaging.handler.annotation.Header;
-import org.springframework.stereotype.Component;
-
-@Component
-public class DepositEventListener {
-
-
-    @Autowired
-    public DepositEventListener() {
-        super();
-    }
-
-    @JmsListener(
-            destination = EventConstants.DESTINATION,
-            selector = EventConstants.SELECTOR_INTEREST_ACCRUED,
-            subscription = EventConstants.DESTINATION
-    )
-    public void onAccrual(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                          final String payload) {
-    }
-
-    @JmsListener(
-            destination = EventConstants.DESTINATION,
-            selector = EventConstants.SELECTOR_DIVIDEND_DISTRIBUTION,
-            subscription = EventConstants.DESTINATION
-    )
-    public void onDividendDistribution(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                                       final String payload) {
-        this.logger.debug("Dividend distributed for product {}.", payload);
-        this.eventRecorder.event(tenant, EventConstants.DIVIDEND_DISTRIBUTION, payload, String.class);
-    }
-
-}
-*/
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/IdentityEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/IdentityEventListener.java
deleted file mode 100644
index 142f138..0000000
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/IdentityEventListener.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*
-package org.apache.fineract.cn.notification.service.listener;
-
-import org.apache.fineract.cn.identity.api.v1.events.EventConstants;
-import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
-import org.apache.fineract.cn.test.listener.EventRecorder;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.jms.annotation.JmsListener;
-import org.springframework.messaging.handler.annotation.Header;
-import org.springframework.stereotype.Component;
-
-@Component
-public class IdentityEventListener {
-
-    private IdentityManager identityManager;
-
-    @Autowired
-    public IdentityEventListener( final IdentityManager identityManager) {
-        this.identityManager = identityManager;
-    }
-
-
-    @JmsListener(
-            subscription = EventConstants.DESTINATION,
-            destination = EventConstants.DESTINATION,
-            selector = EventConstants.SELECTOR_POST_USER
-    )
-    public void onCreateUser(
-            @Header(TenantHeaderFilter.TENANT_HEADER)final String tenant,
-            final String payload) throws Exception {
-        eventRecorder.event(tenant, EventConstants.OPERATION_POST_USER, payload, String.class);
-    }
-
-    @JmsListener(
-            subscription = EventConstants.DESTINATION,
-            destination = EventConstants.DESTINATION,
-            selector = EventConstants.SELECTOR_PUT_USER_ROLEIDENTIFIER
-    )
-    public void onChangeUserRole(
-            @Header(TenantHeaderFilter.TENANT_HEADER)final String tenant,
-            final String payload) throws Exception {
-        eventRecorder.event(tenant, EventConstants.OPERATION_PUT_USER_ROLEIDENTIFIER, payload, String.class);
-    }
-
-    @JmsListener(
-            subscription = EventConstants.DESTINATION,
-            destination = EventConstants.DESTINATION,
-            selector = EventConstants.SELECTOR_PUT_USER_PASSWORD
-    )
-    public void onChangeUserPassword(
-            @Header(TenantHeaderFilter.TENANT_HEADER)final String tenant,
-            final String payload) throws Exception {
-        eventRecorder.event(tenant, EventConstants.OPERATION_PUT_USER_PASSWORD, payload, String.class);
-    }
-
-    @JmsListener(
-            subscription = EventConstants.DESTINATION,
-            destination = EventConstants.DESTINATION,
-            selector = EventConstants.SELECTOR_AUTHENTICATE
-    )
-    public void onAuthentication(
-            @Header(TenantHeaderFilter.TENANT_HEADER)final String tenant,
-            final String payload) throws Exception {
-        eventRecorder.event(tenant, EventConstants.OPERATION_AUTHENTICATE, payload, String.class);
-    }
-
-
-}
-*/
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/OfficeEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/OfficeEventListener.java
deleted file mode 100644
index 219c830..0000000
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/OfficeEventListener.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.fineract.cn.notification.service.listener;
-
-import org.apache.fineract.cn.notification.service.internal.service.EmailSender;
-import org.apache.fineract.cn.notification.service.internal.service.SMSSender;
-import org.apache.fineract.cn.office.api.v1.EventConstants;
-import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
-import org.apache.fineract.cn.office.api.v1.client.OrganizationManager;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.jms.annotation.JmsListener;
-import org.springframework.messaging.handler.annotation.Header;
-import org.springframework.stereotype.Component;
-
-@Component
-@SuppressWarnings("unused")
-public class OfficeEventListener {
-
-	private OrganizationManager organizationManager;
-	private SMSSender smsSender;
-	private EmailSender emailSender;
-
-	@Autowired
-	public OfficeEventListener(final OrganizationManager organizationManager, SMSSender smsSender,
-	                           final EmailSender emailSender) {
-		this.organizationManager = organizationManager;
-		this.smsSender = smsSender;
-		this.emailSender = emailSender;
-	}
-
-	@JmsListener(
-			subscription = EventConstants.DESTINATION,
-			destination = EventConstants.DESTINATION,
-			selector = EventConstants.SELECTOR_POST_OFFICE
-	)
-	public void onCreateOffice(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-	                           final String payload) {
-		//for testing purposes
-		String office = this.organizationManager.findOfficeByIdentifier(payload).getName();
-		if (office.equalsIgnoreCase("Head Office")) {
-			smsSender.sendSMS("+23058409206", "Test From Demo");
-		}
-	}
-}
-
-/*
-	@JmsListener(
-            subscription = EventConstants.DESTINATION,
-            destination = EventConstants.DESTINATION,
-            selector = EventConstants.SELECTOR_POST_EMPLOYEE
-    )
-    public void onCreateEmployee(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                                 final String eventPayload) throws Exception {
-        this.eventRecorder.event(tenant, EventConstants.OPERATION_POST_EMPLOYEE, eventPayload, String.class);
-    }
-
-    @JmsListener(
-            subscription = EventConstants.DESTINATION,
-            destination = EventConstants.DESTINATION,
-            selector = EventConstants.SELECTOR_PUT_EMPLOYEE
-    )
-    public void onUpdateEmployee(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                                 final String eventPayload) throws Exception {
-        this.eventRecorder.event(tenant, EventConstants.OPERATION_PUT_EMPLOYEE, eventPayload, String.class);
-    }
-
-    @JmsListener(
-            subscription = EventConstants.DESTINATION,
-            destination = EventConstants.DESTINATION,
-            selector = EventConstants.SELECTOR_DELETE_EMPLOYEE
-    )
-    public void onDeleteEmployee(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                                 final String eventPayload) throws Exception {
-        this.eventRecorder.event(tenant, EventConstants.OPERATION_DELETE_EMPLOYEE, eventPayload, String.class);
-    }
-
-    @JmsListener(
-            subscription = EventConstants.DESTINATION,
-            destination = EventConstants.DESTINATION,
-            selector = EventConstants.SELECTOR_PUT_CONTACT_DETAIL
-    )
-    public void onSetContactDetail(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                                   final String eventPayload) throws Exception {
-        this.eventRecorder.event(tenant, EventConstants.OPERATION_PUT_CONTACT_DETAIL, eventPayload, String.class);
-    }
-
-    @JmsListener(
-            subscription = EventConstants.DESTINATION,
-            destination = EventConstants.DESTINATION,
-            selector = EventConstants.SELECTOR_DELETE_CONTACT_DETAIL
-    )
-    public void onDeleteContactDetail(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                                      final String eventPayload) throws Exception {
-        this.eventRecorder.event(tenant, EventConstants.OPERATION_DELETE_CONTACT_DETAIL, eventPayload, String.class);
-    }
-
-    @JmsListener(
-            subscription = EventConstants.DESTINATION,
-            destination = EventConstants.DESTINATION,
-            selector = EventConstants.SELECTOR_DELETE_OFFICE
-    )
-    public void onDeleteOffice(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                               final String payload)
-            throws Exception {
-        this.eventRecorder.event(tenant, EventConstants.OPERATION_DELETE_OFFICE, payload, String.class);
-    }
-
-    @JmsListener(
-            subscription = EventConstants.DESTINATION,
-            destination = EventConstants.DESTINATION,
-            selector = EventConstants.SELECTOR_PUT_OFFICE
-    )
-    public void onUpdateOffice(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                               final String payload)
-            throws Exception {
-        this.eventRecorder.event(tenant, EventConstants.OPERATION_PUT_OFFICE, payload, String.class);
-    }
-
-}
-*/
\ No newline at end of file
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PayrollEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PayrollEventListener.java
deleted file mode 100644
index ce4cc70..0000000
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PayrollEventListener.java
+++ /dev/null
@@ -1,61 +0,0 @@
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-    /*
-package org.apache.fineract.cn.payroll.listener;
-
-import org.apache.fineract.cn.payroll.api.v1.EventConstants;
-import org.apache.fineract.cn.payroll.service.ServiceConstants;
-import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
-import org.apache.fineract.cn.test.listener.EventRecorder;
-import org.slf4j.Logger;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.jms.annotation.JmsListener;
-import org.springframework.messaging.handler.annotation.Header;
-import org.springframework.stereotype.Component;
-
-@Component
-public class PayrollEventListener {
-
-    private final Logger logger;
-    private final EventRecorder eventRecorder;
-
-    @Autowired
-    public PayrollEventListener(@Qualifier(ServiceConstants.LOGGER_NAME) final Logger logger,
-                                       final EventRecorder eventRecorder) {
-        super();
-        this.logger = logger;
-        this.eventRecorder = eventRecorder;
-    }
-
-
-    @JmsListener(
-            subscription = EventConstants.DESTINATION,
-            destination = EventConstants.DESTINATION,
-            selector = EventConstants.SELECTOR_POST_DISTRIBUTION
-    )
-    public void onPostCollection(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                                 final String payload) {
-        this.logger.info("Payment distribution with source account {0} processed.", payload);
-        this.eventRecorder.event(tenant, EventConstants.POST_DISTRIBUTION, payload, String.class);
-    }
-
-}
-*/
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PortfolioEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PortfolioEventListener.java
index 50697b2..2f860e5 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PortfolioEventListener.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PortfolioEventListener.java
@@ -18,129 +18,149 @@
  */
 package org.apache.fineract.cn.notification.service.listener;
 
-import org.apache.fineract.cn.group.api.v1.EventConstants;
 import org.apache.fineract.cn.individuallending.api.v1.events.IndividualLoanEventConstants;
 import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
-import org.apache.fineract.cn.notification.service.internal.service.EmailSender;
-import org.apache.fineract.cn.notification.service.internal.service.SMSSender;
+import org.apache.fineract.cn.notification.service.ServiceConstants;
+import org.apache.fineract.cn.notification.service.internal.service.NotificationService;
+import org.slf4j.Logger;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.jms.annotation.JmsListener;
 import org.springframework.messaging.handler.annotation.Header;
 import org.springframework.stereotype.Component;
-import org.apache.fineract.cn.portfolio.api.v1.client.PortfolioManager;
 
+/**
+ * @author Ebenezer Graham
+ */
 @SuppressWarnings("unused")
 @Component
 public class PortfolioEventListener {
-
-    private PortfolioManager portfolioManager;
-    private SMSSender smsSender;
-    private EmailSender emailSender;
-
-    @Autowired
-    public PortfolioEventListener(PortfolioManager portfolioManager, SMSSender smsSender, EmailSender emailSender) {
-        super();
-        this.portfolioManager = portfolioManager;
-        this.smsSender = smsSender;
-        this.emailSender = emailSender;
-    }
-
-    @JmsListener(
-            subscription = IndividualLoanEventConstants.DESTINATION,
-            destination = IndividualLoanEventConstants.DESTINATION,
-            selector = IndividualLoanEventConstants.SELECTOR_DENY_INDIVIDUALLOAN_CASE
-    )
-    public void onDeny(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                       final String payload) {
-
-    }
-
-    @JmsListener(
-            subscription = IndividualLoanEventConstants.DESTINATION,
-            destination = IndividualLoanEventConstants.DESTINATION,
-            selector = IndividualLoanEventConstants.SELECTOR_APPROVE_INDIVIDUALLOAN_CASE
-    )
-    public void onApprove(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                          final String payload) {
-
-    }
-
-    @JmsListener(
-            subscription = IndividualLoanEventConstants.DESTINATION,
-            destination = IndividualLoanEventConstants.DESTINATION,
-            selector = IndividualLoanEventConstants.SELECTOR_ACCEPT_PAYMENT_INDIVIDUALLOAN_CASE
-    )
-    public void onAcceptPayment(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                                final String payload) {
-    }
-
-
-    @JmsListener(
-            subscription = IndividualLoanEventConstants.DESTINATION,
-            destination = IndividualLoanEventConstants.DESTINATION,
-            selector = IndividualLoanEventConstants.SELECTOR_DISBURSE_INDIVIDUALLOAN_CASE
-    )
-    public void onDisburse(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                           final String payload) {
-
-    }
-
-    @JmsListener(
-            subscription = IndividualLoanEventConstants.DESTINATION,
-            destination = IndividualLoanEventConstants.DESTINATION,
-            selector = IndividualLoanEventConstants.SELECTOR_CHECK_LATE_INDIVIDUALLOAN_CASE
-    )
-    public void onCheckLate(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                            final String payload) {
-
-    }
-
-    @JmsListener(
-            subscription = IndividualLoanEventConstants.DESTINATION,
-            destination = IndividualLoanEventConstants.DESTINATION,
-            selector = IndividualLoanEventConstants.SELECTOR_OPEN_INDIVIDUALLOAN_CASE
-    )
-    public void onOpen(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                       final String payload) {
-
-    }
-
-    @JmsListener(
-            subscription = IndividualLoanEventConstants.DESTINATION,
-            destination = IndividualLoanEventConstants.DESTINATION,
-            selector = IndividualLoanEventConstants.SELECTOR_MARK_LATE_INDIVIDUALLOAN_CASE
-    )
-    public void onMarkLate(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                           final String payload) {
-
-    }
-
-    @JmsListener(
-            subscription = IndividualLoanEventConstants.DESTINATION,
-            destination = IndividualLoanEventConstants.DESTINATION,
-            selector = IndividualLoanEventConstants.SELECTOR_CLOSE_INDIVIDUALLOAN_CASE
-    )
-    public void onClose(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                        final String payload) {
-    }
-
-    @JmsListener(
-                subscription = EventConstants.DESTINATION,
-                destination = EventConstants.DESTINATION,
-                selector = EventConstants.SELECTOR_POST_GROUP
-        )
-    public void onGroupCreated(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                                   final String payload) {
-
-        }
-
-        @JmsListener(
-                subscription = EventConstants.DESTINATION,
-                destination = EventConstants.DESTINATION,
-                selector = EventConstants.SELECTOR_ACTIVATE_GROUP
-        )
-        public void onGroupActivated(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                                     final String payload) {
-        }
-
-    }
+	
+	private final NotificationService notificationService;
+	private final Logger logger;
+	
+	@Autowired
+	public PortfolioEventListener(
+			final NotificationService notificationService,
+			@Qualifier(ServiceConstants.LOGGER_NAME) final Logger logger) {
+		super();
+		this.logger = logger;
+		this.notificationService = notificationService;
+	}
+	
+	@JmsListener(
+			subscription = IndividualLoanEventConstants.DESTINATION,
+			destination = IndividualLoanEventConstants.DESTINATION,
+			selector = IndividualLoanEventConstants.SELECTOR_OPEN_INDIVIDUALLOAN_CASE
+	)
+	public void onOpen(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+	                   final String payload) {
+	}
+	
+	@JmsListener(
+			subscription = IndividualLoanEventConstants.DESTINATION,
+			destination = IndividualLoanEventConstants.DESTINATION,
+			selector = IndividualLoanEventConstants.SELECTOR_DENY_INDIVIDUALLOAN_CASE
+	)
+	public void onDeny(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+	                   final String payload) {
+		this.notificationService.sendSMS("+23058409206",
+				"Dear Valued Customer,\n\nYour loan request has been denied\n\nBest Regards\nYour MFI");
+	}
+	
+	@JmsListener(
+			subscription = IndividualLoanEventConstants.DESTINATION,
+			destination = IndividualLoanEventConstants.DESTINATION,
+			selector = IndividualLoanEventConstants.SELECTOR_APPROVE_INDIVIDUALLOAN_CASE
+	)
+	public void onApprove(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+	                      final String payload) {
+		logger.info(payload);
+		this.notificationService.sendSMS("+23058409206",
+				"Dear Valued Customer,\n\nYour loan has been Approved and waiting disbursal\n\nBest Regards\nYour MFI");
+	}
+	
+	@JmsListener(
+			subscription = IndividualLoanEventConstants.DESTINATION,
+			destination = IndividualLoanEventConstants.DESTINATION,
+			selector = IndividualLoanEventConstants.SELECTOR_DISBURSE_INDIVIDUALLOAN_CASE
+	)
+	public void onDisburse(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+	                       final String payload) {
+		logger.info(payload);
+		this.notificationService.sendSMS("+23058409206",
+			"Dear Valued Customer,\n\nYour loan has been disbursed\n\nBest Regards\nYour MFI");
+	}
+	
+	@JmsListener(
+			subscription = IndividualLoanEventConstants.DESTINATION,
+			destination = IndividualLoanEventConstants.DESTINATION,
+			selector = IndividualLoanEventConstants.SELECTOR_APPLY_INTEREST_INDIVIDUALLOAN_CASE
+	)
+	public void onApplyInterest(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+	                            final String payload) {
+	}
+	
+	@JmsListener(
+			subscription = IndividualLoanEventConstants.DESTINATION,
+			destination = IndividualLoanEventConstants.DESTINATION,
+			selector = IndividualLoanEventConstants.SELECTOR_ACCEPT_PAYMENT_INDIVIDUALLOAN_CASE
+	)
+	public void onAcceptPayment(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+	                            final String payload) {
+	}
+	
+	@JmsListener(
+			subscription = IndividualLoanEventConstants.DESTINATION,
+			destination = IndividualLoanEventConstants.DESTINATION,
+			selector = IndividualLoanEventConstants.SELECTOR_CHECK_LATE_INDIVIDUALLOAN_CASE
+	)
+	public void onCheckLate(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+	                        final String payload) {
+	}
+	
+	@JmsListener(
+			subscription = IndividualLoanEventConstants.DESTINATION,
+			destination = IndividualLoanEventConstants.DESTINATION,
+			selector = IndividualLoanEventConstants.SELECTOR_MARK_LATE_INDIVIDUALLOAN_CASE
+	)
+	public void onMarkLate(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+	                       final String payload) {
+	}
+	
+	@JmsListener(
+			subscription = IndividualLoanEventConstants.DESTINATION,
+			destination = IndividualLoanEventConstants.DESTINATION,
+			selector = IndividualLoanEventConstants.SELECTOR_MARK_IN_ARREARS_INDIVIDUALLOAN_CASE
+	)
+	public void onMarkInArrears(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+	                            final String payload) {
+	}
+	
+	@JmsListener(
+			subscription = IndividualLoanEventConstants.DESTINATION,
+			destination = IndividualLoanEventConstants.DESTINATION,
+			selector = IndividualLoanEventConstants.SELECTOR_WRITE_OFF_INDIVIDUALLOAN_CASE
+	)
+	public void onWriteOff(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+	                       final String payload) {
+	}
+	
+	@JmsListener(
+			subscription = IndividualLoanEventConstants.DESTINATION,
+			destination = IndividualLoanEventConstants.DESTINATION,
+			selector = IndividualLoanEventConstants.SELECTOR_CLOSE_INDIVIDUALLOAN_CASE
+	)
+	public void onClose(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+	                    final String payload) {
+	}
+	
+	@JmsListener(
+			subscription = IndividualLoanEventConstants.DESTINATION,
+			destination = IndividualLoanEventConstants.DESTINATION,
+			selector = IndividualLoanEventConstants.SELECTOR_RECOVER_INDIVIDUALLOAN_CASE
+	)
+	public void onRecover(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+	                      final String payload) {
+	}
+}
\ No newline at end of file
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/TellerEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/TellerEventListener.java
deleted file mode 100644
index 5b461be..0000000
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/TellerEventListener.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-    /*
-package org.apache.fineract.cn.teller.listener;
-
-import org.apache.fineract.cn.teller.AbstractTellerTest;
-import org.apache.fineract.cn.teller.api.v1.EventConstants;
-import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
-import org.apache.fineract.cn.test.listener.EventRecorder;
-import org.slf4j.Logger;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.jms.annotation.JmsListener;
-import org.springframework.messaging.handler.annotation.Header;
-import org.springframework.stereotype.Component;
-
-@Component
-public class TellerEventListener {
-
-    private final Logger logger;
-    private final EventRecorder eventRecorder;
-
-    public TellerEventListener(@Qualifier(AbstractTellerTest.LOGGER_NAME) final Logger logger,
-                               final EventRecorder eventRecorder) {
-        super();
-        this.logger = logger;
-        this.eventRecorder = eventRecorder;
-    }
-
-
-    @JmsListener(
-            destination = EventConstants.DESTINATION,
-            selector = EventConstants.SELECTOR_POST_TELLER,
-            subscription = EventConstants.DESTINATION
-    )
-    public void onCreate(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                         final String payload) {
-        this.logger.debug("Teller {} created.", payload);
-        this.eventRecorder.event(tenant, EventConstants.POST_TELLER, payload, String.class);
-    }
-
-    @JmsListener(
-            destination = EventConstants.DESTINATION,
-            selector = EventConstants.SELECTOR_PUT_TELLER,
-            subscription = EventConstants.DESTINATION
-    )
-    public void onChange(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                         final String payload) {
-        this.logger.debug("Teller {} created.", payload);
-        this.eventRecorder.event(tenant, EventConstants.PUT_TELLER, payload, String.class);
-    }
-
-    @JmsListener(
-            destination = EventConstants.DESTINATION,
-            selector = EventConstants.SELECTOR_OPEN_TELLER,
-            subscription = EventConstants.DESTINATION
-    )
-    public void onOpen(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                       final String payload) {
-        this.logger.debug("Teller {} created.", payload);
-        this.eventRecorder.event(tenant, EventConstants.OPEN_TELLER, payload, String.class);
-    }
-
-    @JmsListener(
-            destination = EventConstants.DESTINATION,
-            selector = EventConstants.SELECTOR_CLOSE_TELLER,
-            subscription = EventConstants.DESTINATION
-    )
-    public void onClose(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                        final String payload) {
-        this.logger.debug("Teller {} created.", payload);
-        this.eventRecorder.event(tenant, EventConstants.CLOSE_TELLER, payload, String.class);
-    }
-
-    @JmsListener(
-            destination = EventConstants.DESTINATION,
-            selector = EventConstants.SELECTOR_AUTHENTICATE_TELLER,
-            subscription = EventConstants.DESTINATION
-    )
-    public void onAuthenticate(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                               final String payload) {
-        this.logger.debug("Teller {} created.", payload);
-        this.eventRecorder.event(tenant, EventConstants.AUTHENTICATE_TELLER, payload, String.class);
-    }
-
-    @JmsListener(
-            destination = EventConstants.DESTINATION,
-            selector = EventConstants.SELECTOR_PAUSE_TELLER,
-            subscription = EventConstants.DESTINATION
-    )
-    public void onPause(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                        final String payload) {
-        this.logger.debug("Teller {} created.", payload);
-        this.eventRecorder.event(tenant, EventConstants.PAUSE_TELLER, payload, String.class);
-    }
-
-    @JmsListener(
-            destination = EventConstants.DESTINATION,
-            selector = EventConstants.SELECTOR_CONFIRM_TRANSACTION,
-            subscription = EventConstants.DESTINATION
-    )
-    public void confirmTransaction(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                                   final String payload) {
-        this.logger.debug("Teller {} created.", payload);
-        this.eventRecorder.event(tenant, EventConstants.CONFIRM_TRANSACTION, payload, String.class);
-    }
-
-    @JmsListener(
-            destination = EventConstants.DESTINATION,
-            selector = EventConstants.SELECTOR_DELETE_TELLER,
-            subscription = EventConstants.DESTINATION
-    )
-    public void onDeleteTeller(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                               final String payload) {
-        this.logger.debug("Teller {} created.", payload);
-        this.eventRecorder.event(tenant, EventConstants.DELETE_TELLER, payload, String.class);
-    }
-
-    @JmsListener(
-            destination = EventConstants.DESTINATION,
-            selector = EventConstants.SELECTOR_SAVE_DENOMINATION,
-            subscription = EventConstants.DESTINATION
-    )
-    public void onSaveDenomination(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                                   final String payload) {
-        this.logger.debug("Teller {} created.", payload);
-        this.eventRecorder.event(tenant, EventConstants.SAVE_DENOMINATION, payload, String.class);
-    }
-
-}
-*/
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/rest/NotificationRestController.java b/service/src/main/java/org/apache/fineract/cn/notification/service/rest/NotificationRestController.java
index 983b43e..df36f03 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/rest/NotificationRestController.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/rest/NotificationRestController.java
@@ -18,102 +18,153 @@
  */
 package org.apache.fineract.cn.notification.service.rest;
 
-import org.apache.fineract.cn.notification.api.v1.PermittableGroupIds;
-import org.apache.fineract.cn.notification.api.v1.domain.Sample;
-import org.apache.fineract.cn.notification.service.ServiceConstants;
-import org.apache.fineract.cn.notification.service.internal.command.InitializeServiceCommand;
-import org.apache.fineract.cn.notification.service.internal.command.SampleCommand;
-import org.apache.fineract.cn.notification.service.internal.service.SampleService;
-import java.util.List;
-import javax.validation.Valid;
 import org.apache.fineract.cn.anubis.annotation.AcceptedTokenType;
 import org.apache.fineract.cn.anubis.annotation.Permittable;
 import org.apache.fineract.cn.command.gateway.CommandGateway;
 import org.apache.fineract.cn.lang.ServiceException;
+import org.apache.fineract.cn.notification.api.v1.PermittableGroupIds;
+import org.apache.fineract.cn.notification.api.v1.client.ConfigurationNotFoundException;
+import org.apache.fineract.cn.notification.api.v1.domain.EmailConfiguration;
+import org.apache.fineract.cn.notification.api.v1.domain.SMSConfiguration;
+import org.apache.fineract.cn.notification.service.ServiceConstants;
+import org.apache.fineract.cn.notification.service.internal.command.CreateEmailConfigurationCommand;
+import org.apache.fineract.cn.notification.service.internal.command.CreateSMSConfigurationCommand;
+import org.apache.fineract.cn.notification.service.internal.command.InitializeServiceCommand;
+import org.apache.fineract.cn.notification.service.internal.command.PostSMSCommand;
+import org.apache.fineract.cn.notification.service.internal.service.NotificationService;
 import org.slf4j.Logger;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.http.MediaType;
 import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+import java.util.List;
 
 @SuppressWarnings("unused")
 @RestController
 @RequestMapping("/")
 public class NotificationRestController {
-
-  private final Logger logger;
-  private final CommandGateway commandGateway;
-  private final SampleService sampleService;
-
-  @Autowired
-  public NotificationRestController(@Qualifier(ServiceConstants.LOGGER_NAME) final Logger logger,
-                              final CommandGateway commandGateway,
-                              final SampleService sampleService) {
-    super();
-    this.logger = logger;
-    this.commandGateway = commandGateway;
-    this.sampleService = sampleService;
-  }
-
-  @Permittable(value = AcceptedTokenType.SYSTEM)
-  @RequestMapping(
-      value = "/initialize",
-      method = RequestMethod.POST,
-      consumes = MediaType.ALL_VALUE,
-      produces = MediaType.APPLICATION_JSON_VALUE
-  )
-  public
-  @ResponseBody
-  ResponseEntity<Void> initialize() throws InterruptedException {
-      this.commandGateway.process(new InitializeServiceCommand());
-      return ResponseEntity.accepted().build();
-  }
-
-  @Permittable(value = AcceptedTokenType.TENANT, groupId = PermittableGroupIds.SAMPLE_MANAGEMENT)
-  @RequestMapping(
-          value = "/sample",
-          method = RequestMethod.GET,
-          consumes = MediaType.ALL_VALUE,
-          produces = MediaType.APPLICATION_JSON_VALUE
-  )
-  public
-  @ResponseBody
-  List<Sample> findAllEntities() {
-    return this.sampleService.findAllEntities();
-  }
-
-  @Permittable(value = AcceptedTokenType.TENANT, groupId = PermittableGroupIds.SAMPLE_MANAGEMENT)
-  @RequestMapping(
-          value = "/sample/{identifier}",
-          method = RequestMethod.GET,
-          consumes = MediaType.ALL_VALUE,
-          produces = MediaType.APPLICATION_JSON_VALUE
-  )
-  public
-  @ResponseBody
-  ResponseEntity<Sample> getEntity(@PathVariable("identifier") final String identifier) {
-    return this.sampleService.findByIdentifier(identifier)
-            .map(ResponseEntity::ok)
-            .orElseThrow(() -> ServiceException.notFound("Instance with identifier " + identifier + " doesn't exist."));
-  }
-
-  @Permittable(value = AcceptedTokenType.TENANT, groupId = PermittableGroupIds.SAMPLE_MANAGEMENT)
-  @RequestMapping(
-      value = "/sample",
-      method = RequestMethod.POST,
-      consumes = MediaType.APPLICATION_JSON_VALUE,
-      produces = MediaType.APPLICATION_JSON_VALUE
-  )
-  public
-  @ResponseBody
-  ResponseEntity<Void> createEntity(@RequestBody @Valid final Sample instance) throws InterruptedException {
-    this.commandGateway.process(new SampleCommand(instance));
-    return ResponseEntity.accepted().build();
-  }
+	
+	private final Logger logger;
+	private final CommandGateway commandGateway;
+	private final NotificationService notificationService;
+	
+	@Autowired
+	public NotificationRestController(@Qualifier(ServiceConstants.LOGGER_NAME) final Logger logger,
+	                                  final CommandGateway commandGateway,
+	                                  final NotificationService notificationService) {
+		super();
+		this.logger = logger;
+		this.commandGateway = commandGateway;
+		this.notificationService = notificationService;
+	}
+	
+	@Permittable(value = AcceptedTokenType.SYSTEM)
+	@RequestMapping(
+			value = "/initialize",
+			method = RequestMethod.POST,
+			consumes = MediaType.ALL_VALUE,
+			produces = MediaType.APPLICATION_JSON_VALUE
+	)
+	public
+	@ResponseBody
+	ResponseEntity<Void> initialize() throws InterruptedException {
+		this.commandGateway.process(new InitializeServiceCommand());
+		return ResponseEntity.accepted().build();
+	}
+	
+	@Permittable(value = AcceptedTokenType.TENANT, groupId = PermittableGroupIds.SELF_MANAGEMENT)
+	@RequestMapping(
+			value = "/notification/sms/active",
+			method = RequestMethod.GET,
+			consumes = MediaType.ALL_VALUE,
+			produces = MediaType.APPLICATION_JSON_VALUE
+	)
+	public
+	@ResponseBody
+	List<SMSConfiguration> findAllActiveSMSConfigurationEntities() {
+		return this.notificationService.findAllActiveSMSConfigurationEntities();
+	}
+	
+	@Permittable(value = AcceptedTokenType.TENANT, groupId = PermittableGroupIds.SELF_MANAGEMENT)
+	@RequestMapping(
+			value = "/notification/email/active",
+			method = RequestMethod.GET,
+			consumes = MediaType.ALL_VALUE,
+			produces = MediaType.APPLICATION_JSON_VALUE
+	)
+	public
+	@ResponseBody
+	List<EmailConfiguration> findAllActiveEmailConfigurationEntities() {
+		return this.notificationService.findAllActiveEmailConfigurationEntities();
+	}
+	
+	@Permittable(value = AcceptedTokenType.TENANT, groupId = PermittableGroupIds.SELF_MANAGEMENT)
+	@RequestMapping(
+			value = "/notification/sms/{identifier}",
+			method = RequestMethod.GET,
+			consumes = MediaType.ALL_VALUE,
+			produces = MediaType.APPLICATION_JSON_VALUE
+	)
+	public
+	@ResponseBody
+	ResponseEntity<SMSConfiguration> findSMSConfigurationByIdentifier(@PathVariable("identifier") final String identifier)
+	throws ConfigurationNotFoundException {
+		return this.notificationService.findSMSConfigurationByIdentifier(identifier)
+				.map(ResponseEntity::ok)
+				.orElseThrow(() -> ServiceException.notFound("SMS Gateway Configuration with identifier " + identifier + " doesn't exist."));
+	}
+	
+	@Permittable(value = AcceptedTokenType.TENANT, groupId = PermittableGroupIds.SELF_MANAGEMENT)
+	@RequestMapping(
+			value = "/notification/email/{identifier}",
+			method = RequestMethod.GET,
+			consumes = MediaType.ALL_VALUE,
+			produces = MediaType.APPLICATION_JSON_VALUE
+	)
+	public
+	@ResponseBody
+	ResponseEntity<EmailConfiguration> findEmailConfigurationByIdentifier(@PathVariable("identifier") final String identifier)
+			throws ConfigurationNotFoundException {
+		return this.notificationService.findEmailConfigurationByIdentifier(identifier)
+				.map(ResponseEntity::ok)
+				.orElseThrow(() -> ServiceException.notFound("Email Gateway Configuration with identifier " + identifier + " doesn't exist."));
+	}
+	
+	@Permittable(value = AcceptedTokenType.TENANT, groupId = PermittableGroupIds.SELF_MANAGEMENT)
+	@RequestMapping(
+			value = "/notification/sms/create",
+			method = RequestMethod.POST,
+			consumes = MediaType.APPLICATION_JSON_VALUE,
+			produces = MediaType.APPLICATION_JSON_VALUE
+	)
+	public
+	@ResponseBody
+	ResponseEntity<Void> createSMSConfiguration(@RequestBody @Valid final SMSConfiguration smsConfiguration) throws InterruptedException {
+		if (this.notificationService.smsConfigurationExists(smsConfiguration.getIdentifier())) {
+			throw ServiceException.conflict("Configuration {0} already exists.", smsConfiguration.getIdentifier());
+		}
+		
+		this.commandGateway.process(new CreateSMSConfigurationCommand(smsConfiguration));
+		return ResponseEntity.accepted().build();
+	}
+	
+	@Permittable(value = AcceptedTokenType.TENANT, groupId = PermittableGroupIds.SELF_MANAGEMENT)
+	@RequestMapping(
+			value = "/notification/email/create",
+			method = RequestMethod.POST,
+			consumes = MediaType.APPLICATION_JSON_VALUE,
+			produces = MediaType.APPLICATION_JSON_VALUE
+	)
+	public
+	@ResponseBody
+	ResponseEntity<Void> createEmailConfiguration(@RequestBody @Valid final EmailConfiguration emailConfiguration) throws InterruptedException {
+		if (this.notificationService.emailConfigurationExists(emailConfiguration.getIdentifier())) {
+			throw ServiceException.conflict("Configuration {0} already exists.", emailConfiguration.getIdentifier());
+		}
+		this.commandGateway.process(new CreateEmailConfigurationCommand(emailConfiguration));
+		return ResponseEntity.accepted().build();
+	}
 }
diff --git a/service/src/main/resources/application.yml b/service/src/main/resources/application.yml
index ec163fc..fa7165e 100644
--- a/service/src/main/resources/application.yml
+++ b/service/src/main/resources/application.yml
@@ -23,6 +23,20 @@ spring:
       enabled: false
     config:
       enabled: false
+    mail:
+      host: smtp.gmail.com
+      port: 587
+      username:
+      password:
+      properties:
+        debug: true
+        mail:
+          smtp:
+            auth: true
+            starttls:
+              enable: true
+
+
 
 eureka:
   client:
@@ -68,14 +82,7 @@ async:
 flyway:
   enabled: false
 
-fineract:
-  customer:
-    accountcreated:
-      message: Dear Valued Customer, Your account has been created.
-    accountclosed:
-      message: Dear Valued Customer, Your account has been successfully closed.
-
 smssender:
   accountSID: AC1fde2c6f26f367b93231c5fdb944c908
-  authtoken: bc9a53e41745b8471e0ecafc859d86aa
+  authToken: bc9a53e41745b8471e0ecafc859d86aa
   senderNumber: +1 510-944-1898
diff --git a/service/src/main/resources/db/migrations/mariadb/V1__initial_setup.sql b/service/src/main/resources/db/migrations/mariadb/V1__initial_setup.sql
index ff9a61f..57cefe1 100644
--- a/service/src/main/resources/db/migrations/mariadb/V1__initial_setup.sql
+++ b/service/src/main/resources/db/migrations/mariadb/V1__initial_setup.sql
@@ -18,55 +18,39 @@
 --
 
 -- -----------------------------------------------------
--- Table `fineract-cn-notification`.`email_gateway_configurations`
+-- Table wada_sms_gateway_configurations
 -- -----------------------------------------------------
-CREATE TABLE IF NOT EXISTS `fineract-cn-notification`.`email_gateway_configurations` (
-  `id` INT(11) NOT NULL AUTO_INCREMENT,
-  `identifer` VARCHAR(45) NULL DEFAULT NULL,
-  `host` VARCHAR(45) NOT NULL,
-  `port` VARCHAR(45) NOT NULL,
-  `username` VARCHAR(45) NOT NULL,
-  `app_id` VARCHAR(45) NOT NULL,
-  PRIMARY KEY (`id`))
-ENGINE = InnoDB
-DEFAULT CHARACTER SET = latin1;
-
+CREATE TABLE wada_sms_gateway_configurations (
+  id INT(11) NOT NULL AUTO_INCREMENT,
+  identifier VARCHAR(45) NULL DEFAULT NULL,
+  account_sid VARCHAR(255) NOT NULL,
+  auth_token VARCHAR(255) NOT NULL,
+  sender_number VARCHAR(45) NOT NULL,
+  state VARCHAR(45) NULL DEFAULT NULL,
+  PRIMARY KEY (id));
 
 -- -----------------------------------------------------
--- Table `fineract-cn-notification`.`sms_gateway_configurations`
+-- Table wada_email_gateway_configurations
 -- -----------------------------------------------------
-CREATE TABLE IF NOT EXISTS `fineract-cn-notification`.`sms_gateway_configurations` (
-  `id` INT(11) NOT NULL AUTO_INCREMENT,
-  `identifier` VARCHAR(45) NULL DEFAULT NULL,
-  `accountsid` VARCHAR(255) NOT NULL,
-  `auth_token` VARCHAR(255) NOT NULL,
-  `option` VARCHAR(45) NULL DEFAULT NULL,
-  PRIMARY KEY (`id`))
-ENGINE = InnoDB
-DEFAULT CHARACTER SET = latin1;
-
+CREATE TABLE wada_email_gateway_configurations (
+  id INT(11) NOT NULL AUTO_INCREMENT,
+  identifier VARCHAR(45) NULL DEFAULT NULL,
+  host VARCHAR(45) NOT NULL,
+  port VARCHAR(45) NOT NULL,
+  username VARCHAR(45) NOT NULL,
+  app_password VARCHAR(255) NOT NULL,
+  protocol VARCHAR(45)NOT NULL,
+  smtp_auth VARCHAR (45)NOT NULL,
+  start_tls VARCHAR (45)NOT NULL,
+  state VARCHAR(45)NOT NULL,
+  PRIMARY KEY (id));
 
 -- -----------------------------------------------------
--- Table `fineract-cn-notification`.`templates`
+-- Table wada_templates
 -- -----------------------------------------------------
-CREATE TABLE IF NOT EXISTS `fineract-cn-notification`.`templates` (
-  `id` INT(11) NOT NULL AUTO_INCREMENT,
-  PRIMARY KEY (`id`))
-ENGINE = InnoDB
-DEFAULT CHARACTER SET = latin1;
-
--- ------------------------------------------------------
-
-CREATE TABLE sample (
-  id BIGINT NOT NULL AUTO_INCREMENT,
-  identifier VARCHAR(8) NOT NULL,
-  payload VARCHAR(512) NULL,
-  CONSTRAINT notification_pk PRIMARY KEY (id)
-);
-
-CREATE TABLE template_sample (
-  id BIGINT NOT NULL AUTO_INCREMENT,
-  identifier VARCHAR(8) NOT NULL,
-  payload VARCHAR(512) NULL,
-  CONSTRAINT template_sample_pk PRIMARY KEY (id)
-);
\ No newline at end of file
+CREATE TABLE wada_templates (
+  id INT(11) NOT NULL AUTO_INCREMENT,
+  identifier VARCHAR(45) NULL DEFAULT NULL,
+  event VARCHAR(45) NULL DEFAULT NULL,
+  url VARCHAR(255) NOT NULL,
+  PRIMARY KEY (id));
diff --git a/service/src/main/resources/db/migrations/mariadb/V2__sms_gateway_configurations.sql b/service/src/main/resources/db/migrations/mariadb/V2__sms_gateway_configurations.sql
new file mode 100644
index 0000000..d795f01
--- /dev/null
+++ b/service/src/main/resources/db/migrations/mariadb/V2__sms_gateway_configurations.sql
@@ -0,0 +1,20 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--   http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing,
+-- software distributed under the License is distributed on an
+-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+-- KIND, either express or implied.  See the License for the
+-- specific language governing permissions and limitations
+-- under the License.
+--
+
+INSERT INTO wada_sms_gateway_configurations VALUES ('1', 'Twilio', 'AC1fde2c6f26f367b93231c5fdb944c908', 'c9a53e41745b8471e0ecafc859d86aa', '+1 510-944-1898', 'ACTIVE');
\ No newline at end of file
diff --git a/service/src/main/resources/db/migrations/mariadb/V3__email_gateway_configurations.sql b/service/src/main/resources/db/migrations/mariadb/V3__email_gateway_configurations.sql
new file mode 100644
index 0000000..9482b7c
--- /dev/null
+++ b/service/src/main/resources/db/migrations/mariadb/V3__email_gateway_configurations.sql
@@ -0,0 +1,20 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--   http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing,
+-- software distributed under the License is distributed on an
+-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+-- KIND, either express or implied.  See the License for the
+-- specific language governing permissions and limitations
+-- under the License.
+--
+
+INSERT INTO wada_email_gateway_configurations VALUES ('1', 'Gmail', 'smtp.gmail.com', '587','fineractcnnotificationdemo@gmail.com', 'pnuugpwmcibipdpw', 'smtp', 'true', 'true', 'ACTIVE');
\ No newline at end of file
diff --git a/service/src/main/resources/logback.xml b/service/src/main/resources/logback.xml
new file mode 100644
index 0000000..5cd9b4c
--- /dev/null
+++ b/service/src/main/resources/logback.xml
@@ -0,0 +1,58 @@
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<configuration>
+    <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>logs/notification.log</file>
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <fileNamePattern>logs/archive/notification.%d{yyyy-MM-dd}.log</fileNamePattern>
+            <maxHistory>7</maxHistory>
+            <totalSizeCap>2GB</totalSizeCap>
+        </rollingPolicy>
+        <encoder>
+            <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
+        </encoder>
+    </appender>
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
+        </encoder>
+    </appender>
+
+    <logger name="com" level="INFO">
+        <appender-ref ref="STDOUT" />
+    </logger>
+
+    <logger name="org" level="INFO">
+        <appender-ref ref="STDOUT" />
+    </logger>
+
+    <logger name="io" level="INFO">
+        <appender-ref ref="STDOUT" />
+    </logger>
+
+    <logger name="net" level="INFO">
+        <appender-ref ref="STDOUT" />
+    </logger>
+
+    <root level="DEBUG">
+        <appender-ref ref="FILE"/>
+    </root>
+</configuration>
\ No newline at end of file
diff --git a/shared.gradle b/shared.gradle
index 4a65927..6b000b7 100644
--- a/shared.gradle
+++ b/shared.gradle
@@ -20,15 +20,11 @@ version '0.1.0-BUILD-SNAPSHOT'
 
 ext.versions = [
         fineractcnidentity      : '0.1.0-BUILD-SNAPSHOT',
-        fineractcnprovisioner   : '0.1.0-BUILD-SNAPSHOT',
-        fineractcnrhythm        : '0.1.0-BUILD-SNAPSHOT',
         fineractcnoffice        : '0.1.0-BUILD-SNAPSHOT',
         fineractcncustomer      : '0.1.0-BUILD-SNAPSHOT',
         fineractcnaccounting    : '0.1.0-BUILD-SNAPSHOT',
         fineractcnportfolio     : '0.1.0-BUILD-SNAPSHOT',
-        fineractcndeposit       : '0.1.0-BUILD-SNAPSHOT',
         fineractcnteller        : '0.1.0-BUILD-SNAPSHOT',
-        kuelapcheques           : '0.1.0-BUILD-SNAPSHOT',
         fineractcnpayroll       : '0.1.0-BUILD-SNAPSHOT',
         fineractcngroup         : '0.1.0-BUILD-SNAPSHOT',
         frameworkapi            : '0.1.0-BUILD-SNAPSHOT',
@@ -39,7 +35,9 @@ ext.versions = [
         frameworkcommand        : '0.1.0-BUILD-SNAPSHOT',
         frameworktest           : '0.1.0-BUILD-SNAPSHOT',
         frameworkanubis         : '0.1.0-BUILD-SNAPSHOT',
-        validator : '5.3.0.Final'
+        validator               : '5.3.0.Final',
+        springjavamail          : '1.4.1.RELEASE',
+        twilioapi               : '7.17.+'
 ]
 
 apply plugin: 'java'
diff --git a/system-analysis.mdj b/system-analysis.mdj
deleted file mode 100644
index 4c7f1af..0000000
--- a/system-analysis.mdj
+++ /dev/null
@@ -1,4104 +0,0 @@
-{
-	"_type": "Project",
-	"_id": "AAAAAAFF+h6SjaM2Hec=",
-	"name": "Untitled",
-	"ownedElements": [
-		{
-			"_type": "UMLModel",
-			"_id": "AAAAAAFF+qBWK6M3Z8Y=",
-			"_parent": {
-				"$ref": "AAAAAAFF+h6SjaM2Hec="
-			},
-			"name": "Model",
-			"ownedElements": [
-				{
-					"_type": "UMLClassDiagram",
-					"_id": "AAAAAAFF+qBtyKM79qY=",
-					"_parent": {
-						"$ref": "AAAAAAFF+qBWK6M3Z8Y="
-					},
-					"name": "Main",
-					"visible": true,
-					"defaultDiagram": true
-				},
-				{
-					"_type": "UMLActivity",
-					"_id": "AAAAAAFjqASLHqqfH1M=",
-					"_parent": {
-						"$ref": "AAAAAAFF+qBWK6M3Z8Y="
-					},
-					"name": "Activity1",
-					"ownedElements": [
-						{
-							"_type": "UMLActivityDiagram",
-							"_id": "AAAAAAFjqASLIKqg3FE=",
-							"_parent": {
-								"$ref": "AAAAAAFjqASLHqqfH1M="
-							},
-							"name": "Notification Activity",
-							"visible": true,
-							"defaultDiagram": false,
-							"ownedViews": [
-								{
-									"_type": "UMLControlNodeView",
-									"_id": "AAAAAAFjqASvhqqmFR0=",
-									"_parent": {
-										"$ref": "AAAAAAFjqASLIKqg3FE="
-									},
-									"model": {
-										"$ref": "AAAAAAFjqASvhaqkmH0="
-									},
-									"visible": true,
-									"enabled": true,
-									"lineColor": "#000000",
-									"fillColor": "#ffffff",
-									"fontColor": "#000000",
-									"font": "Arial;13;0",
-									"showShadow": true,
-									"containerChangeable": true,
-									"containerExtending": false,
-									"left": 178,
-									"top": 32,
-									"width": 20,
-									"height": 20,
-									"autoResize": false
-								},
-								{
-									"_type": "UMLActionView",
-									"_id": "AAAAAAFjqATelaqrA88=",
-									"_parent": {
-										"$ref": "AAAAAAFjqASLIKqg3FE="
-									},
-									"model": {
-										"$ref": "AAAAAAFjqATelKqpPIs="
-									},
-									"subViews": [
-										{
-											"_type": "UMLNameCompartmentView",
-											"_id": "AAAAAAFjqATelqqsQwY=",
-											"_parent": {
-												"$ref": "AAAAAAFjqATelaqrA88="
-											},
-											"model": {
-												"$ref": "AAAAAAFjqATelKqpPIs="
-											},
-											"subViews": [
-												{
-													"_type": "LabelView",
-													"_id": "AAAAAAFjqATelqqtdxw=",
-													"_parent": {
-														"$ref": "AAAAAAFjqATelqqsQwY="
-													},
-													"visible": false,
-													"enabled": true,
-													"lineColor": "#000000",
-													"fillColor": "#ffffff",
-													"fontColor": "#000000",
-													"font": "Arial;13;0",
-													"showShadow": true,
-													"containerChangeable": false,
-													"containerExtending": false,
-													"left": 32,
-													"top": 0,
-													"width": 0,
-													"height": 13,
-													"autoResize": false,
-													"underline": false,
-													"horizontalAlignment": 2,
-													"verticalAlignment": 5,
-													"wordWrap": false
-												},
-												{
-													"_type": "LabelView",
-													"_id": "AAAAAAFjqATel6qupnU=",
-													"_parent": {
-														"$ref": "AAAAAAFjqATelqqsQwY="
-													},
-													"visible": true,
-													"enabled": true,
-													"lineColor": "#000000",
-													"fillColor": "#ffffff",
-													"fontColor": "#000000",
-													"font": "Arial;13;1",
-													"showShadow": true,
-													"containerChangeable": false,
-													"containerExtending": false,
-													"left": 144,
-													"top": 95,
-													"width": 87,
-													"height": 26,
-													"autoResize": false,
-													"underline": false,
-													"text": "JMSListener injects event",
-													"horizontalAlignment": 2,
-													"verticalAlignment": 5,
-													"wordWrap": true
-												},
-												{
-													"_type": "LabelView",
-													"_id": "AAAAAAFjqATemKqvl8w=",
-													"_parent": {
-														"$ref": "AAAAAAFjqATelqqsQwY="
-													},
-													"visible": false,
-													"enabled": true,
-													"lineColor": "#000000",
-													"fillColor": "#ffffff",
-													"fontColor": "#000000",
-													"font": "Arial;13;0",
-													"showShadow": true,
-													"containerChangeable": false,
-													"containerExtending": false,
-													"left": 32,
-													"top": 0,
-													"width": 86,
-													"height": 13,
-													"autoResize": false,
-													"underline": false,
-													"text": "(from Activity1)",
-													"horizontalAlignment": 2,
-													"verticalAlignment": 5,
-													"wordWrap": false
-												},
-												{
-													"_type": "LabelView",
-													"_id": "AAAAAAFjqATemKqwuws=",
-													"_parent": {
-														"$ref": "AAAAAAFjqATelqqsQwY="
-													},
-													"visible": false,
-													"enabled": true,
-													"lineColor": "#000000",
-													"fillColor": "#ffffff",
-													"fontColor": "#000000",
-													"font": "Arial;13;0",
-													"showShadow": true,
-													"containerChangeable": false,
-													"containerExtending": false,
-													"left": 32,
-													"top": 0,
-													"width": 0,
-													"height": 13,
-													"autoResize": false,
-													"underline": false,
-													"horizontalAlignment": 1,
-													"verticalAlignment": 5,
-													"wordWrap": false
-												}
-											],
-											"visible": true,
-											"enabled": true,
-											"lineColor": "#000000",
-											"fillColor": "#ffffff",
-											"fontColor": "#000000",
-											"font": "Arial;13;0",
-											"showShadow": true,
-											"containerChangeable": false,
-											"containerExtending": false,
-											"left": 139,
-											"top": 88,
-											"width": 97,
-											"height": 38,
-											"autoResize": false,
-											"stereotypeLabel": {
-												"$ref": "AAAAAAFjqATelqqtdxw="
-											},
-											"nameLabel": {
-												"$ref": "AAAAAAFjqATel6qupnU="
-											},
-											"namespaceLabel": {
-												"$ref": "AAAAAAFjqATemKqvl8w="
-											},
-											"propertyLabel": {
-												"$ref": "AAAAAAFjqATemKqwuws="
-											}
-										}
-									],
-									"visible": true,
-									"enabled": true,
-									"lineColor": "#000000",
-									"fillColor": "#ffffff",
-									"fontColor": "#000000",
-									"font": "Arial;13;0",
-									"showShadow": true,
-									"containerChangeable": true,
-									"containerExtending": false,
-									"left": 139,
-									"top": 88,
-									"width": 97,
-									"height": 54,
-									"autoResize": false,
-									"stereotypeDisplay": "label",
-									"showVisibility": true,
-									"showNamespace": false,
-									"showProperty": true,
-									"showType": true,
-									"nameCompartment": {
-										"$ref": "AAAAAAFjqATelqqsQwY="
-									},
-									"wordWrap": true
-								},
-								{
-									"_type": "UMLActionView",
-									"_id": "AAAAAAFjqAWrCqrNuOs=",
-									"_parent": {
-										"$ref": "AAAAAAFjqASLIKqg3FE="
-									},
-									"model": {
-										"$ref": "AAAAAAFjqAWrCarLlr0="
-									},
-									"subViews": [
-										{
-											"_type": "UMLNameCompartmentView",
-											"_id": "AAAAAAFjqAWrCqrOxcc=",
-											"_parent": {
-												"$ref": "AAAAAAFjqAWrCqrNuOs="
-											},
-											"model": {
-												"$ref": "AAAAAAFjqAWrCarLlr0="
-											},
-											"subViews": [
-												{
-													"_type": "LabelView",
-													"_id": "AAAAAAFjqAWrC6rPvtY=",
-													"_parent": {
-														"$ref": "AAAAAAFjqAWrCqrOxcc="
-													},
-													"visible": false,
-													"enabled": true,
-													"lineColor": "#000000",
-													"fillColor": "#ffffff",
-													"fontColor": "#000000",
-													"font": "Arial;13;0",
-													"showShadow": true,
-													"containerChangeable": false,
-													"containerExtending": false,
-													"left": -366,
-													"top": 304,
-													"width": 0,
-													"height": 13,
-													"autoResize": false,
-													"underline": false,
-													"horizontalAlignment": 2,
-													"verticalAlignment": 5,
-													"wordWrap": false
-												},
-												{
-													"_type": "LabelView",
-													"_id": "AAAAAAFjqAWrC6rQZmc=",
-													"_parent": {
-														"$ref": "AAAAAAFjqAWrCqrOxcc="
-													},
-													"visible": true,
-													"enabled": true,
-													"lineColor": "#000000",
-													"fillColor": "#ffffff",
-													"fontColor": "#000000",
-													"font": "Arial;13;1",
-													"showShadow": true,
-													"containerChangeable": false,
-													"containerExtending": false,
-													"left": 45,
-													"top": 351,
-													"width": 95,
-													"height": 52,
-													"autoResize": false,
-													"underline": false,
-													"text": "retrieve receipt SMS and email contact",
-													"horizontalAlignment": 2,
-													"verticalAlignment": 5,
-													"wordWrap": true
-												},
-												{
-													"_type": "LabelView",
-													"_id": "AAAAAAFjqAWrC6rRHbU=",
-													"_parent": {
-														"$ref": "AAAAAAFjqAWrCqrOxcc="
-													},
-													"visible": false,
-													"enabled": true,
-													"lineColor": "#000000",
-													"fillColor": "#ffffff",
-													"fontColor": "#000000",
-													"font": "Arial;13;0",
-													"showShadow": true,
-													"containerChangeable": false,
-													"containerExtending": false,
-													"left": -366,
-													"top": 304,
-													"width": 86,
-													"height": 13,
-													"autoResize": false,
-													"underline": false,
-													"text": "(from Activity1)",
-													"horizontalAlignment": 2,
-													"verticalAlignment": 5,
-													"wordWrap": false
-												},
-												{
-													"_type": "LabelView",
-													"_id": "AAAAAAFjqAWrC6rS8Ik=",
-													"_parent": {
-														"$ref": "AAAAAAFjqAWrCqrOxcc="
-													},
-													"visible": false,
-													"enabled": true,
-													"lineColor": "#000000",
-													"fillColor": "#ffffff",
-													"fontColor": "#000000",
-													"font": "Arial;13;0",
-													"showShadow": true,
-													"containerChangeable": false,
-													"containerExtending": false,
-													"left": -366,
-													"top": 304,
-													"width": 0,
-													"height": 13,
-													"autoResize": false,
-													"underline": false,
-													"horizontalAlignment": 1,
-													"verticalAlignment": 5,
-													"wordWrap": false
-												}
-											],
-											"visible": true,
-											"enabled": true,
-											"lineColor": "#000000",
-											"fillColor": "#ffffff",
-											"fontColor": "#000000",
-											"font": "Arial;13;0",
-											"showShadow": true,
-											"containerChangeable": false,
-											"containerExtending": false,
-											"left": 40,
-											"top": 344,
-											"width": 105,
-											"height": 64,
-											"autoResize": false,
-											"stereotypeLabel": {
-												"$ref": "AAAAAAFjqAWrC6rPvtY="
-											},
-											"nameLabel": {
-												"$ref": "AAAAAAFjqAWrC6rQZmc="
-											},
-											"namespaceLabel": {
-												"$ref": "AAAAAAFjqAWrC6rRHbU="
-											},
-											"propertyLabel": {
-												"$ref": "AAAAAAFjqAWrC6rS8Ik="
-											}
-										}
-									],
-									"visible": true,
-									"enabled": true,
-									"lineColor": "#000000",
-									"fillColor": "#ffffff",
-									"fontColor": "#000000",
-									"font": "Arial;13;0",
-									"showShadow": true,
-									"containerChangeable": true,
-									"containerExtending": false,
-									"left": 40,
-									"top": 344,
-									"width": 105,
-									"height": 80,
-									"autoResize": false,
-									"stereotypeDisplay": "label",
-									"showVisibility": true,
-									"showNamespace": false,
-									"showProperty": true,
-									"showType": true,
-									"nameCompartment": {
-										"$ref": "AAAAAAFjqAWrCqrOxcc="
-									},
-									"wordWrap": true
-								},
-								{
-									"_type": "UMLActionView",
-									"_id": "AAAAAAFjqAYmKaro5lo=",
-									"_parent": {
-										"$ref": "AAAAAAFjqASLIKqg3FE="
-									},
-									"model": {
-										"$ref": "AAAAAAFjqAYmKKrmL6s="
-									},
-									"subViews": [
-										{
-											"_type": "UMLNameCompartmentView",
-											"_id": "AAAAAAFjqAYmKarpUFk=",
-											"_parent": {
-												"$ref": "AAAAAAFjqAYmKaro5lo="
-											},
-											"model": {
-												"$ref": "AAAAAAFjqAYmKKrmL6s="
-											},
-											"subViews": [
-												{
-													"_type": "LabelView",
-													"_id": "AAAAAAFjqAYmKqrq62s=",
-													"_parent": {
-														"$ref": "AAAAAAFjqAYmKarpUFk="
-													},
-													"visible": false,
-													"enabled": true,
-													"lineColor": "#000000",
-													"fillColor": "#ffffff",
-													"fontColor": "#000000",
-													"font": "Arial;13;0",
-													"showShadow": true,
-													"containerChangeable": false,
-													"containerExtending": false,
-													"left": 322,
-													"top": 224,
-													"width": 0,
-													"height": 13,
-													"autoResize": false,
-													"underline": false,
-													"horizontalAlignment": 2,
-													"verticalAlignment": 5,
-													"wordWrap": false
-												},
-												{
-													"_type": "LabelView",
-													"_id": "AAAAAAFjqAYmKqrr75M=",
-													"_parent": {
-														"$ref": "AAAAAAFjqAYmKarpUFk="
-													},
-													"visible": true,
-													"enabled": true,
-													"lineColor": "#000000",
-													"fillColor": "#ffffff",
-													"fontColor": "#000000",
-													"font": "Arial;13;1",
-													"showShadow": true,
-													"containerChangeable": false,
-													"containerExtending": false,
-													"left": 213,
-													"top": 351,
-													"width": 111,
-													"height": 39,
-													"autoResize": false,
-													"underline": false,
-													"text": "Prepare Message with template created",
-													"horizontalAlignment": 2,
-													"verticalAlignment": 5,
-													"wordWrap": true
-												},
-												{
-													"_type": "LabelView",
-													"_id": "AAAAAAFjqAYmK6rsSQ0=",
-													"_parent": {
-														"$ref": "AAAAAAFjqAYmKarpUFk="
-													},
-													"visible": false,
-													"enabled": true,
-													"lineColor": "#000000",
-													"fillColor": "#ffffff",
-													"fontColor": "#000000",
-													"font": "Arial;13;0",
-													"showShadow": true,
-													"containerChangeable": false,
-													"containerExtending": false,
-													"left": 322,
-													"top": 224,
-													"width": 86,
-													"height": 13,
-													"autoResize": false,
-													"underline": false,
-													"text": "(from Activity1)",
-													"horizontalAlignment": 2,
-													"verticalAlignment": 5,
-													"wordWrap": false
-												},
-												{
-													"_type": "LabelView",
-													"_id": "AAAAAAFjqAYmK6rtvPo=",
-													"_parent": {
-														"$ref": "AAAAAAFjqAYmKarpUFk="
-													},
-													"visible": false,
-													"enabled": true,
-													"lineColor": "#000000",
-													"fillColor": "#ffffff",
-													"fontColor": "#000000",
-													"font": "Arial;13;0",
-													"showShadow": true,
-													"containerChangeable": false,
-													"containerExtending": false,
-													"left": 322,
-													"top": 224,
-													"width": 0,
-													"height": 13,
-													"autoResize": false,
-													"underline": false,
-													"horizontalAlignment": 1,
-													"verticalAlignment": 5,
-													"wordWrap": false
-												}
-											],
-											"visible": true,
-											"enabled": true,
-											"lineColor": "#000000",
-											"fillColor": "#ffffff",
-											"fontColor": "#000000",
-											"font": "Arial;13;0",
-											"showShadow": true,
-											"containerChangeable": false,
-											"containerExtending": false,
-											"left": 208,
-											"top": 344,
-											"width": 121,
-											"height": 51,
-											"autoResize": false,
-											"stereotypeLabel": {
-												"$ref": "AAAAAAFjqAYmKqrq62s="
-											},
-											"nameLabel": {
-												"$ref": "AAAAAAFjqAYmKqrr75M="
-											},
-											"namespaceLabel": {
-												"$ref": "AAAAAAFjqAYmK6rsSQ0="
-											},
-											"propertyLabel": {
-												"$ref": "AAAAAAFjqAYmK6rtvPo="
-											}
-										}
-									],
-									"visible": true,
-									"enabled": true,
-									"lineColor": "#000000",
-									"fillColor": "#ffffff",
-									"fontColor": "#000000",
-									"font": "Arial;13;0",
-									"showShadow": true,
-									"containerChangeable": true,
-									"containerExtending": false,
-									"left": 208,
-									"top": 344,
-									"width": 121,
-									"height": 67,
-									"autoResize": false,
-									"stereotypeDisplay": "label",
-									"showVisibility": true,
-									"showNamespace": false,
-									"showProperty": true,
-									"showType": true,
-									"nameCompartment": {
-										"$ref": "AAAAAAFjqAYmKarpUFk="
-									},
-									"wordWrap": true
-								},
-								{
-									"_type": "UMLActionView",
-									"_id": "AAAAAAFjqAZdgqsCYJQ=",
-									"_parent": {
-										"$ref": "AAAAAAFjqASLIKqg3FE="
-									},
-									"model": {
-										"$ref": "AAAAAAFjqAZdgasAyFA="
-									},
-									"subViews": [
-										{
-											"_type": "UMLNameCompartmentView",
-											"_id": "AAAAAAFjqAZdgqsDDao=",
-											"_parent": {
-												"$ref": "AAAAAAFjqAZdgqsCYJQ="
-											},
-											"model": {
-												"$ref": "AAAAAAFjqAZdgasAyFA="
-											},
-											"subViews": [
-												{
-													"_type": "LabelView",
-													"_id": "AAAAAAFjqAZdgqsEhl4=",
-													"_parent": {
-														"$ref": "AAAAAAFjqAZdgqsDDao="
-													},
-													"visible": false,
-													"enabled": true,
-													"lineColor": "#000000",
-													"fillColor": "#ffffff",
-													"fontColor": "#000000",
-													"font": "Arial;13;0",
-													"showShadow": true,
-													"containerChangeable": false,
-													"containerExtending": false,
-													"left": -240,
-													"top": 528,
-													"width": 0,
-													"height": 13,
-													"autoResize": false,
-													"underline": false,
-													"horizontalAlignment": 2,
-													"verticalAlignment": 5,
-													"wordWrap": false
-												},
-												{
-													"_type": "LabelView",
-													"_id": "AAAAAAFjqAZdgqsF8Ko=",
-													"_parent": {
-														"$ref": "AAAAAAFjqAZdgqsDDao="
-													},
-													"visible": true,
-													"enabled": true,
-													"lineColor": "#000000",
-													"fillColor": "#ffffff",
-													"fontColor": "#000000",
-													"font": "Arial;13;1",
-													"showShadow": true,
-													"containerChangeable": false,
-													"containerExtending": false,
-													"left": 136,
-													"top": 591,
-													"width": 103,
-													"height": 39,
-													"autoResize": false,
-													"underline": false,
-													"text": "Senders Objects transmit the data",
-													"horizontalAlignment": 2,
-													"verticalAlignment": 5,
-													"wordWrap": true
-												},
-												{
-													"_type": "LabelView",
-													"_id": "AAAAAAFjqAZdgqsGu+E=",
-													"_parent": {
-														"$ref": "AAAAAAFjqAZdgqsDDao="
-													},
-													"visible": false,
-													"enabled": true,
-													"lineColor": "#000000",
-													"fillColor": "#ffffff",
-													"fontColor": "#000000",
-													"font": "Arial;13;0",
-													"showShadow": true,
-													"containerChangeable": false,
-													"containerExtending": false,
-													"left": -240,
-													"top": 528,
-													"width": 86,
-													"height": 13,
-													"autoResize": false,
-													"underline": false,
-													"text": "(from Activity1)",
-													"horizontalAlignment": 2,
-													"verticalAlignment": 5,
-													"wordWrap": false
-												},
-												{
-													"_type": "LabelView",
-													"_id": "AAAAAAFjqAZdgqsH70w=",
-													"_parent": {
-														"$ref": "AAAAAAFjqAZdgqsDDao="
-													},
-													"visible": false,
-													"enabled": true,
-													"lineColor": "#000000",
-													"fillColor": "#ffffff",
-													"fontColor": "#000000",
-													"font": "Arial;13;0",
-													"showShadow": true,
-													"containerChangeable": false,
-													"containerExtending": false,
-													"left": -240,
-													"top": 528,
-													"width": 0,
-													"height": 13,
-													"autoResize": false,
-													"underline": false,
-													"horizontalAlignment": 1,
-													"verticalAlignment": 5,
-													"wordWrap": false
-												}
-											],
-											"visible": true,
-											"enabled": true,
-											"lineColor": "#000000",
-											"fillColor": "#ffffff",
-											"fontColor": "#000000",
-											"font": "Arial;13;0",
-											"showShadow": true,
-											"containerChangeable": false,
-											"containerExtending": false,
-											"left": 131,
-											"top": 584,
-											"width": 113,
-											"height": 51,
-											"autoResize": false,
-											"stereotypeLabel": {
-												"$ref": "AAAAAAFjqAZdgqsEhl4="
-											},
-											"nameLabel": {
-												"$ref": "AAAAAAFjqAZdgqsF8Ko="
-											},
-											"namespaceLabel": {
-												"$ref": "AAAAAAFjqAZdgqsGu+E="
-											},
-											"propertyLabel": {
-												"$ref": "AAAAAAFjqAZdgqsH70w="
-											}
-										}
-									],
-									"visible": true,
-									"enabled": true,
-									"lineColor": "#000000",
-									"fillColor": "#ffffff",
-									"fontColor": "#000000",
-									"font": "Arial;13;0",
-									"showShadow": true,
-									"containerChangeable": true,
-									"containerExtending": false,
-									"left": 131,
-									"top": 584,
-									"width": 113,
-									"height": 67,
-									"autoResize": false,
-									"stereotypeDisplay": "label",
-									"showVisibility": true,
-									"showNamespace": false,
-									"showProperty": true,
-									"showType": true,
-									"nameCompartment": {
-										"$ref": "AAAAAAFjqAZdgqsDDao="
-									},
-									"wordWrap": true
-								},
-								{
-									"_type": "UMLControlNodeView",
-									"_id": "AAAAAAFjqAbQ96sfooI=",
-									"_parent": {
-										"$ref": "AAAAAAFjqASLIKqg3FE="
-									},
-									"model": {
-										"$ref": "AAAAAAFjqAbQ7asd+Ww="
-									},
-									"visible": true,
-									"enabled": true,
-									"lineColor": "#000000",
-									"fillColor": "#ffffff",
-									"fontColor": "#000000",
-									"font": "Arial;13;0",
-									"showShadow": true,
-									"containerChangeable": true,
-									"containerExtending": false,
-									"left": 175,
-									"top": 680,
-									"width": 26,
-									"height": 26,
-									"autoResize": false
-								},
-								{
-									"_type": "UMLActionView",
-									"_id": "AAAAAAFjqA2/Cata4OI=",
-									"_parent": {
-										"$ref": "AAAAAAFjqASLIKqg3FE="
-									},
-									"model": {
-										"$ref": "AAAAAAFjqA2/A6tYai0="
-									},
-									"subViews": [
-										{
-											"_type": "UMLNameCompartmentView",
-											"_id": "AAAAAAFjqA2/C6tbg3o=",
-											"_parent": {
-												"$ref": "AAAAAAFjqA2/Cata4OI="
-											},
-											"model": {
-												"$ref": "AAAAAAFjqA2/A6tYai0="
-											},
-											"subViews": [
-												{
-													"_type": "LabelView",
-													"_id": "AAAAAAFjqA2/C6tcNpM=",
-													"_parent": {
-														"$ref": "AAAAAAFjqA2/C6tbg3o="
-													},
-													"visible": false,
-													"enabled": true,
-													"lineColor": "#000000",
-													"fillColor": "#ffffff",
-													"fontColor": "#000000",
-													"font": "Arial;13;0",
-													"showShadow": true,
-													"containerChangeable": false,
-													"containerExtending": false,
-													"left": 178,
-													"top": 336,
-													"width": 0,
-													"height": 13,
-													"autoResize": false,
-													"underline": false,
-													"horizontalAlignment": 2,
-													"verticalAlignment": 5,
-													"wordWrap": false
-												},
-												{
-													"_type": "LabelView",
-													"_id": "AAAAAAFjqA2/DKtd5Og=",
-													"_parent": {
-														"$ref": "AAAAAAFjqA2/C6tbg3o="
-													},
-													"visible": true,
-													"enabled": true,
-													"lineColor": "#000000",
-													"fillColor": "#ffffff",
-													"fontColor": "#000000",
-													"font": "Arial;13;1",
-													"showShadow": true,
-													"containerChangeable": false,
-													"containerExtending": false,
-													"left": 229,
-													"top": 463,
-													"width": 79,
-													"height": 26,
-													"autoResize": false,
-													"underline": false,
-													"text": "Locatize Template",
-													"horizontalAlignment": 2,
-													"verticalAlignment": 5,
-													"wordWrap": true
-												},
-												{
-													"_type": "LabelView",
-													"_id": "AAAAAAFjqA2/DateYyA=",
-													"_parent": {
-														"$ref": "AAAAAAFjqA2/C6tbg3o="
-													},
-													"visible": false,
-													"enabled": true,
-													"lineColor": "#000000",
-													"fillColor": "#ffffff",
-													"fontColor": "#000000",
-													"font": "Arial;13;0",
-													"showShadow": true,
-													"containerChangeable": false,
-													"containerExtending": false,
-													"left": 178,
-													"top": 336,
-													"width": 86,
-													"height": 13,
-													"autoResize": false,
-													"underline": false,
-													"text": "(from Activity1)",
-													"horizontalAlignment": 2,
-													"verticalAlignment": 5,
-													"wordWrap": false
-												},
-												{
-													"_type": "LabelView",
-													"_id": "AAAAAAFjqA2/Datf4DQ=",
-													"_parent": {
-														"$ref": "AAAAAAFjqA2/C6tbg3o="
-													},
-													"visible": false,
-													"enabled": true,
-													"lineColor": "#000000",
-													"fillColor": "#ffffff",
-													"fontColor": "#000000",
-													"font": "Arial;13;0",
-													"showShadow": true,
-													"containerChangeable": false,
-													"containerExtending": false,
-													"left": 178,
-													"top": 336,
-													"width": 0,
-													"height": 13,
-													"autoResize": false,
-													"underline": false,
-													"horizontalAlignment": 1,
-													"verticalAlignment": 5,
-													"wordWrap": false
-												}
-											],
-											"visible": true,
-											"enabled": true,
-											"lineColor": "#000000",
-											"fillColor": "#ffffff",
-											"fontColor": "#000000",
-											"font": "Arial;13;0",
-											"showShadow": true,
-											"containerChangeable": false,
-											"containerExtending": false,
-											"left": 224,
-											"top": 456,
-											"width": 89,
-											"height": 38,
-											"autoResize": false,
-											"stereotypeLabel": {
-												"$ref": "AAAAAAFjqA2/C6tcNpM="
-											},
-											"nameLabel": {
-												"$ref": "AAAAAAFjqA2/DKtd5Og="
-											},
-											"namespaceLabel": {
-												"$ref": "AAAAAAFjqA2/DateYyA="
-											},
-											"propertyLabel": {
-												"$ref": "AAAAAAFjqA2/Datf4DQ="
-											}
-										}
-									],
-									"visible": true,
-									"enabled": true,
-									"lineColor": "#000000",
-									"fillColor": "#ffffff",
-									"fontColor": "#000000",
-									"font": "Arial;13;0",
-									"showShadow": true,
-									"containerChangeable": true,
-									"containerExtending": false,
-									"left": 224,
-									"top": 456,
-									"width": 89,
-									"height": 54,
-									"autoResize": false,
-									"stereotypeDisplay": "label",
-									"showVisibility": true,
-									"showNamespace": false,
-									"showProperty": true,
-									"showType": true,
-									"nameCompartment": {
-										"$ref": "AAAAAAFjqA2/C6tbg3o="
-									},
-									"wordWrap": true
-								},
-								{
-									"_type": "UMLControlNodeView",
-									"_id": "AAAAAAFjqBIJL6ubZ3I=",
-									"_parent": {
-										"$ref": "AAAAAAFjqASLIKqg3FE="
-									},
-									"model": {
-										"$ref": "AAAAAAFjqBIJLquZsRo="
-									},
-									"visible": true,
-									"enabled": true,
-									"lineColor": "#000000",
-									"fillColor": "#ffffff",
-									"fontColor": "#000000",
-									"font": "Helvetica;12;0",
-									"showShadow": true,
-									"containerChangeable": true,
-									"containerExtending": false,
-									"left": 131,
-									"top": 288,
-									"width": 113,
-									"height": 6,
-									"autoResize": false
-								},
-								{
-									"_type": "UMLControlFlowView",
-									"_id": "AAAAAAFjqBIoa6ugHqY=",
-									"_parent": {
-										"$ref": "AAAAAAFjqASLIKqg3FE="
-									},
-									"model": {
-										"$ref": "AAAAAAFjqBIoaquel/4="
-									},
-									"subViews": [
-										{
-											"_type": "EdgeLabelView",
-											"_id": "AAAAAAFjqBIoa6uhY6U=",
-											"_parent": {
-												"$ref": "AAAAAAFjqBIoa6ugHqY="
-											},
-											"model": {
-												"$ref": "AAAAAAFjqBIoaquel/4="
-											},
-											"visible": false,
-											"enabled": true,
-											"lineColor": "#000000",
-											"fillColor": "#ffffff",
-											"fontColor": "#000000",
-											"font": "Helvetica;12;0",
-											"showShadow": true,
-											"containerChangeable": false,
-											"containerExtending": false,
-											"left": 201,
-											"top": 151,
-											"width": 0,
-											"height": 12,
-											"autoResize": false,
-											"alpha": 1.5707963267948966,
-											"distance": 15,
-											"hostEdge": {
-												"$ref": "AAAAAAFjqBIoa6ugHqY="
-											},
-											"edgePosition": 1,
-											"underline": false,
-											"horizontalAlignment": 2,
-											"verticalAlignment": 5,
-											"wordWrap": false
-										},
-										{
-											"_type": "EdgeLabelView",
-											"_id": "AAAAAAFjqBIoa6uivk8=",
-											"_parent": {
-												"$ref": "AAAAAAFjqBIoa6ugHqY="
-											},
-											"model": {
-												"$ref": "AAAAAAFjqBIoaquel/4="
-											},
-											"visible": null,
-											"enabled": true,
-											"lineColor": "#000000",
-											"fillColor": "#ffffff",
-											"fontColor": "#000000",
-											"font": "Helvetica;12;0",
-											"showShadow": true,
-											"containerChangeable": false,
-											"containerExtending": false,
-											"left": 216,
-											"top": 151,
-											"width": 0,
-											"height": 12,
-											"autoResize": false,
-											"alpha": 1.5707963267948966,
-											"distance": 30,
-											"hostEdge": {
-												"$ref": "AAAAAAFjqBIoa6ugHqY="
-											},
-											"edgePosition": 1,
-											"underline": false,
-											"horizontalAlignment": 2,
-											"verticalAlignment": 5,
-											"wordWrap": false
-										},
-										{
-											"_type": "EdgeLabelView",
-											"_id": "AAAAAAFjqBIobKujWVc=",
-											"_parent": {
-												"$ref": "AAAAAAFjqBIoa6ugHqY="
-											},
-											"model": {
-												"$ref": "AAAAAAFjqBIoaquel/4="
-											},
-											"visible": false,
-											"enabled": true,
-											"lineColor": "#000000",
-											"fillColor": "#ffffff",
-											"fontColor": "#000000",
-											"font": "Helvetica;12;0",
-											"showShadow": true,
-											"containerChangeable": false,
-											"containerExtending": false,
-											"left": 172,
-											"top": 152,
-											"width": 0,
-											"height": 12,
-											"autoResize": false,
-											"alpha": -1.5707963267948966,
-											"distance": 15,
-											"hostEdge": {
-												"$ref": "AAAAAAFjqBIoa6ugHqY="
-											},
-											"edgePosition": 1,
-											"underline": false,
-											"horizontalAlignment": 2,
-											"verticalAlignment": 5,
-											"wordWrap": false
-										}
-									],
-									"visible": true,
-									"enabled": true,
-									"lineColor": "#000000",
-									"fillColor": "#ffffff",
-									"fontColor": "#000000",
-									"font": "Helvetica;12;0",
-									"showShadow": true,
-									"containerChangeable": false,
-									"containerExtending": false,
-									"head": {
-										"$ref": "AAAAAAFjqCEih6yTO40="
-									},
-									"tail": {
-										"$ref": "AAAAAAFjqATelaqrA88="
-									},
-									"lineStyle": 1,
-									"points": "187:142;187:175",
-									"stereotypeDisplay": "label",
-									"showVisibility": true,
-									"showProperty": true,
-									"nameLabel": {
-										"$ref": "AAAAAAFjqBIoa6uhY6U="
-									},
-									"stereotypeLabel": {
-										"$ref": "AAAAAAFjqBIoa6uivk8="
-									},
-									"propertyLabel": {
-										"$ref": "AAAAAAFjqBIobKujWVc="
-									}
-								},
-								{
-									"_type": "UMLControlFlowView",
-									"_id": "AAAAAAFjqBKjHquxAW0=",
-									"_parent": {
-										"$ref": "AAAAAAFjqASLIKqg3FE="
-									},
-									"model": {
-										"$ref": "AAAAAAFjqBKjHquv5CM="
-									},
-									"subViews": [
-										{
-											"_type": "EdgeLabelView",
-											"_id": "AAAAAAFjqBKjHquyqKs=",
-											"_parent": {
-												"$ref": "AAAAAAFjqBKjHquxAW0="
-											},
-											"model": {
-												"$ref": "AAAAAAFjqBKjHquv5CM="
-											},
-											"visible": false,
-											"enabled": true,
-											"lineColor": "#000000",
-											"fillColor": "#ffffff",
-											"fontColor": "#000000",
-											"font": "Helvetica;12;0",
-											"showShadow": true,
-											"containerChangeable": false,
-											"containerExtending": false,
-											"left": 201,
-											"top": 62,
-											"width": 0,
-											"height": 12,
-											"autoResize": false,
-											"alpha": 1.5707963267948966,
-											"distance": 15,
-											"hostEdge": {
-												"$ref": "AAAAAAFjqBKjHquxAW0="
-											},
-											"edgePosition": 1,
-											"underline": false,
-											"horizontalAlignment": 2,
-											"verticalAlignment": 5,
-											"wordWrap": false
-										},
-										{
-											"_type": "EdgeLabelView",
-											"_id": "AAAAAAFjqBKjHquzayI=",
-											"_parent": {
-												"$ref": "AAAAAAFjqBKjHquxAW0="
-											},
-											"model": {
-												"$ref": "AAAAAAFjqBKjHquv5CM="
-											},
-											"visible": null,
-											"enabled": true,
-											"lineColor": "#000000",
-											"fillColor": "#ffffff",
-											"fontColor": "#000000",
-											"font": "Helvetica;12;0",
-											"showShadow": true,
-											"containerChangeable": false,
-											"containerExtending": false,
-											"left": 216,
-											"top": 62,
-											"width": 0,
-											"height": 12,
-											"autoResize": false,
-											"alpha": 1.5707963267948966,
-											"distance": 30,
-											"hostEdge": {
-												"$ref": "AAAAAAFjqBKjHquxAW0="
-											},
-											"edgePosition": 1,
-											"underline": false,
-											"horizontalAlignment": 2,
-											"verticalAlignment": 5,
-											"wordWrap": false
-										},
-										{
-											"_type": "EdgeLabelView",
-											"_id": "AAAAAAFjqBKjHqu0+xU=",
-											"_parent": {
-												"$ref": "AAAAAAFjqBKjHquxAW0="
-											},
-											"model": {
-												"$ref": "AAAAAAFjqBKjHquv5CM="
-											},
-											"visible": false,
-											"enabled": true,
-											"lineColor": "#000000",
-											"fillColor": "#ffffff",
-											"fontColor": "#000000",
-											"font": "Helvetica;12;0",
-											"showShadow": true,
-											"containerChangeable": false,
-											"containerExtending": false,
-											"left": 172,
-											"top": 63,
-											"width": 0,
-											"height": 12,
-											"autoResize": false,
-											"alpha": -1.5707963267948966,
-											"distance": 15,
-											"hostEdge": {
-												"$ref": "AAAAAAFjqBKjHquxAW0="
-											},
-											"edgePosition": 1,
-											"underline": false,
-											"horizontalAlignment": 2,
-											"verticalAlignment": 5,
-											"wordWrap": false
-										}
-									],
-									"visible": true,
-									"enabled": true,
-									"lineColor": "#000000",
-									"fillColor": "#ffffff",
-									"fontColor": "#000000",
-									"font": "Helvetica;12;0",
-									"showShadow": true,
-									"containerChangeable": false,
-									"containerExtending": false,
-									"head": {
-										"$ref": "AAAAAAFjqATelaqrA88="
-									},
-									"tail": {
-										"$ref": "AAAAAAFjqASvhqqmFR0="
-									},
-									"lineStyle": 1,
-									"points": "187:52;187:87",
-									"stereotypeDisplay": "label",
-									"showVisibility": true,
-									"showProperty": true,
-									"nameLabel": {
-										"$ref": "AAAAAAFjqBKjHquyqKs="
-									},
-									"stereotypeLabel": {
-										"$ref": "AAAAAAFjqBKjHquzayI="
-									},
-									"propertyLabel": {
-										"$ref": "AAAAAAFjqBKjHqu0+xU="
-									}
-								},
-								{
-									"_type": "UMLControlFlowView",
-									"_id": "AAAAAAFjqBLYAqvEqog=",
-									"_parent": {
-										"$ref": "AAAAAAFjqASLIKqg3FE="
-									},
-									"model": {
-										"$ref": "AAAAAAFjqBLYAqvCSQk="
-									},
-									"subViews": [
-										{
-											"_type": "EdgeLabelView",
-											"_id": "AAAAAAFjqBLYAqvFiZM=",
-											"_parent": {
-												"$ref": "AAAAAAFjqBLYAqvEqog="
-											},
-											"model": {
-												"$ref": "AAAAAAFjqBLYAqvCSQk="
-											},
-											"visible": false,
-											"enabled": true,
-											"lineColor": "#000000",
-											"fillColor": "#ffffff",
-											"fontColor": "#000000",
-											"font": "Helvetica;12;0",
-											"showShadow": true,
-											"containerChangeable": false,
-											"containerExtending": false,
-											"left": 282,
-											"top": 426,
-											"width": 0,
-											"height": 12,
-											"autoResize": false,
-											"alpha": 1.5707963267948966,
-											"distance": 15,
-											"hostEdge": {
-												"$ref": "AAAAAAFjqBLYAqvEqog="
-											},
-											"edgePosition": 1,
-											"underline": false,
-											"horizontalAlignment": 2,
-											"verticalAlignment": 5,
-											"wordWrap": false
-										},
-										{
-											"_type": "EdgeLabelView",
-											"_id": "AAAAAAFjqBLYAqvGPAg=",
-											"_parent": {
-												"$ref": "AAAAAAFjqBLYAqvEqog="
-											},
-											"model": {
-												"$ref": "AAAAAAFjqBLYAqvCSQk="
-											},
-											"visible": null,
-											"enabled": true,
-											"lineColor": "#000000",
-											"fillColor": "#ffffff",
-											"fontColor": "#000000",
-											"font": "Helvetica;12;0",
-											"showShadow": true,
-											"containerChangeable": false,
-											"containerExtending": false,
-											"left": 297,
-											"top": 426,
-											"width": 0,
-											"height": 12,
-											"autoResize": false,
-											"alpha": 1.5707963267948966,
-											"distance": 30,
-											"hostEdge": {
-												"$ref": "AAAAAAFjqBLYAqvEqog="
-											},
-											"edgePosition": 1,
-											"underline": false,
-											"horizontalAlignment": 2,
-											"verticalAlignment": 5,
-											"wordWrap": false
-										},
-										{
-											"_type": "EdgeLabelView",
-											"_id": "AAAAAAFjqBLYAqvHWRk=",
-											"_parent": {
-												"$ref": "AAAAAAFjqBLYAqvEqog="
-											},
-											"model": {
-												"$ref": "AAAAAAFjqBLYAqvCSQk="
-											},
-											"visible": false,
-											"enabled": true,
-											"lineColor": "#000000",
-											"fillColor": "#ffffff",
-											"fontColor": "#000000",
-											"font": "Helvetica;12;0",
-											"showShadow": true,
-											"containerChangeable": false,
-											"containerExtending": false,
-											"left": 253,
-											"top": 427,
-											"width": 0,
-											"height": 12,
-											"autoResize": false,
-											"alpha": -1.5707963267948966,
-											"distance": 15,
-											"hostEdge": {
-												"$ref": "AAAAAAFjqBLYAqvEqog="
-											},
-											"edgePosition": 1,
-											"underline": false,
-											"horizontalAlignment": 2,
-											"verticalAlignment": 5,
-											"wordWrap": false
-										}
-									],
-									"visible": true,
-									"enabled": true,
-									"lineColor": "#000000",
-									"fillColor": "#ffffff",
-									"fontColor": "#000000",
-									"font": "Helvetica;12;0",
-									"showShadow": true,
-									"containerChangeable": false,
-									"containerExtending": false,
-									"head": {
-										"$ref": "AAAAAAFjqA2/Cata4OI="
-									},
-									"tail": {
-										"$ref": "AAAAAAFjqAYmKaro5lo="
-									},
-									"lineStyle": 1,
-									"points": "268:411;268:455",
-									"stereotypeDisplay": "label",
-									"showVisibility": true,
-									"showProperty": true,
-									"nameLabel": {
-										"$ref": "AAAAAAFjqBLYAqvFiZM="
-									},
-									"stereotypeLabel": {
-										"$ref": "AAAAAAFjqBLYAqvGPAg="
-									},
-									"propertyLabel": {
-										"$ref": "AAAAAAFjqBLYAqvHWRk="
-									}
-								},
-								{
-									"_type": "UMLControlFlowView",
-									"_id": "AAAAAAFjqBLqN6vVVDc=",
-									"_parent": {
-										"$ref": "AAAAAAFjqASLIKqg3FE="
-									},
-									"model": {
-										"$ref": "AAAAAAFjqBLqNqvTow0="
-									},
-									"subViews": [
-										{
-											"_type": "EdgeLabelView",
-											"_id": "AAAAAAFjqBLqOKvWpw0=",
-											"_parent": {
-												"$ref": "AAAAAAFjqBLqN6vVVDc="
-											},
-											"model": {
-												"$ref": "AAAAAAFjqBLqNqvTow0="
-											},
-											"visible": false,
-											"enabled": true,
-											"lineColor": "#000000",
-											"fillColor": "#ffffff",
-											"fontColor": "#000000",
-											"font": "Helvetica;12;0",
-											"showShadow": true,
-											"containerChangeable": false,
-											"containerExtending": false,
-											"left": 201,
-											"top": 658,
-											"width": 0,
-											"height": 12,
-											"autoResize": false,
-											"alpha": 1.5707963267948966,
-											"distance": 15,
-											"hostEdge": {
-												"$ref": "AAAAAAFjqBLqN6vVVDc="
-											},
-											"edgePosition": 1,
-											"underline": false,
-											"horizontalAlignment": 2,
-											"verticalAlignment": 5,
-											"wordWrap": false
-										},
-										{
-											"_type": "EdgeLabelView",
-											"_id": "AAAAAAFjqBLqOKvX76Y=",
-											"_parent": {
-												"$ref": "AAAAAAFjqBLqN6vVVDc="
-											},
-											"model": {
-												"$ref": "AAAAAAFjqBLqNqvTow0="
-											},
-											"visible": null,
-											"enabled": true,
-											"lineColor": "#000000",
-											"fillColor": "#ffffff",
-											"fontColor": "#000000",
-											"font": "Helvetica;12;0",
-											"showShadow": true,
-											"containerChangeable": false,
-											"containerExtending": false,
-											"left": 216,
-											"top": 658,
-											"width": 0,
-											"height": 12,
-											"autoResize": false,
-											"alpha": 1.5707963267948966,
-											"distance": 30,
-											"hostEdge": {
-												"$ref": "AAAAAAFjqBLqN6vVVDc="
-											},
-											"edgePosition": 1,
-											"underline": false,
-											"horizontalAlignment": 2,
-											"verticalAlignment": 5,
-											"wordWrap": false
-										},
-										{
-											"_type": "EdgeLabelView",
-											"_id": "AAAAAAFjqBLqOavYEPE=",
-											"_parent": {
-												"$ref": "AAAAAAFjqBLqN6vVVDc="
-											},
-											"model": {
-												"$ref": "AAAAAAFjqBLqNqvTow0="
-											},
-											"visible": false,
-											"enabled": true,
-											"lineColor": "#000000",
-											"fillColor": "#ffffff",
-											"fontColor": "#000000",
-											"font": "Helvetica;12;0",
-											"showShadow": true,
-											"containerChangeable": false,
-											"containerExtending": false,
-											"left": 172,
-											"top": 659,
-											"width": 0,
-											"height": 12,
-											"autoResize": false,
-											"alpha": -1.5707963267948966,
-											"distance": 15,
-											"hostEdge": {
-												"$ref": "AAAAAAFjqBLqN6vVVDc="
-											},
-											"edgePosition": 1,
-											"underline": false,
-											"horizontalAlignment": 2,
-											"verticalAlignment": 5,
-											"wordWrap": false
-										}
-									],
-									"visible": true,
-									"enabled": true,
-									"lineColor": "#000000",
-									"fillColor": "#ffffff",
-									"fontColor": "#000000",
-									"font": "Helvetica;12;0",
-									"showShadow": true,
-									"containerChangeable": false,
-									"containerExtending": false,
-									"head": {
-										"$ref": "AAAAAAFjqAbQ96sfooI="
-									},
-									"tail": {
-										"$ref": "AAAAAAFjqAZdgqsCYJQ="
-									},
-									"lineStyle": 1,
-									"points": "187:651;187:679",
-									"stereotypeDisplay": "label",
-									"showVisibility": true,
-									"showProperty": true,
-									"nameLabel": {
-										"$ref": "AAAAAAFjqBLqOKvWpw0="
-									},
-									"stereotypeLabel": {
-										"$ref": "AAAAAAFjqBLqOKvX76Y="
-									},
-									"propertyLabel": {
-										"$ref": "AAAAAAFjqBLqOavYEPE="
-									}
-								},
-								{
-									"_type": "UMLControlFlowView",
-									"_id": "AAAAAAFjqB0vKqwHDoM=",
-									"_parent": {
-										"$ref": "AAAAAAFjqASLIKqg3FE="
-									},
-									"model": {
-										"$ref": "AAAAAAFjqB0vKawF6iM="
-									},
-									"subViews": [
-										{
-											"_type": "EdgeLabelView",
-											"_id": "AAAAAAFjqB0vKqwIlNc=",
-											"_parent": {
-												"$ref": "AAAAAAFjqB0vKqwHDoM="
-											},
-											"model": {
-												"$ref": "AAAAAAFjqB0vKawF6iM="
-											},
-											"visible": false,
-											"enabled": true,
-											"lineColor": "#000000",
-											"fillColor": "#ffffff",
-											"fontColor": "#000000",
-											"font": "Helvetica;12;0",
-											"showShadow": true,
-											"containerChangeable": false,
-											"containerExtending": false,
-											"left": 168,
-											"top": 322,
-											"width": 0,
-											"height": 12,
-											"autoResize": false,
-											"alpha": 1.5707963267948966,
-											"distance": 15,
-											"hostEdge": {
-												"$ref": "AAAAAAFjqB0vKqwHDoM="
-											},
-											"edgePosition": 1,
-											"underline": false,
-											"horizontalAlignment": 2,
-											"verticalAlignment": 5,
-											"wordWrap": false
-										},
-										{
-											"_type": "EdgeLabelView",
-											"_id": "AAAAAAFjqB0vK6wJ+8E=",
-											"_parent": {
-												"$ref": "AAAAAAFjqB0vKqwHDoM="
-											},
-											"model": {
-												"$ref": "AAAAAAFjqB0vKawF6iM="
-											},
-											"visible": null,
-											"enabled": true,
-											"lineColor": "#000000",
-											"fillColor": "#ffffff",
-											"fontColor": "#000000",
-											"font": "Helvetica;12;0",
-											"showShadow": true,
-											"containerChangeable": false,
-											"containerExtending": false,
-											"left": 179,
-											"top": 333,
-											"width": 0,
-											"height": 12,
-											"autoResize": false,
-											"alpha": 1.5707963267948966,
-											"distance": 30,
-											"hostEdge": {
-												"$ref": "AAAAAAFjqB0vKqwHDoM="
-											},
-											"edgePosition": 1,
-											"underline": false,
-											"horizontalAlignment": 2,
-											"verticalAlignment": 5,
-											"wordWrap": false
-										},
-										{
-											"_type": "EdgeLabelView",
-											"_id": "AAAAAAFjqB0vK6wKDT8=",
-											"_parent": {
-												"$ref": "AAAAAAFjqB0vKqwHDoM="
-											},
-											"model": {
-												"$ref": "AAAAAAFjqB0vKawF6iM="
-											},
-											"visible": false,
-											"enabled": true,
-											"lineColor": "#000000",
-											"fillColor": "#ffffff",
-											"fontColor": "#000000",
-											"font": "Helvetica;12;0",
-											"showShadow": true,
-											"containerChangeable": false,
-											"containerExtending": false,
-											"left": 147,
-											"top": 301,
-											"width": 0,
-											"height": 12,
-											"autoResize": false,
-											"alpha": -1.5707963267948966,
-											"distance": 15,
-											"hostEdge": {
-												"$ref": "AAAAAAFjqB0vKqwHDoM="
-											},
-											"edgePosition": 1,
-											"underline": false,
-											"horizontalAlignment": 2,
-											"verticalAlignment": 5,
-											"wordWrap": false
-										}
-									],
-									"visible": true,
-									"enabled": true,
-									"lineColor": "#000000",
-									"fillColor": "#ffffff",
-									"fontColor": "#000000",
-									"font": "Helvetica;12;0",
-									"showShadow": true,
-									"containerChangeable": false,
-									"containerExtending": false,
-									"head": {
-										"$ref": "AAAAAAFjqAWrCqrNuOs="
-									},
-									"tail": {
-										"$ref": "AAAAAAFjqBIJL6ubZ3I="
-									},
-									"lineStyle": 1,
-									"points": "183:294;133:343",
-									"stereotypeDisplay": "label",
-									"showVisibility": true,
-									"showProperty": true,
-									"nameLabel": {
-										"$ref": "AAAAAAFjqB0vKqwIlNc="
-									},
-									"stereotypeLabel": {
-										"$ref": "AAAAAAFjqB0vK6wJ+8E="
-									},
-									"propertyLabel": {
-										"$ref": "AAAAAAFjqB0vK6wKDT8="
-									}
-								},
-								{
-									"_type": "UMLControlFlowView",
-									"_id": "AAAAAAFjqB14tKwY2QY=",
-									"_parent": {
-										"$ref": "AAAAAAFjqASLIKqg3FE="
-									},
-									"model": {
-										"$ref": "AAAAAAFjqB14s6wWTtM="
-									},
-									"subViews": [
-										{
-											"_type": "EdgeLabelView",
-											"_id": "AAAAAAFjqB14tKwZWVs=",
-											"_parent": {
-												"$ref": "AAAAAAFjqB14tKwY2QY="
-											},
-											"model": {
-												"$ref": "AAAAAAFjqB14s6wWTtM="
-											},
-											"visible": false,
-											"enabled": true,
-											"lineColor": "#000000",
-											"fillColor": "#ffffff",
-											"fontColor": "#000000",
-											"font": "Helvetica;12;0",
-											"showShadow": true,
-											"containerChangeable": false,
-											"containerExtending": false,
-											"left": 224,
-											"top": 301,
-											"width": 0,
-											"height": 12,
-											"autoResize": false,
-											"alpha": 1.5707963267948966,
-											"distance": 15,
-											"hostEdge": {
-												"$ref": "AAAAAAFjqB14tKwY2QY="
-											},
-											"edgePosition": 1,
-											"underline": false,
-											"horizontalAlignment": 2,
-											"verticalAlignment": 5,
-											"wordWrap": false
-										},
-										{
-											"_type": "EdgeLabelView",
-											"_id": "AAAAAAFjqB14tKwaFP8=",
-											"_parent": {
-												"$ref": "AAAAAAFjqB14tKwY2QY="
-											},
-											"model": {
-												"$ref": "AAAAAAFjqB14s6wWTtM="
-											},
-											"visible": null,
-											"enabled": true,
-											"lineColor": "#000000",
-											"fillColor": "#ffffff",
-											"fontColor": "#000000",
-											"font": "Helvetica;12;0",
-											"showShadow": true,
-											"containerChangeable": false,
-											"containerExtending": false,
-											"left": 235,
-											"top": 291,
-											"width": 0,
-											"height": 12,
-											"autoResize": false,
-											"alpha": 1.5707963267948966,
-											"distance": 30,
-											"hostEdge": {
-												"$ref": "AAAAAAFjqB14tKwY2QY="
-											},
-											"edgePosition": 1,
-											"underline": false,
-											"horizontalAlignment": 2,
-											"verticalAlignment": 5,
-											"wordWrap": false
-										},
-										{
-											"_type": "EdgeLabelView",
-											"_id": "AAAAAAFjqB14tKwbJe8=",
-											"_parent": {
-												"$ref": "AAAAAAFjqB14tKwY2QY="
-											},
-											"model": {
-												"$ref": "AAAAAAFjqB14s6wWTtM="
-											},
-											"visible": false,
-											"enabled": true,
-											"lineColor": "#000000",
-											"fillColor": "#ffffff",
-											"fontColor": "#000000",
-											"font": "Helvetica;12;0",
-											"showShadow": true,
-											"containerChangeable": false,
-											"containerExtending": false,
-											"left": 201,
-											"top": 322,
-											"width": 0,
-											"height": 12,
-											"autoResize": false,
-											"alpha": -1.5707963267948966,
-											"distance": 15,
-											"hostEdge": {
-												"$ref": "AAAAAAFjqB14tKwY2QY="
-											},
-											"edgePosition": 1,
-											"underline": false,
-											"horizontalAlignment": 2,
-											"verticalAlignment": 5,
-											"wordWrap": false
-										}
-									],
-									"visible": true,
-									"enabled": true,
-									"lineColor": "#000000",
-									"fillColor": "#ffffff",
-									"fontColor": "#000000",
-									"font": "Helvetica;12;0",
-									"showShadow": true,
-									"containerChangeable": false,
-									"containerExtending": false,
-									"head": {
-										"$ref": "AAAAAAFjqAYmKaro5lo="
-									},
-									"tail": {
-										"$ref": "AAAAAAFjqBIJL6ubZ3I="
-									},
-									"lineStyle": 1,
-									"points": "191:294;236:343",
-									"stereotypeDisplay": "label",
-									"showVisibility": true,
-									"showProperty": true,
-									"nameLabel": {
-										"$ref": "AAAAAAFjqB14tKwZWVs="
-									},
-									"stereotypeLabel": {
-										"$ref": "AAAAAAFjqB14tKwaFP8="
-									},
-									"propertyLabel": {
-										"$ref": "AAAAAAFjqB14tKwbJe8="
-									}
-								},
-								{
-									"_type": "UMLControlNodeView",
-									"_id": "AAAAAAFjqB9/Taw5bl4=",
-									"_parent": {
-										"$ref": "AAAAAAFjqASLIKqg3FE="
-									},
-									"model": {
-										"$ref": "AAAAAAFjqB9/S6w3TKM="
-									},
-									"visible": true,
-									"enabled": true,
-									"lineColor": "#000000",
-									"fillColor": "#ffffff",
-									"fontColor": "#000000",
-									"font": "Helvetica;12;0",
-									"showShadow": true,
-									"containerChangeable": true,
-									"containerExtending": false,
-									"left": 136,
-									"top": 544,
-									"width": 104,
-									"height": 6,
-									"autoResize": false
-								},
-								{
-									"_type": "UMLControlFlowView",
-									"_id": "AAAAAAFjqB+W4qw+0nc=",
-									"_parent": {
-										"$ref": "AAAAAAFjqASLIKqg3FE="
-									},
-									"model": {
-										"$ref": "AAAAAAFjqB+W4qw8vc8="
-									},
-									"subViews": [
-										{
-											"_type": "EdgeLabelView",
-											"_id": "AAAAAAFjqB+W46w/H0c=",
-											"_parent": {
-												"$ref": "AAAAAAFjqB+W4qw+0nc="
-											},
-											"model": {
-												"$ref": "AAAAAAFjqB+W4qw8vc8="
-											},
-											"visible": false,
-											"enabled": true,
-											"lineColor": "#000000",
-											"fillColor": "#ffffff",
-											"fontColor": "#000000",
-											"font": "Helvetica;12;0",
-											"showShadow": true,
-											"containerChangeable": false,
-											"containerExtending": false,
-											"left": 201,
-											"top": 559,
-											"width": 0,
-											"height": 12,
-											"autoResize": false,
-											"alpha": 1.5707963267948966,
-											"distance": 15,
-											"hostEdge": {
-												"$ref": "AAAAAAFjqB+W4qw+0nc="
-											},
-											"edgePosition": 1,
-											"underline": false,
-											"horizontalAlignment": 2,
-											"verticalAlignment": 5,
-											"wordWrap": false
-										},
-										{
-											"_type": "EdgeLabelView",
-											"_id": "AAAAAAFjqB+W46xAJPs=",
-											"_parent": {
-												"$ref": "AAAAAAFjqB+W4qw+0nc="
-											},
-											"model": {
-												"$ref": "AAAAAAFjqB+W4qw8vc8="
-											},
-											"visible": null,
-											"enabled": true,
-											"lineColor": "#000000",
-											"fillColor": "#ffffff",
-											"fontColor": "#000000",
-											"font": "Helvetica;12;0",
-											"showShadow": true,
-											"containerChangeable": false,
-											"containerExtending": false,
-											"left": 216,
-											"top": 559,
-											"width": 0,
-											"height": 12,
-											"autoResize": false,
-											"alpha": 1.5707963267948966,
-											"distance": 30,
-											"hostEdge": {
-												"$ref": "AAAAAAFjqB+W4qw+0nc="
-											},
-											"edgePosition": 1,
-											"underline": false,
-											"horizontalAlignment": 2,
-											"verticalAlignment": 5,
-											"wordWrap": false
-										},
-										{
-											"_type": "EdgeLabelView",
-											"_id": "AAAAAAFjqB+W46xBhSQ=",
-											"_parent": {
-												"$ref": "AAAAAAFjqB+W4qw+0nc="
-											},
-											"model": {
-												"$ref": "AAAAAAFjqB+W4qw8vc8="
-											},
-											"visible": false,
-											"enabled": true,
-											"lineColor": "#000000",
-											"fillColor": "#ffffff",
-											"fontColor": "#000000",
-											"font": "Helvetica;12;0",
-											"showShadow": true,
-											"containerChangeable": false,
-											"containerExtending": false,
-											"left": 172,
-											"top": 560,
-											"width": 0,
-											"height": 12,
-											"autoResize": false,
-											"alpha": -1.5707963267948966,
-											"distance": 15,
-											"hostEdge": {
-												"$ref": "AAAAAAFjqB+W4qw+0nc="
-											},
-											"edgePosition": 1,
-											"underline": false,
-											"horizontalAlignment": 2,
-											"verticalAlignment": 5,
-											"wordWrap": false
-										}
-									],
-									"visible": true,
-									"enabled": true,
-									"lineColor": "#000000",
-									"fillColor": "#ffffff",
-									"fontColor": "#000000",
-									"font": "Helvetica;12;0",
-									"showShadow": true,
-									"containerChangeable": false,
-									"containerExtending": false,
-									"head": {
-										"$ref": "AAAAAAFjqAZdgqsCYJQ="
-									},
-									"tail": {
-										"$ref": "AAAAAAFjqB9/Taw5bl4="
-									},
-									"lineStyle": 1,
-									"points": "187:550;187:583",
-									"stereotypeDisplay": "label",
-									"showVisibility": true,
-									"showProperty": true,
-									"nameLabel": {
-										"$ref": "AAAAAAFjqB+W46w/H0c="
-									},
-									"stereotypeLabel": {
-										"$ref": "AAAAAAFjqB+W46xAJPs="
-									},
-									"propertyLabel": {
-										"$ref": "AAAAAAFjqB+W46xBhSQ="
-									}
-								},
-								{
-									"_type": "UMLControlFlowView",
-									"_id": "AAAAAAFjqB+mdKxPr44=",
-									"_parent": {
-										"$ref": "AAAAAAFjqASLIKqg3FE="
-									},
-									"model": {
-										"$ref": "AAAAAAFjqB+mc6xNTWc="
-									},
-									"subViews": [
-										{
-											"_type": "EdgeLabelView",
-											"_id": "AAAAAAFjqB+mdKxQpVA=",
-											"_parent": {
-												"$ref": "AAAAAAFjqB+mdKxPr44="
-											},
-											"model": {
-												"$ref": "AAAAAAFjqB+mc6xNTWc="
-											},
-											"visible": false,
-											"enabled": true,
-											"lineColor": "#000000",
-											"fillColor": "#ffffff",
-											"fontColor": "#000000",
-											"font": "Helvetica;12;0",
-											"showShadow": true,
-											"containerChangeable": false,
-											"containerExtending": false,
-											"left": 221,
-											"top": 531,
-											"width": 0,
-											"height": 12,
-											"autoResize": false,
-											"alpha": 1.5707963267948966,
-											"distance": 15,
-											"hostEdge": {
-												"$ref": "AAAAAAFjqB+mdKxPr44="
-											},
-											"edgePosition": 1,
-											"underline": false,
-											"horizontalAlignment": 2,
-											"verticalAlignment": 5,
-											"wordWrap": false
-										},
-										{
-											"_type": "EdgeLabelView",
-											"_id": "AAAAAAFjqB+mdKxRB1o=",
-											"_parent": {
-												"$ref": "AAAAAAFjqB+mdKxPr44="
-											},
-											"model": {
-												"$ref": "AAAAAAFjqB+mc6xNTWc="
-											},
-											"visible": null,
-											"enabled": true,
-											"lineColor": "#000000",
-											"fillColor": "#ffffff",
-											"fontColor": "#000000",
-											"font": "Helvetica;12;0",
-											"showShadow": true,
-											"containerChangeable": false,
-											"containerExtending": false,
-											"left": 230,
-											"top": 543,
-											"width": 0,
-											"height": 12,
-											"autoResize": false,
-											"alpha": 1.5707963267948966,
-											"distance": 30,
-											"hostEdge": {
-												"$ref": "AAAAAAFjqB+mdKxPr44="
-											},
-											"edgePosition": 1,
-											"underline": false,
-											"horizontalAlignment": 2,
-											"verticalAlignment": 5,
-											"wordWrap": false
-										},
-										{
-											"_type": "EdgeLabelView",
-											"_id": "AAAAAAFjqB+mdKxSTJo=",
-											"_parent": {
-												"$ref": "AAAAAAFjqB+mdKxPr44="
-											},
-											"model": {
-												"$ref": "AAAAAAFjqB+mc6xNTWc="
-											},
-											"visible": false,
-											"enabled": true,
-											"lineColor": "#000000",
-											"fillColor": "#ffffff",
-											"fontColor": "#000000",
-											"font": "Helvetica;12;0",
-											"showShadow": true,
-											"containerChangeable": false,
-											"containerExtending": false,
-											"left": 202,
-											"top": 508,
-											"width": 0,
-											"height": 12,
-											"autoResize": false,
-											"alpha": -1.5707963267948966,
-											"distance": 15,
-											"hostEdge": {
-												"$ref": "AAAAAAFjqB+mdKxPr44="
-											},
-											"edgePosition": 1,
-											"underline": false,
-											"horizontalAlignment": 2,
-											"verticalAlignment": 5,
-											"wordWrap": false
-										}
-									],
-									"visible": true,
-									"enabled": true,
-									"lineColor": "#000000",
-									"fillColor": "#ffffff",
-									"fontColor": "#000000",
-									"font": "Helvetica;12;0",
-									"showShadow": true,
-									"containerChangeable": false,
-									"containerExtending": false,
-									"head": {
-										"$ref": "AAAAAAFjqB9/Taw5bl4="
-									},
-									"tail": {
-										"$ref": "AAAAAAFjqA2/Cata4OI="
-									},
-									"lineStyle": 1,
-									"points": "233:510;191:543",
-									"stereotypeDisplay": "label",
-									"showVisibility": true,
-									"showProperty": true,
-									"nameLabel": {
-										"$ref": "AAAAAAFjqB+mdKxQpVA="
-									},
-									"stereotypeLabel": {
-										"$ref": "AAAAAAFjqB+mdKxRB1o="
-									},
-									"propertyLabel": {
-										"$ref": "AAAAAAFjqB+mdKxSTJo="
-									}
-								},
-								{
-									"_type": "UMLControlFlowView",
-									"_id": "AAAAAAFjqCBd1Kx5mCs=",
-									"_parent": {
-										"$ref": "AAAAAAFjqASLIKqg3FE="
-									},
-									"model": {
-										"$ref": "AAAAAAFjqCBd06x3DWs="
-									},
-									"subViews": [
-										{
-											"_type": "EdgeLabelView",
-											"_id": "AAAAAAFjqCBd1Kx6qnM=",
-											"_parent": {
-												"$ref": "AAAAAAFjqCBd1Kx5mCs="
-											},
-											"model": {
-												"$ref": "AAAAAAFjqCBd06x3DWs="
-											},
-											"visible": false,
-											"enabled": true,
-											"lineColor": "#000000",
-											"fillColor": "#ffffff",
-											"fontColor": "#000000",
-											"font": "Helvetica;12;0",
-											"showShadow": true,
-											"containerChangeable": false,
-											"containerExtending": false,
-											"left": 162,
-											"top": 469,
-											"width": 0,
-											"height": 12,
-											"autoResize": false,
-											"alpha": 1.5707963267948966,
-											"distance": 15,
-											"hostEdge": {
-												"$ref": "AAAAAAFjqCBd1Kx5mCs="
-											},
-											"edgePosition": 1,
-											"underline": false,
-											"horizontalAlignment": 2,
-											"verticalAlignment": 5,
-											"wordWrap": false
-										},
-										{
-											"_type": "EdgeLabelView",
-											"_id": "AAAAAAFjqCBd1ax7Ky4=",
-											"_parent": {
-												"$ref": "AAAAAAFjqCBd1Kx5mCs="
-											},
-											"model": {
-												"$ref": "AAAAAAFjqCBd06x3DWs="
-											},
-											"visible": null,
-											"enabled": true,
-											"lineColor": "#000000",
-											"fillColor": "#ffffff",
-											"fontColor": "#000000",
-											"font": "Helvetica;12;0",
-											"showShadow": true,
-											"containerChangeable": false,
-											"containerExtending": false,
-											"left": 175,
-											"top": 461,
-											"width": 0,
-											"height": 12,
-											"autoResize": false,
-											"alpha": 1.5707963267948966,
-											"distance": 30,
-											"hostEdge": {
-												"$ref": "AAAAAAFjqCBd1Kx5mCs="
-											},
-											"edgePosition": 1,
-											"underline": false,
-											"horizontalAlignment": 2,
-											"verticalAlignment": 5,
-											"wordWrap": false
-										},
-										{
-											"_type": "EdgeLabelView",
-											"_id": "AAAAAAFjqCBd1ax8vzU=",
-											"_parent": {
-												"$ref": "AAAAAAFjqCBd1Kx5mCs="
-											},
-											"model": {
-												"$ref": "AAAAAAFjqCBd06x3DWs="
-											},
-											"visible": false,
-											"enabled": true,
-											"lineColor": "#000000",
-											"fillColor": "#ffffff",
-											"fontColor": "#000000",
-											"font": "Helvetica;12;0",
-											"showShadow": true,
-											"containerChangeable": false,
-											"containerExtending": false,
-											"left": 137,
-											"top": 484,
-											"width": 0,
-											"height": 12,
-											"autoResize": false,
-											"alpha": -1.5707963267948966,
-											"distance": 15,
-											"hostEdge": {
-												"$ref": "AAAAAAFjqCBd1Kx5mCs="
-											},
-											"edgePosition": 1,
-											"underline": false,
-											"horizontalAlignment": 2,
-											"verticalAlignment": 5,
-											"wordWrap": false
-										}
-									],
-									"visible": true,
-									"enabled": true,
-									"lineColor": "#000000",
-									"fillColor": "#ffffff",
-									"fontColor": "#000000",
-									"font": "Helvetica;12;0",
-									"showShadow": true,
-									"containerChangeable": false,
-									"containerExtending": false,
-									"head": {
-										"$ref": "AAAAAAFjqB9/Taw5bl4="
-									},
-									"tail": {
-										"$ref": "AAAAAAFjqAWrCqrNuOs="
-									},
-									"lineStyle": 1,
-									"points": "116:424;185:543",
-									"stereotypeDisplay": "label",
-									"showVisibility": true,
-									"showProperty": true,
-									"nameLabel": {
-										"$ref": "AAAAAAFjqCBd1Kx6qnM="
-									},
-									"stereotypeLabel": {
-										"$ref": "AAAAAAFjqCBd1ax7Ky4="
-									},
-									"propertyLabel": {
-										"$ref": "AAAAAAFjqCBd1ax8vzU="
-									}
-								},
-								{
-									"_type": "UMLActionView",
-									"_id": "AAAAAAFjqCEih6yTO40=",
-									"_parent": {
-										"$ref": "AAAAAAFjqASLIKqg3FE="
-									},
-									"model": {
-										"$ref": "AAAAAAFjqCEig6yRtTs="
-									},
-									"subViews": [
-										{
-											"_type": "UMLNameCompartmentView",
-											"_id": "AAAAAAFjqCEiiayUplA=",
-											"_parent": {
-												"$ref": "AAAAAAFjqCEih6yTO40="
-											},
-											"model": {
-												"$ref": "AAAAAAFjqCEig6yRtTs="
-											},
-											"subViews": [
-												{
-													"_type": "LabelView",
-													"_id": "AAAAAAFjqCEiiqyV3PI=",
-													"_parent": {
-														"$ref": "AAAAAAFjqCEiiayUplA="
-													},
-													"visible": false,
-													"enabled": true,
-													"lineColor": "#000000",
-													"fillColor": "#ffffff",
-													"fontColor": "#000000",
-													"font": "Helvetica;12;0",
-													"showShadow": true,
-													"containerChangeable": false,
-													"containerExtending": false,
-													"left": -144,
-													"top": -128,
-													"width": 0,
-													"height": 12,
-													"autoResize": false,
-													"underline": false,
-													"horizontalAlignment": 2,
-													"verticalAlignment": 5,
-													"wordWrap": false
-												},
-												{
-													"_type": "LabelView",
-													"_id": "AAAAAAFjqCEii6yWXBY=",
-													"_parent": {
-														"$ref": "AAAAAAFjqCEiiayUplA="
-													},
-													"visible": true,
-													"enabled": true,
-													"lineColor": "#000000",
-													"fillColor": "#ffffff",
-													"fontColor": "#000000",
-													"font": "Helvetica;12;1",
-													"showShadow": true,
-													"containerChangeable": false,
-													"containerExtending": false,
-													"left": 132,
-													"top": 183,
-													"width": 111,
-													"height": 36,
-													"autoResize": false,
-													"underline": false,
-													"text": "Check if Event has been enabled by MFI",
-													"horizontalAlignment": 2,
-													"verticalAlignment": 5,
-													"wordWrap": true
-												},
-												{
-													"_type": "LabelView",
-													"_id": "AAAAAAFjqCEii6yXfwg=",
-													"_parent": {
-														"$ref": "AAAAAAFjqCEiiayUplA="
-													},
-													"visible": false,
-													"enabled": true,
-													"lineColor": "#000000",
-													"fillColor": "#ffffff",
-													"fontColor": "#000000",
-													"font": "Helvetica;12;0",
-													"showShadow": true,
-													"containerChangeable": false,
-													"containerExtending": false,
-													"left": -144,
-													"top": -128,
-													"width": 80,
-													"height": 12,
-													"autoResize": false,
-													"underline": false,
-													"text": "(from Activity1)",
-													"horizontalAlignment": 2,
-													"verticalAlignment": 5,
-													"wordWrap": false
-												},
-												{
-													"_type": "LabelView",
-													"_id": "AAAAAAFjqCEii6yYpPQ=",
-													"_parent": {
-														"$ref": "AAAAAAFjqCEiiayUplA="
-													},
-													"visible": false,
-													"enabled": true,
-													"lineColor": "#000000",
-													"fillColor": "#ffffff",
-													"fontColor": "#000000",
-													"font": "Helvetica;12;0",
-													"showShadow": true,
-													"containerChangeable": false,
-													"containerExtending": false,
-													"left": -144,
-													"top": -128,
-													"width": 0,
-													"height": 12,
-													"autoResize": false,
-													"underline": false,
-													"horizontalAlignment": 1,
-													"verticalAlignment": 5,
-													"wordWrap": false
-												}
-											],
-											"visible": true,
-											"enabled": true,
-											"lineColor": "#000000",
-											"fillColor": "#ffffff",
-											"fontColor": "#000000",
-											"font": "Helvetica;12;0",
-											"showShadow": true,
-											"containerChangeable": false,
-											"containerExtending": false,
-											"left": 127,
-											"top": 176,
-											"width": 121,
-											"height": 48,
-											"autoResize": false,
-											"stereotypeLabel": {
-												"$ref": "AAAAAAFjqCEiiqyV3PI="
-											},
-											"nameLabel": {
-												"$ref": "AAAAAAFjqCEii6yWXBY="
-											},
-											"namespaceLabel": {
-												"$ref": "AAAAAAFjqCEii6yXfwg="
-											},
-											"propertyLabel": {
-												"$ref": "AAAAAAFjqCEii6yYpPQ="
-											}
-										}
-									],
-									"visible": true,
-									"enabled": true,
-									"lineColor": "#000000",
-									"fillColor": "#ffffff",
-									"fontColor": "#000000",
-									"font": "Helvetica;12;0",
-									"showShadow": true,
-									"containerChangeable": true,
-									"containerExtending": false,
-									"left": 127,
-									"top": 176,
-									"width": 121,
-									"height": 64,
-									"autoResize": false,
-									"stereotypeDisplay": "label",
-									"showVisibility": true,
-									"showNamespace": false,
-									"showProperty": true,
-									"showType": true,
-									"nameCompartment": {
-										"$ref": "AAAAAAFjqCEiiayUplA="
-									},
-									"wordWrap": true
-								},
-								{
-									"_type": "UMLControlFlowView",
-									"_id": "AAAAAAFjqCJ5HqyxiME=",
-									"_parent": {
-										"$ref": "AAAAAAFjqASLIKqg3FE="
-									},
-									"model": {
-										"$ref": "AAAAAAFjqCJ5HayvTsA="
-									},
-									"subViews": [
-										{
-											"_type": "EdgeLabelView",
-											"_id": "AAAAAAFjqCJ5H6yynz8=",
-											"_parent": {
-												"$ref": "AAAAAAFjqCJ5HqyxiME="
-											},
-											"model": {
-												"$ref": "AAAAAAFjqCJ5HayvTsA="
-											},
-											"visible": false,
-											"enabled": true,
-											"lineColor": "#000000",
-											"fillColor": "#ffffff",
-											"fontColor": "#000000",
-											"font": "Helvetica;12;0",
-											"showShadow": true,
-											"containerChangeable": false,
-											"containerExtending": false,
-											"left": 201,
-											"top": 256,
-											"width": 0,
-											"height": 12,
-											"autoResize": false,
-											"alpha": 1.5707963267948966,
-											"distance": 15,
-											"hostEdge": {
-												"$ref": "AAAAAAFjqCJ5HqyxiME="
-											},
-											"edgePosition": 1,
-											"underline": false,
-											"horizontalAlignment": 2,
-											"verticalAlignment": 5,
-											"wordWrap": false
-										},
-										{
-											"_type": "EdgeLabelView",
-											"_id": "AAAAAAFjqCJ5IKyzLqE=",
-											"_parent": {
-												"$ref": "AAAAAAFjqCJ5HqyxiME="
-											},
-											"model": {
-												"$ref": "AAAAAAFjqCJ5HayvTsA="
-											},
-											"visible": null,
-											"enabled": true,
-											"lineColor": "#000000",
-											"fillColor": "#ffffff",
-											"fontColor": "#000000",
-											"font": "Helvetica;12;0",
-											"showShadow": true,
-											"containerChangeable": false,
-											"containerExtending": false,
-											"left": 216,
-											"top": 256,
-											"width": 0,
-											"height": 12,
-											"autoResize": false,
-											"alpha": 1.5707963267948966,
-											"distance": 30,
-											"hostEdge": {
-												"$ref": "AAAAAAFjqCJ5HqyxiME="
-											},
-											"edgePosition": 1,
-											"underline": false,
-											"horizontalAlignment": 2,
-											"verticalAlignment": 5,
-											"wordWrap": false
-										},
-										{
-											"_type": "EdgeLabelView",
-											"_id": "AAAAAAFjqCJ5IKy0y/c=",
-											"_parent": {
-												"$ref": "AAAAAAFjqCJ5HqyxiME="
-											},
-											"model": {
-												"$ref": "AAAAAAFjqCJ5HayvTsA="
-											},
-											"visible": false,
-											"enabled": true,
-											"lineColor": "#000000",
-											"fillColor": "#ffffff",
-											"fontColor": "#000000",
-											"font": "Helvetica;12;0",
-											"showShadow": true,
-											"containerChangeable": false,
-											"containerExtending": false,
-											"left": 172,
-											"top": 257,
-											"width": 0,
-											"height": 12,
-											"autoResize": false,
-											"alpha": -1.5707963267948966,
-											"distance": 15,
-											"hostEdge": {
-												"$ref": "AAAAAAFjqCJ5HqyxiME="
-											},
-											"edgePosition": 1,
-											"underline": false,
-											"horizontalAlignment": 2,
-											"verticalAlignment": 5,
-											"wordWrap": false
-										}
-									],
-									"visible": true,
-									"enabled": true,
-									"lineColor": "#000000",
-									"fillColor": "#ffffff",
-									"fontColor": "#000000",
-									"font": "Helvetica;12;0",
-									"showShadow": true,
-									"containerChangeable": false,
-									"containerExtending": false,
-									"head": {
-										"$ref": "AAAAAAFjqBIJL6ubZ3I="
-									},
-									"tail": {
-										"$ref": "AAAAAAFjqCEih6yTO40="
-									},
-									"lineStyle": 1,
-									"points": "187:240;187:287",
-									"stereotypeDisplay": "label",
-									"showVisibility": true,
-									"showProperty": true,
-									"nameLabel": {
-										"$ref": "AAAAAAFjqCJ5H6yynz8="
-									},
-									"stereotypeLabel": {
-										"$ref": "AAAAAAFjqCJ5IKyzLqE="
-									},
-									"propertyLabel": {
-										"$ref": "AAAAAAFjqCJ5IKy0y/c="
-									}
-								}
-							]
-						}
-					],
-					"visibility": "public",
-					"isReentrant": true,
-					"isReadOnly": false,
-					"isSingleExecution": false,
-					"nodes": [
-						{
-							"_type": "UMLInitialNode",
-							"_id": "AAAAAAFjqASvhaqkmH0=",
-							"_parent": {
-								"$ref": "AAAAAAFjqASLHqqfH1M="
-							},
-							"name": "InitialNode1",
-							"visibility": "public"
-						},
-						{
-							"_type": "UMLAction",
-							"_id": "AAAAAAFjqATelKqpPIs=",
-							"_parent": {
-								"$ref": "AAAAAAFjqASLHqqfH1M="
-							},
-							"name": "JMSListener injects event",
-							"visibility": "public",
-							"kind": "opaque",
-							"isLocallyReentrant": false,
-							"isSynchronous": true
-						},
-						{
-							"_type": "UMLAction",
-							"_id": "AAAAAAFjqAWrCarLlr0=",
-							"_parent": {
-								"$ref": "AAAAAAFjqASLHqqfH1M="
-							},
-							"name": "retrieve receipt SMS and email contact",
-							"visibility": "public",
-							"kind": "opaque",
-							"isLocallyReentrant": false,
-							"isSynchronous": true
-						},
-						{
-							"_type": "UMLAction",
-							"_id": "AAAAAAFjqAYmKKrmL6s=",
-							"_parent": {
-								"$ref": "AAAAAAFjqASLHqqfH1M="
-							},
-							"name": "Prepare Message with template created",
-							"visibility": "public",
-							"kind": "opaque",
-							"isLocallyReentrant": false,
-							"isSynchronous": true
-						},
-						{
-							"_type": "UMLAction",
-							"_id": "AAAAAAFjqAZdgasAyFA=",
-							"_parent": {
-								"$ref": "AAAAAAFjqASLHqqfH1M="
-							},
-							"name": "Senders Objects transmit the data",
-							"visibility": "public",
-							"kind": "opaque",
-							"isLocallyReentrant": false,
-							"isSynchronous": true
-						},
-						{
-							"_type": "UMLActivityFinalNode",
-							"_id": "AAAAAAFjqAbQ7asd+Ww=",
-							"_parent": {
-								"$ref": "AAAAAAFjqASLHqqfH1M="
-							},
-							"name": "ActivityFinalNode1",
-							"visibility": "public"
-						},
-						{
-							"_type": "UMLAction",
-							"_id": "AAAAAAFjqA2/A6tYai0=",
-							"_parent": {
-								"$ref": "AAAAAAFjqASLHqqfH1M="
-							},
-							"name": "Locatize Template",
-							"visibility": "public",
-							"kind": "opaque",
-							"isLocallyReentrant": false,
-							"isSynchronous": true
-						},
-						{
-							"_type": "UMLForkNode",
-							"_id": "AAAAAAFjqBHP9auQV5g=",
-							"_parent": {
-								"$ref": "AAAAAAFjqASLHqqfH1M="
-							},
-							"name": "ForkNode1",
-							"visibility": "public"
-						},
-						{
-							"_type": "UMLForkNode",
-							"_id": "AAAAAAFjqBIJLquZsRo=",
-							"_parent": {
-								"$ref": "AAAAAAFjqASLHqqfH1M="
-							},
-							"name": "ForkNode2",
-							"visibility": "public"
-						},
-						{
-							"_type": "UMLJoinNode",
-							"_id": "AAAAAAFjqB9/S6w3TKM=",
-							"_parent": {
-								"$ref": "AAAAAAFjqASLHqqfH1M="
-							},
-							"name": "JoinNode1",
-							"visibility": "public"
-						},
-						{
-							"_type": "UMLAction",
-							"_id": "AAAAAAFjqCEig6yRtTs=",
-							"_parent": {
-								"$ref": "AAAAAAFjqASLHqqfH1M="
-							},
-							"name": "Check if Event has been enabled by MFI",
-							"visibility": "public",
-							"kind": "opaque",
-							"isLocallyReentrant": false,
-							"isSynchronous": true
-						}
-					],
-					"edges": [
-						{
-							"_type": "UMLControlFlow",
-							"_id": "AAAAAAFjqBEKGKt1+H8=",
-							"_parent": {
-								"$ref": "AAAAAAFjqASLHqqfH1M="
-							},
-							"source": {
-								"$ref": "AAAAAAFjqATelKqpPIs="
-							},
-							"target": {
-								"$ref": "AAAAAAFjqAWrCarLlr0="
-							},
-							"visibility": "public"
-						},
-						{
-							"_type": "UMLControlFlow",
-							"_id": "AAAAAAFjqBIoaquel/4=",
-							"_parent": {
-								"$ref": "AAAAAAFjqASLHqqfH1M="
-							},
-							"source": {
-								"$ref": "AAAAAAFjqATelKqpPIs="
-							},
-							"target": {
-								"$ref": "AAAAAAFjqCEig6yRtTs="
-							},
-							"visibility": "public"
-						},
-						{
-							"_type": "UMLControlFlow",
-							"_id": "AAAAAAFjqBKjHquv5CM=",
-							"_parent": {
-								"$ref": "AAAAAAFjqASLHqqfH1M="
-							},
-							"source": {
-								"$ref": "AAAAAAFjqASvhaqkmH0="
-							},
-							"target": {
-								"$ref": "AAAAAAFjqATelKqpPIs="
-							},
-							"visibility": "public"
-						},
-						{
-							"_type": "UMLControlFlow",
-							"_id": "AAAAAAFjqBLYAqvCSQk=",
-							"_parent": {
-								"$ref": "AAAAAAFjqASLHqqfH1M="
-							},
-							"source": {
-								"$ref": "AAAAAAFjqAYmKKrmL6s="
-							},
-							"target": {
-								"$ref": "AAAAAAFjqA2/A6tYai0="
-							},
-							"visibility": "public"
-						},
-						{
-							"_type": "UMLControlFlow",
-							"_id": "AAAAAAFjqBLqNqvTow0=",
-							"_parent": {
-								"$ref": "AAAAAAFjqASLHqqfH1M="
-							},
-							"source": {
-								"$ref": "AAAAAAFjqAZdgasAyFA="
-							},
-							"target": {
-								"$ref": "AAAAAAFjqAbQ7asd+Ww="
-							},
-							"visibility": "public"
-						},
-						{
-							"_type": "UMLControlFlow",
-							"_id": "AAAAAAFjqByuGavpb+Q=",
-							"_parent": {
-								"$ref": "AAAAAAFjqASLHqqfH1M="
-							},
-							"source": {
-								"$ref": "AAAAAAFjqATelKqpPIs="
-							},
-							"target": {
-								"$ref": "AAAAAAFjqAWrCarLlr0="
-							},
-							"visibility": "public"
-						},
-						{
-							"_type": "UMLControlFlow",
-							"_id": "AAAAAAFjqB0vKawF6iM=",
-							"_parent": {
-								"$ref": "AAAAAAFjqASLHqqfH1M="
-							},
-							"source": {
-								"$ref": "AAAAAAFjqBIJLquZsRo="
-							},
-							"target": {
-								"$ref": "AAAAAAFjqAWrCarLlr0="
-							},
-							"visibility": "public"
-						},
-						{
-							"_type": "UMLControlFlow",
-							"_id": "AAAAAAFjqB14s6wWTtM=",
-							"_parent": {
-								"$ref": "AAAAAAFjqASLHqqfH1M="
-							},
-							"source": {
-								"$ref": "AAAAAAFjqBIJLquZsRo="
-							},
-							"target": {
-								"$ref": "AAAAAAFjqAYmKKrmL6s="
-							},
-							"visibility": "public"
-						},
-						{
-							"_type": "UMLControlFlow",
-							"_id": "AAAAAAFjqB+W4qw8vc8=",
-							"_parent": {
-								"$ref": "AAAAAAFjqASLHqqfH1M="
-							},
-							"source": {
-								"$ref": "AAAAAAFjqB9/S6w3TKM="
-							},
-							"target": {
-								"$ref": "AAAAAAFjqAZdgasAyFA="
-							},
-							"visibility": "public"
-						},
-						{
-							"_type": "UMLControlFlow",
-							"_id": "AAAAAAFjqB+mc6xNTWc=",
-							"_parent": {
-								"$ref": "AAAAAAFjqASLHqqfH1M="
-							},
-							"source": {
-								"$ref": "AAAAAAFjqA2/A6tYai0="
-							},
-							"target": {
-								"$ref": "AAAAAAFjqB9/S6w3TKM="
-							},
-							"visibility": "public"
-						},
-						{
-							"_type": "UMLControlFlow",
-							"_id": "AAAAAAFjqCBd06x3DWs=",
-							"_parent": {
-								"$ref": "AAAAAAFjqASLHqqfH1M="
-							},
-							"source": {
-								"$ref": "AAAAAAFjqAWrCarLlr0="
-							},
-							"target": {
-								"$ref": "AAAAAAFjqB9/S6w3TKM="
-							},
-							"visibility": "public"
-						},
-						{
-							"_type": "UMLControlFlow",
-							"_id": "AAAAAAFjqCJ5HayvTsA=",
-							"_parent": {
-								"$ref": "AAAAAAFjqASLHqqfH1M="
-							},
-							"source": {
-								"$ref": "AAAAAAFjqCEig6yRtTs="
-							},
-							"target": {
-								"$ref": "AAAAAAFjqBIJLquZsRo="
-							},
-							"visibility": "public"
-						}
-					]
-				},
-				{
-					"_type": "UMLCollaboration",
-					"_id": "AAAAAAFjqCY2j5u3ys8=",
-					"_parent": {
-						"$ref": "AAAAAAFF+qBWK6M3Z8Y="
-					},
-					"name": "Collaboration1",
-					"ownedElements": [
-						{
-							"_type": "UMLInteraction",
-							"_id": "AAAAAAFjqCY2kpu4n0I=",
-							"_parent": {
-								"$ref": "AAAAAAFjqCY2j5u3ys8="
-							},
-							"name": "Interaction1",
-							"ownedElements": [
-								{
-									"_type": "UMLSequenceDiagram",
-									"_id": "AAAAAAFjqCY2kpu5KQk=",
-									"_parent": {
-										"$ref": "AAAAAAFjqCY2kpu4n0I="
-									},
-									"name": "SequenceDiagram1",
-									"visible": true,
-									"defaultDiagram": false,
-									"ownedViews": [
-										{
-											"_type": "UMLFrameView",
-											"_id": "AAAAAAFjqCY2k5u6GlA=",
-											"_parent": {
-												"$ref": "AAAAAAFjqCY2kpu5KQk="
-											},
-											"model": {
-												"$ref": "AAAAAAFjqCY2kpu5KQk="
-											},
-											"subViews": [
-												{
-													"_type": "LabelView",
-													"_id": "AAAAAAFjqCY2lJu7Oe8=",
-													"_parent": {
-														"$ref": "AAAAAAFjqCY2k5u6GlA="
-													},
-													"visible": true,
-													"enabled": true,
-													"lineColor": "#000000",
-													"fillColor": "#ffffff",
-													"fontColor": "#000000",
-													"font": "Helvetica;12;0",
-													"showShadow": true,
-													"containerChangeable": false,
-													"containerExtending": false,
-													"left": 73,
-													"top": 10,
-													"width": 111,
-													"height": 12,
-													"autoResize": false,
-													"underline": false,
-													"text": "SequenceDiagram1",
-													"horizontalAlignment": 2,
-													"verticalAlignment": 5,
-													"wordWrap": false
-												},
-												{
-													"_type": "LabelView",
-													"_id": "AAAAAAFjqCY2lZu8kXQ=",
-													"_parent": {
-														"$ref": "AAAAAAFjqCY2k5u6GlA="
-													},
-													"visible": true,
-													"enabled": true,
-													"lineColor": "#000000",
-													"fillColor": "#ffffff",
-													"fontColor": "#000000",
-													"font": "Helvetica;12;1",
-													"showShadow": true,
-													"containerChangeable": false,
-													"containerExtending": false,
-													"left": 10,
-													"top": 10,
-													"width": 58,
-													"height": 12,
-													"autoResize": false,
-													"underline": false,
-													"text": "interaction",
-													"horizontalAlignment": 2,
-													"verticalAlignment": 5,
-													"wordWrap": false
-												}
-											],
-											"visible": true,
-											"enabled": true,
-											"lineColor": "#000000",
-											"fillColor": "#ffffff",
-											"fontColor": "#000000",
-											"font": "Helvetica;12;0",
-											"showShadow": true,
-											"containerChangeable": false,
-											"containerExtending": false,
-											"left": 5,
-											"top": 5,
-											"width": 695,
-											"height": 595,
-											"autoResize": false,
-											"nameLabel": {
-												"$ref": "AAAAAAFjqCY2lJu7Oe8="
-											},
-											"frameTypeLabel": {
-												"$ref": "AAAAAAFjqCY2lZu8kXQ="
-											}
-										},
-										{
-											"_type": "UMLSeqLifelineView",
-											"_id": "AAAAAAFjqCbCSJvIsEM=",
-											"_parent": {
-												"$ref": "AAAAAAFjqCY2kpu5KQk="
-											},
-											"model": {
-												"$ref": "AAAAAAFjqCbCSJvHDpo="
-											},
-											"subViews": [
-												{
-													"_type": "UMLNameCompartmentView",
-													"_id": "AAAAAAFjqCbCSZvJ4ng=",
-													"_parent": {
-														"$ref": "AAAAAAFjqCbCSJvIsEM="
-													},
-													"model": {
-														"$ref": "AAAAAAFjqCbCSJvHDpo="
-													},
-													"subViews": [
-														{
-															"_type": "LabelView",
-															"_id": "AAAAAAFjqCbCSpvKaxs=",
-															"_parent": {
-																"$ref": "AAAAAAFjqCbCSZvJ4ng="
-															},
-															"visible": false,
-															"enabled": true,
-															"lineColor": "#000000",
-															"fillColor": "#ffffff",
-															"fontColor": "#000000",
-															"font": "Helvetica;12;0",
-															"showShadow": true,
-															"containerChangeable": false,
-															"containerExtending": false,
-															"left": 0,
-															"top": 0,
-															"width": 0,
-															"height": 12,
-															"autoResize": false,
-															"underline": false,
-															"horizontalAlignment": 2,
-															"verticalAlignment": 5,
-															"wordWrap": false
-														},
-														{
-															"_type": "LabelView",
-															"_id": "AAAAAAFjqCbCSpvLXu8=",
-															"_parent": {
-																"$ref": "AAAAAAFjqCbCSZvJ4ng="
-															},
-															"visible": true,
-															"enabled": true,
-															"lineColor": "#000000",
-															"fillColor": "#ffffff",
-															"fontColor": "#000000",
-															"font": "Helvetica;12;1",
-															"showShadow": true,
-															"containerChangeable": false,
-															"containerExtending": false,
-															"left": 37,
-															"top": 47,
-															"width": 90,
-															"height": 12,
-															"autoResize": false,
-															"underline": false,
-															"text": "EventListener",
-															"horizontalAlignment": 2,
-															"verticalAlignment": 5,
-															"wordWrap": false
-														},
-														{
-															"_type": "LabelView",
-															"_id": "AAAAAAFjqCbCSpvMWyQ=",
-															"_parent": {
-																"$ref": "AAAAAAFjqCbCSZvJ4ng="
-															},
-															"visible": false,
-															"enabled": true,
-															"lineColor": "#000000",
-															"fillColor": "#ffffff",
-															"fontColor": "#000000",
-															"font": "Helvetica;12;0",
-															"showShadow": true,
-															"containerChangeable": false,
-															"containerExtending": false,
-															"left": 0,
-															"top": 0,
-															"width": 99,
-															"height": 12,
-															"autoResize": false,
-															"underline": false,
-															"text": "(from Interaction1)",
-															"horizontalAlignment": 2,
-															"verticalAlignment": 5,
-															"wordWrap": false
-														},
-														{
-															"_type": "LabelView",
-															"_id": "AAAAAAFjqCbCS5vNZUs=",
-															"_parent": {
-																"$ref": "AAAAAAFjqCbCSZvJ4ng="
-															},
-															"visible": false,
-															"enabled": true,
-															"lineColor": "#000000",
... 975 lines suppressed ...


[fineract-cn-notifications] 14/36: added dependencies to shared gradle file

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

awasum pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-notifications.git

commit 4bf46aa995ba4708f651da141b62ac672e2457da
Author: Ebenezer Graham <eg...@alustudent.com>
AuthorDate: Fri Jun 15 18:27:21 2018 +0400

    added dependencies to shared gradle file
---
 service/build.gradle                               | 15 ++++++++--
 .../service/internal/service/SMSSender.java        |  2 +-
 .../service/listener/CustomerEventListener.java    | 34 ++++++++++++++++++++--
 .../service/listener/OfficeEventListener.java      |  1 +
 .../service/listener/PortfolioEventListener.java   | 16 +++-------
 5 files changed, 51 insertions(+), 17 deletions(-)

diff --git a/service/build.gradle b/service/build.gradle
index 57f507d..42b1c6f 100644
--- a/service/build.gradle
+++ b/service/build.gradle
@@ -46,12 +46,23 @@ springBoot {
 dependencies {
     compile(
             [group: 'com.twilio.sdk', name: 'twilio', version: '7.17.+'],
+            [group: 'org.springframework.boot', name: 'spring-boot-starter-mail', version: '1.4.3.RELEASE'],
+
             [group: 'org.apache.fineract.cn.customer', name: 'api', version: versions.fineractcncustomer],
+            [group: 'org.apache.fineract.cn.office', name: 'api', version: versions.fineractcnoffice],
+            [group: 'org.apache.fineract.cn.portfolio', name: 'api', version: versions.fineractcnportfolio],
+            [group: 'org.apache.fineract.cn.group', name: 'api', version: versions.fineractcngroup],
+
+            //[group: 'org.apache.fineract.cn.deposit-account-management', name: 'api', version: versions.fineractcndeposit],
+            //[group: 'org.apache.fineract.cn.teller', name: 'api', version: versions.fineractcnteller],
+            //[group: 'org.apache.fineract.cn.reporting', name: 'api', version: versions.fineractcnreporting],
+            //[group: 'org.apache.fineract.cn.cheques', name: 'api', version: versions.kuelapcheques],
+            //[group: 'org.apache.fineract.cn.payroll', name: 'api', version: versions.fineractcnpayroll],
+            //[group: 'org.apache.fineract.cn.notification', name: 'api', version: versions.fineractcnnotification],
+
             [group: 'org.springframework.cloud', name: 'spring-cloud-starter-config'],
             [group: 'org.springframework.cloud', name: 'spring-cloud-starter-eureka'],
             [group: 'org.springframework.boot', name: 'spring-boot-starter-jetty'],
-            //check this dependency
-            [group: 'org.springframework.boot', name: 'spring-boot-starter-mail', version: '1.4.3.RELEASE'],
             [group: 'org.apache.fineract.cn.notification', name: 'api', version: project.version],
             [group: 'org.apache.fineract.cn.anubis', name: 'library', version: versions.frameworkanubis],
             [group: 'com.google.code.gson', name: 'gson'],
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SMSSender.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SMSSender.java
index 48a7ac9..ed98bea 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SMSSender.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SMSSender.java
@@ -54,4 +54,4 @@ public class SMSSender {
         System.out.println(message.getSid());
         System.out.println(message.getStatus());
     }
-    }
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/CustomerEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/CustomerEventListener.java
index 3f4c771..7db634a 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/CustomerEventListener.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/CustomerEventListener.java
@@ -26,6 +26,7 @@ import org.apache.fineract.cn.customer.api.v1.domain.ContactDetail;
 import org.apache.fineract.cn.customer.api.v1.domain.Customer;
 import org.apache.fineract.cn.notification.service.internal.service.EmailSender;
 import org.apache.fineract.cn.notification.service.internal.service.SMSSender;
+import org.slf4j.Logger;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.jms.annotation.JmsListener;
 import org.springframework.messaging.handler.annotation.Header;
@@ -38,12 +39,15 @@ public class CustomerEventListener {
         private CustomerManager customerManager;
         private SMSSender smsSender;
         private EmailSender emailSender;
+        private final Logger logger;
 
         @Autowired
-        public CustomerEventListener( final CustomerManager customerManager, SMSSender smsSender, EmailSender emailSender ) {
+        public CustomerEventListener( final CustomerManager customerManager,
+                                      SMSSender smsSender, EmailSender emailSender, @Autowired Logger logger ) {
             this.customerManager = customerManager;
             this.smsSender = smsSender;
             this.emailSender = emailSender;
+            this.logger = logger;
             smsSender.sendSMS("+23058409206","just to be sure listen has been instantiated");
         }
 
@@ -55,7 +59,10 @@ public class CustomerEventListener {
                                          final String payload) {
             System.out.println(payload);
             Customer customer = customerManager.findCustomer(payload);
-            System.out.println("This is the customer created: " + customer.getGivenName());
+            System.out.println("This is the customer created: "
+                    + customer.getGivenName() +"--payload" + payload +"--tenant"+ tenant);
+            this.logger.info("Logger --- This is the customer created: "
+                    + customer.getGivenName() +"--payload" + payload +"--tenant"+ tenant);
             if (customer.getContactDetails().size() > 0) {
                 customer.getContactDetails().forEach(contactDetail -> {
                     if (contactDetail.getType().equals(ContactDetail.Type.PHONE)) {
@@ -77,7 +84,12 @@ public class CustomerEventListener {
     )
     public void customerActivatedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
                                        final String payload) {
+
         Customer customer = customerManager.findCustomer(payload);
+        System.out.println("This is the customer created: "
+                + customer.getGivenName() +"--payload" + payload +"--tenant"+ tenant);
+        this.logger.info("Logger --- This is the customer created: "
+                + customer.getGivenName() +"--payload" + payload +"--tenant"+ tenant);
         if(customer.getCurrentState().equalsIgnoreCase("ACTIVE")){
             customer.getContactDetails().forEach(contact-> {
                 if (contact.getType().equals(ContactDetail.Type.PHONE)) {
@@ -99,6 +111,10 @@ public class CustomerEventListener {
     public void customerLockedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
                                     final String payload) {
         Customer customer = customerManager.findCustomer(payload);
+        System.out.println("This is the customer created: "
+                + customer.getGivenName() +"--payload" + payload +"--tenant"+ tenant);
+        this.logger.info("Logger --- This is the customer created: "
+                + customer.getGivenName() +"--payload" + payload +"--tenant"+ tenant);
         if(customer.getCurrentState().equalsIgnoreCase("LOCKED")){
             customer.getContactDetails().forEach(contact-> {
                 if (contact.getType().equals(ContactDetail.Type.PHONE)) {
@@ -120,6 +136,11 @@ public class CustomerEventListener {
     public void customerUnlockedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
                                       final String payload) {
         Customer customer = customerManager.findCustomer(payload);
+
+        System.out.println("This is the customer created: "
+                + customer.getGivenName() +"--payload" + payload +"--tenant"+ tenant);
+        this.logger.info("Logger --- This is the customer created: "
+                + customer.getGivenName() +"--payload" + payload +"--tenant"+ tenant);
         if(customer.getCurrentState().equalsIgnoreCase("LOCKED")){
             customer.getContactDetails().forEach(contact-> {
                 if (contact.getType().equals(ContactDetail.Type.PHONE)) {
@@ -141,6 +162,11 @@ public class CustomerEventListener {
     public void customerClosedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
                                     final String payload) {
         Customer customer = customerManager.findCustomer(payload);
+        System.out.println("This is the customer created: "
+                + customer.getGivenName() +"--payload" + payload +"--tenant"+ tenant);
+        this.logger.info("Logger --- This is the customer created: "
+                + customer.getGivenName() +"--payload" + payload +"--tenant"+ tenant);
+
         if(customer.getCurrentState().equalsIgnoreCase("CLOSED")){
             customer.getContactDetails().forEach(contact-> {
                 if (contact.getType().equals(ContactDetail.Type.PHONE)) {
@@ -162,6 +188,10 @@ public class CustomerEventListener {
     public void customerReopenedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
                                       final String payload) {
         Customer customer = customerManager.findCustomer(payload);
+        System.out.println("This is the customer created: "
+                + customer.getGivenName() +"--payload" + payload +"--tenant"+ tenant);
+        this.logger.info("Logger --- This is the customer created: "
+                + customer.getGivenName() +"--payload" + payload +"--tenant"+ tenant);
         if(customer.getCurrentState().equalsIgnoreCase("LOCKED")){
             customer.getContactDetails().forEach(contact-> {
                 if (contact.getType().equals(ContactDetail.Type.PHONE)) {
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/OfficeEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/OfficeEventListener.java
index 9f083c5..219c830 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/OfficeEventListener.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/OfficeEventListener.java
@@ -30,6 +30,7 @@ import org.springframework.messaging.handler.annotation.Header;
 import org.springframework.stereotype.Component;
 
 @Component
+@SuppressWarnings("unused")
 public class OfficeEventListener {
 
 	private OrganizationManager organizationManager;
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PortfolioEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PortfolioEventListener.java
index 4f8f9d0..50697b2 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PortfolioEventListener.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PortfolioEventListener.java
@@ -50,7 +50,8 @@ public class PortfolioEventListener {
             destination = IndividualLoanEventConstants.DESTINATION,
             selector = IndividualLoanEventConstants.SELECTOR_DENY_INDIVIDUALLOAN_CASE
     )
-    public void onDeny(final String payload) {
+    public void onDeny(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                       final String payload) {
 
     }
 
@@ -99,7 +100,7 @@ public class PortfolioEventListener {
             destination = IndividualLoanEventConstants.DESTINATION,
             selector = IndividualLoanEventConstants.SELECTOR_OPEN_INDIVIDUALLOAN_CASE
     )
-    public void onOpen(//@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+    public void onOpen(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
                        final String payload) {
 
     }
@@ -128,7 +129,7 @@ public class PortfolioEventListener {
                 destination = EventConstants.DESTINATION,
                 selector = EventConstants.SELECTOR_POST_GROUP
         )
-        public void onGroupCreated(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+    public void onGroupCreated(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
                                    final String payload) {
 
         }
@@ -142,13 +143,4 @@ public class PortfolioEventListener {
                                      final String payload) {
         }
 
-        @JmsListener(
-                subscription = EventConstants.DESTINATION,
-                destination = EventConstants.DESTINATION,
-                selector = EventConstants.SELECTOR_PUT_GROUP
-        )
-        public void onGroupUpdated(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                                   final String payload) {
-        }
-
     }


[fineract-cn-notifications] 03/36: improved the repositories and entities for the configurations

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

awasum pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-notifications.git

commit 71d5c3ed920006f6557279ec02054f8100b3f761
Author: Ebenezer Graham <eg...@alustudent.com>
AuthorDate: Sun Jun 10 18:46:58 2018 +0400

    improved the repositories and entities for the configurations
---
 .../notification/api/v1/domain/Notification.class  | Bin 1782 -> 1820 bytes
 .../cn/notification/api/v1/domain/SampleTest.class | Bin 3710 -> 0 bytes
 .../api/v1/domain/EmailConfiguration.java          | 162 +++++++++++++++++++++
 .../api/v1/domain/SMSConfiguration.java            | 122 ++++++++++++++++
 .../cn/notification/SuiteTestEnvironment.class     | Bin 1528 -> 0 bytes
 .../TestSample$TestConfiguration.class             | Bin 1398 -> 0 bytes
 .../fineract/cn/notification/TestSample.class      | Bin 5890 -> 0 bytes
 .../fineract/cn/notification/TestSuite.class       | Bin 695 -> 0 bytes
 .../listener/MigrationEventListener.class          | Bin 1482 -> 0 bytes
 .../listener/SampleEventListener.class             | Bin 1473 -> 0 bytes
 service/out/production/resources/application.yml   |  18 ---
 .../internal/command/handler/SampleAggregate.java  |   2 +
 .../internal/mapper/EmailConfigurationMapper.java  |  49 +++++++
 .../internal/mapper/SMSConfigurationMapper.java    |  47 ++++++
 .../service/internal/mapper/SampleMapper.java      |   1 +
 .../repository/EmailGatewayConfiguration.java      |  10 ++
 ...ewayConfiguration.java => SampleJpaEntity.java} |  68 ++-------
 .../SampleJpaEntityRepository.java}                |  32 +---
 .../service/internal/service/EmailSender.java      |  18 ++-
 .../service/internal/service/SampleService.java    |   1 +
 .../service/listener/AccountingEventListener.java  |  14 +-
 .../service/listener/ChequeEventListener.java      |   7 +-
 .../service/listener/CustomerEventListener.java    |   1 -
 .../service/listener/DepositEventListener.java     |   7 +-
 .../service/listener/PortfolioEventListener.java   |   3 -
 25 files changed, 440 insertions(+), 122 deletions(-)

diff --git a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/Notification.class b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/Notification.class
index 16602d7..afe7f46 100644
Binary files a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/Notification.class and b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/Notification.class differ
diff --git a/api/out/test/classes/org/apache/fineract/cn/notification/api/v1/domain/SampleTest.class b/api/out/test/classes/org/apache/fineract/cn/notification/api/v1/domain/SampleTest.class
deleted file mode 100644
index 8013bfa..0000000
Binary files a/api/out/test/classes/org/apache/fineract/cn/notification/api/v1/domain/SampleTest.class and /dev/null differ
diff --git a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/EmailConfiguration.java b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/EmailConfiguration.java
new file mode 100644
index 0000000..24aa0dc
--- /dev/null
+++ b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/EmailConfiguration.java
@@ -0,0 +1,162 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.api.v1.domain;
+
+import org.apache.fineract.cn.lang.validation.constraints.ValidIdentifier;
+import org.hibernate.validator.constraints.Length;
+
+import java.util.Objects;
+
+@SuppressWarnings({"WeakerAccess", "unused"})
+public class EmailConfiguration {
+  @ValidIdentifier
+  private String identifier;
+  @Length(max = 512)
+  private String payload;
+  @Length(max = 512)
+  private String host;
+  @Length(max = 512)
+  private String port;
+  @Length(max = 512)
+  private String username;
+  @Length(max = 512)
+  private String app_id;
+  @Length(max = 512)
+  private String smtp_auth;
+  @Length(max = 512)
+  private String start_tls;
+  @Length(max = 512)
+  private String option;
+
+  public EmailConfiguration(){
+    super();
+  }
+
+  public static EmailConfiguration create (String identifier, String payload,
+                            String host, String port,
+                            String username, String app_id,
+                            String smtp_auth, String start_tls,
+                            String option) {
+    EmailConfiguration emailConfiguration = new EmailConfiguration();
+    emailConfiguration.setIdentifier(identifier);
+    emailConfiguration.setPayload(payload);
+    emailConfiguration.setHost(host);
+    emailConfiguration.setPort(port);
+    emailConfiguration.setUsername(username);
+    emailConfiguration.setApp_id(app_id);
+    emailConfiguration.setSmtp_auth(smtp_auth);
+    emailConfiguration.setStart_tls(start_tls);
+    emailConfiguration.setOption(option);
+    return emailConfiguration;
+  }
+
+  public String getIdentifier() {
+    return identifier;
+  }
+
+  public void setIdentifier(String identifier) {
+    this.identifier = identifier;
+  }
+
+  public String getPayload() {
+    return payload;
+  }
+
+  public void setPayload(String payload) {
+    this.payload = payload;
+  }
+
+  public String getHost() {
+    return host;
+  }
+
+  public void setHost(String host) {
+    this.host = host;
+  }
+
+  public String getPort() {
+    return port;
+  }
+
+  public void setPort(String port) {
+    this.port = port;
+  }
+
+  public String getUsername() {
+    return username;
+  }
+
+  public void setUsername(String username) {
+    this.username = username;
+  }
+
+  public String getApp_id() {
+    return app_id;
+  }
+
+  public void setApp_id(String app_id) {
+    this.app_id = app_id;
+  }
+
+  public String getSmtp_auth() {
+    return smtp_auth;
+  }
+
+  public void setSmtp_auth(String smtp_auth) {
+    this.smtp_auth = smtp_auth;
+  }
+
+  public String getStart_tls() {
+    return start_tls;
+  }
+
+  public void setStart_tls(String start_tls) {
+    this.start_tls = start_tls;
+  }
+
+  public String getOption() {
+    return option;
+  }
+
+  public void setOption(String option) {
+    this.option = option;
+  }
+
+  @Override
+  public boolean equals(Object o) {
+    if (this == o) return true;
+    if (o == null || getClass() != o.getClass()) return false;
+    EmailConfiguration that = (EmailConfiguration) o;
+    return Objects.equals(identifier, that.identifier) &&
+            Objects.equals(payload, that.payload) &&
+            Objects.equals(host, that.host) &&
+            Objects.equals(port, that.port) &&
+            Objects.equals(username, that.username) &&
+            Objects.equals(app_id, that.app_id) &&
+            Objects.equals(smtp_auth, that.smtp_auth) &&
+            Objects.equals(start_tls, that.start_tls) &&
+            Objects.equals(option, that.option);
+  }
+
+  @Override
+  public int hashCode() {
+    return Objects.hash(identifier, payload, host, port, username,
+            app_id, smtp_auth, start_tls, option);
+  }
+}
diff --git a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/SMSConfiguration.java b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/SMSConfiguration.java
new file mode 100644
index 0000000..cef7f57
--- /dev/null
+++ b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/SMSConfiguration.java
@@ -0,0 +1,122 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.api.v1.domain;
+
+import org.apache.fineract.cn.lang.validation.constraints.ValidIdentifier;
+import org.hibernate.validator.constraints.Length;
+
+import java.util.Objects;
+
+@SuppressWarnings({"WeakerAccess", "unused"})
+public class SMSConfiguration {
+  @ValidIdentifier
+  private String identifier;
+  @Length(max = 512)
+  private String payload;
+  @Length(max = 512)
+  private String organisation;
+  @Length(max = 512)
+  private String auth_token;
+  @Length(max = 512)
+  private String accountid;
+  @Length(max = 256)
+  private String option;
+
+  public SMSConfiguration() {
+    super();
+  }
+
+  public static SMSConfiguration create(String identifier, String payload, String organisation, String auth_token, String accountid, String option) {
+    SMSConfiguration smsconfiguration = new SMSConfiguration();
+    smsconfiguration.setIdentifier(identifier);
+    smsconfiguration.setPayload(payload);
+    smsconfiguration.setOrganisation(organisation);
+    smsconfiguration.setAuth_token(auth_token);
+    smsconfiguration.setAccountid(accountid);
+    smsconfiguration.setOption(option);
+    return smsconfiguration;
+  }
+
+  public String getIdentifier() {
+    return identifier;
+  }
+
+  public void setIdentifier(String identifier) {
+    this.identifier = identifier;
+  }
+
+  public String getPayload() {
+    return payload;
+  }
+
+  public void setPayload(String payload) {
+    this.payload = payload;
+  }
+
+  public String getOrganisation() {
+    return organisation;
+  }
+
+  public void setOrganisation(String organisation) {
+    this.organisation = organisation;
+  }
+
+  public String getAuth_token() {
+    return auth_token;
+  }
+
+  public void setAuth_token(String auth_token) {
+    this.auth_token = auth_token;
+  }
+
+  public String getAccountid() {
+    return accountid;
+  }
+
+  public void setAccountid(String accountid) {
+    this.accountid = accountid;
+  }
+
+  public String getOption() {
+    return option;
+  }
+
+  public void setOption(String option) {
+    this.option = option;
+  }
+
+  @Override
+  public boolean equals(Object o) {
+    if (this == o) return true;
+    if (o == null || getClass() != o.getClass()) return false;
+    SMSConfiguration that = (SMSConfiguration) o;
+    return Objects.equals(identifier, that.identifier) &&
+            Objects.equals(payload, that.payload) &&
+            Objects.equals(organisation, that.organisation) &&
+            Objects.equals(auth_token, that.auth_token) &&
+            Objects.equals(accountid, that.accountid) &&
+            Objects.equals(option, that.option);
+  }
+
+  @Override
+  public int hashCode() {
+
+    return Objects.hash(identifier, payload, organisation, auth_token, accountid, option);
+  }
+}
diff --git a/component-test/out/production/classes/org/apache/fineract/cn/notification/SuiteTestEnvironment.class b/component-test/out/production/classes/org/apache/fineract/cn/notification/SuiteTestEnvironment.class
deleted file mode 100644
index d098f6e..0000000
Binary files a/component-test/out/production/classes/org/apache/fineract/cn/notification/SuiteTestEnvironment.class and /dev/null differ
diff --git a/component-test/out/production/classes/org/apache/fineract/cn/notification/TestSample$TestConfiguration.class b/component-test/out/production/classes/org/apache/fineract/cn/notification/TestSample$TestConfiguration.class
deleted file mode 100644
index b125463..0000000
Binary files a/component-test/out/production/classes/org/apache/fineract/cn/notification/TestSample$TestConfiguration.class and /dev/null differ
diff --git a/component-test/out/production/classes/org/apache/fineract/cn/notification/TestSample.class b/component-test/out/production/classes/org/apache/fineract/cn/notification/TestSample.class
deleted file mode 100644
index 5962f3a..0000000
Binary files a/component-test/out/production/classes/org/apache/fineract/cn/notification/TestSample.class and /dev/null differ
diff --git a/component-test/out/production/classes/org/apache/fineract/cn/notification/TestSuite.class b/component-test/out/production/classes/org/apache/fineract/cn/notification/TestSuite.class
deleted file mode 100644
index f083d51..0000000
Binary files a/component-test/out/production/classes/org/apache/fineract/cn/notification/TestSuite.class and /dev/null differ
diff --git a/component-test/out/production/classes/org/apache/fineract/cn/notification/listener/MigrationEventListener.class b/component-test/out/production/classes/org/apache/fineract/cn/notification/listener/MigrationEventListener.class
deleted file mode 100644
index 6a70e37..0000000
Binary files a/component-test/out/production/classes/org/apache/fineract/cn/notification/listener/MigrationEventListener.class and /dev/null differ
diff --git a/component-test/out/production/classes/org/apache/fineract/cn/notification/listener/SampleEventListener.class b/component-test/out/production/classes/org/apache/fineract/cn/notification/listener/SampleEventListener.class
deleted file mode 100644
index 917edfc..0000000
Binary files a/component-test/out/production/classes/org/apache/fineract/cn/notification/listener/SampleEventListener.class and /dev/null differ
diff --git a/service/out/production/resources/application.yml b/service/out/production/resources/application.yml
index 17d03bc..37acaaf 100644
--- a/service/out/production/resources/application.yml
+++ b/service/out/production/resources/application.yml
@@ -23,17 +23,6 @@ spring:
       enabled: false
     config:
       enabled: false
-  mail:
-    host: smtp.gmail.com
-    port: 587
-    username: ebenezergraham69@gmail.com
-    password: fdzmzbhbmtkafzvq
-    properties:
-      mail:
-        smtpauth: true
-        smtp:
-        starttls:
-          enable: true
 
 eureka:
   client:
@@ -79,13 +68,6 @@ async:
 flyway:
   enabled: false
 
-mfi:
-  senderNumber: +15109441898
-
-smssender:
-  accountSID: AC1fde2c6f26f367b93231c5fdb944c908
-  authtoken: bc9a53e41745b8471e0ecafc859d86aa
-
 fineract:
   customer:
     accountcreated:
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/SampleAggregate.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/SampleAggregate.java
index cf09aca..a21589d 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/SampleAggregate.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/SampleAggregate.java
@@ -24,6 +24,8 @@ import org.apache.fineract.cn.command.annotation.Aggregate;
 import org.apache.fineract.cn.command.annotation.CommandHandler;
 import org.apache.fineract.cn.command.annotation.CommandLogLevel;
 import org.apache.fineract.cn.command.annotation.EventEmitter;
+import org.apache.fineract.cn.notification.service.internal.repository.SampleJpaEntity;
+import org.apache.fineract.cn.notification.service.internal.repository.SampleJpaEntityRepository;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/mapper/EmailConfigurationMapper.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/mapper/EmailConfigurationMapper.java
new file mode 100644
index 0000000..10e4a86
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/mapper/EmailConfigurationMapper.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.mapper;
+
+import org.apache.fineract.cn.notification.api.v1.domain.EmailConfiguration;
+import org.apache.fineract.cn.notification.service.internal.repository.EmailGatewayConfiguration;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class EmailConfigurationMapper {
+
+  private EmailConfigurationMapper() {
+    super();
+  }
+
+  public static EmailConfiguration map(final EmailGatewayConfiguration emailGatewayConfiguration) {
+    final EmailConfiguration emailConfiguration = new EmailConfiguration();
+    emailConfiguration.setIdentifier(emailGatewayConfiguration.getIdentifier());
+    emailConfiguration.setHost(emailGatewayConfiguration.getHost());
+    emailConfiguration.setPort(emailGatewayConfiguration.getPort());
+    emailConfiguration.setUsername(emailGatewayConfiguration.getUsername());
+    emailConfiguration.setApp_id(emailGatewayConfiguration.getApp_id());
+    return emailConfiguration;
+  }
+
+//  public static List<EmailGatewayConfiguration> map(final List<EmailGatewayConfiguration> emailGatewayConfiguration) {
+//    final ArrayList<EmailGatewayConfiguration> entities = new ArrayList<>(emailGatewayConfiguration.size());
+//    entities.addAll(emailGatewayConfiguration.stream().map(EmailGatewayConfiguration::map).collect(Collectors.toList()));
+//    return entities;
+//  }
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/mapper/SMSConfigurationMapper.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/mapper/SMSConfigurationMapper.java
new file mode 100644
index 0000000..43e6c1c
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/mapper/SMSConfigurationMapper.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.mapper;
+
+import org.apache.fineract.cn.notification.api.v1.domain.SMSConfiguration;
+import org.apache.fineract.cn.notification.service.internal.repository.SMSGatewayConfiguration;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class SMSConfigurationMapper {
+
+  private SMSConfigurationMapper() {
+    super();
+  }
+
+  public static SMSConfiguration map(final SMSGatewayConfiguration smsGatewayConfiguration) {
+    final SMSConfiguration smsConfiguration = new SMSConfiguration();
+    smsConfiguration.setIdentifier(smsGatewayConfiguration.getIdentifier());
+    smsConfiguration.setAccountid(smsGatewayConfiguration.getAccountid());
+    smsConfiguration.setAuth_token(smsGatewayConfiguration.getAuth_token());
+    return smsConfiguration;
+  }
+
+//  public static List<SMSGatewayConfiguration> map(final List<SMSGatewayConfiguration> smsGatewayConfiguration) {
+//    final ArrayList<SMSGatewayConfiguration> entities = new ArrayList<>(smsGatewayConfiguration.size());
+//    entities.addAll(smsGatewayConfiguration.stream().map(SMSConfigurationMapper::map).collect(Collectors.toList()));
+//    return entities;
+//  }
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/mapper/SampleMapper.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/mapper/SampleMapper.java
index 973adee..a56b7aa 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/mapper/SampleMapper.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/mapper/SampleMapper.java
@@ -19,6 +19,7 @@
 package org.apache.fineract.cn.notification.service.internal.mapper;
 
 import org.apache.fineract.cn.notification.api.v1.domain.Sample;
+import org.apache.fineract.cn.notification.service.internal.repository.SampleJpaEntity;
 
 import java.util.ArrayList;
 import java.util.List;
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/EmailGatewayConfiguration.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/EmailGatewayConfiguration.java
index e0c6d89..c344708 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/EmailGatewayConfiguration.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/EmailGatewayConfiguration.java
@@ -43,6 +43,8 @@ public class EmailGatewayConfiguration {
   private String smtp_auth;
   @Column(name = "start_tls")
   private String start_tls;
+  @Column(name = "option")
+  private String option;
 
   public EmailGatewayConfiguration() {
     super();
@@ -111,4 +113,12 @@ public class EmailGatewayConfiguration {
   public void setStart_tls(String start_tls) {
     this.start_tls = start_tls;
   }
+
+  public String getOption() {
+    return option;
+  }
+
+  public void setOption(String option) {
+    this.option = option;
+  }
 }
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/EmailGatewayConfiguration.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SampleJpaEntity.java
similarity index 53%
copy from service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/EmailGatewayConfiguration.java
copy to service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SampleJpaEntity.java
index e0c6d89..f740d85 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/EmailGatewayConfiguration.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SampleJpaEntity.java
@@ -22,8 +22,8 @@ import javax.persistence.*;
 
 @SuppressWarnings("unused")
 @Entity
-@Table(name = "email_gateway_configuration")
-public class EmailGatewayConfiguration {
+@Table(name = "template_samples")
+public class SampleJpaEntity {
 
   @Id
   @GeneratedValue(strategy = GenerationType.IDENTITY)
@@ -31,20 +31,10 @@ public class EmailGatewayConfiguration {
   private Long id;
   @Column(name = "identifier")
   private String identifier;
-  @Column(name = "host")
-  private String host;
-  @Column(name = "port")
-  private String port;
-  @Column(name = "username")
-  private String username;
-  @Column(name = "app_id")
-  private String app_id;
-  @Column(name = "smtp_auth")
-  private String smtp_auth;
-  @Column(name = "start_tls")
-  private String start_tls;
+  @Column(name = "payload")
+  private String payload;
 
-  public EmailGatewayConfiguration() {
+  public SampleJpaEntity() {
     super();
   }
 
@@ -64,51 +54,11 @@ public class EmailGatewayConfiguration {
     this.identifier = identifier;
   }
 
-  public String getHost() {
-    return host;
+  public String getPayload() {
+    return payload;
   }
 
-  public void setHost(String host) {
-    this.host = host;
-  }
-
-  public String getPort() {
-    return port;
-  }
-
-  public void setPort(String port) {
-    this.port = port;
-  }
-
-  public String getUsername() {
-    return username;
-  }
-
-  public void setUsername(String username) {
-    this.username = username;
-  }
-
-  public String getApp_id() {
-    return app_id;
-  }
-
-  public void setApp_id(String app_id) {
-    this.app_id = app_id;
-  }
-
-  public String getSmtp_auth() {
-    return smtp_auth;
-  }
-
-  public void setSmtp_auth(String smtp_auth) {
-    this.smtp_auth = smtp_auth;
-  }
-
-  public String getStart_tls() {
-    return start_tls;
-  }
-
-  public void setStart_tls(String start_tls) {
-    this.start_tls = start_tls;
+  public void setPayload(String payload) {
+    this.payload = payload;
   }
 }
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/EmailSender.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SampleJpaEntityRepository.java
similarity index 51%
copy from service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/EmailSender.java
copy to service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SampleJpaEntityRepository.java
index e9cc516..b4d8abd 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/EmailSender.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SampleJpaEntityRepository.java
@@ -16,29 +16,13 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.fineract.cn.notification.service.internal.service;
+package org.apache.fineract.cn.notification.service.internal.repository;
 
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.context.annotation.Bean;
-import org.springframework.mail.SimpleMailMessage;
-import org.springframework.mail.javamail.JavaMailSender;
-import org.springframework.stereotype.Service;
+import java.util.Optional;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.stereotype.Repository;
 
-
-@Service
-public class EmailSender {
-
-    @Autowired
-    @Qualifier("gmail")
-    private JavaMailSender sender;
-
-    public void sendEmail(String to, String subject, String message) {
-        SimpleMailMessage mail = new SimpleMailMessage();
-        mail.setTo(to);
-        mail.setSubject(subject);
-        mail.setText(message);
-        sender.send(mail);
-    }
-
-}
\ No newline at end of file
+@Repository
+public interface SampleJpaEntityRepository extends JpaRepository<SampleJpaEntity, Long> {
+  Optional<SampleJpaEntity> findByIdentifier(String identifier);
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/EmailSender.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/EmailSender.java
index e9cc516..bebb3c9 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/EmailSender.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/EmailSender.java
@@ -18,13 +18,17 @@
  */
 package org.apache.fineract.cn.notification.service.internal.service;
 
+
+import org.apache.fineract.cn.notification.service.internal.mapper.EmailConfigurationMapper;
+import org.apache.fineract.cn.notification.service.internal.repository.EmailGatewayConfiguration;
+import org.apache.fineract.cn.notification.service.internal.repository.EmailGatewayConfigurationRepository;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.context.annotation.Bean;
 import org.springframework.mail.SimpleMailMessage;
 import org.springframework.mail.javamail.JavaMailSender;
 import org.springframework.stereotype.Service;
 
+import java.util.Optional;
 
 @Service
 public class EmailSender {
@@ -33,6 +37,18 @@ public class EmailSender {
     @Qualifier("gmail")
     private JavaMailSender sender;
 
+    private final EmailGatewayConfigurationRepository emailGatewayConfigurationRepository;
+
+    @Autowired
+    public EmailSender(final EmailGatewayConfigurationRepository emailGatewayConfigurationRepository) {
+        super();
+        this.emailGatewayConfigurationRepository = emailGatewayConfigurationRepository;
+    }
+
+//    public Optional<EmailGatewayConfiguration> findByIdentifier(final String identifier) {
+//        return this.emailGatewayConfigurationRepository.findByIdentifier(identifier).map(EmailGatewayConfiguration::map);
+//    }
+
     public void sendEmail(String to, String subject, String message) {
         SimpleMailMessage mail = new SimpleMailMessage();
         mail.setTo(to);
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SampleService.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SampleService.java
index bc2d5a8..a0e4f71 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SampleService.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SampleService.java
@@ -20,6 +20,7 @@ package org.apache.fineract.cn.notification.service.internal.service;
 
 import org.apache.fineract.cn.notification.api.v1.domain.Sample;
 import org.apache.fineract.cn.notification.service.internal.mapper.SampleMapper;
+import org.apache.fineract.cn.notification.service.internal.repository.SampleJpaEntityRepository;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/AccountingEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/AccountingEventListener.java
index a061b1a..9266b89 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/AccountingEventListener.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/AccountingEventListener.java
@@ -16,7 +16,7 @@
          * specific language governing permissions and limitations
          * under the License.
          */
-
+/*
         package org.apache.fineract.cn.notification.service.listener;
 
         import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
@@ -34,13 +34,6 @@
 @Component
 public class AccountingEventListener {
 
-    AccountService accountService;
-
-    @Autowired
-    SMSSender smsSender;
-
-    @Autowired
-    EmailSender emailSender;
 
     @Autowired
     public AccountingEventListener( final AccountService accountingManager) {
@@ -60,7 +53,7 @@ public class AccountingEventListener {
         emailSender.sendEmail(receiver,"Hello", "You account has been created");
     }
 
-     /*
+
     @JmsListener(
             destination = EventConstants.DESTINATION,
             selector = EventConstants.SELECTOR_PUT_ACCOUNT,
@@ -126,5 +119,6 @@ public class AccountingEventListener {
         this.logger.debug("Account deleted.");
         this.eventRecorder.event(tenant, EventConstants.DELETE_ACCOUNT, payload, String.class);
     }
- */
+
 }
+ */
\ No newline at end of file
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/ChequeEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/ChequeEventListener.java
index 2c6c2cf..97dd5e2 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/ChequeEventListener.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/ChequeEventListener.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
+/*
 package org.apache.fineract.cn.notification.service.listener;
 
 import org.apache.fineract.cn.cheque.AbstractChequeTest;
@@ -47,7 +47,7 @@ public class ChequeEventListener {
                                final String payload) {
         this.logger.debug("Cheques issued.");
     }
-/*
+
     @JmsListener(
             destination = EventConstants.DESTINATION,
             selector = EventConstants.SELECTOR_CHEQUE_TRANSACTION,
@@ -80,5 +80,6 @@ public class ChequeEventListener {
         this.logger.debug("Cheque transaction canceled.");
         this.eventRecorder.event(tenant, EventConstants.CHEQUE_TRANSACTION_CANCELED, payload, String.class);
     }
-*/
+
 }
+*/
\ No newline at end of file
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/CustomerEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/CustomerEventListener.java
index a28d83a..73d3d1d 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/CustomerEventListener.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/CustomerEventListener.java
@@ -24,7 +24,6 @@ import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
 import org.apache.fineract.cn.customer.api.v1.client.CustomerManager;
 import org.apache.fineract.cn.customer.api.v1.domain.ContactDetail;
 import org.apache.fineract.cn.customer.api.v1.domain.Customer;
-import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
 import org.apache.fineract.cn.notification.service.internal.service.EmailSender;
 import org.apache.fineract.cn.notification.service.internal.service.SMSSender;
 import org.springframework.beans.factory.annotation.Autowired;
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/DepositEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/DepositEventListener.java
index bcde220..fa66ace 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/DepositEventListener.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/DepositEventListener.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
+/*
 package org.apache.fineract.cn.deposit.listener;
 
 import org.apache.fineract.cn.deposit.api.v1.EventConstants;
@@ -45,7 +45,7 @@ public class DepositEventListener {
     public void onAccrual(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
                           final String payload) {
     }
-/*
+
     @JmsListener(
             destination = EventConstants.DESTINATION,
             selector = EventConstants.SELECTOR_DIVIDEND_DISTRIBUTION,
@@ -56,5 +56,6 @@ public class DepositEventListener {
         this.logger.debug("Dividend distributed for product {}.", payload);
         this.eventRecorder.event(tenant, EventConstants.DIVIDEND_DISTRIBUTION, payload, String.class);
     }
-*/
+
 }
+*/
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PortfolioEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PortfolioEventListener.java
index 88109a7..afbe490 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PortfolioEventListener.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PortfolioEventListener.java
@@ -17,14 +17,11 @@ package org.apache.fineract.cn.notification.service.listener;/*
  * under the License.
  */
 
-import org.apache.fineract.cn.individuallending.api.v1.events.IndividualLoanCommandEvent;
 import org.apache.fineract.cn.individuallending.api.v1.events.IndividualLoanEventConstants;
 import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
-import org.apache.fineract.cn.reporting.api.v1.domain.Header;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.jms.annotation.JmsListener;
 import org.springframework.stereotype.Component;
-import org.apache.fineract.cn.group.api.v1.EventConstants;
 import org.apache.fineract.cn.portfolio.api.v1.client.PortfolioManager;
 
 @SuppressWarnings("unused")


[fineract-cn-notifications] 05/36: update

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

awasum pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-notifications.git

commit 13e3802db61dc28190a2a0102376074048af75a0
Author: Ebenezer Graham <eg...@alustudent.com>
AuthorDate: Wed Jun 13 04:27:12 2018 +0400

    update
---
 .../api/v1/client/NotificationManager.class        | Bin 1462 -> 1474 bytes
 .../api/v1/domain/EmailConfiguration.class         | Bin 0 -> 3790 bytes
 .../api/v1/domain/SMSConfiguration.class           | Bin 0 -> 2972 bytes
 .../api/v1/client/NotificationManager.java         |   6 +--
 .../fineract/cn/notification/TestSample.java       |   2 +-
 .../db/migrations/mariadb/V1__initial_setup.sql    |  44 ++++++++++++++++++++-
 .../db/migrations/mariadb/V1__initial_setup.sql    |  44 ++++++++++++++++++++-
 7 files changed, 88 insertions(+), 8 deletions(-)

diff --git a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/client/NotificationManager.class b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/client/NotificationManager.class
index 3cb4555..741d5f5 100644
Binary files a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/client/NotificationManager.class and b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/client/NotificationManager.class differ
diff --git a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/EmailConfiguration.class b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/EmailConfiguration.class
new file mode 100644
index 0000000..dd410b5
Binary files /dev/null and b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/EmailConfiguration.class differ
diff --git a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/SMSConfiguration.class b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/SMSConfiguration.class
new file mode 100644
index 0000000..f7e3f18
Binary files /dev/null and b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/SMSConfiguration.class differ
diff --git a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/client/NotificationManager.java b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/client/NotificationManager.java
index 3c20ea3..6d0a7b1 100644
--- a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/client/NotificationManager.java
+++ b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/client/NotificationManager.java
@@ -34,7 +34,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
 public interface NotificationManager {
 
   @RequestMapping(
-          value = "/sample",
+          value = "/notification",
           method = RequestMethod.GET,
           produces = MediaType.ALL_VALUE,
           consumes = MediaType.APPLICATION_JSON_VALUE
@@ -42,14 +42,14 @@ public interface NotificationManager {
   List<Sample> findAllEntities();
 
   @RequestMapping(
-          value = "/sample/{identifier}",
+          value = "/notification/{identifier}",
           method = RequestMethod.GET,
           produces = MediaType.ALL_VALUE,
           consumes = MediaType.APPLICATION_JSON_VALUE)
   Sample getEntity(@PathVariable("identifier") final String identifier);
 
   @RequestMapping(
-      value = "/sample",
+      value = "/notification",
       method = RequestMethod.POST,
       produces = MediaType.APPLICATION_JSON_VALUE,
       consumes = MediaType.APPLICATION_JSON_VALUE
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/TestSample.java b/component-test/src/main/java/org/apache/fineract/cn/notification/TestSample.java
index 76db357..cc39439 100644
--- a/component-test/src/main/java/org/apache/fineract/cn/notification/TestSample.java
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/TestSample.java
@@ -21,7 +21,7 @@ package org.apache.fineract.cn.notification;
 import org.apache.fineract.cn.notification.api.v1.client.NotificationManager;
 import org.apache.fineract.cn.notification.api.v1.domain.Sample;
 import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
-import org.apache.fineract.cn.notification.service.NotificationConfiguration;
+import com.amazonaws.services.autoscaling.model.NotificationConfiguration;
 import java.util.List;
 import org.apache.commons.lang3.RandomStringUtils;
 import org.apache.fineract.cn.anubis.test.v1.TenantApplicationSecurityEnvironmentTestRule;
diff --git a/service/out/production/resources/db/migrations/mariadb/V1__initial_setup.sql b/service/out/production/resources/db/migrations/mariadb/V1__initial_setup.sql
index b68edad..ff9a61f 100644
--- a/service/out/production/resources/db/migrations/mariadb/V1__initial_setup.sql
+++ b/service/out/production/resources/db/migrations/mariadb/V1__initial_setup.sql
@@ -17,7 +17,47 @@
 -- under the License.
 --
 
-CREATE TABLE notification (
+-- -----------------------------------------------------
+-- Table `fineract-cn-notification`.`email_gateway_configurations`
+-- -----------------------------------------------------
+CREATE TABLE IF NOT EXISTS `fineract-cn-notification`.`email_gateway_configurations` (
+  `id` INT(11) NOT NULL AUTO_INCREMENT,
+  `identifer` VARCHAR(45) NULL DEFAULT NULL,
+  `host` VARCHAR(45) NOT NULL,
+  `port` VARCHAR(45) NOT NULL,
+  `username` VARCHAR(45) NOT NULL,
+  `app_id` VARCHAR(45) NOT NULL,
+  PRIMARY KEY (`id`))
+ENGINE = InnoDB
+DEFAULT CHARACTER SET = latin1;
+
+
+-- -----------------------------------------------------
+-- Table `fineract-cn-notification`.`sms_gateway_configurations`
+-- -----------------------------------------------------
+CREATE TABLE IF NOT EXISTS `fineract-cn-notification`.`sms_gateway_configurations` (
+  `id` INT(11) NOT NULL AUTO_INCREMENT,
+  `identifier` VARCHAR(45) NULL DEFAULT NULL,
+  `accountsid` VARCHAR(255) NOT NULL,
+  `auth_token` VARCHAR(255) NOT NULL,
+  `option` VARCHAR(45) NULL DEFAULT NULL,
+  PRIMARY KEY (`id`))
+ENGINE = InnoDB
+DEFAULT CHARACTER SET = latin1;
+
+
+-- -----------------------------------------------------
+-- Table `fineract-cn-notification`.`templates`
+-- -----------------------------------------------------
+CREATE TABLE IF NOT EXISTS `fineract-cn-notification`.`templates` (
+  `id` INT(11) NOT NULL AUTO_INCREMENT,
+  PRIMARY KEY (`id`))
+ENGINE = InnoDB
+DEFAULT CHARACTER SET = latin1;
+
+-- ------------------------------------------------------
+
+CREATE TABLE sample (
   id BIGINT NOT NULL AUTO_INCREMENT,
   identifier VARCHAR(8) NOT NULL,
   payload VARCHAR(512) NULL,
@@ -29,4 +69,4 @@ CREATE TABLE template_sample (
   identifier VARCHAR(8) NOT NULL,
   payload VARCHAR(512) NULL,
   CONSTRAINT template_sample_pk PRIMARY KEY (id)
-);
+);
\ No newline at end of file
diff --git a/service/src/main/resources/db/migrations/mariadb/V1__initial_setup.sql b/service/src/main/resources/db/migrations/mariadb/V1__initial_setup.sql
index b68edad..ff9a61f 100644
--- a/service/src/main/resources/db/migrations/mariadb/V1__initial_setup.sql
+++ b/service/src/main/resources/db/migrations/mariadb/V1__initial_setup.sql
@@ -17,7 +17,47 @@
 -- under the License.
 --
 
-CREATE TABLE notification (
+-- -----------------------------------------------------
+-- Table `fineract-cn-notification`.`email_gateway_configurations`
+-- -----------------------------------------------------
+CREATE TABLE IF NOT EXISTS `fineract-cn-notification`.`email_gateway_configurations` (
+  `id` INT(11) NOT NULL AUTO_INCREMENT,
+  `identifer` VARCHAR(45) NULL DEFAULT NULL,
+  `host` VARCHAR(45) NOT NULL,
+  `port` VARCHAR(45) NOT NULL,
+  `username` VARCHAR(45) NOT NULL,
+  `app_id` VARCHAR(45) NOT NULL,
+  PRIMARY KEY (`id`))
+ENGINE = InnoDB
+DEFAULT CHARACTER SET = latin1;
+
+
+-- -----------------------------------------------------
+-- Table `fineract-cn-notification`.`sms_gateway_configurations`
+-- -----------------------------------------------------
+CREATE TABLE IF NOT EXISTS `fineract-cn-notification`.`sms_gateway_configurations` (
+  `id` INT(11) NOT NULL AUTO_INCREMENT,
+  `identifier` VARCHAR(45) NULL DEFAULT NULL,
+  `accountsid` VARCHAR(255) NOT NULL,
+  `auth_token` VARCHAR(255) NOT NULL,
+  `option` VARCHAR(45) NULL DEFAULT NULL,
+  PRIMARY KEY (`id`))
+ENGINE = InnoDB
+DEFAULT CHARACTER SET = latin1;
+
+
+-- -----------------------------------------------------
+-- Table `fineract-cn-notification`.`templates`
+-- -----------------------------------------------------
+CREATE TABLE IF NOT EXISTS `fineract-cn-notification`.`templates` (
+  `id` INT(11) NOT NULL AUTO_INCREMENT,
+  PRIMARY KEY (`id`))
+ENGINE = InnoDB
+DEFAULT CHARACTER SET = latin1;
+
+-- ------------------------------------------------------
+
+CREATE TABLE sample (
   id BIGINT NOT NULL AUTO_INCREMENT,
   identifier VARCHAR(8) NOT NULL,
   payload VARCHAR(512) NULL,
@@ -29,4 +69,4 @@ CREATE TABLE template_sample (
   identifier VARCHAR(8) NOT NULL,
   payload VARCHAR(512) NULL,
   CONSTRAINT template_sample_pk PRIMARY KEY (id)
-);
+);
\ No newline at end of file


[fineract-cn-notifications] 04/36: additions

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

awasum pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-notifications.git

commit c53c922f5aaf03982f3b05a405ab2f788bce0308
Author: Ebenezer Graham <eg...@alustudent.com>
AuthorDate: Wed Jun 13 02:20:25 2018 +0400

    additions
---
 .../cn/notification/service/listener/PortfolioEventListener.java   | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PortfolioEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PortfolioEventListener.java
index afbe490..758e7f0 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PortfolioEventListener.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PortfolioEventListener.java
@@ -16,7 +16,7 @@ package org.apache.fineract.cn.notification.service.listener;/*
  * specific language governing permissions and limitations
  * under the License.
  */
-
+    /*
 import org.apache.fineract.cn.individuallending.api.v1.events.IndividualLoanEventConstants;
 import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -113,7 +113,7 @@ public class PortfolioEventListener {
                         final String payload) {
     }
 
-    /*
+
 
         @JmsListener(
                 subscription = EventConstants.DESTINATION,
@@ -144,5 +144,6 @@ public class PortfolioEventListener {
                                    final String payload) {
             this.eventRecorder.event(tenant, EventConstants.PUT_GROUP, payload, String.class);
         }
-         */
+
     }
+ */
\ No newline at end of file


[fineract-cn-notifications] 07/36: fixed the build

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

awasum pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-notifications.git

commit 9b71ab2a2fb65a0ac83276a56c2beaa086c98307
Author: Ebenezer Graham <eg...@alustudent.com>
AuthorDate: Thu Jun 14 23:06:09 2018 +0400

    fixed the build
---
 shared.gradle | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/shared.gradle b/shared.gradle
index a01bb15..4a65927 100644
--- a/shared.gradle
+++ b/shared.gradle
@@ -16,7 +16,7 @@
  */
 
 group 'org.apache.fineract.cn.notification'
-version '0.1.0.BUILD-SNAPSHOT'
+version '0.1.0-BUILD-SNAPSHOT'
 
 ext.versions = [
         fineractcnidentity      : '0.1.0-BUILD-SNAPSHOT',


[fineract-cn-notifications] 35/36: Merge remote-tracking branch 'ebenezergraham/permitted-feign-client-auth' into permitted-feign-client-auth

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

awasum pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-notifications.git

commit 7c85f01f9460815ea31dbc5022f0f99c04d74912
Merge: c96fd87 da55668
Author: Ebenezer Graham <eg...@alustudent.com>
AuthorDate: Thu Jun 6 03:06:31 2019 +0400

    Merge remote-tracking branch 'ebenezergraham/permitted-feign-client-auth' into permitted-feign-client-auth

 .travis.yml   | 6 +++++-
 shared.gradle | 5 +++--
 2 files changed, 8 insertions(+), 3 deletions(-)


[fineract-cn-notifications] 34/36: Merge branch 'develop' into permitted-feign-client-auth

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

awasum pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-notifications.git

commit da55668e78704753c53c6c0584b5ba3259db0e96
Merge: 76605f3 857f39c
Author: Ebenezer Graham <eb...@gmail.com>
AuthorDate: Thu Jun 6 03:06:04 2019 +0400

    Merge branch 'develop' into permitted-feign-client-auth

 .travis.yml   | 6 +++++-
 shared.gradle | 5 +++--
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --cc .travis.yml
index bffe9d0,0df6a41..a5ef68c
--- a/.travis.yml
+++ b/.travis.yml
@@@ -27,4 -27,9 +27,8 @@@ env
      - BUILD_SNAPSHOTS_BRANCH=develop
      - ARTIFACTORY_URL=https://mifos.jfrog.io/mifos
      - ARTIFACTORY_USER=travis-ci
-     - secure: "NHjl/OM08+Q8zRXH1GRowPmFTCarpZVgpfzvW23DnHI9kwPcAuvXHUs0liBD1FgUr3oFNlIQ8QknlWSAb2yI9CTs/+v6f7wl4t4Xx4t5gV0wFuffb3W7a41bE+m1OSUunleSGLKr4qGffjPQ63EUyAb4wrywg23iY12OHbQ3a988UvqoDg6IjK7NXKeLhkAXg6qLDRh9aHdM6NknFNUUIbYyX25PMTQj/SShDQ3xptOhrj1wOvKbBEBc2t2X4+0/3pKt36W0VwJt68HPL4YKwFNiErqSXDAmKFwcf/aZxlXAGreCYN9rNuGuP5RMpblY1bNi6sW2COG0IgTjNSvQgULfIb42GI68O9w0supKZ8OKQLnDJDIQ5q1A1rE54bqs1ey8WD9bmwc24NTUkmjKTqDMTMqCLE+gXLM7xnS2JNisOETfEfRughUFBvmHVPgnQ6fCDJ0brPWBO9Se/elPP/XWlWAk [...]
+     - secure: "NHjl/OM08+Q8zRXH1GRowPmFTCarpZVgpfzvW23DnHI9kwPcAuvXHUs0liBD1FgUr3oFNlIQ8QknlWSAb2yI9CTs/+v6f7wl4t4Xx4t5gV0wFuffb3W7a41bE+m1OSUunleSGLKr4qGffjPQ63EUyAb4wrywg23iY12OHbQ3a988UvqoDg6IjK7NXKeLhkAXg6qLDRh9aHdM6NknFNUUIbYyX25PMTQj/SShDQ3xptOhrj1wOvKbBEBc2t2X4+0/3pKt36W0VwJt68HPL4YKwFNiErqSXDAmKFwcf/aZxlXAGreCYN9rNuGuP5RMpblY1bNi6sW2COG0IgTjNSvQgULfIb42GI68O9w0supKZ8OKQLnDJDIQ5q1A1rE54bqs1ey8WD9bmwc24NTUkmjKTqDMTMqCLE+gXLM7xnS2JNisOETfEfRughUFBvmHVPgnQ6fCDJ0brPWBO9Se/elPP/XWlWAk [...]
+ 
+ after_failure:
+   - ./gradlew rat
 -  - cat api/build/reports/rat/rat-report.txt
 -
++  - cat api/build/reports/rat/rat-report.txt


[fineract-cn-notifications] 29/36: Merge pull request #14 from ebenezergraham/docker-file

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

awasum pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-notifications.git

commit 044d72f6acb0b569ec2e11d8cd4916ff8591ca9e
Merge: a202f47 4530fc0
Author: Ang3h Courage <co...@gmail.com>
AuthorDate: Wed May 29 17:01:43 2019 -0400

    Merge pull request #14 from ebenezergraham/docker-file
    
    Docker file to assemble a notification service image

 .dockerignore | 17 +++++++++++++++++
 Dockerfile    | 31 +++++++++++++++++++++++++++++++
 shared.gradle |  3 ++-
 3 files changed, 50 insertions(+), 1 deletion(-)


[fineract-cn-notifications] 18/36: Document the notifications service

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

awasum pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-notifications.git

commit 6063af7975bae9defbfd1bb6b108e82fda3d4fef
Author: Isaac Kamga <u2...@gmail.com>
AuthorDate: Wed Jan 2 21:52:06 2019 +0100

    Document the notifications service
---
 component-test/build.gradle                        |  11 ++
 ...fication.java => AbstractNotificationTest.java} |   8 +-
 .../cn/notification/EmailApiDocumentation.java     | 128 +++++++++++++++++++++
 .../cn/notification/SmsApiDocumentation.java       | 118 +++++++++++++++++++
 .../fineract/cn/notification/TestEmailService.java |   2 +-
 .../fineract/cn/notification/TestSMSService.java   |   3 +-
 .../service/listener/CustomerEventListener.java    |  18 +++
 7 files changed, 281 insertions(+), 7 deletions(-)

diff --git a/component-test/build.gradle b/component-test/build.gradle
index 2e29cf4..55f1d42 100644
--- a/component-test/build.gradle
+++ b/component-test/build.gradle
@@ -26,6 +26,7 @@ buildscript {
 
     dependencies {
         classpath ("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
+        classpath("org.asciidoctor:asciidoctor-gradle-plugin:1.5.3")
     }
 }
 
@@ -34,6 +35,7 @@ plugins {
     id("org.nosphere.apache.rat") version "0.3.1"
 }
 apply from: '../shared.gradle'
+apply plugin: 'org.asciidoctor.convert'
 
 dependencies {
     compile(
@@ -44,9 +46,18 @@ dependencies {
             [group: 'org.apache.fineract.cn', name: 'test', version: versions.frameworktest],
             [group: 'org.apache.fineract.cn', name: 'lang', version: versions.frameworklang],
             [group: 'org.springframework.boot', name: 'spring-boot-starter-test'],
+            [group: 'org.springframework.restdocs', name: 'spring-restdocs-mockmvc'],
+            [group: 'junit', name: 'junit', version: '4.12']
     )
 }
 
+asciidoctor {
+    sourceDir 'build/doc/asciidoc/'
+    outputDir 'build/doc/html5'
+    options backend: "html", doctype: "book"
+    attributes "source-highlighter": "highlightjs", 'snippets': file('build/doc/generated-snippets/')
+}
+
 publishing {
     publications {
         mavenJava(MavenPublication) {
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/TestNotification.java b/component-test/src/main/java/org/apache/fineract/cn/notification/AbstractNotificationTest.java
similarity index 95%
rename from component-test/src/main/java/org/apache/fineract/cn/notification/TestNotification.java
rename to component-test/src/main/java/org/apache/fineract/cn/notification/AbstractNotificationTest.java
index 6a6bf6b..545d4f5 100644
--- a/component-test/src/main/java/org/apache/fineract/cn/notification/TestNotification.java
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/AbstractNotificationTest.java
@@ -47,8 +47,8 @@ import java.security.interfaces.RSAPrivateKey;
 
 @RunWith(SpringRunner.class)
 @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT,
-		classes = {TestNotification.TestConfiguration.class})
-public class TestNotification extends SuiteTestEnvironment {
+		classes = {AbstractNotificationTest.TestConfiguration.class})
+public class AbstractNotificationTest extends SuiteTestEnvironment {
 	
 	@ClassRule
 	public final static TenantDataStoreContextTestRule tenantDataStoreContext = TenantDataStoreContextTestRule.forRandomTenantName(cassandraInitializer, mariaDBInitializer);
@@ -65,13 +65,13 @@ public class TestNotification extends SuiteTestEnvironment {
 	public final TenantApplicationSecurityEnvironmentTestRule tenantApplicationSecurityEnvironment
 			= new TenantApplicationSecurityEnvironmentTestRule(testEnvironment, this::waitForInitialize);
 	
-	public TestNotification() {
+	public AbstractNotificationTest() {
 		super();
 	}
 	
 	@Before
 	public void prepTest() {
-		userContext = tenantApplicationSecurityEnvironment.createAutoUserContext(TestNotification.TEST_USER);
+		userContext = tenantApplicationSecurityEnvironment.createAutoUserContext(AbstractNotificationTest.TEST_USER);
 		final RSAPrivateKey tenantPrivateKey = tenantApplicationSecurityEnvironment.getSystemSecurityEnvironment().tenantPrivateKey();
 		logger.info("tenantPrivateKey = {}", tenantPrivateKey);
 	}
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/EmailApiDocumentation.java b/component-test/src/main/java/org/apache/fineract/cn/notification/EmailApiDocumentation.java
new file mode 100644
index 0000000..1632f0c
--- /dev/null
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/EmailApiDocumentation.java
@@ -0,0 +1,128 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification;
+
+import com.google.gson.Gson;
+import org.apache.commons.lang.RandomStringUtils;
+import org.apache.fineract.cn.notification.api.v1.client.NotificationManager;
+import org.apache.fineract.cn.notification.api.v1.domain.EmailConfiguration;
+import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
+import org.apache.fineract.cn.notification.util.DomainObjectGenerator;
+import org.apache.fineract.cn.test.listener.EventRecorder;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
+import org.springframework.restdocs.JUnitRestDocumentation;
+import org.springframework.test.web.servlet.MockMvc;
+import org.springframework.test.web.servlet.setup.MockMvcBuilders;
+import org.springframework.web.context.WebApplicationContext;
+
+import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document;
+import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.documentationConfiguration;
+import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.get;
+import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.post;
+import static org.springframework.restdocs.operation.preprocess.Preprocessors.preprocessRequest;
+import static org.springframework.restdocs.operation.preprocess.Preprocessors.prettyPrint;
+import static org.springframework.restdocs.payload.PayloadDocumentation.*;
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
+
+public class EmailApiDocumentation extends AbstractNotificationTest {
+  @Rule
+  public final JUnitRestDocumentation restDocumentation = new JUnitRestDocumentation("build/doc/generated-snippets/document-email");
+
+  @Autowired
+  private WebApplicationContext context;
+
+  private MockMvc mockMvc;
+
+  @Autowired
+  private NotificationManager notificationManager;
+
+  @Autowired
+  private EventRecorder eventRecorder;
+
+  @Before
+  public void setUp() {
+
+    this.mockMvc = MockMvcBuilders.webAppContextSetup(this.context)
+            .apply(documentationConfiguration(this.restDocumentation))
+            .build();
+  }
+
+  @Test
+  public void documentCreateEmailConfiguration() throws Exception {
+    final EmailConfiguration emailConfiguration = DomainObjectGenerator.emailConfiguration();
+
+    Gson gson = new Gson();
+    this.mockMvc.perform(post("/notification/email/create")
+            .accept(MediaType.APPLICATION_JSON_VALUE)
+            .contentType(MediaType.APPLICATION_JSON_VALUE)
+            .content(gson.toJson(emailConfiguration)))
+            .andExpect(status().isAccepted())
+            .andDo(document("document-create-emailconfiguration", preprocessRequest(prettyPrint()),
+                    requestFields(
+                            fieldWithPath("identifier").description("EmailConfiguration's identifier"),
+                            fieldWithPath("host").description("EmailConfiguration's host"),
+                            fieldWithPath("port").description("EmailConfiguration's port"),
+                            fieldWithPath("protocol").description("EmailConfiguration's protocol"),
+                            fieldWithPath("username").description("EmailConfiguration's username"),
+                            fieldWithPath("app_password").description("EmailConfiguration's app_password"),
+                            fieldWithPath("smtp_auth").description("EmailConfiguration's smtp authentication"),
+                            fieldWithPath("start_tls").description("EmailConfiguration's start tls"),
+                            fieldWithPath("state").description("EmailConfiguration's state")
+                    )
+            ));
+  }
+
+  @Test
+  public void documentFindEmailConfiguration() throws Exception {
+    final EmailConfiguration emailConfiguration = EmailConfiguration.create("emailtesty",
+            "smtp.google.com",
+            "1233",
+            "smtp",
+            "example",
+            RandomStringUtils.randomAlphanumeric(16),
+            "true",
+            "true",
+            "ACTIVE");
+
+    this.notificationManager.createEmailConfiguration(emailConfiguration);
+    eventRecorder.wait(NotificationEventConstants.POST_EMAIL_CONFIGURATION, EmailConfiguration.class);
+
+    this.mockMvc.perform(get("/notification/email/" + emailConfiguration.getIdentifier())
+            .accept(MediaType.ALL_VALUE)
+            .contentType(MediaType.APPLICATION_JSON_VALUE))
+            .andExpect(status().isOk())
+            .andDo(document("document-find-emailconfiguration", preprocessRequest(prettyPrint()),
+                    responseFields(
+                            fieldWithPath("identifier").description("EmailConfiguration's identifier"),
+                            fieldWithPath("host").description("EmailConfiguration's host"),
+                            fieldWithPath("port").description("EmailConfiguration's port"),
+                            fieldWithPath("protocol").description("EmailConfiguration's protocol"),
+                            fieldWithPath("username").description("EmailConfiguration's username"),
+                            fieldWithPath("app_password").description("EmailConfiguration's app_password"),
+                            fieldWithPath("smtp_auth").description("EmailConfiguration's smtp authentication"),
+                            fieldWithPath("start_tls").description("EmailConfiguration's start tls"),
+                            fieldWithPath("state").description("EmailConfiguration's state")
+                    )
+            ));
+  }
+}
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/SmsApiDocumentation.java b/component-test/src/main/java/org/apache/fineract/cn/notification/SmsApiDocumentation.java
new file mode 100644
index 0000000..1655289
--- /dev/null
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/SmsApiDocumentation.java
@@ -0,0 +1,118 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification;
+
+import com.google.gson.Gson;
+import org.apache.commons.lang.RandomStringUtils;
+import org.apache.fineract.cn.notification.api.v1.client.NotificationManager;
+import org.apache.fineract.cn.notification.api.v1.domain.SMSConfiguration;
+import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
+import org.apache.fineract.cn.notification.util.DomainObjectGenerator;
+import org.apache.fineract.cn.test.listener.EventRecorder;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
+import org.springframework.restdocs.JUnitRestDocumentation;
+import org.springframework.test.web.servlet.MockMvc;
+import org.springframework.test.web.servlet.setup.MockMvcBuilders;
+import org.springframework.web.context.WebApplicationContext;
+
+import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document;
+import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.documentationConfiguration;
+import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.post;
+import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.get;
+import static org.springframework.restdocs.operation.preprocess.Preprocessors.preprocessRequest;
+import static org.springframework.restdocs.operation.preprocess.Preprocessors.prettyPrint;
+import static org.springframework.restdocs.payload.PayloadDocumentation.*;
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
+
+public class SmsApiDocumentation extends AbstractNotificationTest {
+  @Rule
+  public final JUnitRestDocumentation restDocumentation = new JUnitRestDocumentation("build/doc/generated-snippets/document-sms");
+
+  @Autowired
+  private WebApplicationContext context;
+
+  private MockMvc mockMvc;
+
+  @Autowired
+  private NotificationManager notificationManager;
+
+  @Autowired
+  private EventRecorder eventRecorder;
+
+  @Before
+  public void setUp() {
+
+    this.mockMvc = MockMvcBuilders.webAppContextSetup(this.context)
+            .apply(documentationConfiguration(this.restDocumentation))
+            .build();
+  }
+
+  @Test
+  public void documentCreateSMSConfiguration() throws Exception {
+    final SMSConfiguration smsConfiguration = DomainObjectGenerator.smsConfiguration();
+
+    Gson gson = new Gson();
+    this.mockMvc.perform(post("/notification/sms/create")
+            .accept(MediaType.APPLICATION_JSON_VALUE)
+            .contentType(MediaType.APPLICATION_JSON_VALUE)
+            .content(gson.toJson(smsConfiguration)))
+            .andExpect(status().isAccepted())
+            .andDo(document("document-create-smsconfiguration", preprocessRequest(prettyPrint()),
+                    requestFields(
+                            fieldWithPath("identifier").description("SMSConfiguration's identifier"),
+                            fieldWithPath("auth_token").description("SMSConfiguration's auth_token"),
+                            fieldWithPath("account_sid").description("SMSConfiguration's account_sid"),
+                            fieldWithPath("sender_number").description("Sender's number"),
+                            fieldWithPath("state").description("SMSConfiguration's state")
+                    )
+            ));
+  }
+
+  @Test
+  public void documentFindSMSConfiguration() throws Exception {
+
+    final SMSConfiguration smsConfiguration = SMSConfiguration.create(RandomStringUtils.randomAlphanumeric(4),
+            RandomStringUtils.randomAlphanumeric(8),
+            RandomStringUtils.randomAlphanumeric(8),
+            "+309483932",
+            "ACTIVE");
+
+    this.notificationManager.createSMSConfiguration(smsConfiguration);
+    this.eventRecorder.wait(NotificationEventConstants.POST_SMS_CONFIGURATION, SMSConfiguration.class);
+
+    this.mockMvc.perform(get("/notification/sms/" + smsConfiguration.getIdentifier())
+            .accept(MediaType.ALL_VALUE)
+            .contentType(MediaType.APPLICATION_JSON_VALUE))
+            .andExpect(status().isOk())
+            .andDo(document("document-find-smsconfiguration", preprocessRequest(prettyPrint()),
+                    responseFields(
+                            fieldWithPath("type").description("SMSConfiguration's type"),
+                            fieldWithPath("identifier").description("SMSConfiguration's identifier"),
+                            fieldWithPath("auth_token").description("SMSConfiguration's auth_token"),
+                            fieldWithPath("account_sid").description("SMSConfiguration's account_sid"),
+                            fieldWithPath("sender_number").description("Sender's number"),
+                            fieldWithPath("state").description("SMSConfiguration's state")
+                    )
+            ));
+  }
+}
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/TestEmailService.java b/component-test/src/main/java/org/apache/fineract/cn/notification/TestEmailService.java
index 90f73c7..2855f68 100644
--- a/component-test/src/main/java/org/apache/fineract/cn/notification/TestEmailService.java
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/TestEmailService.java
@@ -32,7 +32,7 @@ import org.junit.Assert;
 import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 
-public class TestEmailService extends TestNotification {
+public class TestEmailService extends AbstractNotificationTest {
 	
 	private final String configIdentifier = "Gmail";
 	@Autowired
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/TestSMSService.java b/component-test/src/main/java/org/apache/fineract/cn/notification/TestSMSService.java
index e25a3e8..33536ed 100644
--- a/component-test/src/main/java/org/apache/fineract/cn/notification/TestSMSService.java
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/TestSMSService.java
@@ -23,7 +23,6 @@ import org.apache.fineract.cn.api.util.NotFoundException;
 import org.apache.fineract.cn.customer.api.v1.client.CustomerNotFoundException;
 import org.apache.fineract.cn.notification.api.v1.client.ConfigurationNotFoundException;
 import org.apache.fineract.cn.notification.api.v1.client.NotificationManager;
-import org.apache.fineract.cn.notification.api.v1.domain.EmailConfiguration;
 import org.apache.fineract.cn.notification.api.v1.domain.SMSConfiguration;
 import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
 import org.apache.fineract.cn.notification.service.internal.service.NotificationService;
@@ -33,7 +32,7 @@ import org.junit.Assert;
 import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 
-public class TestSMSService extends TestNotification {
+public class TestSMSService extends AbstractNotificationTest {
 	
 	@Autowired
 	private NotificationService notificationService;
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/CustomerEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/CustomerEventListener.java
index d1cb4d6..78889a3 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/CustomerEventListener.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/CustomerEventListener.java
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
     /*
      * Licensed to the Apache Software Foundation (ASF) under one
      * or more contributor license agreements.  See the NOTICE file


[fineract-cn-notifications] 24/36: Added travis configurations

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

awasum pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-notifications.git

commit f3deeaab97b23be491a4cf012397a369d5aa1ce6
Author: Ebenezer Graham <eg...@alustudent.com>
AuthorDate: Thu May 9 17:24:06 2019 +0400

    Added travis configurations
---
 .dockerignore               | 17 +++++++++++
 .gitignore                  |  8 +++--
 .travis.yml                 | 30 +++++++++++++++++++
 Dockerfile                  | 31 ++++++++++++++++++++
 NOTICE.txt                  |  4 +--
 README.md                   |  2 +-
 api/build.gradle            |  4 +--
 build.gradle                |  8 +++++
 component-test/build.gradle |  4 ++-
 local.properties            |  9 ------
 service/build.gradle        |  6 ++--
 shared.gradle               | 22 +++++++++++++-
 travis.sh                   | 71 +++++++++++++++++++++++++++++++++++++++++++++
 13 files changed, 196 insertions(+), 20 deletions(-)

diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000..8d88495
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,17 @@
+api/
+component-test/
+gradle/
+gradlew.bat
+LICENSE
+README.md
+settings.gradle
+build.gradle
+docs/
+gradlew
+HEADER
+NOTICE.txt
+service/
+.git/
+.gradle/
+.gitignore
+shared.gradle
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index f295929..f74c5e4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,8 +2,12 @@
 .idea
 build/
 target/
-**/out/
-**/build/
+logs
+**/out
+**/build
+**/logs
+**/target
+local.properties
 
 # Ignore Gradle GUI config
 gradle-app.setting
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..06d4b4d
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,30 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+language: java
+sudo: false
+jdk:
+- openjdk8
+install: true
+script: "./travis.sh"
+env:
+  global:
+    - BUILD_SNAPSHOTS_BRANCH=develop
+    - ARTIFACTORY_URL=https://mifos.jfrog.io/mifos
+    - ARTIFACTORY_USER=travis-ci
+    - secure: "E5IyImya7x5cHLB1vGLGIJUC1M+7RxKZivb5iUM+RR/xW39/7b4Qd3JeX4yBUeiPjf9lNMMxcGVyqI/4htT95++WCNc0u6OoxwGgxQEB9JHE8OWecaYgK4uLO7+651XF4DNbSiH3NVmc2b8Q0c0jBlu3MHAeEUIQ6BOiTXSsqnewtWAW0XETBooNmo2nTqZyKvzez0698oJuuYfZeFbqm8wJ9rIwtptyJluRzqcTlzw1cH/CvcIskLDmITVqbuZxAW59j1BqUnZNQpuOFZ692iqntdxq78CxliCG1MEYy4zWY8xcIWNVp28OKkMULXdi+V80oZXY4TyTwZfH6e2oZFz6/X9GpNNR6EwaHV0tT3wZi2NrkoBokD8bEBxQubIgxDCaDAFG9VMByC+++nwm0GJzerKBV4CpNSy/93XLrFAQ8+lOVauVtkVHuzFBWleLLQYcBGAXRz/C/UF4/m0m014jvD7vT [...]
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..ef2e091
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,31 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+FROM openjdk:8-jdk-alpine
+
+ARG notification_port=2033
+
+ENV server.max-http-header-size=16384 \
+    cassandra.clusterName="Test Cluster" \
+    server.port=$notification_port \
+    system.initialclientid=service-runner
+
+WORKDIR /tmp
+COPY notification-service-boot-0.1.0-BUILD-SNAPSHOT.jar .
+
+CMD ["java", "-jar", "customer-service-boot-0.1.0-BUILD-SNAPSHOT.jar"]
diff --git a/NOTICE.txt b/NOTICE.txt
index 41f69b8..6406f7f 100644
--- a/NOTICE.txt
+++ b/NOTICE.txt
@@ -1,5 +1,5 @@
 Apache Fineract CN Notification
-Copyright [2017-2018] The Apache Software Foundation
+Copyright [2017-2019] The Apache Software Foundation
 
 This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
\ No newline at end of file
+The Apache Software Foundation (http://www.apache.org/).
diff --git a/README.md b/README.md
index e94a392..7528145 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# Apache Fineract CN Notification
+# Apache Fineract CN Notification [![Build Status](https://api.travis-ci.com/apache/fineract-cn-notification.svg?branch=develop)](https://travis-ci.com/apache/fineract-cn-notification) 
 
 This mircroservice contains all the functionalities for SMS and Email Notification
 
diff --git a/api/build.gradle b/api/build.gradle
index 5b9924a..f109634 100644
--- a/api/build.gradle
+++ b/api/build.gradle
@@ -28,6 +28,7 @@ buildscript {
 plugins {
     id "com.github.hierynomus.license" version "0.13.1"
     id("org.nosphere.apache.rat") version "0.3.1"
+    id "com.jfrog.artifactory" version "4.9.5"
 }
 
 apply from: '../shared.gradle'
@@ -51,7 +52,6 @@ publishing {
             from components.java
             groupId project.group
             artifactId project.name
-            version project.version
-        }
+            version project.findProperty('externalVersion') ?: project.version         }
     }
 }
diff --git a/build.gradle b/build.gradle
index ca2370a..aa35679 100644
--- a/build.gradle
+++ b/build.gradle
@@ -39,6 +39,14 @@ task publishToMavenLocal {
     dependsOn publishComponentTestToMavenLocal
 }
 
+task artifactoryPublish {
+    group 'all'
+    dependsOn publishToMavenLocal
+    dependsOn gradle.includedBuild('api').task(':artifactoryPublish')
+    dependsOn gradle.includedBuild('service').task(':artifactoryPublish')
+    dependsOn gradle.includedBuild('component-test').task(':artifactoryPublish')
+}
+
 task prepareForTest {
     group 'all'
     dependsOn publishToMavenLocal
diff --git a/component-test/build.gradle b/component-test/build.gradle
index 3998d6c..c0aaace 100644
--- a/component-test/build.gradle
+++ b/component-test/build.gradle
@@ -34,6 +34,7 @@ buildscript {
 plugins {
     id "com.github.hierynomus.license" version "0.13.1"
     id("org.nosphere.apache.rat") version "0.3.1"
+    id "com.jfrog.artifactory" version "4.9.5"
 }
 apply from: '../shared.gradle'
 apply plugin: 'org.asciidoctor.convert'
@@ -68,8 +69,9 @@ asciidoctor {
 
 publishing {
     publications {
-        mavenJava(MavenPublication) {
+        componentTest(MavenPublication) {
             from components.java
+            version project.findProperty('externalVersion') ?: project.version
         }
     }
 }
diff --git a/local.properties b/local.properties
deleted file mode 100644
index 3fea7c3..0000000
--- a/local.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-## This file must *NOT* be checked into Version Control Systems,
-# as it contains information specific to your local configuration.
-#
-# Location of the SDK. This is only used by Gradle.
-# For customization when using a Version Control System, please read the
-# header note.
-#Sat Dec 01 15:14:19 MUT 2018
-ndk.dir=/home/ebenezergraham/Android/Sdk/ndk-bundle
-sdk.dir=/home/ebenezergraham/Android/Sdk
diff --git a/service/build.gradle b/service/build.gradle
index 3bf06c1..6b8513e 100644
--- a/service/build.gradle
+++ b/service/build.gradle
@@ -32,6 +32,8 @@ buildscript {
 plugins {
     id "com.github.hierynomus.license" version "0.13.1"
     id("org.nosphere.apache.rat") version "0.3.1"
+    id "com.jfrog.artifactory" version "4.9.5"
+
 }
 
 apply from: '../shared.gradle'
@@ -77,14 +79,14 @@ publishing {
             from components.java
             groupId project.group
             artifactId project.name
-            version project.version
+            version project.findProperty('externalVersion') ?: project.version
         }
         bootService(MavenPublication) {
             // "boot" jar
             artifact ("$buildDir/libs/$project.name-$version-boot.jar")
             groupId project.group
             artifactId ("$project.name-boot")
-            version project.version
+            version project.findProperty('externalVersion') ?: project.version
         }
     }
 }
diff --git a/shared.gradle b/shared.gradle
index 426ccf2..c270323 100644
--- a/shared.gradle
+++ b/shared.gradle
@@ -55,6 +55,8 @@ tasks.withType(JavaCompile) {
 repositories {
     jcenter()
     mavenLocal()
+    maven { url 'https://mifos.jfrog.io/mifos/libs-snapshot/' }
+
 }
 
 dependencyManagement {
@@ -85,6 +87,22 @@ jar {
     duplicatesStrategy = DuplicatesStrategy.EXCLUDE
 }
 
+artifactory {
+    contextUrl = System.getenv("ARTIFACTORY_URL")
+    publish {
+        repository {
+            repoKey = project.findProperty('artifactoryRepoKey')
+            username = System.getenv("ARTIFACTORY_USER")
+            password = System.getenv("ARTIFACTORY_PASSWORD")
+        }
+
+        defaults {
+            publications ('api', 'componentTest', 'service', 'bootService')
+        }
+    }
+}
+artifactoryPublish.dependsOn('clean','publishToMavenLocal')
+
 license {
     header rootProject.file('../HEADER')
     strictCheck true
@@ -105,7 +123,9 @@ rat {
             "**/build/**",
             "gradlew",
             "gradlew.bat",
-            "README.md"
+            "README.md",
+            "**/.dockerignore/**"
+
     ]
 }
 
diff --git a/travis.sh b/travis.sh
new file mode 100755
index 0000000..03a75ee
--- /dev/null
+++ b/travis.sh
@@ -0,0 +1,71 @@
+#!/usr/bin/env bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# Documentation: https://cwiki.apache.org/confluence/display/FINERACT/Fineract-CN+Artifactory
+
+#Exit immediately if a command exits with a non-zero status.
+set -e
+EXIT_STATUS=0
+
+# Builds and Publishes a SNAPSHOT
+function build_snapshot() {
+  echo -e "Building and publishing a snapshot out of branch [$TRAVIS_BRANCH]"
+  ./gradlew -PartifactoryRepoKey=libs-snapshot-local -DbuildInfo.build.number=${TRAVIS_COMMIT::7} artifactoryPublish --stacktrace || EXIT_STATUS=$?
+}
+
+# Builds a Pull Request
+function build_pullrequest() {
+  echo -e "Building pull request #$TRAVIS_PULL_REQUEST of branch [$TRAVIS_BRANCH]. Won't publish anything to Artifactory."
+  ./gradlew publishToMavenLocal rat || EXIT_STATUS=$?
+}
+
+# For other branches we need to add branch name as prefix
+function build_otherbranch() {
+  echo -e "Building a snapshot out of branch [$TRAVIS_BRANCH] and publishing it with prefix '${TRAVIS_BRANCH}-SNAPSHOT'"
+  ./gradlew -PartifactoryRepoKey=libs-snapshot-local -DbuildInfo.build.number=${TRAVIS_COMMIT::7} -PexternalVersion=${TRAVIS_BRANCH}-SNAPSHOT artifactoryPublish --stacktrace || EXIT_STATUS=$?
+}
+
+# Builds and Publishes a Tag
+function build_tag() {
+  echo -e "Building tag [$TRAVIS_TAG] and publishing it as a release"
+  ./gradlew -PartifactoryRepoKey=libs-release-local -PexternalVersion=$TRAVIS_TAG artifactoryPublish --stacktrace || EXIT_STATUS=$?
+
+}
+
+echo -e "TRAVIS_BRANCH=$TRAVIS_BRANCH"
+echo -e "TRAVIS_TAG=$TRAVIS_TAG"
+echo -e "TRAVIS_COMMIT=${TRAVIS_COMMIT::7}"
+echo -e "TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST"
+
+# Build Logic
+if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
+  build_pullrequest
+elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" != "$BUILD_SNAPSHOTS_BRANCH" ] && [ "$TRAVIS_TAG" == "" ]  ; then
+  build_otherbranch
+elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "$BUILD_SNAPSHOTS_BRANCH" ] && [ "$TRAVIS_TAG" == "" ] ; then
+  build_snapshot
+elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then
+  build_tag
+else
+  echo -e "WARN: Unexpected env variable values => Branch [$TRAVIS_BRANCH], Tag [$TRAVIS_TAG], Pull Request [#$TRAVIS_PULL_REQUEST]"
+  ./gradlew clean build
+fi
+
+exit ${EXIT_STATUS}


[fineract-cn-notifications] 31/36: Merge pull request #13 from ebenezergraham/FINCN-157

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

awasum pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-notifications.git

commit 857f39c8fe3f9c3ba92825b52a96d390a12d13a0
Merge: 044d72f 5a04ac3
Author: Awasum Yannick <aw...@apache.org>
AuthorDate: Mon Jun 3 20:32:56 2019 +0100

    Merge pull request #13 from ebenezergraham/FINCN-157
    
    Adding after_failure procedure to CI

 .travis.yml   |  5 +++++
 shared.gradle | 43 ++++++++++++++++++++++---------------------
 2 files changed, 27 insertions(+), 21 deletions(-)

diff --cc shared.gradle
index 033a13f,e9f8108..0f368bb
--- a/shared.gradle
+++ b/shared.gradle
@@@ -120,8 -120,8 +120,9 @@@ rat 
              "**/build/**",
              "gradlew",
              "gradlew.bat",
 -            "README.md"
 +            "README.md",
 +            ".dockerignore"
      ]
+     plainOutput = true
  }
  


[fineract-cn-notifications] 22/36: Merge branch 'dev-merge' into permitted-feign-client-auth

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

awasum pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-notifications.git

commit e4e258567c9746098194a9e62584f3eec7a2132a
Merge: 6b136f4 3dc6d31
Author: Ebenezer Graham <eg...@alustudent.com>
AuthorDate: Thu May 9 06:16:20 2019 +0400

    Merge branch 'dev-merge' into permitted-feign-client-auth

 component-test/build.gradle                        |   7 ++
 ...fication.java => AbstractNotificationTest.java} |   8 +-
 .../cn/notification/EmailApiDocumentation.java     | 128 +++++++++++++++++++++
 .../cn/notification/SmsApiDocumentation.java       | 118 +++++++++++++++++++
 .../fineract/cn/notification/TestEmailService.java |   2 +-
 .../fineract/cn/notification/TestSMSService.java   |   3 +-
 6 files changed, 259 insertions(+), 7 deletions(-)

diff --cc component-test/build.gradle
index 931282e,55f1d42..3998d6c
--- a/component-test/build.gradle
+++ b/component-test/build.gradle
@@@ -48,17 -47,17 +48,24 @@@ dependencies 
              [group: 'org.apache.fineract.cn', name: 'lang', version: versions.frameworklang],
              [group: 'org.springframework.boot', name: 'spring-boot-starter-test'],
              [group: 'org.springframework.restdocs', name: 'spring-restdocs-mockmvc'],
 -            [group: 'junit', name: 'junit', version: '4.12']
 +            [group: 'junit', name: 'junit', version: versions.junit]
      )
  }
 +asciidoctor {
 +    sourceDir 'build/doc/asciidoc/'
 +    outputDir 'build/doc/html5'
 +    options backend: "html", doctype: "book"
 +    attributes "source-highlighter": "highlightjs",
 +            'snippets': file('build/doc/generated-snippets/')
 +}
  
+ asciidoctor {
+     sourceDir 'build/doc/asciidoc/'
+     outputDir 'build/doc/html5'
+     options backend: "html", doctype: "book"
+     attributes "source-highlighter": "highlightjs", 'snippets': file('build/doc/generated-snippets/')
+ }
+ 
  publishing {
      publications {
          mavenJava(MavenPublication) {
diff --cc component-test/src/main/java/org/apache/fineract/cn/notification/TestEmailService.java
index a30f8f7,2855f68..65adbc6
--- a/component-test/src/main/java/org/apache/fineract/cn/notification/TestEmailService.java
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/TestEmailService.java
@@@ -34,9 -32,9 +34,9 @@@ import org.junit.Assert
  import org.junit.Test;
  import org.springframework.beans.factory.annotation.Autowired;
  
- public class TestEmailService extends TestNotification {
+ public class TestEmailService extends AbstractNotificationTest {
  	
 -	private final String configIdentifier = "Gmail";
 +	final EmailConfiguration emailConfiguration;
  	@Autowired
  	private NotificationService notificationService;
  	@Autowired
diff --cc component-test/src/main/java/org/apache/fineract/cn/notification/TestSMSService.java
index 06af8c0,33536ed..315c79b
--- a/component-test/src/main/java/org/apache/fineract/cn/notification/TestSMSService.java
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/TestSMSService.java
@@@ -34,15 -32,14 +33,15 @@@ import org.junit.Assert
  import org.junit.Test;
  import org.springframework.beans.factory.annotation.Autowired;
  
- public class TestSMSService extends TestNotification {
+ public class TestSMSService extends AbstractNotificationTest {
  	
 +	final SMSConfiguration smsConfiguration;
  	@Autowired
  	private NotificationService notificationService;
 -	
 +	@Autowired
 +	private SMSService smsService;
  	@Autowired
  	private NotificationManager notificationManager;
 -	
  	@Autowired
  	private EventRecorder eventRecorder;
  	


[fineract-cn-notifications] 17/36: Merge pull request #6 from ebenezergraham/develop

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

awasum pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-notifications.git

commit 425c6ae0f5d81620419c32d29a5bed2fe880459d
Merge: f3296bb 6b1b5f7
Author: Awasum Yannick <ya...@gmail.com>
AuthorDate: Mon Sep 17 10:10:36 2018 +0100

    Merge pull request #6 from ebenezergraham/develop
    
    Increment 2

 .gitignore                                         |   10 +-
 .travis.yml                                        |   49 -
 .../notification/api/v1/PermittableGroupIds.class  |  Bin 328 -> 261 bytes
 .../api/v1/client/IamATeapotException.class        |  Bin 392 -> 0 bytes
 .../api/v1/client/NotificationManager.class        |  Bin 1474 -> 1940 bytes
 .../api/v1/domain/EmailConfiguration.class         |  Bin 3790 -> 4391 bytes
 .../notification/api/v1/domain/Notification.class  |  Bin 1820 -> 0 bytes
 .../api/v1/domain/SMSConfiguration.class           |  Bin 2972 -> 3305 bytes
 .../cn/notification/api/v1/domain/Sample.class     |  Bin 1752 -> 0 bytes
 .../api/v1/events/NotificationEventConstants.class |  Bin 666 -> 1609 bytes
 .../notification/api/v1/PermittableGroupIds.java   |    3 +-
 ...on.java => ConfigurationNotFoundException.java} |    9 +-
 .../api/v1/client/NotificationManager.java         |   80 +-
 .../api/v1/domain/EmailConfiguration.java          |  283 +-
 .../cn/notification/api/v1/domain/EmailPage.java   |   81 +
 .../cn/notification/api/v1/domain/Event.java       |   69 +
 .../api/v1/domain/SMSConfiguration.java            |  202 +-
 .../cn/notification/api/v1/domain/SMSPage.java     |   81 +
 .../cn/notification/api/v1/domain/Sample.java      |   72 -
 .../api/v1/events/NotificationEventConstants.java  |   30 +-
 ...SampleTest.java => EmailConfigurationTest.java} |   69 +-
 .../domain/{SampleTest.java => EmailPageTest.java} |   71 +-
 .../v1/domain/{SampleTest.java => EventTest.java}  |   59 +-
 .../api/v1/domain/SMSConfigurationTest.java        |   65 +
 .../domain/{SampleTest.java => SMSPageTest.java}   |   66 +-
 .../cn/notification/api/v1/domain}/TestSuite.java  |   11 +-
 component-test/build.gradle                        |    2 +-
 .../cn/notification/SuiteTestEnvironment.java      |   24 +-
 .../fineract/cn/notification/TestEmailService.java |   96 +
 .../fineract/cn/notification/TestNotification.java |  112 +
 .../fineract/cn/notification/TestSMSService.java   |  102 +
 .../fineract/cn/notification/TestSample.java       |  137 -
 .../apache/fineract/cn/notification/TestSuite.java |    4 +-
 .../listener/MigrationEventListener.java           |   36 +-
 ...istener.java => NotificationEventListener.java} |   48 +-
 .../notification/util/DomainObjectGenerator.java   |   53 +
 service/build.gradle                               |   15 +-
 service/out/production/resources/application.yml   |   26 +-
 .../db/migrations/mariadb/V1__initial_setup.sql    |   74 +-
 .../service/NotificationApplication.java           |   16 +-
 .../service/NotificationConfiguration.java         |  131 +-
 .../cn/notification/service/ServiceConstants.java  |    9 +-
 ...d.java => CreateEmailConfigurationCommand.java} |   40 +-
 ...and.java => CreateSMSConfigurationCommand.java} |   40 +-
 .../internal/command/InitializeServiceCommand.java |   18 +-
 .../{SampleCommand.java => PostSMSCommand.java}    |   40 +-
 .../handler/EmailConfigurationAggregate.java       |   57 +
 .../internal/command/handler/EventsAggregate.java  |   49 +
 .../command/handler/MigrationAggregate.java        |   63 +-
 .../command/handler/SMSConfigurationAggregate.java |   56 +
 .../internal/command/handler/SampleAggregate.java  |   68 -
 .../internal/mapper/EmailConfigurationMapper.java  |   59 +-
 .../internal/mapper/SMSConfigurationMapper.java    |   50 +-
 .../service/internal/mapper/SampleMapper.java      |   46 -
 .../repository/EmailGatewayConfiguration.java      |  124 -
 .../EmailGatewayConfigurationEntity.java           |  134 +
 .../EmailGatewayConfigurationRepository.java       |    9 +-
 .../repository/SMSGatewayConfiguration.java        |   94 -
 .../repository/SMSGatewayConfigurationEntity.java  |   94 +
 .../SMSGatewayConfigurationRepository.java         |    9 +-
 .../internal/repository/SampleJpaEntity.java       |   64 -
 .../internal/repository/TemplateEntity.java        |  102 +
 ...tityRepository.java => TemplateRepository.java} |    7 +-
 .../service/internal/service/EmailSender.java      |   60 -
 .../service/internal/service/EmailService.java     |   79 +
 .../internal/service/NotificationService.java      |  118 +
 .../service/internal/service/SMSSender.java        |   57 -
 .../service/internal/service/SMSService.java       |   68 +
 .../service/internal/service/SampleService.java    |   48 -
 .../service/helperservice/CustomerAdaptor.java     |   55 +
 .../helperservice/NotificationAuthentication.java  |   60 +
 .../service/listener/AccountingEventListener.java  |  124 -
 .../service/listener/ChequeEventListener.java      |   85 -
 .../service/listener/CustomerEventListener.java    |  515 ++-
 .../service/listener/DepositEventListener.java     |   61 -
 .../service/listener/IdentityEventListener.java    |   87 -
 .../service/listener/OfficeEventListener.java      |  137 -
 .../service/listener/PayrollEventListener.java     |   61 -
 .../service/listener/PortfolioEventListener.java   |  252 +-
 .../service/listener/TellerEventListener.java      |  146 -
 .../service/rest/NotificationRestController.java   |  219 +-
 service/src/main/resources/application.yml         |   23 +-
 .../db/migrations/mariadb/V1__initial_setup.sql    |   74 +-
 .../mariadb/V2__sms_gateway_configurations.sql     |   20 +
 .../mariadb/V3__email_gateway_configurations.sql   |   20 +
 service/src/main/resources/logback.xml             |   58 +
 shared.gradle                                      |    8 +-
 system-analysis.mdj                                | 4104 --------------------
 88 files changed, 3162 insertions(+), 6795 deletions(-)


[fineract-cn-notifications] 15/36: update

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

awasum pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-notifications.git

commit f3296bb4fdc76a2ed0c51df6739c9d299991de71
Author: Ebenezer Graham <eg...@alustudent.com>
AuthorDate: Tue Jun 19 19:13:32 2018 +0400

    update
---
 .../cn/notification/service/NotificationConfiguration.java       | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/NotificationConfiguration.java b/service/src/main/java/org/apache/fineract/cn/notification/service/NotificationConfiguration.java
index c38d6bd..cdc55ce 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/NotificationConfiguration.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/NotificationConfiguration.java
@@ -35,6 +35,8 @@ import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.ComponentScan;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
+import org.springframework.jms.annotation.EnableJms;
+import org.springframework.jms.config.DefaultJmsListenerContainerFactory;
 import org.springframework.mail.javamail.JavaMailSender;
 import org.springframework.mail.javamail.JavaMailSenderImpl;
 import org.springframework.web.servlet.config.annotation.PathMatchConfigurer;
@@ -53,7 +55,7 @@ import java.util.Properties;
 @EnableCommandProcessing
 @EnableAnubis
 @EnableServiceException
-@ConfigurationProperties(locations = {"details"})
+@EnableJms
 @ComponentScan({
     "org.apache.fineract.cn.notification.service.rest",
     "org.apache.fineract.cn.notification.service.internal.service",
@@ -74,6 +76,11 @@ public class NotificationConfiguration extends WebMvcConfigurerAdapter {
     return LoggerFactory.getLogger(ServiceConstants.LOGGER_NAME);
   }
 
+//  @Bean
+//  public DefaultJmsListenerContainerFactory myJmsListenerContainerFactory() {
+//    DefaultJmsListenerContainerFactory factory = new DefaultJmsListenerContainerFactory();
+//    return factory;
+//  }
   @Override
   public void configurePathMatch(final PathMatchConfigurer configurer) {
     configurer.setUseSuffixPatternMatch(Boolean.FALSE);


[fineract-cn-notifications] 02/36: Increment One

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

awasum pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-notifications.git

commit 9f886dd56dd4377fcb12a4d47116e9331ba7c3de
Author: Ebenezer Graham <eg...@alustudent.com>
AuthorDate: Sun Jun 10 01:07:54 2018 +0400

    Increment One
    
    Commit for increment one
---
 .gitignore                                         |   17 +
 HEADER                                             |   16 +
 LICENSE                                            |  201 +
 NOTICE.txt                                         |    5 +
 api/build.gradle                                   |   57 +
 .../notification/api/v1/PermittableGroupIds.class  |  Bin 0 -> 328 bytes
 .../api/v1/client/IamATeapotException.class        |  Bin 0 -> 392 bytes
 .../api/v1/client/NotificationManager.class        |  Bin 0 -> 1462 bytes
 .../notification/api/v1/domain/Notification.class  |  Bin 0 -> 1782 bytes
 .../cn/notification/api/v1/domain/Sample.class     |  Bin 0 -> 1752 bytes
 .../api/v1/events/NotificationEventConstants.class |  Bin 0 -> 666 bytes
 .../cn/notification/api/v1/domain/SampleTest.class |  Bin 0 -> 3710 bytes
 api/settings.gradle                                |   18 +
 .../notification/api/v1/PermittableGroupIds.java   |   25 +
 .../api/v1/client/IamATeapotException.java         |   23 +
 .../api/v1/client/NotificationManager.java         |   59 +
 .../notification/api/v1/domain/Notification.java   |   76 +
 .../cn/notification/api/v1/domain/Sample.java      |   72 +
 .../api/v1/events/NotificationEventConstants.java  |   35 +
 .../cn/notification/api/v1/domain/SampleTest.java  |   57 +
 build.gradle                                       |   60 +
 component-test/build.gradle                        |   56 +
 .../cn/notification/SuiteTestEnvironment.class     |  Bin 0 -> 1528 bytes
 .../TestSample$TestConfiguration.class             |  Bin 0 -> 1398 bytes
 .../fineract/cn/notification/TestSample.class      |  Bin 0 -> 5890 bytes
 .../fineract/cn/notification/TestSuite.class       |  Bin 0 -> 695 bytes
 .../listener/MigrationEventListener.class          |  Bin 0 -> 1482 bytes
 .../listener/SampleEventListener.class             |  Bin 0 -> 1473 bytes
 component-test/settings.gradle                     |   18 +
 .../cn/notification/SuiteTestEnvironment.java      |   48 +
 .../fineract/cn/notification/TestSample.java       |  137 +
 .../apache/fineract/cn/notification/TestSuite.java |   30 +
 .../listener/MigrationEventListener.java           |   50 +
 .../notification/listener/SampleEventListener.java |   50 +
 gradle/wrapper/gradle-wrapper.jar                  |  Bin 0 -> 54212 bytes
 gradle/wrapper/gradle-wrapper.properties           |    6 +
 gradlew                                            |  172 +
 gradlew.bat                                        |   84 +
 service/build.gradle                               |   85 +
 service/out/production/resources/application.yml   |   96 +
 service/out/production/resources/bootstrap.yml     |   22 +
 .../db/migrations/mariadb/V1__initial_setup.sql    |   32 +
 service/settings.gradle                            |   18 +
 .../service/NotificationApplication.java           |   32 +
 .../service/NotificationConfiguration.java         |  101 +
 .../cn/notification/service/ServiceConstants.java  |   23 +
 .../internal/command/InitializeServiceCommand.java |   31 +
 .../service/internal/command/SampleCommand.java    |   42 +
 .../command/handler/MigrationAggregate.java        |   67 +
 .../internal/command/handler/SampleAggregate.java  |   66 +
 .../service/internal/mapper/SampleMapper.java      |   45 +
 .../repository/EmailGatewayConfiguration.java      |  114 +
 .../EmailGatewayConfigurationRepository.java       |   29 +
 .../repository/SMSGatewayConfiguration.java        |   94 +
 .../SMSGatewayConfigurationRepository.java         |   29 +
 .../service/internal/service/EmailSender.java      |   44 +
 .../service/internal/service/SMSSender.java        |   54 +
 .../service/internal/service/SampleService.java    |   47 +
 .../service/listener/AccountingEventListener.java  |  130 +
 .../service/listener/ChequeEventListener.java      |   84 +
 .../service/listener/CustomerEventListener.java    |  201 +
 .../service/listener/DepositEventListener.java     |   60 +
 .../service/listener/IdentityEventListener.java    |   87 +
 .../service/listener/OfficeEventListener.java      |  120 +
 .../service/listener/PayrollEventListener.java     |   61 +
 .../service/listener/PortfolioEventListener.java   |  151 +
 .../service/listener/TellerEventListener.java      |  146 +
 .../service/rest/NotificationRestController.java   |  119 +
 service/src/main/resources/application.yml         |   78 +
 service/src/main/resources/bootstrap.yml           |   22 +
 .../db/migrations/mariadb/V1__initial_setup.sql    |   32 +
 settings.gradle                                    |   23 +
 shared.gradle                                      |  111 +
 system-analysis.mdj                                | 4104 ++++++++++++++++++++
 74 files changed, 7972 insertions(+)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..99b514a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,17 @@
+.gradle
+.idea
+build/
+target/
+detail
+
+# Ignore Gradle GUI config
+gradle-app.setting
+
+# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
+!gradle-wrapper.jar
+
+*.iml
+
+*.log
+
+*.toDelete
diff --git a/HEADER b/HEADER
new file mode 100644
index 0000000..90705e0
--- /dev/null
+++ b/HEADER
@@ -0,0 +1,16 @@
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..8dada3e
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "{}"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright {yyyy} {name of copyright owner}
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/NOTICE.txt b/NOTICE.txt
new file mode 100644
index 0000000..41f69b8
--- /dev/null
+++ b/NOTICE.txt
@@ -0,0 +1,5 @@
+Apache Fineract CN Notification
+Copyright [2017-2018] The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
\ No newline at end of file
diff --git a/api/build.gradle b/api/build.gradle
new file mode 100644
index 0000000..5b9924a
--- /dev/null
+++ b/api/build.gradle
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+buildscript {
+    repositories {
+        jcenter()
+    }
+
+    dependencies {
+        classpath 'io.spring.gradle:dependency-management-plugin:0.6.0.RELEASE'
+    }
+}
+
+plugins {
+    id "com.github.hierynomus.license" version "0.13.1"
+    id("org.nosphere.apache.rat") version "0.3.1"
+}
+
+apply from: '../shared.gradle'
+
+dependencies {
+    compile(
+            [group: 'org.springframework.cloud', name: 'spring-cloud-starter-feign'],
+            [group: 'org.apache.fineract.cn', name: 'api', version: versions.frameworkapi],
+            [group: 'org.hibernate', name: 'hibernate-validator', version: versions.validator],
+            [group: 'org.hibernate', name: 'hibernate-validator-annotation-processor', version: versions.validator]
+    )
+
+    testCompile(
+            [group: 'org.apache.fineract.cn', name: 'test', version: versions.frameworktest],
+    )
+}
+
+publishing {
+    publications {
+        api(MavenPublication) {
+            from components.java
+            groupId project.group
+            artifactId project.name
+            version project.version
+        }
+    }
+}
diff --git a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/PermittableGroupIds.class b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/PermittableGroupIds.class
new file mode 100644
index 0000000..a1dee5e
Binary files /dev/null and b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/PermittableGroupIds.class differ
diff --git a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/client/IamATeapotException.class b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/client/IamATeapotException.class
new file mode 100644
index 0000000..a197a0a
Binary files /dev/null and b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/client/IamATeapotException.class differ
diff --git a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/client/NotificationManager.class b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/client/NotificationManager.class
new file mode 100644
index 0000000..3cb4555
Binary files /dev/null and b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/client/NotificationManager.class differ
diff --git a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/Notification.class b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/Notification.class
new file mode 100644
index 0000000..16602d7
Binary files /dev/null and b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/Notification.class differ
diff --git a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/Sample.class b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/Sample.class
new file mode 100644
index 0000000..818a105
Binary files /dev/null and b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/Sample.class differ
diff --git a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/events/NotificationEventConstants.class b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/events/NotificationEventConstants.class
new file mode 100644
index 0000000..6b2a09d
Binary files /dev/null and b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/events/NotificationEventConstants.class differ
diff --git a/api/out/test/classes/org/apache/fineract/cn/notification/api/v1/domain/SampleTest.class b/api/out/test/classes/org/apache/fineract/cn/notification/api/v1/domain/SampleTest.class
new file mode 100644
index 0000000..8013bfa
Binary files /dev/null and b/api/out/test/classes/org/apache/fineract/cn/notification/api/v1/domain/SampleTest.class differ
diff --git a/api/settings.gradle b/api/settings.gradle
new file mode 100644
index 0000000..491f745
--- /dev/null
+++ b/api/settings.gradle
@@ -0,0 +1,18 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+rootProject.name = 'api'
\ No newline at end of file
diff --git a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/PermittableGroupIds.java b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/PermittableGroupIds.java
new file mode 100644
index 0000000..a854460
--- /dev/null
+++ b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/PermittableGroupIds.java
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.api.v1;
+
+@SuppressWarnings("unused")
+public interface PermittableGroupIds {
+  String SAMPLE_MANAGEMENT = "notification__v1__samples";
+  String SELF_MANAGEMENT = "notification__v1__self";
+}
diff --git a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/client/IamATeapotException.java b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/client/IamATeapotException.java
new file mode 100644
index 0000000..9265ed4
--- /dev/null
+++ b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/client/IamATeapotException.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.api.v1.client;
+
+@SuppressWarnings("WeakerAccess")
+public class IamATeapotException extends RuntimeException {
+}
diff --git a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/client/NotificationManager.java b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/client/NotificationManager.java
new file mode 100644
index 0000000..3c20ea3
--- /dev/null
+++ b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/client/NotificationManager.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.api.v1.client;
+
+import org.apache.fineract.cn.notification.api.v1.domain.Sample;
+import java.util.List;
+import org.apache.fineract.cn.api.annotation.ThrowsException;
+import org.apache.fineract.cn.api.util.CustomFeignClientsConfiguration;
+import org.springframework.cloud.netflix.feign.FeignClient;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+@SuppressWarnings("unused")
+@FeignClient(value="notification-v1", path="/notification/v1", configuration = CustomFeignClientsConfiguration.class)
+public interface NotificationManager {
+
+  @RequestMapping(
+          value = "/sample",
+          method = RequestMethod.GET,
+          produces = MediaType.ALL_VALUE,
+          consumes = MediaType.APPLICATION_JSON_VALUE
+  )
+  List<Sample> findAllEntities();
+
+  @RequestMapping(
+          value = "/sample/{identifier}",
+          method = RequestMethod.GET,
+          produces = MediaType.ALL_VALUE,
+          consumes = MediaType.APPLICATION_JSON_VALUE)
+  Sample getEntity(@PathVariable("identifier") final String identifier);
+
+  @RequestMapping(
+      value = "/sample",
+      method = RequestMethod.POST,
+      produces = MediaType.APPLICATION_JSON_VALUE,
+      consumes = MediaType.APPLICATION_JSON_VALUE
+  )
+  @ThrowsException(status = HttpStatus.I_AM_A_TEAPOT, exception = IamATeapotException.class)
+  void createEntity(final Sample sample);
+}
diff --git a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/Notification.java b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/Notification.java
new file mode 100644
index 0000000..c685c5a
--- /dev/null
+++ b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/Notification.java
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.api.v1.domain;
+
+import java.util.Objects;
+import org.apache.fineract.cn.lang.validation.constraints.ValidIdentifier;
+import org.hibernate.validator.constraints.Length;
+
+@SuppressWarnings({"WeakerAccess", "unused"})
+public class Notification {
+  @ValidIdentifier
+  private String identifier;
+  @Length(max = 512)
+  private String payload;
+
+  private String recipient;
+
+  private String message;
+
+  public Notification() {
+    super();
+  }
+
+  public static Notification create(final String identifier, final String payload) {
+    final Notification notification = new Notification();
+    notification.setIdentifier(identifier);
+    notification.setPayload(payload);
+    return notification;
+  }
+
+  public String getIdentifier() {
+    return this.identifier;
+  }
+
+  public void setIdentifier(final String identifier) {
+    this.identifier = identifier;
+  }
+
+  public String getPayload() {
+    return payload;
+  }
+
+  public void setPayload(String payload) {
+    this.payload = payload;
+  }
+
+  @Override
+  public boolean equals(Object o) {
+    if (this == o) return true;
+    if (o == null || getClass() != o.getClass()) return false;
+    Notification notification = (Notification) o;
+    return Objects.equals(identifier, notification.identifier) &&
+            Objects.equals(payload, notification.payload);
+  }
+
+  @Override
+  public int hashCode() {
+    return Objects.hash(identifier, payload);
+  }
+}
diff --git a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/Sample.java b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/Sample.java
new file mode 100644
index 0000000..644dda9
--- /dev/null
+++ b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/Sample.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.api.v1.domain;
+
+import java.util.Objects;
+import org.apache.fineract.cn.lang.validation.constraints.ValidIdentifier;
+import org.hibernate.validator.constraints.Length;
+
+@SuppressWarnings({"WeakerAccess", "unused"})
+public class Sample {
+  @ValidIdentifier
+  private String identifier;
+  @Length(max = 512)
+  private String payload;
+
+  public Sample() {
+    super();
+  }
+
+  public static Sample create(final String identifier, final String payload) {
+    final Sample sample = new Sample();
+    sample.setIdentifier(identifier);
+    sample.setPayload(payload);
+    return sample;
+  }
+
+  public String getIdentifier() {
+    return this.identifier;
+  }
+
+  public void setIdentifier(final String identifier) {
+    this.identifier = identifier;
+  }
+
+  public String getPayload() {
+    return payload;
+  }
+
+  public void setPayload(String payload) {
+    this.payload = payload;
+  }
+
+  @Override
+  public boolean equals(Object o) {
+    if (this == o) return true;
+    if (o == null || getClass() != o.getClass()) return false;
+    Sample sample = (Sample) o;
+    return Objects.equals(identifier, sample.identifier) &&
+            Objects.equals(payload, sample.payload);
+  }
+
+  @Override
+  public int hashCode() {
+    return Objects.hash(identifier, payload);
+  }
+}
diff --git a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/events/NotificationEventConstants.java b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/events/NotificationEventConstants.java
new file mode 100644
index 0000000..3f351c6
--- /dev/null
+++ b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/events/NotificationEventConstants.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.api.v1.events;
+
+@SuppressWarnings("unused")
+public interface NotificationEventConstants {
+
+    String DESTINATION = "notification-v1";
+    String SELECTOR_NAME = "action";
+    String INITIALIZE = "initialize";
+    String POST_SAMPLE = "post-sample";
+    String SELECTOR_INITIALIZE = SELECTOR_NAME + " = '" + INITIALIZE + "'";
+    String SELECTOR_POST_SAMPLE = SELECTOR_NAME + " = '" + POST_SAMPLE + "'";
+
+    //Customer constants;
+    String CUSTOMER_DESTINATION = "customer-v1";
+    String SELECTOR_POST_CUSTOMER = SELECTOR_NAME + " = 'post-customer'";
+
+}
diff --git a/api/src/test/java/org/apache/fineract/cn/notification/api/v1/domain/SampleTest.java b/api/src/test/java/org/apache/fineract/cn/notification/api/v1/domain/SampleTest.java
new file mode 100644
index 0000000..65cd1ac
--- /dev/null
+++ b/api/src/test/java/org/apache/fineract/cn/notification/api/v1/domain/SampleTest.java
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.api.v1.domain;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import org.apache.commons.lang.RandomStringUtils;
+import org.apache.fineract.cn.test.domain.ValidationTest;
+import org.apache.fineract.cn.test.domain.ValidationTestCase;
+import org.junit.runners.Parameterized;
+
+public class SampleTest extends ValidationTest<Sample> {
+
+  public SampleTest(ValidationTestCase<Sample> testCase) {
+    super(testCase);
+  }
+
+  @Override
+  protected Sample createValidTestSubject() {
+    return Sample.create("xxxx", "yyy");
+  }
+
+  @Parameterized.Parameters
+  public static Collection testCases() {
+    final Collection<ValidationTestCase> ret = new ArrayList<>();
+    ret.add(new ValidationTestCase<Sample>("basicCase")
+            .adjustment(x -> {})
+            .valid(true));
+    ret.add(new ValidationTestCase<Sample>("nullIdentifier")
+            .adjustment(x -> x.setIdentifier(null))
+            .valid(false));
+    ret.add(new ValidationTestCase<Sample>("tooShortIdentifier")
+            .adjustment(x -> x.setIdentifier("z"))
+            .valid(false));
+    ret.add(new ValidationTestCase<Sample>("tooLongPayload")
+            .adjustment(x -> x.setPayload(RandomStringUtils.randomAlphanumeric(513)))
+            .valid(false));
+    return ret;
+  }
+
+}
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 0000000..ca2370a
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+group 'org.apache.fineract.cn.notification'
+
+task publishApiToMavenLocal {
+    dependsOn gradle.includedBuild('api').task(':publishToMavenLocal')
+}
+
+task publishServiceToMavenLocal {
+    mustRunAfter publishApiToMavenLocal
+    dependsOn gradle.includedBuild('service').task(':publishToMavenLocal')
+}
+
+task publishComponentTestToMavenLocal {
+    mustRunAfter publishApiToMavenLocal
+    mustRunAfter publishServiceToMavenLocal
+    dependsOn gradle.includedBuild('component-test').task(':publishToMavenLocal')
+}
+
+task publishToMavenLocal {
+    group 'all'
+    dependsOn publishApiToMavenLocal
+    dependsOn publishServiceToMavenLocal
+    dependsOn publishComponentTestToMavenLocal
+}
+
+task prepareForTest {
+    group 'all'
+    dependsOn publishToMavenLocal
+    dependsOn gradle.includedBuild('component-test').task(':build')
+}
+
+task licenseFormat {
+    group 'all'
+    dependsOn gradle.includedBuild('api').task(':licenseFormat')
+    dependsOn gradle.includedBuild('service').task(':licenseFormat')
+    dependsOn gradle.includedBuild('component-test').task(':licenseFormat')
+}
+
+task rat {
+    group 'all'
+    dependsOn gradle.includedBuild('api').task(':rat')
+    dependsOn gradle.includedBuild('service').task(':rat')
+    dependsOn gradle.includedBuild('component-test').task(':rat')
+}
diff --git a/component-test/build.gradle b/component-test/build.gradle
new file mode 100644
index 0000000..0348f06
--- /dev/null
+++ b/component-test/build.gradle
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+buildscript {
+    ext {
+        springBootVersion = '1.4.1.RELEASE'
+    }
+
+    repositories {
+        jcenter()
+    }
+
+    dependencies {
+        classpath ("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
+    }
+}
+
+plugins {
+    id "com.github.hierynomus.license" version "0.13.1"
+    id("org.nosphere.apache.rat") version "0.3.1"
+}
+apply from: '../shared.gradle'
+
+dependencies {
+    compile(
+            [group: 'org.apache.fineract.cn.notification', name: 'api', version: project.version],
+            [group: 'org.apache.fineract.cn.notification', name: 'service', version: project.version],
+            [group: 'org.apache.fineract.cn.anubis', name: 'test', version: versions.frameworkanubis],
+            [group: 'org.apache.fineract.cn', name: 'api', version: versions.frameworkapi],
+            [group: 'org.apache.fineract.cn', name: 'test', version: versions.frameworktest],
+            [group: 'org.apache.fineract.cn', name: 'lang', version: versions.frameworklang],
+            [group: 'org.springframework.boot', name: 'spring-boot-starter-test']
+    )
+}
+
+publishing {
+    publications {
+        mavenJava(MavenPublication) {
+            from components.java
+        }
+    }
+}
diff --git a/component-test/out/production/classes/org/apache/fineract/cn/notification/SuiteTestEnvironment.class b/component-test/out/production/classes/org/apache/fineract/cn/notification/SuiteTestEnvironment.class
new file mode 100644
index 0000000..d098f6e
Binary files /dev/null and b/component-test/out/production/classes/org/apache/fineract/cn/notification/SuiteTestEnvironment.class differ
diff --git a/component-test/out/production/classes/org/apache/fineract/cn/notification/TestSample$TestConfiguration.class b/component-test/out/production/classes/org/apache/fineract/cn/notification/TestSample$TestConfiguration.class
new file mode 100644
index 0000000..b125463
Binary files /dev/null and b/component-test/out/production/classes/org/apache/fineract/cn/notification/TestSample$TestConfiguration.class differ
diff --git a/component-test/out/production/classes/org/apache/fineract/cn/notification/TestSample.class b/component-test/out/production/classes/org/apache/fineract/cn/notification/TestSample.class
new file mode 100644
index 0000000..5962f3a
Binary files /dev/null and b/component-test/out/production/classes/org/apache/fineract/cn/notification/TestSample.class differ
diff --git a/component-test/out/production/classes/org/apache/fineract/cn/notification/TestSuite.class b/component-test/out/production/classes/org/apache/fineract/cn/notification/TestSuite.class
new file mode 100644
index 0000000..f083d51
Binary files /dev/null and b/component-test/out/production/classes/org/apache/fineract/cn/notification/TestSuite.class differ
diff --git a/component-test/out/production/classes/org/apache/fineract/cn/notification/listener/MigrationEventListener.class b/component-test/out/production/classes/org/apache/fineract/cn/notification/listener/MigrationEventListener.class
new file mode 100644
index 0000000..6a70e37
Binary files /dev/null and b/component-test/out/production/classes/org/apache/fineract/cn/notification/listener/MigrationEventListener.class differ
diff --git a/component-test/out/production/classes/org/apache/fineract/cn/notification/listener/SampleEventListener.class b/component-test/out/production/classes/org/apache/fineract/cn/notification/listener/SampleEventListener.class
new file mode 100644
index 0000000..917edfc
Binary files /dev/null and b/component-test/out/production/classes/org/apache/fineract/cn/notification/listener/SampleEventListener.class differ
diff --git a/component-test/settings.gradle b/component-test/settings.gradle
new file mode 100644
index 0000000..a07a3bc
--- /dev/null
+++ b/component-test/settings.gradle
@@ -0,0 +1,18 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+rootProject.name = 'component-test'
\ No newline at end of file
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/SuiteTestEnvironment.java b/component-test/src/main/java/org/apache/fineract/cn/notification/SuiteTestEnvironment.java
new file mode 100644
index 0000000..5f2b5f4
--- /dev/null
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/SuiteTestEnvironment.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification;
+
+import org.apache.fineract.cn.test.env.TestEnvironment;
+import org.apache.fineract.cn.test.fixture.cassandra.CassandraInitializer;
+import org.apache.fineract.cn.test.fixture.mariadb.MariaDBInitializer;
+import org.junit.ClassRule;
+import org.junit.rules.RuleChain;
+import org.junit.rules.RunExternalResourceOnce;
+import org.junit.rules.TestRule;
+
+/**
+ * This contains the database resources required by the test.  They are in a separate
+ * class so that the test suite can initialize them before the classes it calls. This
+ * makes test runs faster and prevents tests from "stepping on each other's toes" when
+ * initializing and de-initializing external resources.
+ */
+public class SuiteTestEnvironment {
+  static final String APP_VERSION = "1";
+  static final String APP_NAME = "notification-v" + APP_VERSION;
+
+  static final TestEnvironment testEnvironment = new TestEnvironment(APP_NAME);
+  static final CassandraInitializer cassandraInitializer = new CassandraInitializer();
+  static final MariaDBInitializer mariaDBInitializer = new MariaDBInitializer();
+
+  @ClassRule
+  public static TestRule orderClassRules = RuleChain
+      .outerRule(new RunExternalResourceOnce(testEnvironment))
+      .around(new RunExternalResourceOnce(cassandraInitializer))
+      .around(new RunExternalResourceOnce(mariaDBInitializer));
+}
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/TestSample.java b/component-test/src/main/java/org/apache/fineract/cn/notification/TestSample.java
new file mode 100644
index 0000000..76db357
--- /dev/null
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/TestSample.java
@@ -0,0 +1,137 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification;
+
+import org.apache.fineract.cn.notification.api.v1.client.NotificationManager;
+import org.apache.fineract.cn.notification.api.v1.domain.Sample;
+import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
+import org.apache.fineract.cn.notification.service.NotificationConfiguration;
+import java.util.List;
+import org.apache.commons.lang3.RandomStringUtils;
+import org.apache.fineract.cn.anubis.test.v1.TenantApplicationSecurityEnvironmentTestRule;
+import org.apache.fineract.cn.api.context.AutoUserContext;
+import org.apache.fineract.cn.test.fixture.TenantDataStoreContextTestRule;
+import org.apache.fineract.cn.test.listener.EnableEventRecording;
+import org.apache.fineract.cn.test.listener.EventRecorder;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.cloud.netflix.feign.EnableFeignClients;
+import org.springframework.cloud.netflix.ribbon.RibbonClient;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Import;
+import org.springframework.test.context.junit4.SpringRunner;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
+public class TestSample extends SuiteTestEnvironment {
+  private static final String LOGGER_NAME = "test-logger";
+  private static final String TEST_USER = "homer";
+
+
+  @Configuration
+  @EnableEventRecording
+  @EnableFeignClients(basePackages = {"org.apache.fineract.cn.notification.api.v1.client"})
+  @RibbonClient(name = APP_NAME)
+  @Import({NotificationConfiguration.class})
+  @ComponentScan("org.apache.fineract.cn.notification.listener")
+  public static class TestConfiguration {
+    public TestConfiguration() {
+      super();
+    }
+
+    @Bean(name = LOGGER_NAME)
+    public Logger logger() {
+      return LoggerFactory.getLogger(LOGGER_NAME);
+    }
+  }
+
+  @ClassRule
+  public final static TenantDataStoreContextTestRule tenantDataStoreContext = TenantDataStoreContextTestRule.forRandomTenantName(cassandraInitializer, mariaDBInitializer);
+
+  @Rule
+  public final TenantApplicationSecurityEnvironmentTestRule tenantApplicationSecurityEnvironment
+          = new TenantApplicationSecurityEnvironmentTestRule(testEnvironment, this::waitForInitialize);
+
+  private AutoUserContext userContext;
+
+  @Autowired
+  private NotificationManager testSubject;
+
+  @Autowired
+  private EventRecorder eventRecorder;
+
+  @SuppressWarnings("WeakerAccess")
+  @Autowired
+  @Qualifier(LOGGER_NAME)
+  Logger logger;
+
+  public TestSample() {
+    super();
+  }
+
+  @Before
+  public void prepTest() {
+    userContext = tenantApplicationSecurityEnvironment.createAutoUserContext(TestSample.TEST_USER);
+  }
+
+  @After
+  public void cleanTest() {
+    userContext.close();
+    eventRecorder.clear();
+  }
+
+  public boolean waitForInitialize() {
+    try {
+      return this.eventRecorder.wait(NotificationEventConstants.INITIALIZE, APP_VERSION);
+    } catch (final InterruptedException e) {
+      throw new IllegalStateException(e);
+    }
+  }
+
+  @Test
+  public void shouldCreateSample() throws InterruptedException {
+    logger.info("Running test shouldCreateSample.");
+    final Sample sample = Sample.create(RandomStringUtils.randomAlphanumeric(8), RandomStringUtils.randomAlphanumeric(512));
+    this.testSubject.createEntity(sample);
+
+    Assert.assertTrue(this.eventRecorder.wait(NotificationEventConstants.POST_SAMPLE, sample.getIdentifier()));
+
+    final Sample createdSample = this.testSubject.getEntity(sample.getIdentifier());
+    Assert.assertEquals(sample, createdSample);
+  }
+
+  @Test
+  public void shouldListSamples() {
+    logger.info("Running test shouldListSamples.");
+    final List<Sample> allEntities = this.testSubject.findAllEntities();
+    Assert.assertNotNull(allEntities);
+  }
+}
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/TestSuite.java b/component-test/src/main/java/org/apache/fineract/cn/notification/TestSuite.java
new file mode 100644
index 0000000..a4d42bf
--- /dev/null
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/TestSuite.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    TestSample.class,
+    //TODO: when you create a new component test, add it here so you can run it with the suite.
+})
+public class TestSuite extends SuiteTestEnvironment {
+}
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/listener/MigrationEventListener.java b/component-test/src/main/java/org/apache/fineract/cn/notification/listener/MigrationEventListener.java
new file mode 100644
index 0000000..c24b97c
--- /dev/null
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/listener/MigrationEventListener.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.listener;
+
+import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
+import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
+import org.apache.fineract.cn.test.listener.EventRecorder;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.jms.annotation.JmsListener;
+import org.springframework.messaging.handler.annotation.Header;
+import org.springframework.stereotype.Component;
+
+@SuppressWarnings("unused")
+@Component
+public class MigrationEventListener {
+
+  private final EventRecorder eventRecorder;
+
+  @Autowired
+  public MigrationEventListener(@SuppressWarnings("SpringJavaAutowiringInspection") final EventRecorder eventRecorder) {
+    super();
+    this.eventRecorder = eventRecorder;
+  }
+
+  @JmsListener(
+      subscription = NotificationEventConstants.DESTINATION,
+      destination = NotificationEventConstants.DESTINATION,
+      selector = NotificationEventConstants.SELECTOR_INITIALIZE
+  )
+  public void onInitialization(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                               final String payload) {
+    this.eventRecorder.event(tenant, NotificationEventConstants.INITIALIZE, payload, String.class);
+  }
+}
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/listener/SampleEventListener.java b/component-test/src/main/java/org/apache/fineract/cn/notification/listener/SampleEventListener.java
new file mode 100644
index 0000000..85abe9e
--- /dev/null
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/listener/SampleEventListener.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.listener;
+
+import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
+import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
+import org.apache.fineract.cn.test.listener.EventRecorder;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.jms.annotation.JmsListener;
+import org.springframework.messaging.handler.annotation.Header;
+import org.springframework.stereotype.Component;
+
+@SuppressWarnings("unused")
+@Component
+public class SampleEventListener {
+
+  private final EventRecorder eventRecorder;
+
+  @Autowired
+  public SampleEventListener(@SuppressWarnings("SpringJavaAutowiringInspection") final EventRecorder eventRecorder) {
+    super();
+    this.eventRecorder = eventRecorder;
+  }
+
+  @JmsListener(
+      subscription = NotificationEventConstants.DESTINATION,
+      destination = NotificationEventConstants.DESTINATION,
+      selector = NotificationEventConstants.SELECTOR_POST_SAMPLE
+  )
+  public void onCreateSample(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                             final String payload) {
+    this.eventRecorder.event(tenant, NotificationEventConstants.POST_SAMPLE, payload, String.class);
+  }
+}
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..400f155
Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..c563c1a
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Fri May 18 16:18:58 MUT 2018
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-all.zip
diff --git a/gradlew b/gradlew
new file mode 100755
index 0000000..4453cce
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,172 @@
+#!/usr/bin/env sh
+
+##############################################################################
+##
+##  Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+        PRG="$link"
+    else
+        PRG=`dirname "$PRG"`"/$link"
+    fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+    echo "$*"
+}
+
+die ( ) {
+    echo
+    echo "$*"
+    echo
+    exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+  CYGWIN* )
+    cygwin=true
+    ;;
+  Darwin* )
+    darwin=true
+    ;;
+  MINGW* )
+    msys=true
+    ;;
+  NONSTOP* )
+    nonstop=true
+    ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+        # IBM's JDK on AIX uses strange locations for the executables
+        JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+        JAVACMD="$JAVA_HOME/bin/java"
+    fi
+    if [ ! -x "$JAVACMD" ] ; then
+        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+    fi
+else
+    JAVACMD="java"
+    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+    MAX_FD_LIMIT=`ulimit -H -n`
+    if [ $? -eq 0 ] ; then
+        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+            MAX_FD="$MAX_FD_LIMIT"
+        fi
+        ulimit -n $MAX_FD
+        if [ $? -ne 0 ] ; then
+            warn "Could not set maximum file descriptor limit: $MAX_FD"
+        fi
+    else
+        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+    fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+    JAVACMD=`cygpath --unix "$JAVACMD"`
+
+    # We build the pattern for arguments to be converted via cygpath
+    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+    SEP=""
+    for dir in $ROOTDIRSRAW ; do
+        ROOTDIRS="$ROOTDIRS$SEP$dir"
+        SEP="|"
+    done
+    OURCYGPATTERN="(^($ROOTDIRS))"
+    # Add a user-defined pattern to the cygpath arguments
+    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+    fi
+    # Now convert the arguments - kludge to limit ourselves to /bin/sh
+    i=0
+    for arg in "$@" ; do
+        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
+
+        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
+            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+        else
+            eval `echo args$i`="\"$arg\""
+        fi
+        i=$((i+1))
+    done
+    case $i in
+        (0) set -- ;;
+        (1) set -- "$args0" ;;
+        (2) set -- "$args0" "$args1" ;;
+        (3) set -- "$args0" "$args1" "$args2" ;;
+        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+    esac
+fi
+
+# Escape application args
+save ( ) {
+    for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+    echo " "
+}
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+  cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644
index 0000000..e95643d
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,84 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem  Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/service/build.gradle b/service/build.gradle
new file mode 100644
index 0000000..57f507d
--- /dev/null
+++ b/service/build.gradle
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+buildscript {
+    ext {
+        springBootVersion = '1.4.1.RELEASE'
+    }
+
+    repositories {
+        jcenter()
+    }
+
+    dependencies {
+        classpath ("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
+    }
+}
+
+plugins {
+    id "com.github.hierynomus.license" version "0.13.1"
+    id("org.nosphere.apache.rat") version "0.3.1"
+}
+
+apply from: '../shared.gradle'
+
+apply plugin: 'spring-boot'
+
+springBoot {
+    executable = true
+    classifier = 'boot'
+}
+
+dependencies {
+    compile(
+            [group: 'com.twilio.sdk', name: 'twilio', version: '7.17.+'],
+            [group: 'org.apache.fineract.cn.customer', name: 'api', version: versions.fineractcncustomer],
+            [group: 'org.springframework.cloud', name: 'spring-cloud-starter-config'],
+            [group: 'org.springframework.cloud', name: 'spring-cloud-starter-eureka'],
+            [group: 'org.springframework.boot', name: 'spring-boot-starter-jetty'],
+            //check this dependency
+            [group: 'org.springframework.boot', name: 'spring-boot-starter-mail', version: '1.4.3.RELEASE'],
+            [group: 'org.apache.fineract.cn.notification', name: 'api', version: project.version],
+            [group: 'org.apache.fineract.cn.anubis', name: 'library', version: versions.frameworkanubis],
+            [group: 'com.google.code.gson', name: 'gson'],
+            [group: 'org.apache.fineract.cn', name: 'lang', version: versions.frameworklang],
+            [group: 'org.apache.fineract.cn', name: 'async', version: versions.frameworkasync],
+            [group: 'org.apache.fineract.cn', name: 'cassandra', version: versions.frameworkcassandra],
+            [group: 'org.apache.fineract.cn', name: 'mariadb', version: versions.frameworkmariadb],
+            [group: 'org.apache.fineract.cn', name: 'command', version: versions.frameworkcommand],
+            [group: 'org.hibernate', name: 'hibernate-validator', version: versions.validator]
+    )
+}
+
+publishToMavenLocal.dependsOn bootRepackage
+
+publishing {
+    publications {
+        service(MavenPublication) {
+            from components.java
+            groupId project.group
+            artifactId project.name
+            version project.version
+        }
+        bootService(MavenPublication) {
+            // "boot" jar
+            artifact ("$buildDir/libs/$project.name-$version-boot.jar")
+            groupId project.group
+            artifactId ("$project.name-boot")
+            version project.version
+        }
+    }
+}
diff --git a/service/out/production/resources/application.yml b/service/out/production/resources/application.yml
new file mode 100644
index 0000000..17d03bc
--- /dev/null
+++ b/service/out/production/resources/application.yml
@@ -0,0 +1,96 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+spring:
+  cloud:
+    discovery:
+      enabled: false
+    config:
+      enabled: false
+  mail:
+    host: smtp.gmail.com
+    port: 587
+    username: ebenezergraham69@gmail.com
+    password: fdzmzbhbmtkafzvq
+    properties:
+      mail:
+        smtpauth: true
+        smtp:
+        starttls:
+          enable: true
+
+eureka:
+  client:
+    serviceUrl:
+      defaultZone: http://localhost:8761/eureka/
+
+server:
+  port: 8081
+  contextPath: /notification/v1/*
+
+cassandra:
+  clusterName: staging_cluster
+  contactPoints: 127.0.0.1:9042,127.0.0.2:9042,127.0.0.3:9042
+  keyspace: seshat
+  cl:
+    read: LOCAL_QUORUM
+    write: LOCAL_QUORUM
+    delete: LOCAL_QUORUM
+
+mariadb:
+  driverClass: org.mariadb.jdbc.Driver
+  database: seshat
+  host: localhost
+  port: 3306
+  user: root
+  password: mysql
+
+bonecp:
+  idleMaxAgeInMinutes: 240
+  idleConnectionTestPeriodInMinutes: 60
+  maxConnectionsPerPartition: 10
+  minConnectionsPerPartition: 1
+  partitionCount: 2
+  acquireIncrement: 5
+  statementsCacheSize: 100
+
+async:
+  corePoolSize: 32
+  maxPoolSize: 16384
+  queueCapacity: 0
+  threadName: async-processor-
+
+flyway:
+  enabled: false
+
+mfi:
+  senderNumber: +15109441898
+
+smssender:
+  accountSID: AC1fde2c6f26f367b93231c5fdb944c908
+  authtoken: bc9a53e41745b8471e0ecafc859d86aa
+
+fineract:
+  customer:
+    accountcreated:
+      message: Dear Valued Customer, Your account has been created.
+    accountclosed:
+      message: Dear Valued Customer, Your account has been successfully closed.
+
+
diff --git a/service/out/production/resources/bootstrap.yml b/service/out/production/resources/bootstrap.yml
new file mode 100644
index 0000000..76c2441
--- /dev/null
+++ b/service/out/production/resources/bootstrap.yml
@@ -0,0 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+spring:
+    application:
+        name: notification-v1
diff --git a/service/out/production/resources/db/migrations/mariadb/V1__initial_setup.sql b/service/out/production/resources/db/migrations/mariadb/V1__initial_setup.sql
new file mode 100644
index 0000000..b68edad
--- /dev/null
+++ b/service/out/production/resources/db/migrations/mariadb/V1__initial_setup.sql
@@ -0,0 +1,32 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--   http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing,
+-- software distributed under the License is distributed on an
+-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+-- KIND, either express or implied.  See the License for the
+-- specific language governing permissions and limitations
+-- under the License.
+--
+
+CREATE TABLE notification (
+  id BIGINT NOT NULL AUTO_INCREMENT,
+  identifier VARCHAR(8) NOT NULL,
+  payload VARCHAR(512) NULL,
+  CONSTRAINT notification_pk PRIMARY KEY (id)
+);
+
+CREATE TABLE template_sample (
+  id BIGINT NOT NULL AUTO_INCREMENT,
+  identifier VARCHAR(8) NOT NULL,
+  payload VARCHAR(512) NULL,
+  CONSTRAINT template_sample_pk PRIMARY KEY (id)
+);
diff --git a/service/settings.gradle b/service/settings.gradle
new file mode 100644
index 0000000..1a4c2fd
--- /dev/null
+++ b/service/settings.gradle
@@ -0,0 +1,18 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+rootProject.name = 'service'
\ No newline at end of file
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/NotificationApplication.java b/service/src/main/java/org/apache/fineract/cn/notification/service/NotificationApplication.java
new file mode 100644
index 0000000..5968d0d
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/NotificationApplication.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service;
+
+import org.springframework.boot.SpringApplication;
+
+public class NotificationApplication {
+
+  public NotificationApplication() {
+    super();
+  }
+
+  public static void main(String[] args) {
+    SpringApplication.run(NotificationConfiguration.class, args);
+  }
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/NotificationConfiguration.java b/service/src/main/java/org/apache/fineract/cn/notification/service/NotificationConfiguration.java
new file mode 100644
index 0000000..01aa6d3
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/NotificationConfiguration.java
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service;
+
+import org.apache.fineract.cn.anubis.config.EnableAnubis;
+import org.apache.fineract.cn.async.config.EnableAsync;
+import org.apache.fineract.cn.cassandra.config.EnableCassandra;
+import org.apache.fineract.cn.command.config.EnableCommandProcessing;
+import org.apache.fineract.cn.lang.config.EnableServiceException;
+import org.apache.fineract.cn.lang.config.EnableTenantContext;
+import org.apache.fineract.cn.mariadb.config.EnableMariaDB;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
+import org.springframework.mail.javamail.JavaMailSender;
+import org.springframework.mail.javamail.JavaMailSenderImpl;
+import org.springframework.web.servlet.config.annotation.PathMatchConfigurer;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
+
+import java.util.Properties;
+
+@SuppressWarnings("WeakerAccess")
+@Configuration
+@EnableAutoConfiguration
+@EnableDiscoveryClient
+@EnableAsync
+@EnableTenantContext
+@EnableCassandra
+@EnableMariaDB
+@EnableCommandProcessing
+@EnableAnubis
+@EnableServiceException
+@ConfigurationProperties(locations = {"details"})
+@ComponentScan({
+    "org.apache.fineract.cn.notification.service.rest",
+    "org.apache.fineract.cn.notification.service.internal.service",
+    "org.apache.fineract.cn.notification.service.internal.repository",
+    "org.apache.fineract.cn.notification.service.internal.command.handler"
+})
+@EnableJpaRepositories({
+    "org.apache.fineract.cn.notification.service.internal.repository"
+})
+public class NotificationConfiguration extends WebMvcConfigurerAdapter {
+
+  public NotificationConfiguration() {
+    super();
+  }
+
+  @Bean(name = ServiceConstants.LOGGER_NAME)
+  public Logger logger() {
+    return LoggerFactory.getLogger(ServiceConstants.LOGGER_NAME);
+  }
+
+  @Override
+  public void configurePathMatch(final PathMatchConfigurer configurer) {
+    configurer.setUseSuffixPatternMatch(Boolean.FALSE);
+  }
+
+  @Bean
+  @Qualifier("gmail")
+  public JavaMailSender getJavaMailSender() {
+
+    JavaMailSenderImpl mailSender = new JavaMailSenderImpl();
+    mailSender.setHost("smtp.gmail.com");
+    mailSender.setPort(587);
+
+    mailSender.setUsername("ebenezergraham69@gmail.com");
+    mailSender.setPassword("fdzmzbhbmtkafzvq");
+
+    Properties props = mailSender.getJavaMailProperties();
+    props.put("mail.transport.protocol", "smtp");
+    props.put("mail.smtp.auth", "true");
+    props.put("mail.smtp.starttls.enable", "true");
+    props.put("mail.debug", "true");
+
+    return mailSender;
+  }
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/ServiceConstants.java b/service/src/main/java/org/apache/fineract/cn/notification/service/ServiceConstants.java
new file mode 100644
index 0000000..cb4e902
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/ServiceConstants.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service;
+
+public interface ServiceConstants {
+  String LOGGER_NAME = "rest-logger";
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/InitializeServiceCommand.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/InitializeServiceCommand.java
new file mode 100644
index 0000000..21335ac
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/InitializeServiceCommand.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.command;
+
+public class InitializeServiceCommand {
+
+  public InitializeServiceCommand() {
+    super();
+  }
+
+  @Override
+  public String toString() {
+    return "InitializeServiceCommand{}";
+  }
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/SampleCommand.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/SampleCommand.java
new file mode 100644
index 0000000..3fa3aac
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/SampleCommand.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.command;
+
+import org.apache.fineract.cn.notification.api.v1.domain.Sample;
+
+public class SampleCommand {
+
+  private final Sample sample;
+
+  public SampleCommand(final Sample sample) {
+    super();
+    this.sample = sample;
+  }
+
+  public Sample sample() {
+    return this.sample;
+  }
+
+  @Override
+  public String toString() {
+    return "SampleCommand{" +
+        "sample=" + sample.getIdentifier() +
+        '}';
+  }
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/MigrationAggregate.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/MigrationAggregate.java
new file mode 100644
index 0000000..da7cc6e
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/MigrationAggregate.java
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.command.handler;
+
+import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
+import org.apache.fineract.cn.notification.service.ServiceConstants;
+import org.apache.fineract.cn.notification.service.internal.command.InitializeServiceCommand;
+import javax.sql.DataSource;
+import org.apache.fineract.cn.command.annotation.Aggregate;
+import org.apache.fineract.cn.command.annotation.CommandHandler;
+import org.apache.fineract.cn.command.annotation.CommandLogLevel;
+import org.apache.fineract.cn.command.annotation.EventEmitter;
+import org.apache.fineract.cn.lang.ApplicationName;
+import org.apache.fineract.cn.mariadb.domain.FlywayFactoryBean;
+import org.slf4j.Logger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.transaction.annotation.Transactional;
+
+@SuppressWarnings({
+    "unused"
+})
+@Aggregate
+public class MigrationAggregate {
+
+  private final Logger logger;
+  private final DataSource dataSource;
+  private final FlywayFactoryBean flywayFactoryBean;
+  private final ApplicationName applicationName;
+
+  @Autowired
+  public MigrationAggregate(@Qualifier(ServiceConstants.LOGGER_NAME) final Logger logger,
+                            final DataSource dataSource,
+                            final FlywayFactoryBean flywayFactoryBean,
+                            final ApplicationName applicationName) {
+    super();
+    this.logger = logger;
+    this.dataSource = dataSource;
+    this.flywayFactoryBean = flywayFactoryBean;
+    this.applicationName = applicationName;
+  }
+
+  @CommandHandler(logStart = CommandLogLevel.INFO, logFinish = CommandLogLevel.INFO)
+  @Transactional
+  @EventEmitter(selectorName = NotificationEventConstants.SELECTOR_NAME, selectorValue = NotificationEventConstants.INITIALIZE)
+  public String initialize(final InitializeServiceCommand initializeServiceCommand) {
+    this.logger.debug("Start service migration.");
+    this.flywayFactoryBean.create(this.dataSource).migrate();
+    return this.applicationName.getVersionString();
+  }
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/SampleAggregate.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/SampleAggregate.java
new file mode 100644
index 0000000..cf09aca
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/SampleAggregate.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.command.handler;
+
+import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
+import org.apache.fineract.cn.notification.service.internal.command.SampleCommand;
+import org.apache.fineract.cn.command.annotation.Aggregate;
+import org.apache.fineract.cn.command.annotation.CommandHandler;
+import org.apache.fineract.cn.command.annotation.CommandLogLevel;
+import org.apache.fineract.cn.command.annotation.EventEmitter;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+
+@SuppressWarnings("unused")
+@Aggregate
+public class SampleAggregate {
+
+  private final SampleJpaEntityRepository sampleJpaEntityRepository;
+
+  @Autowired
+  public SampleAggregate(final SampleJpaEntityRepository sampleJpaEntityRepository) {
+    super();
+    this.sampleJpaEntityRepository = sampleJpaEntityRepository;
+  }
+
+  //TODO: Think about your command handler logging, then delete this comment.
+  // The log levels provided in the command handler cause log messages to be emitted each time this
+  // command handler is called before and after the call. Before the call, the command is logged
+  // using its toString() method, and after the call, the emitted event is logged via its toString()
+  // method.
+  //
+  // If you wish to adjust the information in the log messages, do so via the toString() methods.
+  // Financial transactions, passwords, and customer address data are examples of information which
+  // should not be placed in the logs.
+  //
+  // If a command handler should not emit a log message, change logStart and logFinish to:
+  // CommandLogLevel.NONE.
+  @CommandHandler(logStart = CommandLogLevel.INFO, logFinish = CommandLogLevel.INFO)
+  @Transactional
+  @EventEmitter(selectorName = NotificationEventConstants.SELECTOR_NAME, selectorValue = NotificationEventConstants.POST_SAMPLE)
+  public String sample(final SampleCommand sampleCommand) {
+
+    final SampleJpaEntity entity = new SampleJpaEntity();
+    entity.setIdentifier(sampleCommand.sample().getIdentifier());
+    entity.setPayload(sampleCommand.sample().getPayload());
+    this.sampleJpaEntityRepository.save(entity);
+
+    return sampleCommand.sample().getIdentifier();
+  }
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/mapper/SampleMapper.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/mapper/SampleMapper.java
new file mode 100644
index 0000000..973adee
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/mapper/SampleMapper.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.mapper;
+
+import org.apache.fineract.cn.notification.api.v1.domain.Sample;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class SampleMapper {
+
+  private SampleMapper() {
+    super();
+  }
+
+  public static Sample map(final SampleJpaEntity sampleJpaEntity) {
+    final Sample sample = new Sample();
+    sample.setIdentifier(sampleJpaEntity.getIdentifier());
+    sample.setPayload(sampleJpaEntity.getPayload());
+    return sample;
+  }
+
+  public static List<Sample> map(final List<SampleJpaEntity> sampleJpaEntities) {
+    final ArrayList<Sample> samples = new ArrayList<>(sampleJpaEntities.size());
+    samples.addAll(sampleJpaEntities.stream().map(SampleMapper::map).collect(Collectors.toList()));
+    return samples;
+  }
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/EmailGatewayConfiguration.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/EmailGatewayConfiguration.java
new file mode 100644
index 0000000..e0c6d89
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/EmailGatewayConfiguration.java
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.repository;
+
+import javax.persistence.*;
+
+@SuppressWarnings("unused")
+@Entity
+@Table(name = "email_gateway_configuration")
+public class EmailGatewayConfiguration {
+
+  @Id
+  @GeneratedValue(strategy = GenerationType.IDENTITY)
+  @Column(name = "id")
+  private Long id;
+  @Column(name = "identifier")
+  private String identifier;
+  @Column(name = "host")
+  private String host;
+  @Column(name = "port")
+  private String port;
+  @Column(name = "username")
+  private String username;
+  @Column(name = "app_id")
+  private String app_id;
+  @Column(name = "smtp_auth")
+  private String smtp_auth;
+  @Column(name = "start_tls")
+  private String start_tls;
+
+  public EmailGatewayConfiguration() {
+    super();
+  }
+
+  public Long getId() {
+    return id;
+  }
+
+  public void setId(Long id) {
+    this.id = id;
+  }
+
+  public String getIdentifier() {
+    return this.identifier;
+  }
+
+  public void setIdentifier(final String identifier) {
+    this.identifier = identifier;
+  }
+
+  public String getHost() {
+    return host;
+  }
+
+  public void setHost(String host) {
+    this.host = host;
+  }
+
+  public String getPort() {
+    return port;
+  }
+
+  public void setPort(String port) {
+    this.port = port;
+  }
+
+  public String getUsername() {
+    return username;
+  }
+
+  public void setUsername(String username) {
+    this.username = username;
+  }
+
+  public String getApp_id() {
+    return app_id;
+  }
+
+  public void setApp_id(String app_id) {
+    this.app_id = app_id;
+  }
+
+  public String getSmtp_auth() {
+    return smtp_auth;
+  }
+
+  public void setSmtp_auth(String smtp_auth) {
+    this.smtp_auth = smtp_auth;
+  }
+
+  public String getStart_tls() {
+    return start_tls;
+  }
+
+  public void setStart_tls(String start_tls) {
+    this.start_tls = start_tls;
+  }
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/EmailGatewayConfigurationRepository.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/EmailGatewayConfigurationRepository.java
new file mode 100644
index 0000000..b380def
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/EmailGatewayConfigurationRepository.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.repository;
+
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.stereotype.Repository;
+
+import java.util.Optional;
+
+@Repository
+public interface EmailGatewayConfigurationRepository extends JpaRepository<EmailGatewayConfiguration, Long> {
+  Optional<EmailGatewayConfiguration> findByIdentifier(String identifier);
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SMSGatewayConfiguration.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SMSGatewayConfiguration.java
new file mode 100644
index 0000000..770db6a
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SMSGatewayConfiguration.java
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.repository;
+
+import javax.persistence.*;
+
+@SuppressWarnings("unused")
+@Entity
+@Table(name = "sms_gateway_configuration")
+public class SMSGatewayConfiguration {
+
+  @Id
+  @GeneratedValue(strategy = GenerationType.IDENTITY)
+  @Column(name = "id")
+  private Long id;
+  @Column(name = "identifier")
+  private String identifier;
+  @Column(name = "organisation")
+  private String organisation;
+  @Column(name = "auth_token")
+  private String auth_token;
+  @Column(name = "accountid")
+  private String accountid;
+  @Column(name = "option")
+  private String option;
+
+  public SMSGatewayConfiguration() {
+    super();
+  }
+
+  public Long getId() {
+    return id;
+  }
+
+  public void setId(Long id) {
+    this.id = id;
+  }
+
+  public String getIdentifier() {
+    return this.identifier;
+  }
+
+  public void setIdentifier(final String identifier) {
+    this.identifier = identifier;
+  }
+
+  public String getOrganisation() {
+    return organisation;
+  }
+
+  public void setOrganisation(String organisation) {
+    this.organisation = organisation;
+  }
+
+  public String getAuth_token() {
+    return auth_token;
+  }
+
+  public void setAuth_token(String auth_token) {
+    this.auth_token = auth_token;
+  }
+
+  public String getAccountid() {
+    return accountid;
+  }
+
+  public void setAccountid(String accountid) {
+    this.accountid = accountid;
+  }
+
+  public String getOption() {
+    return option;
+  }
+
+  public void setOption(String option) {
+    this.option = option;
+  }
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SMSGatewayConfigurationRepository.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SMSGatewayConfigurationRepository.java
new file mode 100644
index 0000000..7daae78
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SMSGatewayConfigurationRepository.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.repository;
+
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.stereotype.Repository;
+
+import java.util.Optional;
+
+@Repository
+public interface SMSGatewayConfigurationRepository extends JpaRepository<SMSGatewayConfiguration, Long> {
+  Optional<SMSGatewayConfiguration> findByIdentifier(String identifier);
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/EmailSender.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/EmailSender.java
new file mode 100644
index 0000000..e9cc516
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/EmailSender.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.service;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.context.annotation.Bean;
+import org.springframework.mail.SimpleMailMessage;
+import org.springframework.mail.javamail.JavaMailSender;
+import org.springframework.stereotype.Service;
+
+
+@Service
+public class EmailSender {
+
+    @Autowired
+    @Qualifier("gmail")
+    private JavaMailSender sender;
+
+    public void sendEmail(String to, String subject, String message) {
+        SimpleMailMessage mail = new SimpleMailMessage();
+        mail.setTo(to);
+        mail.setSubject(subject);
+        mail.setText(message);
+        sender.send(mail);
+    }
+
+}
\ No newline at end of file
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SMSSender.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SMSSender.java
new file mode 100644
index 0000000..6bf7558
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SMSSender.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.service;
+
+
+import com.twilio.Twilio;
+import com.twilio.rest.api.v2010.account.Message;
+import com.twilio.type.PhoneNumber;
+import org.springframework.beans.factory.annotation.Value;
+import com.twilio.rest.api.v2010.account.MessageCreator;
+import org.springframework.stereotype.Service;
+
+@Service
+public class SMSSender {
+
+    @Value(value = "${smssender.accountSID}")
+    public static String ACCOUNT_SID;
+
+    @Value("${smssender.authToken}")
+    public static String AUTH_TOKEN;
+
+    @Value("${mfi.senderNumber}")
+    public static String sender;
+
+    @Value("${fineract.customer.accountcreated}")
+    public String template;
+
+    public void sendSMS(String receiver, String template) {
+
+        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
+
+        MessageCreator messageCreator = Message.creator(ACCOUNT_SID,new PhoneNumber(receiver), new PhoneNumber(sender), template);
+        Message message = messageCreator.create();
+        System.out.println(message.getSid());
+        System.out.println(message.getStatus());
+    }
+
+    }
\ No newline at end of file
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SampleService.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SampleService.java
new file mode 100644
index 0000000..bc2d5a8
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SampleService.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.service;
+
+import org.apache.fineract.cn.notification.api.v1.domain.Sample;
+import org.apache.fineract.cn.notification.service.internal.mapper.SampleMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Optional;
+
+@Service
+public class SampleService {
+
+  private final SampleJpaEntityRepository sampleJpaEntityRepository;
+
+  @Autowired
+  public SampleService(final SampleJpaEntityRepository sampleJpaEntityRepository) {
+    super();
+    this.sampleJpaEntityRepository = sampleJpaEntityRepository;
+  }
+
+  public List<Sample> findAllEntities() {
+    return SampleMapper.map(this.sampleJpaEntityRepository.findAll());
+  }
+
+  public Optional<Sample> findByIdentifier(final String identifier) {
+    return this.sampleJpaEntityRepository.findByIdentifier(identifier).map(SampleMapper::map);
+  }
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/AccountingEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/AccountingEventListener.java
new file mode 100644
index 0000000..a061b1a
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/AccountingEventListener.java
@@ -0,0 +1,130 @@
+ /*
+         * Licensed to the Apache Software Foundation (ASF) under one
+         * or more contributor license agreements.  See the NOTICE file
+         * distributed with this work for additional information
+         * regarding copyright ownership.  The ASF licenses this file
+         * to you under the Apache License, Version 2.0 (the
+         * "License"); you may not use this file except in compliance
+         * with the License.  You may obtain a copy of the License at
+         *
+         *   http://www.apache.org/licenses/LICENSE-2.0
+         *
+         * Unless required by applicable law or agreed to in writing,
+         * software distributed under the License is distributed on an
+         * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+         * KIND, either express or implied.  See the License for the
+         * specific language governing permissions and limitations
+         * under the License.
+         */
+
+        package org.apache.fineract.cn.notification.service.listener;
+
+        import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
+        import org.apache.fineract.cn.accounting.service.internal.service.AccountService;
+        import org.apache.fineract.cn.notification.service.internal.service.EmailSender;
+        import org.apache.fineract.cn.notification.service.internal.service.SMSSender;
+        import org.springframework.beans.factory.annotation.Autowired;
+        import org.springframework.jms.annotation.JmsListener;
+        import org.springframework.messaging.handler.annotation.Header;
+        import org.springframework.stereotype.Component;
+        import org.apache.fineract.cn.accounting.api.v1.EventConstants;
+
+
+@SuppressWarnings("unused")
+@Component
+public class AccountingEventListener {
+
+    AccountService accountService;
+
+    @Autowired
+    SMSSender smsSender;
+
+    @Autowired
+    EmailSender emailSender;
+
+    @Autowired
+    public AccountingEventListener( final AccountService accountingManager) {
+        this.accountService = accountingManager;
+    }
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_POST_ACCOUNT,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onCreateAccount(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant, final String payload) {
+        accountService.findAccount(tenant);
+        String receiver = "";
+        String template = "";
+        smsSender.sendSMS(receiver,template);
+        emailSender.sendEmail(receiver,"Hello", "You account has been created");
+    }
+
+     /*
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_PUT_ACCOUNT,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onChangeAccount(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                final String payload) {
+        this.logger.debug("Account modified.");
+        this.eventRecorder.event(tenant, EventConstants.PUT_ACCOUNT, payload, String.class);
+    }
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_CLOSE_ACCOUNT,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onCloseAccount(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                               final String payload) {
+        this.logger.debug("Account closed.");
+        this.eventRecorder.event(tenant, EventConstants.CLOSE_ACCOUNT, payload, String.class);
+    }
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_LOCK_ACCOUNT,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onLockAccount(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                              final String payload) {
+        this.logger.debug("Account locked.");
+        this.eventRecorder.event(tenant, EventConstants.LOCK_ACCOUNT, payload, String.class);
+    }
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_UNLOCK_ACCOUNT,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onUnlockAccount(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                final String payload) {
+        this.logger.debug("Account unlocked.");
+        this.eventRecorder.event(tenant, EventConstants.UNLOCK_ACCOUNT, payload, String.class);
+    }
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_REOPEN_ACCOUNT,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onReopenAccount(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                final String payload) {
+        this.logger.debug("Account reopened.");
+        this.eventRecorder.event(tenant, EventConstants.REOPEN_ACCOUNT, payload, String.class);
+    }
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_DELETE_ACCOUNT,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onDeleteAccount(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                final String payload) {
+        this.logger.debug("Account deleted.");
+        this.eventRecorder.event(tenant, EventConstants.DELETE_ACCOUNT, payload, String.class);
+    }
+ */
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/ChequeEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/ChequeEventListener.java
new file mode 100644
index 0000000..2c6c2cf
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/ChequeEventListener.java
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.fineract.cn.notification.service.listener;
+
+import org.apache.fineract.cn.cheque.AbstractChequeTest;
+import org.apache.fineract.cn.cheque.api.v1.EventConstants;
+import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
+import org.slf4j.Logger;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.jms.annotation.JmsListener;
+import org.springframework.messaging.handler.annotation.Header;
+import org.springframework.stereotype.Component;
+
+@Component
+public class ChequeEventListener {
+
+    private final Logger logger;
+
+    public ChequeEventListener(@Qualifier(AbstractChequeTest.TEST_LOGGER) final Logger logger) {
+        super();
+        this.logger = logger;
+    }
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_ISSUE_CHEQUES,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onIssueCheques(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                               final String payload) {
+        this.logger.debug("Cheques issued.");
+    }
+/*
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_CHEQUE_TRANSACTION,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onChequeTransaction(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                    final String payload) {
+        this.logger.debug("Cheque transaction processed.");
+        this.eventRecorder.event(tenant, EventConstants.CHEQUE_TRANSACTION, payload, String.class);
+    }
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_CHEQUE_TRANSACTION_APPROVED,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onChequeApproved(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                 final String payload) {
+        this.logger.debug("Cheque transaction approved.");
+        this.eventRecorder.event(tenant, EventConstants.CHEQUE_TRANSACTION_APPROVED, payload, String.class);
+    }
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_CHEQUE_TRANSACTION_CANCELED,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onChequeCanceled(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                 final String payload) {
+        this.logger.debug("Cheque transaction canceled.");
+        this.eventRecorder.event(tenant, EventConstants.CHEQUE_TRANSACTION_CANCELED, payload, String.class);
+    }
+*/
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/CustomerEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/CustomerEventListener.java
new file mode 100644
index 0000000..a28d83a
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/CustomerEventListener.java
@@ -0,0 +1,201 @@
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one
+     * or more contributor license agreements.  See the NOTICE file
+     * distributed with this work for additional information
+     * regarding copyright ownership.  The ASF licenses this file
+     * to you under the Apache License, Version 2.0 (the
+     * "License"); you may not use this file except in compliance
+     * with the License.  You may obtain a copy of the License at
+     *
+     *   http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing,
+     * software distributed under the License is distributed on an
+     * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+     * KIND, either express or implied.  See the License for the
+     * specific language governing permissions and limitations
+     * under the License.
+     */
+
+package org.apache.fineract.cn.notification.service.listener;
+
+import org.apache.fineract.cn.customer.api.v1.CustomerEventConstants;
+import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
+import org.apache.fineract.cn.customer.api.v1.client.CustomerManager;
+import org.apache.fineract.cn.customer.api.v1.domain.ContactDetail;
+import org.apache.fineract.cn.customer.api.v1.domain.Customer;
+import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
+import org.apache.fineract.cn.notification.service.internal.service.EmailSender;
+import org.apache.fineract.cn.notification.service.internal.service.SMSSender;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.jms.annotation.JmsListener;
+import org.springframework.messaging.handler.annotation.Header;
+import org.springframework.stereotype.Component;
+
+
+@Component
+public class CustomerEventListener {
+
+        private CustomerManager customerManager;
+        private SMSSender smsSender;
+        private EmailSender emailSender;
+
+        @Autowired
+        public CustomerEventListener( final CustomerManager customerManager, SMSSender smsSender,
+                                 final EmailSender emailSender ) {
+            this.customerManager = customerManager;
+            this.smsSender = smsSender;
+            this.emailSender = emailSender;
+        }
+
+        @JmsListener(
+                destination = CustomerEventConstants.DESTINATION,
+                selector = CustomerEventConstants.SELECTOR_POST_CUSTOMER
+        )
+        public void customerCreatedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                         final String payload) {
+
+            Customer customer = customerManager.findCustomer(payload);
+            if (customer.getContactDetails().size() > 0) {
+                customer.getContactDetails().forEach(contactDetail -> {
+                    if (contactDetail.getType().equals(ContactDetail.Type.PHONE)) {
+                        String receiverNumber = customer.getContactDetails().get(0).getValue();
+                        // TODO: pass receiver number for templating and localization.
+                        smsSender.sendSMS(receiverNumber, "Dear Valued Customer, Your account has been created");
+                    } else if (contactDetail.getType().equals(ContactDetail.Type.EMAIL)) {
+                        String emailAddress = customer.getContactDetails().get(0).getValue();
+                        // TODO: pass email address for templating and localization.
+                        emailSender.sendEmail(emailAddress, "Account created", "Dear Valued Customer, Your account has been created");
+                    }
+                });
+            }
+        }
+
+    @JmsListener(
+            destination = CustomerEventConstants.DESTINATION,
+            selector = CustomerEventConstants.SELECTOR_ACTIVATE_CUSTOMER
+    )
+    public void customerActivatedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                       final String payload) {
+        Customer customer = customerManager.findCustomer(payload);
+        if(customer.getCurrentState().equalsIgnoreCase("ACTIVE")){
+            customer.getContactDetails().forEach(contact-> {
+                if (contact.getType().equals(ContactDetail.Type.PHONE)) {
+                String receiverNumber = customer.getContactDetails().get(0).getValue();
+                smsSender.sendSMS(receiverNumber, "Dear Valued Customer, Your account has been Activated");
+            } else if (contact.getType().equals(ContactDetail.Type.EMAIL)) {
+                String emailAddress = customer.getContactDetails().get(0).getValue();
+                // TODO: pass email address for templating and localization.
+                emailSender.sendEmail(emailAddress, "Account created", "Dear Valued Customer, Your account has been Activated");
+            }
+            });
+        }
+    }
+
+    @JmsListener(
+            destination = CustomerEventConstants.DESTINATION,
+            selector = CustomerEventConstants.SELECTOR_LOCK_CUSTOMER
+    )
+    public void customerLockedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                    final String payload) {
+        Customer customer = customerManager.findCustomer(payload);
+        if(customer.getCurrentState().equalsIgnoreCase("LOCKED")){
+            customer.getContactDetails().forEach(contact-> {
+                if (contact.getType().equals(ContactDetail.Type.PHONE)) {
+                    String receiverNumber = customer.getContactDetails().get(0).getValue();
+                    smsSender.sendSMS(receiverNumber, "Dear Valued Customer, Your account has been Locked");
+                } else if (contact.getType().equals(ContactDetail.Type.EMAIL)) {
+                    String emailAddress = customer.getContactDetails().get(0).getValue();
+                    // TODO: pass email address for templating and localization.
+                    emailSender.sendEmail(emailAddress, "Account created", "Dear Valued Customer, Your account has been Locked");
+                }
+            });
+        }
+    }
+
+    @JmsListener(
+            destination = CustomerEventConstants.DESTINATION,
+            selector = CustomerEventConstants.SELECTOR_UNLOCK_CUSTOMER
+    )
+    public void customerUnlockedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                      final String payload) {
+        Customer customer = customerManager.findCustomer(payload);
+        if(customer.getCurrentState().equalsIgnoreCase("LOCKED")){
+            customer.getContactDetails().forEach(contact-> {
+                if (contact.getType().equals(ContactDetail.Type.PHONE)) {
+                    String receiverNumber = customer.getContactDetails().get(0).getValue();
+                    smsSender.sendSMS(receiverNumber, "Dear Valued Customer, Your account has been Unlocked");
+                } else if (contact.getType().equals(ContactDetail.Type.EMAIL)) {
+                    String emailAddress = customer.getContactDetails().get(0).getValue();
+                    // TODO: pass email address for templating and localization.
+                    emailSender.sendEmail(emailAddress, "Account created", "Dear Valued Customer, Your account has been Unlocked");
+                }
+            });
+        }
+    }
+
+    @JmsListener(
+            destination = CustomerEventConstants.DESTINATION,
+            selector = CustomerEventConstants.SELECTOR_CLOSE_CUSTOMER
+    )
+    public void customerClosedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                    final String payload) {
+        Customer customer = customerManager.findCustomer(payload);
+        if(customer.getCurrentState().equalsIgnoreCase("CLOSED")){
+            customer.getContactDetails().forEach(contact-> {
+                if (contact.getType().equals(ContactDetail.Type.PHONE)) {
+                    String receiverNumber = customer.getContactDetails().get(0).getValue();
+                    smsSender.sendSMS(receiverNumber, "Dear Valued Customer, Your account has been Closed");
+                } else if (contact.getType().equals(ContactDetail.Type.EMAIL)) {
+                    String emailAddress = customer.getContactDetails().get(0).getValue();
+                    // TODO: pass email address for templating and localization.
+                    emailSender.sendEmail(emailAddress, "Account created", "Dear Valued Customer, Your account has been Closed");
+                }
+            });
+        }
+    }
+
+    @JmsListener(
+            destination = CustomerEventConstants.DESTINATION,
+            selector = CustomerEventConstants.SELECTOR_REOPEN_CUSTOMER
+    )
+    public void customerReopenedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                      final String payload) {
+        Customer customer = customerManager.findCustomer(payload);
+        if(customer.getCurrentState().equalsIgnoreCase("LOCKED")){
+            customer.getContactDetails().forEach(contact-> {
+                if (contact.getType().equals(ContactDetail.Type.PHONE)) {
+                    String receiverNumber = customer.getContactDetails().get(0).getValue();
+                    smsSender.sendSMS(receiverNumber, "Dear Valued Customer, Your account has been reopened");
+                } else if (contact.getType().equals(ContactDetail.Type.EMAIL)) {
+                    String emailAddress = customer.getContactDetails().get(0).getValue();
+                    // TODO: pass email address for templating and localization.
+                    emailSender.sendEmail(emailAddress, "Account Reopened", "Dear Valued Customer, Your account has been reopened");
+                }
+            });
+        }
+    }
+    
+/*
+
+    @JmsListener(
+            destination = CustomerEventConstants.DESTINATION,
+            selector = CustomerEventConstants.SELECTOR_PUT_ADDRESS
+    )
+    public void addressChangedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                    final String payload) {
+        this.eventRecorder.event(tenant, CustomerEventConstants.PUT_ADDRESS, payload, String.class);
+    }
+
+    @JmsListener(
+            destination = CustomerEventConstants.DESTINATION,
+            selector = CustomerEventConstants.SELECTOR_PUT_IDENTIFICATION_CARD
+    )
+    public void identificationCardChangedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                               final String payload) {
+        this.eventRecorder.event(tenant, CustomerEventConstants.PUT_IDENTIFICATION_CARD, payload, String.class);
+    }
+
+
+*/
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/DepositEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/DepositEventListener.java
new file mode 100644
index 0000000..bcde220
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/DepositEventListener.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.fineract.cn.deposit.listener;
+
+import org.apache.fineract.cn.deposit.api.v1.EventConstants;
+import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
+import org.slf4j.Logger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.jms.annotation.JmsListener;
+import org.springframework.messaging.handler.annotation.Header;
+import org.springframework.stereotype.Component;
+
+@Component
+public class DepositEventListener {
+
+
+    @Autowired
+    public DepositEventListener() {
+        super();
+    }
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_INTEREST_ACCRUED,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onAccrual(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                          final String payload) {
+    }
+/*
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_DIVIDEND_DISTRIBUTION,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onDividendDistribution(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                       final String payload) {
+        this.logger.debug("Dividend distributed for product {}.", payload);
+        this.eventRecorder.event(tenant, EventConstants.DIVIDEND_DISTRIBUTION, payload, String.class);
+    }
+*/
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/IdentityEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/IdentityEventListener.java
new file mode 100644
index 0000000..142f138
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/IdentityEventListener.java
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+package org.apache.fineract.cn.notification.service.listener;
+
+import org.apache.fineract.cn.identity.api.v1.events.EventConstants;
+import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
+import org.apache.fineract.cn.test.listener.EventRecorder;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.jms.annotation.JmsListener;
+import org.springframework.messaging.handler.annotation.Header;
+import org.springframework.stereotype.Component;
+
+@Component
+public class IdentityEventListener {
+
+    private IdentityManager identityManager;
+
+    @Autowired
+    public IdentityEventListener( final IdentityManager identityManager) {
+        this.identityManager = identityManager;
+    }
+
+
+    @JmsListener(
+            subscription = EventConstants.DESTINATION,
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_POST_USER
+    )
+    public void onCreateUser(
+            @Header(TenantHeaderFilter.TENANT_HEADER)final String tenant,
+            final String payload) throws Exception {
+        eventRecorder.event(tenant, EventConstants.OPERATION_POST_USER, payload, String.class);
+    }
+
+    @JmsListener(
+            subscription = EventConstants.DESTINATION,
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_PUT_USER_ROLEIDENTIFIER
+    )
+    public void onChangeUserRole(
+            @Header(TenantHeaderFilter.TENANT_HEADER)final String tenant,
+            final String payload) throws Exception {
+        eventRecorder.event(tenant, EventConstants.OPERATION_PUT_USER_ROLEIDENTIFIER, payload, String.class);
+    }
+
+    @JmsListener(
+            subscription = EventConstants.DESTINATION,
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_PUT_USER_PASSWORD
+    )
+    public void onChangeUserPassword(
+            @Header(TenantHeaderFilter.TENANT_HEADER)final String tenant,
+            final String payload) throws Exception {
+        eventRecorder.event(tenant, EventConstants.OPERATION_PUT_USER_PASSWORD, payload, String.class);
+    }
+
+    @JmsListener(
+            subscription = EventConstants.DESTINATION,
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_AUTHENTICATE
+    )
+    public void onAuthentication(
+            @Header(TenantHeaderFilter.TENANT_HEADER)final String tenant,
+            final String payload) throws Exception {
+        eventRecorder.event(tenant, EventConstants.OPERATION_AUTHENTICATE, payload, String.class);
+    }
+
+
+}
+*/
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/OfficeEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/OfficeEventListener.java
new file mode 100644
index 0000000..c77510e
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/OfficeEventListener.java
@@ -0,0 +1,120 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+package org.apache.fineract.cn.notification.service.listener;
+
+import org.apache.fineract.cn.accounting.api.v1.EventConstants;
+import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
+import org.apache.fineract.cn.test.listener.EventRecorder;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.jms.annotation.JmsListener;
+import org.springframework.messaging.handler.annotation.Header;
+import org.springframework.stereotype.Component;
+
+@Component
+public class OfficeEventListener {
+
+    private final EventRecorder eventRecorder;
+
+    @Autowired
+    public OfficeEventListener(final EventRecorder eventRecorder) {
+        super();
+        this.eventRecorder = eventRecorder;
+    }
+
+    @JmsListener(
+            subscription = EventConstants.DESTINATION,
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_POST_EMPLOYEE
+    )
+    public void onCreateEmployee(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                 final String eventPayload) throws Exception {
+        this.eventRecorder.event(tenant, EventConstants.OPERATION_POST_EMPLOYEE, eventPayload, String.class);
+    }
+
+    @JmsListener(
+            subscription = EventConstants.DESTINATION,
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_PUT_EMPLOYEE
+    )
+    public void onUpdateEmployee(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                 final String eventPayload) throws Exception {
+        this.eventRecorder.event(tenant, EventConstants.OPERATION_PUT_EMPLOYEE, eventPayload, String.class);
+    }
+
+    @JmsListener(
+            subscription = EventConstants.DESTINATION,
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_DELETE_EMPLOYEE
+    )
+    public void onDeleteEmployee(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                 final String eventPayload) throws Exception {
+        this.eventRecorder.event(tenant, EventConstants.OPERATION_DELETE_EMPLOYEE, eventPayload, String.class);
+    }
+
+    @JmsListener(
+            subscription = EventConstants.DESTINATION,
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_PUT_CONTACT_DETAIL
+    )
+    public void onSetContactDetail(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                   final String eventPayload) throws Exception {
+        this.eventRecorder.event(tenant, EventConstants.OPERATION_PUT_CONTACT_DETAIL, eventPayload, String.class);
+    }
+
+    @JmsListener(
+            subscription = EventConstants.DESTINATION,
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_DELETE_CONTACT_DETAIL
+    )
+    public void onDeleteContactDetail(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                      final String eventPayload) throws Exception {
+        this.eventRecorder.event(tenant, EventConstants.OPERATION_DELETE_CONTACT_DETAIL, eventPayload, String.class);
+    }
+
+    public void onCreateOffice(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                               final String payload)
+            throws Exception {
+        this.eventRecorder.event(tenant, EventConstants.OPERATION_POST_OFFICE, payload, String.class);
+    }
+
+    @JmsListener(
+            subscription = EventConstants.DESTINATION,
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_DELETE_OFFICE
+    )
+    public void onDeleteOffice(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                               final String payload)
+            throws Exception {
+        this.eventRecorder.event(tenant, EventConstants.OPERATION_DELETE_OFFICE, payload, String.class);
+    }
+
+    @JmsListener(
+            subscription = EventConstants.DESTINATION,
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_PUT_OFFICE
+    )
+    public void onUpdateOffice(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                               final String payload)
+            throws Exception {
+        this.eventRecorder.event(tenant, EventConstants.OPERATION_PUT_OFFICE, payload, String.class);
+    }
+
+}
+*/
\ No newline at end of file
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PayrollEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PayrollEventListener.java
new file mode 100644
index 0000000..ce4cc70
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PayrollEventListener.java
@@ -0,0 +1,61 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+    /*
+package org.apache.fineract.cn.payroll.listener;
+
+import org.apache.fineract.cn.payroll.api.v1.EventConstants;
+import org.apache.fineract.cn.payroll.service.ServiceConstants;
+import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
+import org.apache.fineract.cn.test.listener.EventRecorder;
+import org.slf4j.Logger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.jms.annotation.JmsListener;
+import org.springframework.messaging.handler.annotation.Header;
+import org.springframework.stereotype.Component;
+
+@Component
+public class PayrollEventListener {
+
+    private final Logger logger;
+    private final EventRecorder eventRecorder;
+
+    @Autowired
+    public PayrollEventListener(@Qualifier(ServiceConstants.LOGGER_NAME) final Logger logger,
+                                       final EventRecorder eventRecorder) {
+        super();
+        this.logger = logger;
+        this.eventRecorder = eventRecorder;
+    }
+
+
+    @JmsListener(
+            subscription = EventConstants.DESTINATION,
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_POST_DISTRIBUTION
+    )
+    public void onPostCollection(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                 final String payload) {
+        this.logger.info("Payment distribution with source account {0} processed.", payload);
+        this.eventRecorder.event(tenant, EventConstants.POST_DISTRIBUTION, payload, String.class);
+    }
+
+}
+*/
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PortfolioEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PortfolioEventListener.java
new file mode 100644
index 0000000..88109a7
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PortfolioEventListener.java
@@ -0,0 +1,151 @@
+package org.apache.fineract.cn.notification.service.listener;/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.fineract.cn.individuallending.api.v1.events.IndividualLoanCommandEvent;
+import org.apache.fineract.cn.individuallending.api.v1.events.IndividualLoanEventConstants;
+import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
+import org.apache.fineract.cn.reporting.api.v1.domain.Header;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.jms.annotation.JmsListener;
+import org.springframework.stereotype.Component;
+import org.apache.fineract.cn.group.api.v1.EventConstants;
+import org.apache.fineract.cn.portfolio.api.v1.client.PortfolioManager;
+
+@SuppressWarnings("unused")
+@Component
+public class PortfolioEventListener {
+
+    @Autowired
+    public PortfolioEventListener() {
+        super();
+        //PortfolioManager portfolioManager = new PortfolioManager();
+    }
+
+    @JmsListener(
+            subscription = IndividualLoanEventConstants.DESTINATION,
+            destination = IndividualLoanEventConstants.DESTINATION,
+            selector = IndividualLoanEventConstants.SELECTOR_DENY_INDIVIDUALLOAN_CASE
+    )
+    public void onDeny(//@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                       final String payload) {
+
+    }
+
+    @JmsListener(
+            subscription = IndividualLoanEventConstants.DESTINATION,
+            destination = IndividualLoanEventConstants.DESTINATION,
+            selector = IndividualLoanEventConstants.SELECTOR_APPROVE_INDIVIDUALLOAN_CASE
+    )
+    public void onApprove(//@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                          final String payload) {
+
+    }
+
+    @JmsListener(
+            subscription = IndividualLoanEventConstants.DESTINATION,
+            destination = IndividualLoanEventConstants.DESTINATION,
+            selector = IndividualLoanEventConstants.SELECTOR_ACCEPT_PAYMENT_INDIVIDUALLOAN_CASE
+    )
+    public void onAcceptPayment(//@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                final String payload) {
+    }
+
+
+    @JmsListener(
+            subscription = IndividualLoanEventConstants.DESTINATION,
+            destination = IndividualLoanEventConstants.DESTINATION,
+            selector = IndividualLoanEventConstants.SELECTOR_DISBURSE_INDIVIDUALLOAN_CASE
+    )
+    public void onDisburse(//@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                           final String payload) {
+
+    }
+
+    @JmsListener(
+            subscription = IndividualLoanEventConstants.DESTINATION,
+            destination = IndividualLoanEventConstants.DESTINATION,
+            selector = IndividualLoanEventConstants.SELECTOR_CHECK_LATE_INDIVIDUALLOAN_CASE
+    )
+    public void onCheckLate(//@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                            final String payload) {
+
+    }
+
+    @JmsListener(
+            subscription = IndividualLoanEventConstants.DESTINATION,
+            destination = IndividualLoanEventConstants.DESTINATION,
+            selector = IndividualLoanEventConstants.SELECTOR_OPEN_INDIVIDUALLOAN_CASE
+    )
+    public void onOpen(//@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                       final String payload) {
+
+    }
+
+    @JmsListener(
+            subscription = IndividualLoanEventConstants.DESTINATION,
+            destination = IndividualLoanEventConstants.DESTINATION,
+            selector = IndividualLoanEventConstants.SELECTOR_MARK_LATE_INDIVIDUALLOAN_CASE
+    )
+    public void onMarkLate(//@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                           final String payload) {
+
+    }
+
+    @JmsListener(
+            subscription = IndividualLoanEventConstants.DESTINATION,
+            destination = IndividualLoanEventConstants.DESTINATION,
+            selector = IndividualLoanEventConstants.SELECTOR_CLOSE_INDIVIDUALLOAN_CASE
+    )
+    public void onClose(//@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                        final String payload) {
+    }
+
+    /*
+
+        @JmsListener(
+                subscription = EventConstants.DESTINATION,
+                destination = EventConstants.DESTINATION,
+                selector = EventConstants.SELECTOR_POST_GROUP
+        )
+        public void onGroupCreated(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                   final String payload) {
+            this.eventRecorder.event(tenant, EventConstants.POST_GROUP, payload, String.class);
+        }
+
+        @JmsListener(
+                subscription = EventConstants.DESTINATION,
+                destination = EventConstants.DESTINATION,
+                selector = EventConstants.SELECTOR_ACTIVATE_GROUP
+        )
+        public void onGroupActivated(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                     final String payload) {
+            this.eventRecorder.event(tenant, EventConstants.ACTIVATE_GROUP, payload, String.class);
+        }
+
+        @JmsListener(
+                subscription = EventConstants.DESTINATION,
+                destination = EventConstants.DESTINATION,
+                selector = EventConstants.SELECTOR_PUT_GROUP
+        )
+        public void onGroupUpdated(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                   final String payload) {
+            this.eventRecorder.event(tenant, EventConstants.PUT_GROUP, payload, String.class);
+        }
+         */
+    }
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/TellerEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/TellerEventListener.java
new file mode 100644
index 0000000..5b461be
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/TellerEventListener.java
@@ -0,0 +1,146 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+    /*
+package org.apache.fineract.cn.teller.listener;
+
+import org.apache.fineract.cn.teller.AbstractTellerTest;
+import org.apache.fineract.cn.teller.api.v1.EventConstants;
+import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
+import org.apache.fineract.cn.test.listener.EventRecorder;
+import org.slf4j.Logger;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.jms.annotation.JmsListener;
+import org.springframework.messaging.handler.annotation.Header;
+import org.springframework.stereotype.Component;
+
+@Component
+public class TellerEventListener {
+
+    private final Logger logger;
+    private final EventRecorder eventRecorder;
+
+    public TellerEventListener(@Qualifier(AbstractTellerTest.LOGGER_NAME) final Logger logger,
+                               final EventRecorder eventRecorder) {
+        super();
+        this.logger = logger;
+        this.eventRecorder = eventRecorder;
+    }
+
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_POST_TELLER,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onCreate(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                         final String payload) {
+        this.logger.debug("Teller {} created.", payload);
+        this.eventRecorder.event(tenant, EventConstants.POST_TELLER, payload, String.class);
+    }
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_PUT_TELLER,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onChange(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                         final String payload) {
+        this.logger.debug("Teller {} created.", payload);
+        this.eventRecorder.event(tenant, EventConstants.PUT_TELLER, payload, String.class);
+    }
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_OPEN_TELLER,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onOpen(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                       final String payload) {
+        this.logger.debug("Teller {} created.", payload);
+        this.eventRecorder.event(tenant, EventConstants.OPEN_TELLER, payload, String.class);
+    }
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_CLOSE_TELLER,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onClose(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                        final String payload) {
+        this.logger.debug("Teller {} created.", payload);
+        this.eventRecorder.event(tenant, EventConstants.CLOSE_TELLER, payload, String.class);
+    }
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_AUTHENTICATE_TELLER,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onAuthenticate(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                               final String payload) {
+        this.logger.debug("Teller {} created.", payload);
+        this.eventRecorder.event(tenant, EventConstants.AUTHENTICATE_TELLER, payload, String.class);
+    }
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_PAUSE_TELLER,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onPause(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                        final String payload) {
+        this.logger.debug("Teller {} created.", payload);
+        this.eventRecorder.event(tenant, EventConstants.PAUSE_TELLER, payload, String.class);
+    }
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_CONFIRM_TRANSACTION,
+            subscription = EventConstants.DESTINATION
+    )
+    public void confirmTransaction(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                   final String payload) {
+        this.logger.debug("Teller {} created.", payload);
+        this.eventRecorder.event(tenant, EventConstants.CONFIRM_TRANSACTION, payload, String.class);
+    }
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_DELETE_TELLER,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onDeleteTeller(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                               final String payload) {
+        this.logger.debug("Teller {} created.", payload);
+        this.eventRecorder.event(tenant, EventConstants.DELETE_TELLER, payload, String.class);
+    }
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_SAVE_DENOMINATION,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onSaveDenomination(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                   final String payload) {
+        this.logger.debug("Teller {} created.", payload);
+        this.eventRecorder.event(tenant, EventConstants.SAVE_DENOMINATION, payload, String.class);
+    }
+
+}
+*/
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/rest/NotificationRestController.java b/service/src/main/java/org/apache/fineract/cn/notification/service/rest/NotificationRestController.java
new file mode 100644
index 0000000..983b43e
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/rest/NotificationRestController.java
@@ -0,0 +1,119 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.rest;
+
+import org.apache.fineract.cn.notification.api.v1.PermittableGroupIds;
+import org.apache.fineract.cn.notification.api.v1.domain.Sample;
+import org.apache.fineract.cn.notification.service.ServiceConstants;
+import org.apache.fineract.cn.notification.service.internal.command.InitializeServiceCommand;
+import org.apache.fineract.cn.notification.service.internal.command.SampleCommand;
+import org.apache.fineract.cn.notification.service.internal.service.SampleService;
+import java.util.List;
+import javax.validation.Valid;
+import org.apache.fineract.cn.anubis.annotation.AcceptedTokenType;
+import org.apache.fineract.cn.anubis.annotation.Permittable;
+import org.apache.fineract.cn.command.gateway.CommandGateway;
+import org.apache.fineract.cn.lang.ServiceException;
+import org.slf4j.Logger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.RestController;
+
+@SuppressWarnings("unused")
+@RestController
+@RequestMapping("/")
+public class NotificationRestController {
+
+  private final Logger logger;
+  private final CommandGateway commandGateway;
+  private final SampleService sampleService;
+
+  @Autowired
+  public NotificationRestController(@Qualifier(ServiceConstants.LOGGER_NAME) final Logger logger,
+                              final CommandGateway commandGateway,
+                              final SampleService sampleService) {
+    super();
+    this.logger = logger;
+    this.commandGateway = commandGateway;
+    this.sampleService = sampleService;
+  }
+
+  @Permittable(value = AcceptedTokenType.SYSTEM)
+  @RequestMapping(
+      value = "/initialize",
+      method = RequestMethod.POST,
+      consumes = MediaType.ALL_VALUE,
+      produces = MediaType.APPLICATION_JSON_VALUE
+  )
+  public
+  @ResponseBody
+  ResponseEntity<Void> initialize() throws InterruptedException {
+      this.commandGateway.process(new InitializeServiceCommand());
+      return ResponseEntity.accepted().build();
+  }
+
+  @Permittable(value = AcceptedTokenType.TENANT, groupId = PermittableGroupIds.SAMPLE_MANAGEMENT)
+  @RequestMapping(
+          value = "/sample",
+          method = RequestMethod.GET,
+          consumes = MediaType.ALL_VALUE,
+          produces = MediaType.APPLICATION_JSON_VALUE
+  )
+  public
+  @ResponseBody
+  List<Sample> findAllEntities() {
+    return this.sampleService.findAllEntities();
+  }
+
+  @Permittable(value = AcceptedTokenType.TENANT, groupId = PermittableGroupIds.SAMPLE_MANAGEMENT)
+  @RequestMapping(
+          value = "/sample/{identifier}",
+          method = RequestMethod.GET,
+          consumes = MediaType.ALL_VALUE,
+          produces = MediaType.APPLICATION_JSON_VALUE
+  )
+  public
+  @ResponseBody
+  ResponseEntity<Sample> getEntity(@PathVariable("identifier") final String identifier) {
+    return this.sampleService.findByIdentifier(identifier)
+            .map(ResponseEntity::ok)
+            .orElseThrow(() -> ServiceException.notFound("Instance with identifier " + identifier + " doesn't exist."));
+  }
+
+  @Permittable(value = AcceptedTokenType.TENANT, groupId = PermittableGroupIds.SAMPLE_MANAGEMENT)
+  @RequestMapping(
+      value = "/sample",
+      method = RequestMethod.POST,
+      consumes = MediaType.APPLICATION_JSON_VALUE,
+      produces = MediaType.APPLICATION_JSON_VALUE
+  )
+  public
+  @ResponseBody
+  ResponseEntity<Void> createEntity(@RequestBody @Valid final Sample instance) throws InterruptedException {
+    this.commandGateway.process(new SampleCommand(instance));
+    return ResponseEntity.accepted().build();
+  }
+}
diff --git a/service/src/main/resources/application.yml b/service/src/main/resources/application.yml
new file mode 100644
index 0000000..37acaaf
--- /dev/null
+++ b/service/src/main/resources/application.yml
@@ -0,0 +1,78 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+spring:
+  cloud:
+    discovery:
+      enabled: false
+    config:
+      enabled: false
+
+eureka:
+  client:
+    serviceUrl:
+      defaultZone: http://localhost:8761/eureka/
+
+server:
+  port: 8081
+  contextPath: /notification/v1/*
+
+cassandra:
+  clusterName: staging_cluster
+  contactPoints: 127.0.0.1:9042,127.0.0.2:9042,127.0.0.3:9042
+  keyspace: seshat
+  cl:
+    read: LOCAL_QUORUM
+    write: LOCAL_QUORUM
+    delete: LOCAL_QUORUM
+
+mariadb:
+  driverClass: org.mariadb.jdbc.Driver
+  database: seshat
+  host: localhost
+  port: 3306
+  user: root
+  password: mysql
+
+bonecp:
+  idleMaxAgeInMinutes: 240
+  idleConnectionTestPeriodInMinutes: 60
+  maxConnectionsPerPartition: 10
+  minConnectionsPerPartition: 1
+  partitionCount: 2
+  acquireIncrement: 5
+  statementsCacheSize: 100
+
+async:
+  corePoolSize: 32
+  maxPoolSize: 16384
+  queueCapacity: 0
+  threadName: async-processor-
+
+flyway:
+  enabled: false
+
+fineract:
+  customer:
+    accountcreated:
+      message: Dear Valued Customer, Your account has been created.
+    accountclosed:
+      message: Dear Valued Customer, Your account has been successfully closed.
+
+
diff --git a/service/src/main/resources/bootstrap.yml b/service/src/main/resources/bootstrap.yml
new file mode 100644
index 0000000..76c2441
--- /dev/null
+++ b/service/src/main/resources/bootstrap.yml
@@ -0,0 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+spring:
+    application:
+        name: notification-v1
diff --git a/service/src/main/resources/db/migrations/mariadb/V1__initial_setup.sql b/service/src/main/resources/db/migrations/mariadb/V1__initial_setup.sql
new file mode 100644
index 0000000..b68edad
--- /dev/null
+++ b/service/src/main/resources/db/migrations/mariadb/V1__initial_setup.sql
@@ -0,0 +1,32 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--   http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing,
+-- software distributed under the License is distributed on an
+-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+-- KIND, either express or implied.  See the License for the
+-- specific language governing permissions and limitations
+-- under the License.
+--
+
+CREATE TABLE notification (
+  id BIGINT NOT NULL AUTO_INCREMENT,
+  identifier VARCHAR(8) NOT NULL,
+  payload VARCHAR(512) NULL,
+  CONSTRAINT notification_pk PRIMARY KEY (id)
+);
+
+CREATE TABLE template_sample (
+  id BIGINT NOT NULL AUTO_INCREMENT,
+  identifier VARCHAR(8) NOT NULL,
+  payload VARCHAR(512) NULL,
+  CONSTRAINT template_sample_pk PRIMARY KEY (id)
+);
diff --git a/settings.gradle b/settings.gradle
new file mode 100644
index 0000000..868411f
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+rootProject.name = 'notification'
+
+includeBuild 'api'
+includeBuild 'service'
+includeBuild 'component-test'
+
diff --git a/shared.gradle b/shared.gradle
new file mode 100644
index 0000000..a01bb15
--- /dev/null
+++ b/shared.gradle
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+group 'org.apache.fineract.cn.notification'
+version '0.1.0.BUILD-SNAPSHOT'
+
+ext.versions = [
+        fineractcnidentity      : '0.1.0-BUILD-SNAPSHOT',
+        fineractcnprovisioner   : '0.1.0-BUILD-SNAPSHOT',
+        fineractcnrhythm        : '0.1.0-BUILD-SNAPSHOT',
+        fineractcnoffice        : '0.1.0-BUILD-SNAPSHOT',
+        fineractcncustomer      : '0.1.0-BUILD-SNAPSHOT',
+        fineractcnaccounting    : '0.1.0-BUILD-SNAPSHOT',
+        fineractcnportfolio     : '0.1.0-BUILD-SNAPSHOT',
+        fineractcndeposit       : '0.1.0-BUILD-SNAPSHOT',
+        fineractcnteller        : '0.1.0-BUILD-SNAPSHOT',
+        kuelapcheques           : '0.1.0-BUILD-SNAPSHOT',
+        fineractcnpayroll       : '0.1.0-BUILD-SNAPSHOT',
+        fineractcngroup         : '0.1.0-BUILD-SNAPSHOT',
+        frameworkapi            : '0.1.0-BUILD-SNAPSHOT',
+        frameworklang           : '0.1.0-BUILD-SNAPSHOT',
+        frameworkasync          : '0.1.0-BUILD-SNAPSHOT',
+        frameworkcassandra      : '0.1.0-BUILD-SNAPSHOT',
+        frameworkmariadb        : '0.1.0-BUILD-SNAPSHOT',
+        frameworkcommand        : '0.1.0-BUILD-SNAPSHOT',
+        frameworktest           : '0.1.0-BUILD-SNAPSHOT',
+        frameworkanubis         : '0.1.0-BUILD-SNAPSHOT',
+        validator : '5.3.0.Final'
+]
+
+apply plugin: 'java'
+apply plugin: 'idea'
+apply plugin: 'maven-publish'
+apply plugin: 'io.spring.dependency-management'
+
+tasks.withType(JavaCompile) {
+    sourceCompatibility = JavaVersion.VERSION_1_8
+    targetCompatibility = JavaVersion.VERSION_1_8
+}
+
+repositories {
+    jcenter()
+    mavenLocal()
+}
+
+dependencyManagement {
+    imports {
+        mavenBom 'io.spring.platform:platform-bom:Athens-RELEASE'
+        mavenBom 'org.springframework.cloud:spring-cloud-dependencies:Camden.SR1'
+    }
+}
+
+// override certain dependency provided by Spring platform using newer releases
+ext['cassandra.version'] = '3.6'
+ext['cassandra-driver.version'] = '3.1.2'
+ext['activemq.version'] = '5.13.2'
+ext['spring-data-releasetrain.version'] = 'Gosling-SR2A'
+
+dependencies {
+    compile(
+            [group: 'com.google.code.findbugs', name: 'jsr305']
+    )
+
+    testCompile(
+            [group: 'org.springframework.boot', name: 'spring-boot-starter-test']
+    )
+}
+
+jar {
+    from sourceSets.main.allSource
+    duplicatesStrategy = DuplicatesStrategy.EXCLUDE
+}
+
+license {
+    header rootProject.file('../HEADER')
+    strictCheck true
+    mapping {
+        java = 'SLASHSTAR_STYLE'
+        xml = 'XML_STYLE'
+        yml = 'SCRIPT_STYLE'
+        yaml = 'SCRIPT_STYLE'
+    }
+}
+
+rat {
+    // List of exclude directives, defaults to ['**/.gradle/**']
+    excludes = [
+            "**/.idea/**",
+            "**/.gradle/**",
+            "**/gradle/**",
+            "**/build/**",
+            "gradlew",
+            "gradlew.bat",
+            "README.md"
+    ]
+}
+
diff --git a/system-analysis.mdj b/system-analysis.mdj
new file mode 100644
index 0000000..4c7f1af
--- /dev/null
+++ b/system-analysis.mdj
@@ -0,0 +1,4104 @@
+{
+	"_type": "Project",
+	"_id": "AAAAAAFF+h6SjaM2Hec=",
+	"name": "Untitled",
+	"ownedElements": [
+		{
+			"_type": "UMLModel",
+			"_id": "AAAAAAFF+qBWK6M3Z8Y=",
+			"_parent": {
+				"$ref": "AAAAAAFF+h6SjaM2Hec="
+			},
+			"name": "Model",
+			"ownedElements": [
+				{
+					"_type": "UMLClassDiagram",
+					"_id": "AAAAAAFF+qBtyKM79qY=",
+					"_parent": {
+						"$ref": "AAAAAAFF+qBWK6M3Z8Y="
+					},
+					"name": "Main",
+					"visible": true,
+					"defaultDiagram": true
+				},
+				{
+					"_type": "UMLActivity",
+					"_id": "AAAAAAFjqASLHqqfH1M=",
+					"_parent": {
+						"$ref": "AAAAAAFF+qBWK6M3Z8Y="
+					},
+					"name": "Activity1",
+					"ownedElements": [
+						{
+							"_type": "UMLActivityDiagram",
+							"_id": "AAAAAAFjqASLIKqg3FE=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"name": "Notification Activity",
+							"visible": true,
+							"defaultDiagram": false,
+							"ownedViews": [
+								{
+									"_type": "UMLControlNodeView",
+									"_id": "AAAAAAFjqASvhqqmFR0=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqASvhaqkmH0="
+									},
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Arial;13;0",
+									"showShadow": true,
+									"containerChangeable": true,
+									"containerExtending": false,
+									"left": 178,
+									"top": 32,
+									"width": 20,
+									"height": 20,
+									"autoResize": false
+								},
+								{
+									"_type": "UMLActionView",
+									"_id": "AAAAAAFjqATelaqrA88=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqATelKqpPIs="
+									},
+									"subViews": [
+										{
+											"_type": "UMLNameCompartmentView",
+											"_id": "AAAAAAFjqATelqqsQwY=",
+											"_parent": {
+												"$ref": "AAAAAAFjqATelaqrA88="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqATelKqpPIs="
+											},
+											"subViews": [
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqATelqqtdxw=",
+													"_parent": {
+														"$ref": "AAAAAAFjqATelqqsQwY="
+													},
+													"visible": false,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": 32,
+													"top": 0,
+													"width": 0,
+													"height": 13,
+													"autoResize": false,
+													"underline": false,
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												},
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqATel6qupnU=",
+													"_parent": {
+														"$ref": "AAAAAAFjqATelqqsQwY="
+													},
+													"visible": true,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;1",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": 144,
+													"top": 95,
+													"width": 87,
+													"height": 26,
+													"autoResize": false,
+													"underline": false,
+													"text": "JMSListener injects event",
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": true
+												},
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqATemKqvl8w=",
+													"_parent": {
+														"$ref": "AAAAAAFjqATelqqsQwY="
+													},
+													"visible": false,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": 32,
+													"top": 0,
+													"width": 86,
+													"height": 13,
+													"autoResize": false,
+													"underline": false,
+													"text": "(from Activity1)",
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												},
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqATemKqwuws=",
+													"_parent": {
+														"$ref": "AAAAAAFjqATelqqsQwY="
+													},
+													"visible": false,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": 32,
+													"top": 0,
+													"width": 0,
+													"height": 13,
+													"autoResize": false,
+													"underline": false,
+													"horizontalAlignment": 1,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												}
+											],
+											"visible": true,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Arial;13;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 139,
+											"top": 88,
+											"width": 97,
+											"height": 38,
+											"autoResize": false,
+											"stereotypeLabel": {
+												"$ref": "AAAAAAFjqATelqqtdxw="
+											},
+											"nameLabel": {
+												"$ref": "AAAAAAFjqATel6qupnU="
+											},
+											"namespaceLabel": {
+												"$ref": "AAAAAAFjqATemKqvl8w="
+											},
+											"propertyLabel": {
+												"$ref": "AAAAAAFjqATemKqwuws="
+											}
+										}
+									],
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Arial;13;0",
+									"showShadow": true,
+									"containerChangeable": true,
+									"containerExtending": false,
+									"left": 139,
+									"top": 88,
+									"width": 97,
+									"height": 54,
+									"autoResize": false,
+									"stereotypeDisplay": "label",
+									"showVisibility": true,
+									"showNamespace": false,
+									"showProperty": true,
+									"showType": true,
+									"nameCompartment": {
+										"$ref": "AAAAAAFjqATelqqsQwY="
+									},
+									"wordWrap": true
+								},
+								{
+									"_type": "UMLActionView",
+									"_id": "AAAAAAFjqAWrCqrNuOs=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqAWrCarLlr0="
+									},
+									"subViews": [
+										{
+											"_type": "UMLNameCompartmentView",
+											"_id": "AAAAAAFjqAWrCqrOxcc=",
+											"_parent": {
+												"$ref": "AAAAAAFjqAWrCqrNuOs="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqAWrCarLlr0="
+											},
+											"subViews": [
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqAWrC6rPvtY=",
+													"_parent": {
+														"$ref": "AAAAAAFjqAWrCqrOxcc="
+													},
+													"visible": false,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": -366,
+													"top": 304,
+													"width": 0,
+													"height": 13,
+													"autoResize": false,
+													"underline": false,
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												},
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqAWrC6rQZmc=",
+													"_parent": {
+														"$ref": "AAAAAAFjqAWrCqrOxcc="
+													},
+													"visible": true,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;1",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": 45,
+													"top": 351,
+													"width": 95,
+													"height": 52,
+													"autoResize": false,
+													"underline": false,
+													"text": "retrieve receipt SMS and email contact",
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": true
+												},
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqAWrC6rRHbU=",
+													"_parent": {
+														"$ref": "AAAAAAFjqAWrCqrOxcc="
+													},
+													"visible": false,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": -366,
+													"top": 304,
+													"width": 86,
+													"height": 13,
+													"autoResize": false,
+													"underline": false,
+													"text": "(from Activity1)",
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												},
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqAWrC6rS8Ik=",
+													"_parent": {
+														"$ref": "AAAAAAFjqAWrCqrOxcc="
+													},
+													"visible": false,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": -366,
+													"top": 304,
+													"width": 0,
+													"height": 13,
+													"autoResize": false,
+													"underline": false,
+													"horizontalAlignment": 1,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												}
+											],
+											"visible": true,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Arial;13;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 40,
+											"top": 344,
+											"width": 105,
+											"height": 64,
+											"autoResize": false,
+											"stereotypeLabel": {
+												"$ref": "AAAAAAFjqAWrC6rPvtY="
+											},
+											"nameLabel": {
+												"$ref": "AAAAAAFjqAWrC6rQZmc="
+											},
+											"namespaceLabel": {
+												"$ref": "AAAAAAFjqAWrC6rRHbU="
+											},
+											"propertyLabel": {
+												"$ref": "AAAAAAFjqAWrC6rS8Ik="
+											}
+										}
+									],
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Arial;13;0",
+									"showShadow": true,
+									"containerChangeable": true,
+									"containerExtending": false,
+									"left": 40,
+									"top": 344,
+									"width": 105,
+									"height": 80,
+									"autoResize": false,
+									"stereotypeDisplay": "label",
+									"showVisibility": true,
+									"showNamespace": false,
+									"showProperty": true,
+									"showType": true,
+									"nameCompartment": {
+										"$ref": "AAAAAAFjqAWrCqrOxcc="
+									},
+									"wordWrap": true
+								},
+								{
+									"_type": "UMLActionView",
+									"_id": "AAAAAAFjqAYmKaro5lo=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqAYmKKrmL6s="
+									},
+									"subViews": [
+										{
+											"_type": "UMLNameCompartmentView",
+											"_id": "AAAAAAFjqAYmKarpUFk=",
+											"_parent": {
+												"$ref": "AAAAAAFjqAYmKaro5lo="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqAYmKKrmL6s="
+											},
+											"subViews": [
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqAYmKqrq62s=",
+													"_parent": {
+														"$ref": "AAAAAAFjqAYmKarpUFk="
+													},
+													"visible": false,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": 322,
+													"top": 224,
+													"width": 0,
+													"height": 13,
+													"autoResize": false,
+													"underline": false,
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												},
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqAYmKqrr75M=",
+													"_parent": {
+														"$ref": "AAAAAAFjqAYmKarpUFk="
+													},
+													"visible": true,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;1",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": 213,
+													"top": 351,
+													"width": 111,
+													"height": 39,
+													"autoResize": false,
+													"underline": false,
+													"text": "Prepare Message with template created",
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": true
+												},
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqAYmK6rsSQ0=",
+													"_parent": {
+														"$ref": "AAAAAAFjqAYmKarpUFk="
+													},
+													"visible": false,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": 322,
+													"top": 224,
+													"width": 86,
+													"height": 13,
+													"autoResize": false,
+													"underline": false,
+													"text": "(from Activity1)",
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												},
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqAYmK6rtvPo=",
+													"_parent": {
+														"$ref": "AAAAAAFjqAYmKarpUFk="
+													},
+													"visible": false,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": 322,
+													"top": 224,
+													"width": 0,
+													"height": 13,
+													"autoResize": false,
+													"underline": false,
+													"horizontalAlignment": 1,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												}
+											],
+											"visible": true,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Arial;13;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 208,
+											"top": 344,
+											"width": 121,
+											"height": 51,
+											"autoResize": false,
+											"stereotypeLabel": {
+												"$ref": "AAAAAAFjqAYmKqrq62s="
+											},
+											"nameLabel": {
+												"$ref": "AAAAAAFjqAYmKqrr75M="
+											},
+											"namespaceLabel": {
+												"$ref": "AAAAAAFjqAYmK6rsSQ0="
+											},
+											"propertyLabel": {
+												"$ref": "AAAAAAFjqAYmK6rtvPo="
+											}
+										}
+									],
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Arial;13;0",
+									"showShadow": true,
+									"containerChangeable": true,
+									"containerExtending": false,
+									"left": 208,
+									"top": 344,
+									"width": 121,
+									"height": 67,
+									"autoResize": false,
+									"stereotypeDisplay": "label",
+									"showVisibility": true,
+									"showNamespace": false,
+									"showProperty": true,
+									"showType": true,
+									"nameCompartment": {
+										"$ref": "AAAAAAFjqAYmKarpUFk="
+									},
+									"wordWrap": true
+								},
+								{
+									"_type": "UMLActionView",
+									"_id": "AAAAAAFjqAZdgqsCYJQ=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqAZdgasAyFA="
+									},
+									"subViews": [
+										{
+											"_type": "UMLNameCompartmentView",
+											"_id": "AAAAAAFjqAZdgqsDDao=",
+											"_parent": {
+												"$ref": "AAAAAAFjqAZdgqsCYJQ="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqAZdgasAyFA="
+											},
+											"subViews": [
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqAZdgqsEhl4=",
+													"_parent": {
+														"$ref": "AAAAAAFjqAZdgqsDDao="
+													},
+													"visible": false,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": -240,
+													"top": 528,
+													"width": 0,
+													"height": 13,
+													"autoResize": false,
+													"underline": false,
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												},
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqAZdgqsF8Ko=",
+													"_parent": {
+														"$ref": "AAAAAAFjqAZdgqsDDao="
+													},
+													"visible": true,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;1",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": 136,
+													"top": 591,
+													"width": 103,
+													"height": 39,
+													"autoResize": false,
+													"underline": false,
+													"text": "Senders Objects transmit the data",
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": true
+												},
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqAZdgqsGu+E=",
+													"_parent": {
+														"$ref": "AAAAAAFjqAZdgqsDDao="
+													},
+													"visible": false,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": -240,
+													"top": 528,
+													"width": 86,
+													"height": 13,
+													"autoResize": false,
+													"underline": false,
+													"text": "(from Activity1)",
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												},
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqAZdgqsH70w=",
+													"_parent": {
+														"$ref": "AAAAAAFjqAZdgqsDDao="
+													},
+													"visible": false,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": -240,
+													"top": 528,
+													"width": 0,
+													"height": 13,
+													"autoResize": false,
+													"underline": false,
+													"horizontalAlignment": 1,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												}
+											],
+											"visible": true,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Arial;13;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 131,
+											"top": 584,
+											"width": 113,
+											"height": 51,
+											"autoResize": false,
+											"stereotypeLabel": {
+												"$ref": "AAAAAAFjqAZdgqsEhl4="
+											},
+											"nameLabel": {
+												"$ref": "AAAAAAFjqAZdgqsF8Ko="
+											},
+											"namespaceLabel": {
+												"$ref": "AAAAAAFjqAZdgqsGu+E="
+											},
+											"propertyLabel": {
+												"$ref": "AAAAAAFjqAZdgqsH70w="
+											}
+										}
+									],
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Arial;13;0",
+									"showShadow": true,
+									"containerChangeable": true,
+									"containerExtending": false,
+									"left": 131,
+									"top": 584,
+									"width": 113,
+									"height": 67,
+									"autoResize": false,
+									"stereotypeDisplay": "label",
+									"showVisibility": true,
+									"showNamespace": false,
+									"showProperty": true,
+									"showType": true,
+									"nameCompartment": {
+										"$ref": "AAAAAAFjqAZdgqsDDao="
+									},
+									"wordWrap": true
+								},
+								{
+									"_type": "UMLControlNodeView",
+									"_id": "AAAAAAFjqAbQ96sfooI=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqAbQ7asd+Ww="
+									},
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Arial;13;0",
+									"showShadow": true,
+									"containerChangeable": true,
+									"containerExtending": false,
+									"left": 175,
+									"top": 680,
+									"width": 26,
+									"height": 26,
+									"autoResize": false
+								},
+								{
+									"_type": "UMLActionView",
+									"_id": "AAAAAAFjqA2/Cata4OI=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqA2/A6tYai0="
+									},
+									"subViews": [
+										{
+											"_type": "UMLNameCompartmentView",
+											"_id": "AAAAAAFjqA2/C6tbg3o=",
+											"_parent": {
+												"$ref": "AAAAAAFjqA2/Cata4OI="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqA2/A6tYai0="
+											},
+											"subViews": [
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqA2/C6tcNpM=",
+													"_parent": {
+														"$ref": "AAAAAAFjqA2/C6tbg3o="
+													},
+													"visible": false,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": 178,
+													"top": 336,
+													"width": 0,
+													"height": 13,
+													"autoResize": false,
+													"underline": false,
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												},
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqA2/DKtd5Og=",
+													"_parent": {
+														"$ref": "AAAAAAFjqA2/C6tbg3o="
+													},
+													"visible": true,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;1",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": 229,
+													"top": 463,
+													"width": 79,
+													"height": 26,
+													"autoResize": false,
+													"underline": false,
+													"text": "Locatize Template",
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": true
+												},
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqA2/DateYyA=",
+													"_parent": {
+														"$ref": "AAAAAAFjqA2/C6tbg3o="
+													},
+													"visible": false,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": 178,
+													"top": 336,
+													"width": 86,
+													"height": 13,
+													"autoResize": false,
+													"underline": false,
+													"text": "(from Activity1)",
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												},
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqA2/Datf4DQ=",
+													"_parent": {
+														"$ref": "AAAAAAFjqA2/C6tbg3o="
+													},
+													"visible": false,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": 178,
+													"top": 336,
+													"width": 0,
+													"height": 13,
+													"autoResize": false,
+													"underline": false,
+													"horizontalAlignment": 1,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												}
+											],
+											"visible": true,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Arial;13;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 224,
+											"top": 456,
+											"width": 89,
+											"height": 38,
+											"autoResize": false,
+											"stereotypeLabel": {
+												"$ref": "AAAAAAFjqA2/C6tcNpM="
+											},
+											"nameLabel": {
+												"$ref": "AAAAAAFjqA2/DKtd5Og="
+											},
+											"namespaceLabel": {
+												"$ref": "AAAAAAFjqA2/DateYyA="
+											},
+											"propertyLabel": {
+												"$ref": "AAAAAAFjqA2/Datf4DQ="
+											}
+										}
+									],
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Arial;13;0",
+									"showShadow": true,
+									"containerChangeable": true,
+									"containerExtending": false,
+									"left": 224,
+									"top": 456,
+									"width": 89,
+									"height": 54,
+									"autoResize": false,
+									"stereotypeDisplay": "label",
+									"showVisibility": true,
+									"showNamespace": false,
+									"showProperty": true,
+									"showType": true,
+									"nameCompartment": {
+										"$ref": "AAAAAAFjqA2/C6tbg3o="
+									},
+									"wordWrap": true
+								},
+								{
+									"_type": "UMLControlNodeView",
+									"_id": "AAAAAAFjqBIJL6ubZ3I=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqBIJLquZsRo="
+									},
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": true,
+									"containerExtending": false,
+									"left": 131,
+									"top": 288,
+									"width": 113,
+									"height": 6,
+									"autoResize": false
+								},
+								{
+									"_type": "UMLControlFlowView",
+									"_id": "AAAAAAFjqBIoa6ugHqY=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqBIoaquel/4="
+									},
+									"subViews": [
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqBIoa6uhY6U=",
+											"_parent": {
+												"$ref": "AAAAAAFjqBIoa6ugHqY="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqBIoaquel/4="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 201,
+											"top": 151,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqBIoa6ugHqY="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqBIoa6uivk8=",
+											"_parent": {
+												"$ref": "AAAAAAFjqBIoa6ugHqY="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqBIoaquel/4="
+											},
+											"visible": null,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 216,
+											"top": 151,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 30,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqBIoa6ugHqY="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqBIobKujWVc=",
+											"_parent": {
+												"$ref": "AAAAAAFjqBIoa6ugHqY="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqBIoaquel/4="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 172,
+											"top": 152,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": -1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqBIoa6ugHqY="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										}
+									],
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"head": {
+										"$ref": "AAAAAAFjqCEih6yTO40="
+									},
+									"tail": {
+										"$ref": "AAAAAAFjqATelaqrA88="
+									},
+									"lineStyle": 1,
+									"points": "187:142;187:175",
+									"stereotypeDisplay": "label",
+									"showVisibility": true,
+									"showProperty": true,
+									"nameLabel": {
+										"$ref": "AAAAAAFjqBIoa6uhY6U="
+									},
+									"stereotypeLabel": {
+										"$ref": "AAAAAAFjqBIoa6uivk8="
+									},
+									"propertyLabel": {
+										"$ref": "AAAAAAFjqBIobKujWVc="
+									}
+								},
+								{
+									"_type": "UMLControlFlowView",
+									"_id": "AAAAAAFjqBKjHquxAW0=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqBKjHquv5CM="
+									},
+									"subViews": [
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqBKjHquyqKs=",
+											"_parent": {
+												"$ref": "AAAAAAFjqBKjHquxAW0="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqBKjHquv5CM="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 201,
+											"top": 62,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqBKjHquxAW0="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqBKjHquzayI=",
+											"_parent": {
+												"$ref": "AAAAAAFjqBKjHquxAW0="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqBKjHquv5CM="
+											},
+											"visible": null,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 216,
+											"top": 62,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 30,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqBKjHquxAW0="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqBKjHqu0+xU=",
+											"_parent": {
+												"$ref": "AAAAAAFjqBKjHquxAW0="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqBKjHquv5CM="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 172,
+											"top": 63,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": -1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqBKjHquxAW0="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										}
+									],
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"head": {
+										"$ref": "AAAAAAFjqATelaqrA88="
+									},
+									"tail": {
+										"$ref": "AAAAAAFjqASvhqqmFR0="
+									},
+									"lineStyle": 1,
+									"points": "187:52;187:87",
+									"stereotypeDisplay": "label",
+									"showVisibility": true,
+									"showProperty": true,
+									"nameLabel": {
+										"$ref": "AAAAAAFjqBKjHquyqKs="
+									},
+									"stereotypeLabel": {
+										"$ref": "AAAAAAFjqBKjHquzayI="
+									},
+									"propertyLabel": {
+										"$ref": "AAAAAAFjqBKjHqu0+xU="
+									}
+								},
+								{
+									"_type": "UMLControlFlowView",
+									"_id": "AAAAAAFjqBLYAqvEqog=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqBLYAqvCSQk="
+									},
+									"subViews": [
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqBLYAqvFiZM=",
+											"_parent": {
+												"$ref": "AAAAAAFjqBLYAqvEqog="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqBLYAqvCSQk="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 282,
+											"top": 426,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqBLYAqvEqog="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqBLYAqvGPAg=",
+											"_parent": {
+												"$ref": "AAAAAAFjqBLYAqvEqog="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqBLYAqvCSQk="
+											},
+											"visible": null,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 297,
+											"top": 426,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 30,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqBLYAqvEqog="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqBLYAqvHWRk=",
+											"_parent": {
+												"$ref": "AAAAAAFjqBLYAqvEqog="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqBLYAqvCSQk="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 253,
+											"top": 427,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": -1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqBLYAqvEqog="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										}
+									],
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"head": {
+										"$ref": "AAAAAAFjqA2/Cata4OI="
+									},
+									"tail": {
+										"$ref": "AAAAAAFjqAYmKaro5lo="
+									},
+									"lineStyle": 1,
+									"points": "268:411;268:455",
+									"stereotypeDisplay": "label",
+									"showVisibility": true,
+									"showProperty": true,
+									"nameLabel": {
+										"$ref": "AAAAAAFjqBLYAqvFiZM="
+									},
+									"stereotypeLabel": {
+										"$ref": "AAAAAAFjqBLYAqvGPAg="
+									},
+									"propertyLabel": {
+										"$ref": "AAAAAAFjqBLYAqvHWRk="
+									}
+								},
+								{
+									"_type": "UMLControlFlowView",
+									"_id": "AAAAAAFjqBLqN6vVVDc=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqBLqNqvTow0="
+									},
+									"subViews": [
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqBLqOKvWpw0=",
+											"_parent": {
+												"$ref": "AAAAAAFjqBLqN6vVVDc="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqBLqNqvTow0="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 201,
+											"top": 658,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqBLqN6vVVDc="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqBLqOKvX76Y=",
+											"_parent": {
+												"$ref": "AAAAAAFjqBLqN6vVVDc="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqBLqNqvTow0="
+											},
+											"visible": null,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 216,
+											"top": 658,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 30,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqBLqN6vVVDc="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqBLqOavYEPE=",
+											"_parent": {
+												"$ref": "AAAAAAFjqBLqN6vVVDc="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqBLqNqvTow0="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 172,
+											"top": 659,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": -1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqBLqN6vVVDc="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										}
+									],
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"head": {
+										"$ref": "AAAAAAFjqAbQ96sfooI="
+									},
+									"tail": {
+										"$ref": "AAAAAAFjqAZdgqsCYJQ="
+									},
+									"lineStyle": 1,
+									"points": "187:651;187:679",
+									"stereotypeDisplay": "label",
+									"showVisibility": true,
+									"showProperty": true,
+									"nameLabel": {
+										"$ref": "AAAAAAFjqBLqOKvWpw0="
+									},
+									"stereotypeLabel": {
+										"$ref": "AAAAAAFjqBLqOKvX76Y="
+									},
+									"propertyLabel": {
+										"$ref": "AAAAAAFjqBLqOavYEPE="
+									}
+								},
+								{
+									"_type": "UMLControlFlowView",
+									"_id": "AAAAAAFjqB0vKqwHDoM=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqB0vKawF6iM="
+									},
+									"subViews": [
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqB0vKqwIlNc=",
+											"_parent": {
+												"$ref": "AAAAAAFjqB0vKqwHDoM="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqB0vKawF6iM="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 168,
+											"top": 322,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqB0vKqwHDoM="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqB0vK6wJ+8E=",
+											"_parent": {
+												"$ref": "AAAAAAFjqB0vKqwHDoM="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqB0vKawF6iM="
+											},
+											"visible": null,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 179,
+											"top": 333,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 30,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqB0vKqwHDoM="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqB0vK6wKDT8=",
+											"_parent": {
+												"$ref": "AAAAAAFjqB0vKqwHDoM="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqB0vKawF6iM="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 147,
+											"top": 301,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": -1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqB0vKqwHDoM="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										}
+									],
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"head": {
+										"$ref": "AAAAAAFjqAWrCqrNuOs="
+									},
+									"tail": {
+										"$ref": "AAAAAAFjqBIJL6ubZ3I="
+									},
+									"lineStyle": 1,
+									"points": "183:294;133:343",
+									"stereotypeDisplay": "label",
+									"showVisibility": true,
+									"showProperty": true,
+									"nameLabel": {
+										"$ref": "AAAAAAFjqB0vKqwIlNc="
+									},
+									"stereotypeLabel": {
+										"$ref": "AAAAAAFjqB0vK6wJ+8E="
+									},
+									"propertyLabel": {
+										"$ref": "AAAAAAFjqB0vK6wKDT8="
+									}
+								},
+								{
+									"_type": "UMLControlFlowView",
+									"_id": "AAAAAAFjqB14tKwY2QY=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqB14s6wWTtM="
+									},
+									"subViews": [
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqB14tKwZWVs=",
+											"_parent": {
+												"$ref": "AAAAAAFjqB14tKwY2QY="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqB14s6wWTtM="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 224,
+											"top": 301,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqB14tKwY2QY="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqB14tKwaFP8=",
+											"_parent": {
+												"$ref": "AAAAAAFjqB14tKwY2QY="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqB14s6wWTtM="
+											},
+											"visible": null,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 235,
+											"top": 291,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 30,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqB14tKwY2QY="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqB14tKwbJe8=",
+											"_parent": {
+												"$ref": "AAAAAAFjqB14tKwY2QY="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqB14s6wWTtM="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 201,
+											"top": 322,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": -1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqB14tKwY2QY="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										}
+									],
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"head": {
+										"$ref": "AAAAAAFjqAYmKaro5lo="
+									},
+									"tail": {
+										"$ref": "AAAAAAFjqBIJL6ubZ3I="
+									},
+									"lineStyle": 1,
+									"points": "191:294;236:343",
+									"stereotypeDisplay": "label",
+									"showVisibility": true,
+									"showProperty": true,
+									"nameLabel": {
+										"$ref": "AAAAAAFjqB14tKwZWVs="
+									},
+									"stereotypeLabel": {
+										"$ref": "AAAAAAFjqB14tKwaFP8="
+									},
+									"propertyLabel": {
+										"$ref": "AAAAAAFjqB14tKwbJe8="
+									}
+								},
+								{
+									"_type": "UMLControlNodeView",
+									"_id": "AAAAAAFjqB9/Taw5bl4=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqB9/S6w3TKM="
+									},
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": true,
+									"containerExtending": false,
+									"left": 136,
+									"top": 544,
+									"width": 104,
+									"height": 6,
+									"autoResize": false
+								},
+								{
+									"_type": "UMLControlFlowView",
+									"_id": "AAAAAAFjqB+W4qw+0nc=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqB+W4qw8vc8="
+									},
+									"subViews": [
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqB+W46w/H0c=",
+											"_parent": {
+												"$ref": "AAAAAAFjqB+W4qw+0nc="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqB+W4qw8vc8="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 201,
+											"top": 559,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqB+W4qw+0nc="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqB+W46xAJPs=",
+											"_parent": {
+												"$ref": "AAAAAAFjqB+W4qw+0nc="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqB+W4qw8vc8="
+											},
+											"visible": null,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 216,
+											"top": 559,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 30,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqB+W4qw+0nc="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqB+W46xBhSQ=",
+											"_parent": {
+												"$ref": "AAAAAAFjqB+W4qw+0nc="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqB+W4qw8vc8="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 172,
+											"top": 560,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": -1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqB+W4qw+0nc="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										}
+									],
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"head": {
+										"$ref": "AAAAAAFjqAZdgqsCYJQ="
+									},
+									"tail": {
+										"$ref": "AAAAAAFjqB9/Taw5bl4="
+									},
+									"lineStyle": 1,
+									"points": "187:550;187:583",
+									"stereotypeDisplay": "label",
+									"showVisibility": true,
+									"showProperty": true,
+									"nameLabel": {
+										"$ref": "AAAAAAFjqB+W46w/H0c="
+									},
+									"stereotypeLabel": {
+										"$ref": "AAAAAAFjqB+W46xAJPs="
+									},
+									"propertyLabel": {
+										"$ref": "AAAAAAFjqB+W46xBhSQ="
+									}
+								},
+								{
+									"_type": "UMLControlFlowView",
+									"_id": "AAAAAAFjqB+mdKxPr44=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqB+mc6xNTWc="
+									},
+									"subViews": [
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqB+mdKxQpVA=",
+											"_parent": {
+												"$ref": "AAAAAAFjqB+mdKxPr44="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqB+mc6xNTWc="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 221,
+											"top": 531,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqB+mdKxPr44="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqB+mdKxRB1o=",
+											"_parent": {
+												"$ref": "AAAAAAFjqB+mdKxPr44="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqB+mc6xNTWc="
+											},
+											"visible": null,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 230,
+											"top": 543,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 30,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqB+mdKxPr44="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqB+mdKxSTJo=",
+											"_parent": {
+												"$ref": "AAAAAAFjqB+mdKxPr44="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqB+mc6xNTWc="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 202,
+											"top": 508,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": -1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqB+mdKxPr44="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										}
+									],
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"head": {
+										"$ref": "AAAAAAFjqB9/Taw5bl4="
+									},
+									"tail": {
+										"$ref": "AAAAAAFjqA2/Cata4OI="
+									},
+									"lineStyle": 1,
+									"points": "233:510;191:543",
+									"stereotypeDisplay": "label",
+									"showVisibility": true,
+									"showProperty": true,
+									"nameLabel": {
+										"$ref": "AAAAAAFjqB+mdKxQpVA="
+									},
+									"stereotypeLabel": {
+										"$ref": "AAAAAAFjqB+mdKxRB1o="
+									},
+									"propertyLabel": {
+										"$ref": "AAAAAAFjqB+mdKxSTJo="
+									}
+								},
+								{
+									"_type": "UMLControlFlowView",
+									"_id": "AAAAAAFjqCBd1Kx5mCs=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqCBd06x3DWs="
+									},
+									"subViews": [
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqCBd1Kx6qnM=",
+											"_parent": {
+												"$ref": "AAAAAAFjqCBd1Kx5mCs="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqCBd06x3DWs="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 162,
+											"top": 469,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqCBd1Kx5mCs="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqCBd1ax7Ky4=",
+											"_parent": {
+												"$ref": "AAAAAAFjqCBd1Kx5mCs="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqCBd06x3DWs="
+											},
+											"visible": null,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 175,
+											"top": 461,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 30,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqCBd1Kx5mCs="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqCBd1ax8vzU=",
+											"_parent": {
+												"$ref": "AAAAAAFjqCBd1Kx5mCs="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqCBd06x3DWs="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 137,
+											"top": 484,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": -1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqCBd1Kx5mCs="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										}
+									],
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"head": {
+										"$ref": "AAAAAAFjqB9/Taw5bl4="
+									},
+									"tail": {
+										"$ref": "AAAAAAFjqAWrCqrNuOs="
+									},
+									"lineStyle": 1,
+									"points": "116:424;185:543",
+									"stereotypeDisplay": "label",
+									"showVisibility": true,
+									"showProperty": true,
+									"nameLabel": {
+										"$ref": "AAAAAAFjqCBd1Kx6qnM="
+									},
+									"stereotypeLabel": {
+										"$ref": "AAAAAAFjqCBd1ax7Ky4="
+									},
+									"propertyLabel": {
+										"$ref": "AAAAAAFjqCBd1ax8vzU="
+									}
+								},
+								{
+									"_type": "UMLActionView",
+									"_id": "AAAAAAFjqCEih6yTO40=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqCEig6yRtTs="
+									},
+									"subViews": [
+										{
+											"_type": "UMLNameCompartmentView",
+											"_id": "AAAAAAFjqCEiiayUplA=",
+											"_parent": {
+												"$ref": "AAAAAAFjqCEih6yTO40="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqCEig6yRtTs="
+											},
+											"subViews": [
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqCEiiqyV3PI=",
+													"_parent": {
+														"$ref": "AAAAAAFjqCEiiayUplA="
+													},
+													"visible": false,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Helvetica;12;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": -144,
+													"top": -128,
+													"width": 0,
+													"height": 12,
+													"autoResize": false,
+													"underline": false,
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												},
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqCEii6yWXBY=",
+													"_parent": {
+														"$ref": "AAAAAAFjqCEiiayUplA="
+													},
+													"visible": true,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Helvetica;12;1",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": 132,
+													"top": 183,
+													"width": 111,
+													"height": 36,
+													"autoResize": false,
+													"underline": false,
+													"text": "Check if Event has been enabled by MFI",
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": true
+												},
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqCEii6yXfwg=",
+													"_parent": {
+														"$ref": "AAAAAAFjqCEiiayUplA="
+													},
+													"visible": false,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Helvetica;12;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": -144,
+													"top": -128,
+													"width": 80,
+													"height": 12,
+													"autoResize": false,
+													"underline": false,
+													"text": "(from Activity1)",
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												},
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqCEii6yYpPQ=",
+													"_parent": {
+														"$ref": "AAAAAAFjqCEiiayUplA="
+													},
+													"visible": false,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Helvetica;12;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": -144,
+													"top": -128,
+													"width": 0,
+													"height": 12,
+													"autoResize": false,
+													"underline": false,
+													"horizontalAlignment": 1,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												}
+											],
+											"visible": true,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 127,
+											"top": 176,
+											"width": 121,
+											"height": 48,
+											"autoResize": false,
+											"stereotypeLabel": {
+												"$ref": "AAAAAAFjqCEiiqyV3PI="
+											},
+											"nameLabel": {
+												"$ref": "AAAAAAFjqCEii6yWXBY="
+											},
+											"namespaceLabel": {
+												"$ref": "AAAAAAFjqCEii6yXfwg="
+											},
+											"propertyLabel": {
+												"$ref": "AAAAAAFjqCEii6yYpPQ="
+											}
+										}
+									],
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": true,
+									"containerExtending": false,
+									"left": 127,
+									"top": 176,
+									"width": 121,
+									"height": 64,
+									"autoResize": false,
+									"stereotypeDisplay": "label",
+									"showVisibility": true,
+									"showNamespace": false,
+									"showProperty": true,
+									"showType": true,
+									"nameCompartment": {
+										"$ref": "AAAAAAFjqCEiiayUplA="
+									},
+									"wordWrap": true
+								},
+								{
+									"_type": "UMLControlFlowView",
+									"_id": "AAAAAAFjqCJ5HqyxiME=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqCJ5HayvTsA="
+									},
+									"subViews": [
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqCJ5H6yynz8=",
+											"_parent": {
+												"$ref": "AAAAAAFjqCJ5HqyxiME="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqCJ5HayvTsA="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 201,
+											"top": 256,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqCJ5HqyxiME="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqCJ5IKyzLqE=",
+											"_parent": {
+												"$ref": "AAAAAAFjqCJ5HqyxiME="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqCJ5HayvTsA="
+											},
+											"visible": null,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 216,
+											"top": 256,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 30,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqCJ5HqyxiME="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqCJ5IKy0y/c=",
+											"_parent": {
+												"$ref": "AAAAAAFjqCJ5HqyxiME="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqCJ5HayvTsA="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 172,
+											"top": 257,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": -1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqCJ5HqyxiME="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										}
+									],
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"head": {
+										"$ref": "AAAAAAFjqBIJL6ubZ3I="
+									},
+									"tail": {
+										"$ref": "AAAAAAFjqCEih6yTO40="
+									},
+									"lineStyle": 1,
+									"points": "187:240;187:287",
+									"stereotypeDisplay": "label",
+									"showVisibility": true,
+									"showProperty": true,
+									"nameLabel": {
+										"$ref": "AAAAAAFjqCJ5H6yynz8="
+									},
+									"stereotypeLabel": {
+										"$ref": "AAAAAAFjqCJ5IKyzLqE="
+									},
+									"propertyLabel": {
+										"$ref": "AAAAAAFjqCJ5IKy0y/c="
+									}
+								}
+							]
+						}
+					],
+					"visibility": "public",
+					"isReentrant": true,
+					"isReadOnly": false,
+					"isSingleExecution": false,
+					"nodes": [
+						{
+							"_type": "UMLInitialNode",
+							"_id": "AAAAAAFjqASvhaqkmH0=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"name": "InitialNode1",
+							"visibility": "public"
+						},
+						{
+							"_type": "UMLAction",
+							"_id": "AAAAAAFjqATelKqpPIs=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"name": "JMSListener injects event",
+							"visibility": "public",
+							"kind": "opaque",
+							"isLocallyReentrant": false,
+							"isSynchronous": true
+						},
+						{
+							"_type": "UMLAction",
+							"_id": "AAAAAAFjqAWrCarLlr0=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"name": "retrieve receipt SMS and email contact",
+							"visibility": "public",
+							"kind": "opaque",
+							"isLocallyReentrant": false,
+							"isSynchronous": true
+						},
+						{
+							"_type": "UMLAction",
+							"_id": "AAAAAAFjqAYmKKrmL6s=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"name": "Prepare Message with template created",
+							"visibility": "public",
+							"kind": "opaque",
+							"isLocallyReentrant": false,
+							"isSynchronous": true
+						},
+						{
+							"_type": "UMLAction",
+							"_id": "AAAAAAFjqAZdgasAyFA=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"name": "Senders Objects transmit the data",
+							"visibility": "public",
+							"kind": "opaque",
+							"isLocallyReentrant": false,
+							"isSynchronous": true
+						},
+						{
+							"_type": "UMLActivityFinalNode",
+							"_id": "AAAAAAFjqAbQ7asd+Ww=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"name": "ActivityFinalNode1",
+							"visibility": "public"
+						},
+						{
+							"_type": "UMLAction",
+							"_id": "AAAAAAFjqA2/A6tYai0=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"name": "Locatize Template",
+							"visibility": "public",
+							"kind": "opaque",
+							"isLocallyReentrant": false,
+							"isSynchronous": true
+						},
+						{
+							"_type": "UMLForkNode",
+							"_id": "AAAAAAFjqBHP9auQV5g=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"name": "ForkNode1",
+							"visibility": "public"
+						},
+						{
+							"_type": "UMLForkNode",
+							"_id": "AAAAAAFjqBIJLquZsRo=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"name": "ForkNode2",
+							"visibility": "public"
+						},
+						{
+							"_type": "UMLJoinNode",
+							"_id": "AAAAAAFjqB9/S6w3TKM=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"name": "JoinNode1",
+							"visibility": "public"
+						},
+						{
+							"_type": "UMLAction",
+							"_id": "AAAAAAFjqCEig6yRtTs=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"name": "Check if Event has been enabled by MFI",
+							"visibility": "public",
+							"kind": "opaque",
+							"isLocallyReentrant": false,
+							"isSynchronous": true
+						}
+					],
+					"edges": [
+						{
+							"_type": "UMLControlFlow",
+							"_id": "AAAAAAFjqBEKGKt1+H8=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"source": {
+								"$ref": "AAAAAAFjqATelKqpPIs="
+							},
+							"target": {
+								"$ref": "AAAAAAFjqAWrCarLlr0="
+							},
+							"visibility": "public"
+						},
+						{
+							"_type": "UMLControlFlow",
+							"_id": "AAAAAAFjqBIoaquel/4=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"source": {
+								"$ref": "AAAAAAFjqATelKqpPIs="
+							},
+							"target": {
+								"$ref": "AAAAAAFjqCEig6yRtTs="
+							},
+							"visibility": "public"
+						},
+						{
+							"_type": "UMLControlFlow",
+							"_id": "AAAAAAFjqBKjHquv5CM=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"source": {
+								"$ref": "AAAAAAFjqASvhaqkmH0="
+							},
+							"target": {
+								"$ref": "AAAAAAFjqATelKqpPIs="
+							},
+							"visibility": "public"
+						},
+						{
+							"_type": "UMLControlFlow",
+							"_id": "AAAAAAFjqBLYAqvCSQk=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"source": {
+								"$ref": "AAAAAAFjqAYmKKrmL6s="
+							},
+							"target": {
+								"$ref": "AAAAAAFjqA2/A6tYai0="
+							},
+							"visibility": "public"
+						},
+						{
+							"_type": "UMLControlFlow",
+							"_id": "AAAAAAFjqBLqNqvTow0=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"source": {
+								"$ref": "AAAAAAFjqAZdgasAyFA="
+							},
+							"target": {
+								"$ref": "AAAAAAFjqAbQ7asd+Ww="
+							},
+							"visibility": "public"
+						},
+						{
+							"_type": "UMLControlFlow",
+							"_id": "AAAAAAFjqByuGavpb+Q=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"source": {
+								"$ref": "AAAAAAFjqATelKqpPIs="
+							},
+							"target": {
+								"$ref": "AAAAAAFjqAWrCarLlr0="
+							},
+							"visibility": "public"
+						},
+						{
+							"_type": "UMLControlFlow",
+							"_id": "AAAAAAFjqB0vKawF6iM=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"source": {
+								"$ref": "AAAAAAFjqBIJLquZsRo="
+							},
+							"target": {
+								"$ref": "AAAAAAFjqAWrCarLlr0="
+							},
+							"visibility": "public"
+						},
+						{
+							"_type": "UMLControlFlow",
+							"_id": "AAAAAAFjqB14s6wWTtM=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"source": {
+								"$ref": "AAAAAAFjqBIJLquZsRo="
+							},
+							"target": {
+								"$ref": "AAAAAAFjqAYmKKrmL6s="
+							},
+							"visibility": "public"
+						},
+						{
+							"_type": "UMLControlFlow",
+							"_id": "AAAAAAFjqB+W4qw8vc8=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"source": {
+								"$ref": "AAAAAAFjqB9/S6w3TKM="
+							},
+							"target": {
+								"$ref": "AAAAAAFjqAZdgasAyFA="
+							},
+							"visibility": "public"
+						},
+						{
+							"_type": "UMLControlFlow",
+							"_id": "AAAAAAFjqB+mc6xNTWc=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"source": {
+								"$ref": "AAAAAAFjqA2/A6tYai0="
+							},
+							"target": {
+								"$ref": "AAAAAAFjqB9/S6w3TKM="
+							},
+							"visibility": "public"
+						},
+						{
+							"_type": "UMLControlFlow",
+							"_id": "AAAAAAFjqCBd06x3DWs=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"source": {
+								"$ref": "AAAAAAFjqAWrCarLlr0="
+							},
+							"target": {
+								"$ref": "AAAAAAFjqB9/S6w3TKM="
+							},
+							"visibility": "public"
+						},
+						{
+							"_type": "UMLControlFlow",
+							"_id": "AAAAAAFjqCJ5HayvTsA=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"source": {
+								"$ref": "AAAAAAFjqCEig6yRtTs="
+							},
+							"target": {
+								"$ref": "AAAAAAFjqBIJLquZsRo="
+							},
+							"visibility": "public"
+						}
+					]
+				},
+				{
+					"_type": "UMLCollaboration",
+					"_id": "AAAAAAFjqCY2j5u3ys8=",
+					"_parent": {
+						"$ref": "AAAAAAFF+qBWK6M3Z8Y="
+					},
+					"name": "Collaboration1",
+					"ownedElements": [
+						{
+							"_type": "UMLInteraction",
+							"_id": "AAAAAAFjqCY2kpu4n0I=",
+							"_parent": {
+								"$ref": "AAAAAAFjqCY2j5u3ys8="
+							},
+							"name": "Interaction1",
+							"ownedElements": [
+								{
+									"_type": "UMLSequenceDiagram",
+									"_id": "AAAAAAFjqCY2kpu5KQk=",
+									"_parent": {
+										"$ref": "AAAAAAFjqCY2kpu4n0I="
+									},
+									"name": "SequenceDiagram1",
+									"visible": true,
+									"defaultDiagram": false,
+									"ownedViews": [
+										{
+											"_type": "UMLFrameView",
+											"_id": "AAAAAAFjqCY2k5u6GlA=",
+											"_parent": {
+												"$ref": "AAAAAAFjqCY2kpu5KQk="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqCY2kpu5KQk="
+											},
+											"subViews": [
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqCY2lJu7Oe8=",
+													"_parent": {
+														"$ref": "AAAAAAFjqCY2k5u6GlA="
+													},
+													"visible": true,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Helvetica;12;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": 73,
+													"top": 10,
+													"width": 111,
+													"height": 12,
+													"autoResize": false,
+													"underline": false,
+													"text": "SequenceDiagram1",
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												},
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqCY2lZu8kXQ=",
+													"_parent": {
+														"$ref": "AAAAAAFjqCY2k5u6GlA="
+													},
+													"visible": true,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Helvetica;12;1",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": 10,
+													"top": 10,
+													"width": 58,
+													"height": 12,
+													"autoResize": false,
+													"underline": false,
+													"text": "interaction",
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												}
+											],
+											"visible": true,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 5,
+											"top": 5,
+											"width": 695,
+											"height": 595,
+											"autoResize": false,
+											"nameLabel": {
+												"$ref": "AAAAAAFjqCY2lJu7Oe8="
+											},
+											"frameTypeLabel": {
+												"$ref": "AAAAAAFjqCY2lZu8kXQ="
+											}
+										},
+										{
+											"_type": "UMLSeqLifelineView",
+											"_id": "AAAAAAFjqCbCSJvIsEM=",
+											"_parent": {
+												"$ref": "AAAAAAFjqCY2kpu5KQk="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqCbCSJvHDpo="
+											},
+											"subViews": [
+												{
+													"_type": "UMLNameCompartmentView",
+													"_id": "AAAAAAFjqCbCSZvJ4ng=",
+													"_parent": {
+														"$ref": "AAAAAAFjqCbCSJvIsEM="
+													},
+													"model": {
+														"$ref": "AAAAAAFjqCbCSJvHDpo="
+													},
+													"subViews": [
+														{
+															"_type": "LabelView",
+															"_id": "AAAAAAFjqCbCSpvKaxs=",
+															"_parent": {
+																"$ref": "AAAAAAFjqCbCSZvJ4ng="
+															},
+															"visible": false,
+															"enabled": true,
+															"lineColor": "#000000",
+															"fillColor": "#ffffff",
+															"fontColor": "#000000",
+															"font": "Helvetica;12;0",
+															"showShadow": true,
+															"containerChangeable": false,
+															"containerExtending": false,
+															"left": 0,
+															"top": 0,
+															"width": 0,
+															"height": 12,
+															"autoResize": false,
+															"underline": false,
+															"horizontalAlignment": 2,
+															"verticalAlignment": 5,
+															"wordWrap": false
+														},
+														{
+															"_type": "LabelView",
+															"_id": "AAAAAAFjqCbCSpvLXu8=",
+															"_parent": {
+																"$ref": "AAAAAAFjqCbCSZvJ4ng="
+															},
+															"visible": true,
+															"enabled": true,
+															"lineColor": "#000000",
+															"fillColor": "#ffffff",
+															"fontColor": "#000000",
+															"font": "Helvetica;12;1",
+															"showShadow": true,
+															"containerChangeable": false,
+															"containerExtending": false,
+															"left": 37,
+															"top": 47,
+															"width": 90,
+															"height": 12,
+															"autoResize": false,
+															"underline": false,
+															"text": "EventListener",
+															"horizontalAlignment": 2,
+															"verticalAlignment": 5,
+															"wordWrap": false
+														},
+														{
+															"_type": "LabelView",
+															"_id": "AAAAAAFjqCbCSpvMWyQ=",
+															"_parent": {
+																"$ref": "AAAAAAFjqCbCSZvJ4ng="
+															},
+															"visible": false,
+															"enabled": true,
+															"lineColor": "#000000",
+															"fillColor": "#ffffff",
+															"fontColor": "#000000",
+															"font": "Helvetica;12;0",
+															"showShadow": true,
+															"containerChangeable": false,
+															"containerExtending": false,
+															"left": 0,
+															"top": 0,
+															"width": 99,
+															"height": 12,
+															"autoResize": false,
+															"underline": false,
+															"text": "(from Interaction1)",
+															"horizontalAlignment": 2,
+															"verticalAlignment": 5,
+															"wordWrap": false
+														},
+														{
+															"_type": "LabelView",
+															"_id": "AAAAAAFjqCbCS5vNZUs=",
+															"_parent": {
+																"$ref": "AAAAAAFjqCbCSZvJ4ng="
+															},
+															"visible": false,
+															"enabled": true,
+															"lineColor": "#000000",
+															"fillColor": "#ffffff",
+															"fontColor": "#000000",
+															"font": "Helvetica;12;0",
+															"showShadow": true,
+															"containerChangeable": false,
+															"containerExtending": false,
+															"left": 0,
+															"top": 0,
+															"width": 0,
+															"height": 12,
+															"autoResize": false,
+															"underline": false,
+															"horizontalAlignment": 1,
+															"verticalAlignment": 5,
+															"wordWrap": false
+														}
+													],
+													"visible": true,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Helvetica;12;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": 32,
+													"top": 40,
+													"width": 100,
+													"height": 40,
+													"autoResize": false,
+													"stereotypeLabel": {
+														"$ref": "AAAAAAFjqCbCSpvKaxs="
+													},
+													"nameLabel": {
+														"$ref": "AAAAAAFjqCbCSpvLXu8="
+													},
+													"namespaceLabel": {
+														"$ref": "AAAAAAFjqCbCSpvMWyQ="
+													},
+													"propertyLabel": {
+														"$ref": "AAAAAAFjqCbCS5vNZUs="
+													}
+												},
+												{
+													"_type": "UMLLinePartView",
+													"_id": "AAAAAAFjqCbCS5vOH9k=",
+													"_parent": {
+														"$ref": "AAAAAAFjqCbCSJvIsEM="
+													},
+													"model": {
+														"$ref": "AAAAAAFjqCbCSJvHDpo="
+													},
+													"visible": true,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Helvetica;12;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": 82,
+													"top": 80,
+													"width": 1,
+													"height": 160,
+													"autoResize": false
+												}
+											],
+											"visible": true,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 32,
+											"top": 40,
+											"width": 100,
+											"height": 200,
+											"autoResize": false,
+											"stereotypeDisplay": "label",
+											"showVisibility": true,
+											"showNamespace": false,
+											"showProperty": true,
+											"showType": true,
+											"nameCompartment": {
+												"$ref": "AAAAAAFjqCbCSZvJ4ng="
+											},
+											"wordWrap": false,
+											"linePart": {
+												"$ref": "AAAAAAFjqCbCS5vOH9k="
+											}
+										}
+									],
+									"showSequenceNumber": true,
+									"showSignature": true,
+									"showActivation": true
+								}
+							],
+							"visibility": "public",
+							"isReentrant": true,
+							"participants": [
+								{
+									"_type": "UMLLifeline",
+									"_id": "AAAAAAFjqCbCSJvHDpo=",
+									"_parent": {
+										"$ref": "AAAAAAFjqCY2kpu4n0I="
+									},
+									"name": "EventListener",
+									"visibility": "public",
+									"represent": {
+										"$ref": "AAAAAAFjqCbCR5vGwmU="
+									},
+									"isMultiInstance": false
+								}
+							]
+						}
+					],
+					"visibility": "public",
+					"attributes": [
+						{
+							"_type": "UMLAttribute",
+							"_id": "AAAAAAFjqCbCR5vGwmU=",
+							"_parent": {
+								"$ref": "AAAAAAFjqCY2j5u3ys8="
+							},
+							"name": "Role1",
+							"visibility": "public",
+							"isStatic": false,
+							"isLeaf": false,
+							"type": "",
+							"isReadOnly": false,
+							"isOrdered": false,
+							"isUnique": false,
+							"isDerived": false,
+							"aggregation": "none",
+							"isID": false
+						}
+					],
+					"isAbstract": false,
+					"isFinalSpecialization": false,
+					"isLeaf": false
+				},
+				{
+					"_type": "UMLUseCaseDiagram",
+					"_id": "AAAAAAFjuvxSC6RUg4A=",
+					"_parent": {
+						"$ref": "AAAAAAFF+qBWK6M3Z8Y="
+					},
+					"name": "CustomerUseCase",
+					"visible": true,
+					"defaultDiagram": false,
+					"ownedViews": [
+						{
+							"_type": "UMLUseCaseSubjectView",
+							"_id": "AAAAAAFjuv4gOKRa+jQ=",
+							"_parent": {
+								"$ref": "AAAAAAFjuvxSC6RUg4A="
+							},
+							"model": {
+								"$ref": "AAAAAAFjuv4gOKRYAw8="
+							},
+							"subViews": [
+								{
+									"_type": "UMLNameCompartmentView",
+									"_id": "AAAAAAFjuv4gOaRbEkE=",
+									"_parent": {
+										"$ref": "AAAAAAFjuv4gOKRa+jQ="
+									},
+									"model": {
+										"$ref": "AAAAAAFjuv4gOKRYAw8="
+									},
+									"subViews": [
+										{
+											"_type": "LabelView",
+											"_id": "AAAAAAFjuv4gOaRczFQ=",
+											"_parent": {
+												"$ref": "AAAAAAFjuv4gOaRbEkE="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 0,
+											"top": 0,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "LabelView",
+											"_id": "AAAAAAFjuv4gOaRdgAQ=",
+											"_parent": {
+												"$ref": "AAAAAAFjuv4gOaRbEkE="
+											},
+											"visible": true,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;1",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 213,
+											"top": 39,
+											"width": 478,
+											"height": 12,
+											"autoResize": false,
+											"underline": false,
+											"text": "Notification Microservice",
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "LabelView",
+											"_id": "AAAAAAFjuv4gOaReStM=",
+											"_parent": {
+												"$ref": "AAAAAAFjuv4gOaRbEkE="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 0,
+											"top": 0,
+											"width": 69,
+											"height": 12,
+											"autoResize": false,
+											"underline": false,
+											"text": "(from Model)",
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "LabelView",
+											"_id": "AAAAAAFjuv4gOaRf7IE=",
+											"_parent": {
+												"$ref": "AAAAAAFjuv4gOaRbEkE="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 0,
+											"top": 0,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"underline": false,
+											"horizontalAlignment": 1,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										}
+									],
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"left": 208,
+									"top": 32,
+									"width": 488,
+									"height": 24,
+									"autoResize": false,
+									"stereotypeLabel": {
+										"$ref": "AAAAAAFjuv4gOaRczFQ="
+									},
+									"nameLabel": {
+										"$ref": "AAAAAAFjuv4gOaRdgAQ="
+									},
+									"namespaceLabel": {
+										"$ref": "AAAAAAFjuv4gOaReStM="
+									},
+									"propertyLabel": {
+										"$ref": "AAAAAAFjuv4gOaRf7IE="
+									}
+								}
+							],
+							"visible": true,
+							"enabled": true,
+							"lineColor": "#000000",
+							"fillColor": "#ffffff",
+							"fontColor": "#000000",
+							"font": "Helvetica;12;0",
+							"showShadow": true,
+							"containerChangeable": false,
+							"containerExtending": false,
+							"left": 208,
+							"top": 32,
+							"width": 488,
+							"height": 608,
+							"autoResize": false,
+							"stereotypeDisplay": "label",
+							"showVisibility": true,
+							"showNamespace": false,
+							"showProperty": true,
+							"showType": true,
+							"nameCompartment": {
+								"$ref": "AAAAAAFjuv4gOaRbEkE="
+							},
+							"wordWrap": false
+						},
+						{
+							"_type": "UMLActorView",
+							"_id": "AAAAAAFjuv6kb6R0A6g=",
+							"_parent": {
+								"$ref": "AAAAAAFjuvxSC6RUg4A="
+							},
+							"model": {
+								"$ref": "AAAAAAFjuv6kbaRyZy0="
+							},
+							"subViews": [
+								{
+									"_type": "UMLNameCompartmentView",
+									"_id": "AAAAAAFjuv6kcKR1JNo=",
+									"_parent": {
+										"$ref": "AAAAAAFjuv6kb6R0A6g="
+									},
+									"model": {
+										"$ref": "AAAAAAFjuv6kbaRyZy0="
+									},
+									"subViews": [
+										{
+											"_type": "LabelView",
+											"_id": "AAAAAAFjuv6kcKR2baE=",
+											"_parent": {
+												"$ref": "AAAAAAFjuv6kcKR1JNo="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": -112,
+											"top": 352,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "LabelView",
+											"_id": "AAAAAAFjuv6kcaR3JSY=",
+											"_parent": {
+												"$ref": "AAAAAAFjuv6kcKR1JNo="
+											},
+											"visible": true,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;1",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 61,
+											"top": 341,
+											"width": 134,
+											"height": 12,
+											"autoResize": false,
+											"underline": false,
+											"text": "customer microservice",
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "LabelView",
+											"_id": "AAAAAAFjuv6kcaR4LTc=",
+											"_parent": {
+												"$ref": "AAAAAAFjuv6kcKR1JNo="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": -112,
+											"top": 352,
+											"width": 69,
+											"height": 12,
+											"autoResize": false,
+											"underline": false,
+											"text": "(from Model)",
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "LabelView",
+											"_id": "AAAAAAFjuv6kcaR5qOc=",
+											"_parent": {
+												"$ref": "AAAAAAFjuv6kcKR1JNo="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": -112,
+											"top": 352,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"underline": false,
+											"horizontalAlignment": 1,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										}
+									],
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"left": 56,
+									"top": 334,
+									"width": 144,
+									"height": 24,
+									"autoResize": false,
+									"stereotypeLabel": {
+										"$ref": "AAAAAAFjuv6kcKR2baE="
+									},
+									"nameLabel": {
+										"$ref": "AAAAAAFjuv6kcaR3JSY="
+									},
+									"namespaceLabel": {
+										"$ref": "AAAAAAFjuv6kcaR4LTc="
+									},
+									"propertyLabel": {
+										"$ref": "AAAAAAFjuv6kcaR5qOc="
+									}
+								},
+								{
+									"_type": "UMLAttributeCompartmentView",
+									"_id": "AAAAAAFjuv6kcqR6rvs=",
+									"_parent": {
+										"$ref": "AAAAAAFjuv6kb6R0A6g="
+									},
+									"model": {
+										"$ref": "AAAAAAFjuv6kbaRyZy0="
+									},
+									"visible": false,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"left": -56,
+									"top": 176,
+									"width": 10,
+									"height": 10,
+									"autoResize": false
+								},
+								{
+									"_type": "UMLOperationCompartmentView",
+									"_id": "AAAAAAFjuv6kcqR7HEk=",
+									"_parent": {
+										"$ref": "AAAAAAFjuv6kb6R0A6g="
+									},
+									"model": {
+										"$ref": "AAAAAAFjuv6kbaRyZy0="
+									},
+									"visible": false,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"left": -56,
+									"top": 176,
+									"width": 10,
+									"height": 10,
+									"autoResize": false
+								},
+								{
+									"_type": "UMLReceptionCompartmentView",
+									"_id": "AAAAAAFjuv6kc6R8FZ0=",
+									"_parent": {
+										"$ref": "AAAAAAFjuv6kb6R0A6g="
+									},
+									"model": {
+										"$ref": "AAAAAAFjuv6kbaRyZy0="
+									},
+									"visible": false,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"left": -56,
+									"top": 176,
+									"width": 10,
+									"height": 10,
+									"autoResize": false
+								},
+								{
+									"_type": "UMLTemplateParameterCompartmentView",
+									"_id": "AAAAAAFjuv6kdKR9/xc=",
+									"_parent": {
+										"$ref": "AAAAAAFjuv6kb6R0A6g="
+									},
+									"model": {
+										"$ref": "AAAAAAFjuv6kbaRyZy0="
+									},
+									"visible": false,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"left": -56,
+									"top": 176,
+									"width": 10,
+									"height": 10,
+									"autoResize": false
+								}
+							],
+							"visible": true,
+							"enabled": true,
+							"lineColor": "#000000",
+							"fillColor": "#ffffff",
+							"fontColor": "#000000",
+							"font": "Helvetica;12;0",
+							"showShadow": true,
+							"containerChangeable": true,
+							"containerExtending": false,
+							"left": 56,
+							"top": 280,
+							"width": 144,
+							"height": 79,
+							"autoResize": false,
+							"stereotypeDisplay": "label",
+							"showVisibility": true,
+							"showNamespace": false,
+							"showProperty": true,
+							"showType": true,
+							"nameCompartment": {
+								"$ref": "AAAAAAFjuv6kcKR1JNo="
+							},
+							"wordWrap": false,
+							"suppressAttributes": true,
+							"suppressOperations": true,
+							"suppressReceptions": true,
+							"showMultiplicity": true,
+							"showOperationSignature": true,
+							"attributeCompartment": {
+								"$ref": "AAAAAAFjuv6kcqR6rvs="
+							},
+							"operationCompartment": {
+								"$ref": "AAAAAAFjuv6kcqR7HEk="
+							},
+							"receptionCompartment": {
+								"$ref": "AAAAAAFjuv6kc6R8FZ0="
+							},
+							"templateParameterCompartment": {
+								"$ref": "AAAAAAFjuv6kdKR9/xc="
+							}
+						},
+						{
+							"_type": "UMLUseCaseView",
+							"_id": "AAAAAAFjuv/XzaSib0Y=",
+							"_parent": {
+								"$ref": "AAAAAAFjuvxSC6RUg4A="
+							},
+							"model": {
+								"$ref": "AAAAAAFjuv/XzKSgDcQ="
+							},
+							"subViews": [
+								{
+									"_type": "UMLNameCompartmentView",
+									"_id": "AAAAAAFjuv/XzqSjIc4=",
+									"_parent": {
+										"$ref": "AAAAAAFjuv/XzaSib0Y="
+									},
+									"model": {
+										"$ref": "AAAAAAFjuv/XzKSgDcQ="
+									},
+									"subViews": [
+										{
+											"_type": "LabelView",
+											"_id": "AAAAAAFjuv/Xz6SkS8o=",
+											"_parent": {
+												"$ref": "AAAAAAFjuv/XzqSjIc4="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": -80,
+											"top": -96,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "LabelView",
+											"_id": "AAAAAAFjuv/X0KSlY0g=",
+											"_parent": {
+												"$ref": "AAAAAAFjuv/XzqSjIc4="
+											},
+											"visible": true,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;1",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 330.5,
+											"top": 104,
+											"width": 92,
+											"height": 36,
+											"autoResize": false,
+											"underline": false,
+											"text": "Account Created Notification",
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": true
+										},
+										{
+											"_type": "LabelView",
+											"_id": "AAAAAAFjuv/X0KSmuPo=",
+											"_parent": {
+												"$ref": "AAAAAAFjuv/XzqSjIc4="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": -80,
+											"top": -96,
+											"width": 69,
+											"height": 12,
+											"autoResize": false,
+											"underline": false,
+											"text": "(from Model)",
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "LabelView",
+											"_id": "AAAAAAFjuv/X0KSnIG4=",
+											"_parent": {
+												"$ref": "AAAAAAFjuv/XzqSjIc4="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": -80,
+											"top": -96,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"underline": false,
+											"horizontalAlignment": 1,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										}
+									],
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"left": 325.5,
+									"top": 97,
+									"width": 102,
+									"height": 48,
+									"autoResize": false,
+									"stereotypeLabel": {
+										"$ref": "AAAAAAFjuv/Xz6SkS8o="
+									},
+									"nameLabel": {
+										"$ref": "AAAAAAFjuv/X0KSlY0g="
+									},
+									"namespaceLabel": {
+										"$ref": "AAAAAAFjuv/X0KSmuPo="
+									},
+									"propertyLabel": {
+										"$ref": "AAAAAAFjuv/X0KSnIG4="
+									}
+								},
+								{
+									"_type": "UMLAttributeCompartmentView",
+									"_id": "AAAAAAFjuv/X0aSocII=",
+									"_parent": {
+										"$ref": "AAAAAAFjuv/XzaSib0Y="
+									},
+									"model": {
+										"$ref": "AAAAAAFjuv/XzKSgDcQ="
+									},
+									"visible": false,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"left": -40,
+									"top": -48,
+									"width": 10,
+									"height": 10,
+									"autoResize": false
+								},
+								{
+									"_type": "UMLOperationCompartmentView",
+									"_id": "AAAAAAFjuv/X0qSpfns=",
+									"_parent": {
+										"$ref": "AAAAAAFjuv/XzaSib0Y="
+									},
+									"model": {
+										"$ref": "AAAAAAFjuv/XzKSgDcQ="
+									},
+									"visible": false,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"left": -40,
+									"top": -48,
+									"width": 10,
+									"height": 10,
+									"autoResize": false
+								},
+								{
+									"_type": "UMLReceptionCompartmentView",
+									"_id": "AAAAAAFjuv/X0qSqNoc=",
+									"_parent": {
+										"$ref": "AAAAAAFjuv/XzaSib0Y="
+									},
+									"model": {
+										"$ref": "AAAAAAFjuv/XzKSgDcQ="
+									},
+									"visible": false,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"left": -40,
+									"top": -48,
+									"width": 10,
+									"height": 10,
+									"autoResize": false
+								},
+								{
+									"_type": "UMLTemplateParameterCompartmentView",
+									"_id": "AAAAAAFjuv/X06Sr5DM=",
+									"_parent": {
+										"$ref": "AAAAAAFjuv/XzaSib0Y="
+									},
+									"model": {
+										"$ref": "AAAAAAFjuv/XzKSgDcQ="
+									},
+									"visible": false,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"left": -40,
+									"top": -48,
+									"width": 10,
+									"height": 10,
+									"autoResize": false
+								},
+								{
+									"_type": "UMLExtensionPointCompartmentView",
+									"_id": "AAAAAAFjuv/X1KSsXMU=",
+									"_parent": {
+										"$ref": "AAAAAAFjuv/XzaSib0Y="
+									},
+									"model": {
+										"$ref": "AAAAAAFjuv/XzKSgDcQ="
+									},
+									"visible": false,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"left": -40,
+									"top": -48,
+									"width": 10,
+									"height": 10,
+									"autoResize": false
+								}
+							],
+							"visible": true,
+							"enabled": true,
+							"lineColor": "#000000",
+							"fillColor": "#ffffff",
+							"fontColor": "#000000",
+							"font": "Helvetica;12;0",
+							"showShadow": true,
+							"containerChangeable": true,
+							"containerExtending": false,
+							"left": 304,
+							"top": 88,
+							"width": 145,
+							"height": 67,
+							"autoResize": false,
+							"stereotypeDisplay": "label",
+							"showVisibility": true,
+							"showNamespace": false,
+							"showProperty": true,
+							"showType": true,
+							"nameCompartment": {
+								"$ref": "AAAAAAFjuv/XzqSjIc4="
+							},
+							"wordWrap": true,
+							"suppressAttributes": true,
+							"suppressOperations": true,
+							"suppressReceptions": true,
+							"showMultiplicity": true,
+							"showOperationSignature": true,
+							"attributeCompartment": {
+								"$ref": "AAAAAAFjuv/X0aSocII="
+							},
+							"operationCompartment": {
+								"$ref": "AAAAAAFjuv/X0qSpfns="
+							},
+							"receptionCompartment": {
+								"$ref": "AAAAAAFjuv/X0qSqNoc="
+							},
+							"templateParameterCompartment": {
+								"$ref": "AAAAAAFjuv/X06Sr5DM="
+							},
+							"extensionPointCompartment": {
+								"$ref": "AAAAAAFjuv/X1KSsXMU="
+							}
+						}
+					]
+				},
+				{
+					"_type": "UMLUseCaseSubject",
+					"_id": "AAAAAAFjuv4gOKRYAw8=",
+					"_parent": {
+						"$ref": "AAAAAAFF+qBWK6M3Z8Y="
+					},
+					"name": "Notification Microservice",
+					"visibility": "public"
+				},
+				{
+					"_type": "UMLActor",
+					"_id": "AAAAAAFjuv6kbaRyZy0=",
+					"_parent": {
+						"$ref": "AAAAAAFF+qBWK6M3Z8Y="
+					},
+					"name": "customer microservice",
+					"visibility": "public",
+					"isAbstract": false,
+					"isFinalSpecialization": false,
+					"isLeaf": false
+				},
+				{
+					"_type": "UMLUseCase",
+					"_id": "AAAAAAFjuv/XzKSgDcQ=",
+					"_parent": {
+						"$ref": "AAAAAAFF+qBWK6M3Z8Y="
+					},
+					"name": "Account Created Notification",
+					"visibility": "public",
+					"isAbstract": false,
+					"isFinalSpecialization": false,
+					"isLeaf": false
+				}
+			],
+			"visibility": "public"
+		}
+	]
+}
\ No newline at end of file


[fineract-cn-notifications] 10/36: test

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

awasum pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-notifications.git

commit 041ec3473717bfa0d45ca7f73cbafa4634e7bdb5
Author: Ebenezer Graham <eg...@alustudent.com>
AuthorDate: Fri Jun 15 04:04:00 2018 +0400

    test
---
 .../service/listener/OfficeEventListener.java      | 48 ++++++++++++++--------
 1 file changed, 32 insertions(+), 16 deletions(-)

diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/OfficeEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/OfficeEventListener.java
index c77510e..9f083c5 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/OfficeEventListener.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/OfficeEventListener.java
@@ -16,12 +16,14 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-/*
+
 package org.apache.fineract.cn.notification.service.listener;
 
-import org.apache.fineract.cn.accounting.api.v1.EventConstants;
+import org.apache.fineract.cn.notification.service.internal.service.EmailSender;
+import org.apache.fineract.cn.notification.service.internal.service.SMSSender;
+import org.apache.fineract.cn.office.api.v1.EventConstants;
 import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
-import org.apache.fineract.cn.test.listener.EventRecorder;
+import org.apache.fineract.cn.office.api.v1.client.OrganizationManager;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.jms.annotation.JmsListener;
 import org.springframework.messaging.handler.annotation.Header;
@@ -30,15 +32,35 @@ import org.springframework.stereotype.Component;
 @Component
 public class OfficeEventListener {
 
-    private final EventRecorder eventRecorder;
+	private OrganizationManager organizationManager;
+	private SMSSender smsSender;
+	private EmailSender emailSender;
 
-    @Autowired
-    public OfficeEventListener(final EventRecorder eventRecorder) {
-        super();
-        this.eventRecorder = eventRecorder;
-    }
+	@Autowired
+	public OfficeEventListener(final OrganizationManager organizationManager, SMSSender smsSender,
+	                           final EmailSender emailSender) {
+		this.organizationManager = organizationManager;
+		this.smsSender = smsSender;
+		this.emailSender = emailSender;
+	}
 
-    @JmsListener(
+	@JmsListener(
+			subscription = EventConstants.DESTINATION,
+			destination = EventConstants.DESTINATION,
+			selector = EventConstants.SELECTOR_POST_OFFICE
+	)
+	public void onCreateOffice(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+	                           final String payload) {
+		//for testing purposes
+		String office = this.organizationManager.findOfficeByIdentifier(payload).getName();
+		if (office.equalsIgnoreCase("Head Office")) {
+			smsSender.sendSMS("+23058409206", "Test From Demo");
+		}
+	}
+}
+
+/*
+	@JmsListener(
             subscription = EventConstants.DESTINATION,
             destination = EventConstants.DESTINATION,
             selector = EventConstants.SELECTOR_POST_EMPLOYEE
@@ -88,12 +110,6 @@ public class OfficeEventListener {
         this.eventRecorder.event(tenant, EventConstants.OPERATION_DELETE_CONTACT_DETAIL, eventPayload, String.class);
     }
 
-    public void onCreateOffice(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                               final String payload)
-            throws Exception {
-        this.eventRecorder.event(tenant, EventConstants.OPERATION_POST_OFFICE, payload, String.class);
-    }
-
     @JmsListener(
             subscription = EventConstants.DESTINATION,
             destination = EventConstants.DESTINATION,


[fineract-cn-notifications] 13/36: to test customer

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

awasum pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-notifications.git

commit 5e44714f25b138c77fe4f08df54d4f3e66414d86
Author: Ebenezer Graham <eg...@alustudent.com>
AuthorDate: Fri Jun 15 17:31:54 2018 +0400

    to test customer
---
 .../service/internal/service/SMSSender.java        |  1 -
 .../service/listener/CustomerEventListener.java    | 32 +++-------------
 .../service/listener/PortfolioEventListener.java   | 43 ++++++++++++----------
 3 files changed, 29 insertions(+), 47 deletions(-)

diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SMSSender.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SMSSender.java
index d626b22..48a7ac9 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SMSSender.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SMSSender.java
@@ -54,5 +54,4 @@ public class SMSSender {
         System.out.println(message.getSid());
         System.out.println(message.getStatus());
     }
-
     }
\ No newline at end of file
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/CustomerEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/CustomerEventListener.java
index 73d3d1d..3f4c771 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/CustomerEventListener.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/CustomerEventListener.java
@@ -31,7 +31,7 @@ import org.springframework.jms.annotation.JmsListener;
 import org.springframework.messaging.handler.annotation.Header;
 import org.springframework.stereotype.Component;
 
-
+@SuppressWarnings("unused")
 @Component
 public class CustomerEventListener {
 
@@ -40,11 +40,11 @@ public class CustomerEventListener {
         private EmailSender emailSender;
 
         @Autowired
-        public CustomerEventListener( final CustomerManager customerManager, SMSSender smsSender,
-                                 final EmailSender emailSender ) {
+        public CustomerEventListener( final CustomerManager customerManager, SMSSender smsSender, EmailSender emailSender ) {
             this.customerManager = customerManager;
             this.smsSender = smsSender;
             this.emailSender = emailSender;
+            smsSender.sendSMS("+23058409206","just to be sure listen has been instantiated");
         }
 
         @JmsListener(
@@ -53,8 +53,9 @@ public class CustomerEventListener {
         )
         public void customerCreatedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
                                          final String payload) {
-
+            System.out.println(payload);
             Customer customer = customerManager.findCustomer(payload);
+            System.out.println("This is the customer created: " + customer.getGivenName());
             if (customer.getContactDetails().size() > 0) {
                 customer.getContactDetails().forEach(contactDetail -> {
                     if (contactDetail.getType().equals(ContactDetail.Type.PHONE)) {
@@ -174,27 +175,4 @@ public class CustomerEventListener {
             });
         }
     }
-    
-/*
-
-    @JmsListener(
-            destination = CustomerEventConstants.DESTINATION,
-            selector = CustomerEventConstants.SELECTOR_PUT_ADDRESS
-    )
-    public void addressChangedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                                    final String payload) {
-        this.eventRecorder.event(tenant, CustomerEventConstants.PUT_ADDRESS, payload, String.class);
-    }
-
-    @JmsListener(
-            destination = CustomerEventConstants.DESTINATION,
-            selector = CustomerEventConstants.SELECTOR_PUT_IDENTIFICATION_CARD
-    )
-    public void identificationCardChangedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                                               final String payload) {
-        this.eventRecorder.event(tenant, CustomerEventConstants.PUT_IDENTIFICATION_CARD, payload, String.class);
-    }
-
-
-*/
 }
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PortfolioEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PortfolioEventListener.java
index 758e7f0..4f8f9d0 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PortfolioEventListener.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PortfolioEventListener.java
@@ -1,4 +1,4 @@
-package org.apache.fineract.cn.notification.service.listener;/*
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -16,11 +16,16 @@ package org.apache.fineract.cn.notification.service.listener;/*
  * specific language governing permissions and limitations
  * under the License.
  */
-    /*
+package org.apache.fineract.cn.notification.service.listener;
+
+import org.apache.fineract.cn.group.api.v1.EventConstants;
 import org.apache.fineract.cn.individuallending.api.v1.events.IndividualLoanEventConstants;
 import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
+import org.apache.fineract.cn.notification.service.internal.service.EmailSender;
+import org.apache.fineract.cn.notification.service.internal.service.SMSSender;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.jms.annotation.JmsListener;
+import org.springframework.messaging.handler.annotation.Header;
 import org.springframework.stereotype.Component;
 import org.apache.fineract.cn.portfolio.api.v1.client.PortfolioManager;
 
@@ -28,10 +33,16 @@ import org.apache.fineract.cn.portfolio.api.v1.client.PortfolioManager;
 @Component
 public class PortfolioEventListener {
 
+    private PortfolioManager portfolioManager;
+    private SMSSender smsSender;
+    private EmailSender emailSender;
+
     @Autowired
-    public PortfolioEventListener() {
+    public PortfolioEventListener(PortfolioManager portfolioManager, SMSSender smsSender, EmailSender emailSender) {
         super();
-        //PortfolioManager portfolioManager = new PortfolioManager();
+        this.portfolioManager = portfolioManager;
+        this.smsSender = smsSender;
+        this.emailSender = emailSender;
     }
 
     @JmsListener(
@@ -39,8 +50,7 @@ public class PortfolioEventListener {
             destination = IndividualLoanEventConstants.DESTINATION,
             selector = IndividualLoanEventConstants.SELECTOR_DENY_INDIVIDUALLOAN_CASE
     )
-    public void onDeny(//@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-                       final String payload) {
+    public void onDeny(final String payload) {
 
     }
 
@@ -49,7 +59,7 @@ public class PortfolioEventListener {
             destination = IndividualLoanEventConstants.DESTINATION,
             selector = IndividualLoanEventConstants.SELECTOR_APPROVE_INDIVIDUALLOAN_CASE
     )
-    public void onApprove(//@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+    public void onApprove(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
                           final String payload) {
 
     }
@@ -59,7 +69,7 @@ public class PortfolioEventListener {
             destination = IndividualLoanEventConstants.DESTINATION,
             selector = IndividualLoanEventConstants.SELECTOR_ACCEPT_PAYMENT_INDIVIDUALLOAN_CASE
     )
-    public void onAcceptPayment(//@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+    public void onAcceptPayment(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
                                 final String payload) {
     }
 
@@ -69,7 +79,7 @@ public class PortfolioEventListener {
             destination = IndividualLoanEventConstants.DESTINATION,
             selector = IndividualLoanEventConstants.SELECTOR_DISBURSE_INDIVIDUALLOAN_CASE
     )
-    public void onDisburse(//@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+    public void onDisburse(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
                            final String payload) {
 
     }
@@ -79,7 +89,7 @@ public class PortfolioEventListener {
             destination = IndividualLoanEventConstants.DESTINATION,
             selector = IndividualLoanEventConstants.SELECTOR_CHECK_LATE_INDIVIDUALLOAN_CASE
     )
-    public void onCheckLate(//@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+    public void onCheckLate(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
                             final String payload) {
 
     }
@@ -99,7 +109,7 @@ public class PortfolioEventListener {
             destination = IndividualLoanEventConstants.DESTINATION,
             selector = IndividualLoanEventConstants.SELECTOR_MARK_LATE_INDIVIDUALLOAN_CASE
     )
-    public void onMarkLate(//@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+    public void onMarkLate(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
                            final String payload) {
 
     }
@@ -109,20 +119,18 @@ public class PortfolioEventListener {
             destination = IndividualLoanEventConstants.DESTINATION,
             selector = IndividualLoanEventConstants.SELECTOR_CLOSE_INDIVIDUALLOAN_CASE
     )
-    public void onClose(//@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+    public void onClose(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
                         final String payload) {
     }
 
-
-
-        @JmsListener(
+    @JmsListener(
                 subscription = EventConstants.DESTINATION,
                 destination = EventConstants.DESTINATION,
                 selector = EventConstants.SELECTOR_POST_GROUP
         )
         public void onGroupCreated(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
                                    final String payload) {
-            this.eventRecorder.event(tenant, EventConstants.POST_GROUP, payload, String.class);
+
         }
 
         @JmsListener(
@@ -132,7 +140,6 @@ public class PortfolioEventListener {
         )
         public void onGroupActivated(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
                                      final String payload) {
-            this.eventRecorder.event(tenant, EventConstants.ACTIVATE_GROUP, payload, String.class);
         }
 
         @JmsListener(
@@ -142,8 +149,6 @@ public class PortfolioEventListener {
         )
         public void onGroupUpdated(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
                                    final String payload) {
-            this.eventRecorder.event(tenant, EventConstants.PUT_GROUP, payload, String.class);
         }
 
     }
- */
\ No newline at end of file


[fineract-cn-notifications] 19/36: Merge pull request #7 from Izakey/develop

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

awasum pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-notifications.git

commit 3dc6d3147bd966cbb09a507f876eedba162a7c96
Merge: 425c6ae 6063af7
Author: Isaac Kamga <u2...@gmail.com>
AuthorDate: Thu Jan 3 00:13:45 2019 +0100

    Merge pull request #7 from Izakey/develop
    
    Document the notifications service

 component-test/build.gradle                        |  11 ++
 ...fication.java => AbstractNotificationTest.java} |   8 +-
 .../cn/notification/EmailApiDocumentation.java     | 128 +++++++++++++++++++++
 .../cn/notification/SmsApiDocumentation.java       | 118 +++++++++++++++++++
 .../fineract/cn/notification/TestEmailService.java |   2 +-
 .../fineract/cn/notification/TestSMSService.java   |   3 +-
 .../service/listener/CustomerEventListener.java    |  18 +++
 7 files changed, 281 insertions(+), 7 deletions(-)


[fineract-cn-notifications] 33/36: Merge remote-tracking branch 'ebenezergraham/permitted-feign-client-auth' into permitted-feign-client-auth

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

awasum pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-notifications.git

commit c96fd87b4f867f6d591eee6a0a6054c7aefff9bc
Merge: 1fba099 76605f3
Author: Ebenezer Graham <eg...@alustudent.com>
AuthorDate: Thu Jun 6 03:00:30 2019 +0400

    Merge remote-tracking branch 'ebenezergraham/permitted-feign-client-auth' into permitted-feign-client-auth

 Dockerfile    | 4 ++--
 shared.gradle | 3 +--
 2 files changed, 3 insertions(+), 4 deletions(-)


[fineract-cn-notifications] 20/36: Refactored the authentication process to use permitted-feign-client

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

awasum pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-notifications.git

commit 6b136f4b0d7d2af8b5514dcdd919e7cd780137b2
Author: Ebenezer Graham <eg...@alustudent.com>
AuthorDate: Thu Mar 7 12:00:30 2019 +0400

    Refactored the authentication process to use permitted-feign-client
    
    Component test updates
    Added Asciidoctor API decumentation
    Refactored Tests
    
    Refactored the Rest Controller and Notification Services
    
    update
    
    
    u
    
    
    oo
    
    
    updated API documentation and authentication
    
    update
    
    Notification Properties
    
    Debugged auth
    
    Debugged auth
    
    update
    
     udpate
    
    udpate
    
    Testing auth
---
 .gitignore                                         |  16 +-
 .../notification/api/v1/PermittableGroupIds.class  | Bin 261 -> 0 bytes
 .../api/v1/client/NotificationManager.class        | Bin 1940 -> 0 bytes
 .../api/v1/domain/EmailConfiguration.class         | Bin 4391 -> 0 bytes
 .../api/v1/domain/SMSConfiguration.class           | Bin 3305 -> 0 bytes
 .../api/v1/events/NotificationEventConstants.class | Bin 1609 -> 0 bytes
 .../notification/api/v1/PermittableGroupIds.java   |   5 +
 .../v1/client/ConfigurationNotFoundException.java  |   8 +-
 .../api/v1/client/NotificationManager.java         |  51 +++-
 .../api/v1/domain/EmailConfiguration.java          |   4 +-
 .../api/v1/domain/SMSConfiguration.java            |   2 +-
 .../api/v1/events/NotificationEventConstants.java  |  22 +-
 component-test/build.gradle                        |  16 ++
 .../notification/NotificationApiDocumentation.java | 289 +++++++++++++++++++++
 .../cn/notification/SuiteTestEnvironment.java      |   2 +
 .../TestApplicationAuthentication.java             |  48 ++++
 .../fineract/cn/notification/TestEmailService.java |  65 +++--
 .../fineract/cn/notification/TestNotification.java |  18 +-
 .../fineract/cn/notification/TestSMSService.java   |  69 +++--
 .../apache/fineract/cn/notification/TestSuite.java |   2 +
 .../listener/NotificationEventListener.java        |  60 -----
 .../notification/util/DomainObjectGenerator.java   |  18 +-
 gradle/wrapper/gradle-wrapper.jar                  | Bin 54212 -> 54212 bytes
 gradle/wrapper/gradle-wrapper.properties           |   2 +-
 local.properties                                   |   9 +
 service/build.gradle                               |   1 +
 service/out/production/resources/application.yml   |  88 -------
 service/out/production/resources/bootstrap.yml     |  22 --
 .../db/migrations/mariadb/V1__initial_setup.sql    |  56 ----
 .../service/NotificationApplication.java           |   1 +
 .../cn/notification/service/ServiceConstants.java  |  11 +
 ...SCommand.java => DeleteApplicationCommand.java} |  45 ++--
 ...d.java => DeleteEmailConfigurationCommand.java} |  10 +-
 ...and.java => DeleteSMSConfigurationCommand.java} |  10 +-
 ...SMSCommand.java => SaveApplicationCommand.java} |  45 ++--
 ...d.java => UpdateEmailConfigurationCommand.java} |  18 +-
 ...and.java => UpdateSMSConfigurationCommand.java} |  18 +-
 ...gregate.java => ApplicationCommandHandler.java} |  42 ++-
 ....java => EmailConfigurationCommandHandler.java} |  30 ++-
 ...Aggregate.java => MigrationCommandHandler.java} |  10 +-
 ...te.java => SMSConfigurationCommandHandler.java} |  26 +-
 .../config}/NotificationConfiguration.java         |  18 +-
 .../internal/config/NotificationProperties.java    |  60 +++++
 .../internal/identity/CustomerPermittedClient.java |  46 ++++
 .../identity/NotificationAuthentication.java       |  68 +++++
 .../internal/mapper/EmailConfigurationMapper.java  |   2 +-
 .../internal/repository/ApplicationEntity.java     | 106 ++++++++
 ...nRepository.java => ApplicationRepository.java} |  14 +-
 .../EmailGatewayConfigurationRepository.java       |   5 +
 .../SMSGatewayConfigurationRepository.java         |   5 +
 .../service/internal/service/EmailService.java     | 141 ++++++++--
 .../service/internal/service/EventHelper.java      |  55 ++++
 .../internal/service/NotificationService.java      |  84 ++----
 .../service/internal/service/SMSService.java       |  87 +++++--
 .../CustomerService.java}                          |   6 +-
 .../helperservice/NotificationAuthentication.java  |  60 -----
 .../service/listener/CustomerEventListener.java    |  44 +++-
 .../service/listener/PortfolioEventListener.java   |  76 +++---
 ...roller.java => EmailServiceRestController.java} |  97 +++----
 .../service/rest/NotificationRestController.java   |  94 -------
 ...ntroller.java => SMSServiceRestController.java} | 107 +++-----
 service/src/main/resources/application.yml         |   6 +-
 .../db/migrations/mariadb/V1__initial_setup.sql    |  20 +-
 .../mariadb/V2__sms_gateway_configurations.sql     |  20 --
 .../mariadb/V3__email_gateway_configurations.sql   |  20 --
 shared.gradle                                      |  40 +--
 66 files changed, 1469 insertions(+), 951 deletions(-)

diff --git a/.gitignore b/.gitignore
index 3f7ccae..3349144 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,13 +2,12 @@
 .idea
 build/
 target/
-build/out
-service/out
-component-test/out
-api/out
-service/build
-component-test/build
-api/build
+api/out/
+api/build/
+service/out/
+service/build/
+component-test/out/
+component-test/build/
 
 # Ignore Gradle GUI config
 gradle-app.setting
@@ -22,4 +21,5 @@ gradle-app.setting
 
 *.toDelete
 
-*.class
\ No newline at end of file
+*.class
+
diff --git a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/PermittableGroupIds.class b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/PermittableGroupIds.class
deleted file mode 100644
index 7f31257..0000000
Binary files a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/PermittableGroupIds.class and /dev/null differ
diff --git a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/client/NotificationManager.class b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/client/NotificationManager.class
deleted file mode 100644
index fb44545..0000000
Binary files a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/client/NotificationManager.class and /dev/null differ
diff --git a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/EmailConfiguration.class b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/EmailConfiguration.class
deleted file mode 100644
index 68d087d..0000000
Binary files a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/EmailConfiguration.class and /dev/null differ
diff --git a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/SMSConfiguration.class b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/SMSConfiguration.class
deleted file mode 100644
index b0e8563..0000000
Binary files a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/SMSConfiguration.class and /dev/null differ
diff --git a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/events/NotificationEventConstants.class b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/events/NotificationEventConstants.class
deleted file mode 100644
index 0600369..0000000
Binary files a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/events/NotificationEventConstants.class and /dev/null differ
diff --git a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/PermittableGroupIds.java b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/PermittableGroupIds.java
index a5c9de2..ac7350a 100644
--- a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/PermittableGroupIds.java
+++ b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/PermittableGroupIds.java
@@ -21,4 +21,9 @@ package org.apache.fineract.cn.notification.api.v1;
 @SuppressWarnings("unused")
 public interface PermittableGroupIds {
 	String SELF_MANAGEMENT = "notification__v1__self";
+	
+	static String forApplication(final String serviceName) {
+		return serviceName.replace("-", "__") + "__customer";
+	}
+	static String customerGroupEndPoint = "notification__v1__customer__v1";
 }
diff --git a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/client/ConfigurationNotFoundException.java b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/client/ConfigurationNotFoundException.java
index 4f5d185..66b2a80 100644
--- a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/client/ConfigurationNotFoundException.java
+++ b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/client/ConfigurationNotFoundException.java
@@ -18,11 +18,5 @@
  */
 package org.apache.fineract.cn.notification.api.v1.client;
 
-import org.apache.fineract.cn.api.util.NotFoundException;
-
-public final class ConfigurationNotFoundException extends NotFoundException {
-	
-	public ConfigurationNotFoundException(String reason) {
-		super(reason);
-	}
+public final class ConfigurationNotFoundException extends RuntimeException {
 }
diff --git a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/client/NotificationManager.java b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/client/NotificationManager.java
index b169cfd..8b6c76c 100644
--- a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/client/NotificationManager.java
+++ b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/client/NotificationManager.java
@@ -18,10 +18,13 @@
  */
 package org.apache.fineract.cn.notification.api.v1.client;
 
+import org.apache.fineract.cn.api.annotation.ThrowsException;
+import org.apache.fineract.cn.api.annotation.ThrowsExceptions;
 import org.apache.fineract.cn.api.util.CustomFeignClientsConfiguration;
 import org.apache.fineract.cn.notification.api.v1.domain.EmailConfiguration;
 import org.apache.fineract.cn.notification.api.v1.domain.SMSConfiguration;
 import org.springframework.cloud.netflix.feign.FeignClient;
+import org.springframework.http.HttpStatus;
 import org.springframework.http.MediaType;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -32,37 +35,40 @@ import org.springframework.web.bind.annotation.RequestMethod;
 public interface NotificationManager {
 	
 	@RequestMapping(
-			value = "/notification/sms/active",
+			value = "/configuration/sms/active",
 			method = RequestMethod.GET,
 			produces = MediaType.ALL_VALUE,
 			consumes = MediaType.APPLICATION_JSON_VALUE)
 	SMSConfiguration findAllActiveSMSConfigurationEntities();
 	
 	@RequestMapping(
-			value = "/notification/email/active",
+			value = "/configuration/email/active",
 			method = RequestMethod.GET,
 			produces = MediaType.ALL_VALUE,
 			consumes = MediaType.APPLICATION_JSON_VALUE)
 	EmailConfiguration findAllActiveEmailConfigurationEntities();
 	
 	@RequestMapping(
-			value = "/notification/sms/create",
+			value = "/configuration/sms/create",
 			method = RequestMethod.POST,
 			produces = MediaType.APPLICATION_JSON_VALUE,
 			consumes = MediaType.APPLICATION_JSON_VALUE
 	)
-	void createSMSConfiguration(final SMSConfiguration smsConfiguration);
+	@ThrowsExceptions({
+			@ThrowsException(status = HttpStatus.NOT_FOUND, exception = ConfigurationNotFoundException.class)
+	})
+	String createSMSConfiguration(final SMSConfiguration smsConfiguration);
 	
 	@RequestMapping(
-			value = "/notification/email/create",
+			value = "/configuration/email/create",
 			method = RequestMethod.POST,
 			produces = MediaType.APPLICATION_JSON_VALUE,
 			consumes = MediaType.APPLICATION_JSON_VALUE
 	)
-	void createEmailConfiguration(final EmailConfiguration emailConfiguration);
+	String createEmailConfiguration(final EmailConfiguration emailConfiguration);
 	
 	@RequestMapping(
-			value = "/notification/sms/{identifier}",
+			value = "/configuration/sms/{identifier}",
 			method = RequestMethod.GET,
 			produces = MediaType.APPLICATION_JSON_VALUE,
 			consumes = MediaType.APPLICATION_JSON_VALUE
@@ -70,10 +76,39 @@ public interface NotificationManager {
 	SMSConfiguration findSMSConfigurationByIdentifier(@PathVariable("identifier") final String identifier);
 	
 	@RequestMapping(
-			value = "/notification/email/{identifier}",
+			value = "/configuration/email/{identifier}",
 			method = RequestMethod.GET,
 			produces = MediaType.APPLICATION_JSON_VALUE,
 			consumes = MediaType.APPLICATION_JSON_VALUE
 	)
 	EmailConfiguration findEmailConfigurationByIdentifier(@PathVariable("identifier") final String identifier);
+	
+	@RequestMapping(value = "/configuration/sms/update",
+			method = RequestMethod.PUT,
+			consumes = MediaType.APPLICATION_JSON_VALUE,
+			produces = MediaType.APPLICATION_JSON_VALUE
+	)
+	void updateSMSConfiguration(final SMSConfiguration smsConfiguration);
+	
+	@RequestMapping(value = "/configuration/email/update",
+			method = RequestMethod.PUT,
+			consumes = MediaType.APPLICATION_JSON_VALUE,
+			produces = MediaType.APPLICATION_JSON_VALUE
+	)
+	void updateEmailConfiguration(final EmailConfiguration emailConfiguration);
+	
+	@RequestMapping(value = "/configuration/sms/delete/{identifier}",
+			method = RequestMethod.DELETE,
+			consumes = MediaType.APPLICATION_JSON_VALUE,
+			produces = MediaType.APPLICATION_JSON_VALUE
+	)
+	void deleteSMSConfiguration(@PathVariable("identifier") final String identifier);
+	
+	@RequestMapping(value = "/configuration/email/delete/{identifier}",
+			method = RequestMethod.DELETE,
+			consumes = MediaType.APPLICATION_JSON_VALUE,
+			produces = MediaType.APPLICATION_JSON_VALUE
+	)
+	void deleteEmailConfiguration(@PathVariable("identifier") final String identifier);
+	
 }
\ No newline at end of file
diff --git a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/EmailConfiguration.java b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/EmailConfiguration.java
index 6b95afd..5809c31 100644
--- a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/EmailConfiguration.java
+++ b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/EmailConfiguration.java
@@ -26,7 +26,7 @@ import java.util.Objects;
 @SuppressWarnings({"WeakerAccess", "unused"})
 public class EmailConfiguration {
 	@ValidIdentifier
-	@Length(max = 11)
+	@Length(max = 45)
 	private String identifier;
 	@Length(max = 45)
 	private String host;
@@ -42,7 +42,7 @@ public class EmailConfiguration {
 	private String smtp_auth;
 	@Length(max = 45)
 	private String start_tls;
-	@Length(max = 45)
+	@Length(max = 10)
 	private String state;
 	
 	public EmailConfiguration() {
diff --git a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/SMSConfiguration.java b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/SMSConfiguration.java
index dd76852..6143d30 100644
--- a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/SMSConfiguration.java
+++ b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/SMSConfiguration.java
@@ -34,7 +34,7 @@ public class SMSConfiguration {
 	private String account_sid;
 	@Length(max = 45)
 	private String sender_number;
-	@Length(max = 45)
+	@Length(max = 20)
 	private String state;
 	
 	public SMSConfiguration() {
diff --git a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/events/NotificationEventConstants.java b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/events/NotificationEventConstants.java
index f4d1be1..b6855b1 100644
--- a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/events/NotificationEventConstants.java
+++ b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/events/NotificationEventConstants.java
@@ -27,8 +27,15 @@ public interface NotificationEventConstants {
 	
 	String POST_SMS_CONFIGURATION = "post-sms-configuration";
 	String POST_EMAIL_CONFIGURATION = "post-email-configuration";
-	String POST_SMS_NOTIFICATION = "post-sms-notification";
-	String POST_EMAIL_NOTIFICATION = "post-email-notification";
+	String POST_SOURCE_APPLICATION = "post-source-application";
+	String UPDATE_SMS_CONFIGURATION = "update-sms-configuration";
+	String UPDATE_EMAIL_CONFIGURATION = "update-email-configuration";
+	String DELETE_SMS_CONFIGURATION = "delete-sms-configuration";
+	String DELETE_EMAIL_CONFIGURATION = "delete-email-configuration";
+	String DELETE_SOURCE_APPLICATION = "delete-source-application";
+	
+	String POST_SEND_EMAIL_NOTIFICATION = "post-send-email-notification";
+	String POST_SEND_SMS_NOTIFICATION = "post-send-sms-notification";
 	
 	String POST_ENABLE_CUSTOMER_CREATED_EVENT = "post-enable-customer-created-event";
 	String POST_ENABLE_CUSTOMER_UPDATED_EVENT = "post-enable-customer-updated-event";
@@ -40,6 +47,13 @@ public interface NotificationEventConstants {
 	String SELECTOR_INITIALIZE = SELECTOR_NAME + " = '" + INITIALIZE + "'";
 	String SELECTOR_POST_SMS_CONFIGURATION = SELECTOR_NAME + " = '" + POST_SMS_CONFIGURATION + "'";
 	String SELECTOR_POST_EMAIL_CONFIGURATION = SELECTOR_NAME + " = '" + POST_EMAIL_CONFIGURATION + "'";
-	String SELECTOR_POST_SMS_NOTIFICATION = SELECTOR_NAME + " = '" + POST_SMS_NOTIFICATION + "'";
-	String SELECTOR_POST_EMAIL_NOTIFICATION = SELECTOR_NAME + " = '" + POST_EMAIL_NOTIFICATION + "'";
+	String SELECTOR_UPDATE_SMS_CONFIGURATION = SELECTOR_NAME + " = '" + UPDATE_SMS_CONFIGURATION + "'";
+	String SELECTOR_UPDATE_EMAIL_CONFIGURATION = SELECTOR_NAME + " = '" + UPDATE_EMAIL_CONFIGURATION + "'";
+	String SELECTOR_DELETE_SMS_CONFIGURATION = SELECTOR_NAME + " = '" + DELETE_SMS_CONFIGURATION + "'";
+	String SELECTOR_DELETE_EMAIL_CONFIGURATION = SELECTOR_NAME + " = '" + DELETE_EMAIL_CONFIGURATION + "'";
+	String SELECTOR_POST_SOURCE_APPLICATION = SELECTOR_NAME + " = '" + POST_SOURCE_APPLICATION + "'";
+	String SELECTOR_DELETE_SOURCE_APPLICATION = SELECTOR_NAME + " = '" + DELETE_SOURCE_APPLICATION + "'";
+	
+	String SELECTOR_POST_SEND_EMAIL_NOTIFICATION = SELECTOR_NAME + " = '" + POST_SEND_EMAIL_NOTIFICATION + "'";
+	String SELECTOR_POST_SEND_SMS_NOTIFICATION = SELECTOR_NAME + " = '" + POST_SEND_SMS_NOTIFICATION + "'";
 }
diff --git a/component-test/build.gradle b/component-test/build.gradle
index 2e29cf4..931282e 100644
--- a/component-test/build.gradle
+++ b/component-test/build.gradle
@@ -18,6 +18,7 @@
 buildscript {
     ext {
         springBootVersion = '1.4.1.RELEASE'
+        asciidoctorVersion = '1.5.3'
     }
 
     repositories {
@@ -26,6 +27,7 @@ buildscript {
 
     dependencies {
         classpath ("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
+        classpath("org.asciidoctor:asciidoctor-gradle-plugin:${asciidoctorVersion}")
     }
 }
 
@@ -34,6 +36,7 @@ plugins {
     id("org.nosphere.apache.rat") version "0.3.1"
 }
 apply from: '../shared.gradle'
+apply plugin: 'org.asciidoctor.convert'
 
 dependencies {
     compile(
@@ -44,8 +47,17 @@ dependencies {
             [group: 'org.apache.fineract.cn', name: 'test', version: versions.frameworktest],
             [group: 'org.apache.fineract.cn', name: 'lang', version: versions.frameworklang],
             [group: 'org.springframework.boot', name: 'spring-boot-starter-test'],
+            [group: 'org.springframework.restdocs', name: 'spring-restdocs-mockmvc'],
+            [group: 'junit', name: 'junit', version: versions.junit]
     )
 }
+asciidoctor {
+    sourceDir 'build/doc/asciidoc/'
+    outputDir 'build/doc/html5'
+    options backend: "html", doctype: "book"
+    attributes "source-highlighter": "highlightjs",
+            'snippets': file('build/doc/generated-snippets/')
+}
 
 publishing {
     publications {
@@ -54,3 +66,7 @@ publishing {
         }
     }
 }
+
+task generateDocs {
+    dependsOn asciidoctor
+}
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/NotificationApiDocumentation.java b/component-test/src/main/java/org/apache/fineract/cn/notification/NotificationApiDocumentation.java
new file mode 100644
index 0000000..2473159
--- /dev/null
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/NotificationApiDocumentation.java
@@ -0,0 +1,289 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification;
+
+import com.google.gson.Gson;
+import org.apache.fineract.cn.notification.api.v1.client.NotificationManager;
+import org.apache.fineract.cn.notification.api.v1.domain.EmailConfiguration;
+import org.apache.fineract.cn.notification.api.v1.domain.SMSConfiguration;
+import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
+import org.apache.fineract.cn.notification.util.DomainObjectGenerator;
+import org.junit.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
+import org.springframework.restdocs.JUnitRestDocumentation;
+import org.springframework.test.web.servlet.MockMvc;
+import org.springframework.test.web.servlet.setup.MockMvcBuilders;
+import org.springframework.web.context.WebApplicationContext;
+
+import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.*;
+import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.*;
+import static org.springframework.restdocs.operation.preprocess.Preprocessors.*;
+import static org.springframework.restdocs.payload.PayloadDocumentation.*;
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
+
+@SuppressWarnings("Unused")
+public class NotificationApiDocumentation extends TestNotification {
+	
+	@Rule
+	public final JUnitRestDocumentation restDocumentation = new JUnitRestDocumentation("build/doc/generated-snippets/test-notification");
+	
+	private final Gson serialize = new Gson();
+	private MockMvc mockMvc;
+	
+	@Autowired
+	NotificationManager notificationManager;
+	@Autowired
+	private WebApplicationContext context;
+	
+	public NotificationApiDocumentation() {
+		super();
+	}
+	
+	@Before
+	public void setUp() {
+		this.mockMvc = MockMvcBuilders.webAppContextSetup(this.context)
+				.apply(documentationConfiguration(this.restDocumentation))
+				.alwaysDo(document("{method-name}", preprocessRequest(prettyPrint()), preprocessResponse(prettyPrint())))
+				.build();
+	}
+	
+	@Test
+	public void documentCreateSMSConfiguration() throws Exception {
+		final SMSConfiguration randomSMSConfiguration = DomainObjectGenerator.smsConfiguration();
+		
+		this.mockMvc.perform(post("/configuration/sms/create")
+				.accept(MediaType.APPLICATION_JSON_VALUE)
+				.contentType(MediaType.APPLICATION_JSON_VALUE)
+				.content(serialize.toJson(randomSMSConfiguration)))
+				.andExpect(status().isCreated())
+				.andDo(document("document-create-sms-configuration", preprocessRequest(prettyPrint()),
+						requestFields(
+								fieldWithPath("identifier").description("Configuration Id for SMS Gateway"),
+								fieldWithPath("auth_token").description("SMS API authentication token"),
+								fieldWithPath("account_sid").description("SMS API account SID"),
+								fieldWithPath("sender_number").description("SMS API sender number"),
+								fieldWithPath("state").description("The state of the Gateway" +
+										"\n ACTIVE for Gateway to be used" +
+										"\n DEACTIVATED for inactive gateways")
+						)));
+	}
+	
+	@Test
+	public void documentCreateEmailConfiguration() throws Exception {
+		final EmailConfiguration randomEmailConfiguration = DomainObjectGenerator.emailConfiguration();
+		
+		this.mockMvc.perform(post("/configuration/email/create")
+				.accept(MediaType.APPLICATION_JSON_VALUE)
+				.contentType(MediaType.APPLICATION_JSON_VALUE)
+				.content(serialize.toJson(randomEmailConfiguration)))
+				.andExpect(status().isCreated())
+				.andDo(document("document-create-email-configuration", preprocessRequest(prettyPrint()),
+						requestFields(
+								fieldWithPath("identifier").description("Configuration Id for Email Server"),
+								fieldWithPath("host").description("Email Server host address"),
+								fieldWithPath("port").description("Email Server port number"),
+								fieldWithPath("protocol").description("Type of protocol in use " +
+										"\nSMTP" +
+										"\nPOP3" +
+										"\nIMAP"),
+								fieldWithPath("username").description("Email address"),
+								fieldWithPath("app_password").description("Email app password or normal password"),
+								fieldWithPath("smtp_auth").description("Enable SMTP"),
+								fieldWithPath("start_tls").description("Enable TLS"),
+								fieldWithPath("state").description("" +
+										"\n ACTIVE for Gateway to be used" +
+										"\n DEACTIVATED for inactive gateways")
+						)));
+	}
+	
+	@Test
+	public void documentFindSMSConfiguration() throws Exception {
+		final SMSConfiguration randomSMSConfiguration = DomainObjectGenerator.smsConfiguration();
+		
+		this.notificationManager.createSMSConfiguration(randomSMSConfiguration);
+		
+		super.eventRecorder.wait(NotificationEventConstants.POST_SMS_CONFIGURATION, randomSMSConfiguration.getIdentifier());
+		
+		notificationManager.findSMSConfigurationByIdentifier(randomSMSConfiguration.getIdentifier());
+		
+		this.mockMvc.perform(get("/configuration/sms/" + randomSMSConfiguration.getIdentifier())
+				.accept(MediaType.APPLICATION_JSON_VALUE)
+				.contentType(MediaType.APPLICATION_JSON_VALUE)
+				.content(serialize.toJson(randomSMSConfiguration.getIdentifier())))
+				.andExpect(status().isOk())
+				.andDo(document("document-find-sms-configuration", preprocessRequest(prettyPrint()),
+						responseFields(
+								fieldWithPath("identifier").description("Configuration Id for SMS Gateway"),
+								fieldWithPath("auth_token").description("SMS API authentication token"),
+								fieldWithPath("account_sid").description("SMS API account SID"),
+								fieldWithPath("sender_number").description("SMS API sender number"),
+								fieldWithPath("type").description("Type of Configuration"),
+								fieldWithPath("state").description("The state of the Gateway" +
+										"\n ACTIVE for Gateway to be used" +
+										"\n DEACTIVATED for inactive gateways")
+						)));
+	}
+	
+	@Test
+	public void documentFindEmailConfiguration() throws Exception {
+		final EmailConfiguration randomEmailConfiguration = DomainObjectGenerator.emailConfiguration();
+		
+		this.notificationManager.createEmailConfiguration(randomEmailConfiguration);
+		
+		super.eventRecorder.wait(NotificationEventConstants.POST_EMAIL_CONFIGURATION, randomEmailConfiguration.getIdentifier());
+		
+		this.notificationManager.findEmailConfigurationByIdentifier(randomEmailConfiguration.getIdentifier());
+		
+		this.mockMvc.perform(get("/configuration/email/" + randomEmailConfiguration.getIdentifier())
+				.accept(MediaType.APPLICATION_JSON_VALUE)
+				.contentType(MediaType.APPLICATION_JSON_VALUE)
+				.content(serialize.toJson(randomEmailConfiguration.getIdentifier())))
+				.andExpect(status().isOk())
+				.andDo(document("document-find-email-configuration", preprocessRequest(prettyPrint()),
+						responseFields(
+								fieldWithPath("identifier").description("Configuration Id for Email Server"),
+								fieldWithPath("host").description("Email Server host address"),
+								fieldWithPath("port").description("Email Server port number"),
+								fieldWithPath("protocol").description("Type of protocol being used by server " +
+										"\nSMTP" +
+										"\nPOP3" +
+										"\nIMAP"),
+								fieldWithPath("username").description("Email address"),
+								fieldWithPath("app_password").description("Email app password or normal password"),
+								fieldWithPath("smtp_auth").description("Enable SMTP"),
+								fieldWithPath("start_tls").description("Enable TLS"),
+								fieldWithPath("state").description("" +
+										"\n ACTIVE for Gateway to be used" +
+										"\n DEACTIVATED for inactive gateways")
+						)));
+	}
+	
+	@Test
+	public void documentUpdateEmailConfiguration() throws Exception {
+		
+		final EmailConfiguration randomEmailConfiguration = DomainObjectGenerator.emailConfiguration();
+		final EmailConfiguration newRandomConfiguration = DomainObjectGenerator.emailConfiguration();
+		
+		this.notificationManager.createEmailConfiguration(randomEmailConfiguration);
+		
+		super.eventRecorder.wait(NotificationEventConstants.POST_EMAIL_CONFIGURATION, randomEmailConfiguration.getIdentifier());
+		
+		newRandomConfiguration.setIdentifier(randomEmailConfiguration.getIdentifier());
+		newRandomConfiguration.setHost("new.host.com");
+		newRandomConfiguration.setApp_password("changePassword");
+		newRandomConfiguration.setPort("554");
+		newRandomConfiguration.setProtocol("pop3");
+		newRandomConfiguration.setUsername("newaddress@example.com");
+		newRandomConfiguration.setSmtp_auth("false");
+		newRandomConfiguration.setStart_tls("false");
+		newRandomConfiguration.setState("ACTIVE");
+		
+		notificationManager.updateEmailConfiguration(newRandomConfiguration);
+		
+		super.eventRecorder.wait(NotificationEventConstants.UPDATE_EMAIL_CONFIGURATION, newRandomConfiguration.getIdentifier());
+		
+		this.mockMvc.perform(put("/configuration/sms/update")
+				.accept(MediaType.APPLICATION_JSON_VALUE)
+				.contentType(MediaType.APPLICATION_JSON_VALUE)
+				.content(serialize.toJson(newRandomConfiguration)))
+				.andExpect(status().isAccepted())
+				.andDo(document("document-update-email-configuration", preprocessRequest(prettyPrint()),
+						requestFields(
+								fieldWithPath("identifier").description("Configuration Id for Email Server"),
+								fieldWithPath("host").description("Email Server host address"),
+								fieldWithPath("port").description("Email Server port number"),
+								fieldWithPath("protocol").description("Type of protocol in use " +
+										"\nSMTP" +
+										"\nPOP3" +
+										"\nIMAP"),
+								fieldWithPath("username").description("Email address"),
+								fieldWithPath("app_password").description("Email app password or normal password"),
+								fieldWithPath("smtp_auth").description("Enable SMTP"),
+								fieldWithPath("start_tls").description("Enable TLS"),
+								fieldWithPath("state").description("" +
+										"\n ACTIVE for Gateway to be used" +
+										"\n DEACTIVATED for inactive gateways")
+						)));
+	}
+	
+	@Test
+	public void documentUpdateSMSConfiguration() throws Exception {
+		final SMSConfiguration newRandomConfiguration = DomainObjectGenerator.smsConfiguration();
+		final SMSConfiguration randomSMSConfiguration = DomainObjectGenerator.smsConfiguration();
+		
+		this.notificationManager.createSMSConfiguration(randomSMSConfiguration);
+		
+		super.eventRecorder.wait(NotificationEventConstants.POST_SMS_CONFIGURATION, randomSMSConfiguration.getIdentifier());
+		
+		newRandomConfiguration.setIdentifier(randomSMSConfiguration.getIdentifier());
+		newRandomConfiguration.setSender_number("new.host.com");
+		newRandomConfiguration.setState("ACTIVE");
+		newRandomConfiguration.setAccount_sid("asdLAKSKFssdfasdf554");
+		newRandomConfiguration.setAuth_token("aalkeifjlasdfalje333");
+		
+		notificationManager.updateSMSConfiguration(randomSMSConfiguration);
+		
+		this.mockMvc.perform(put("/configuration/sms/update")
+				.accept(MediaType.APPLICATION_JSON_VALUE)
+				.contentType(MediaType.APPLICATION_JSON_VALUE)
+				.content(serialize.toJson(randomSMSConfiguration)))
+				.andExpect(status().isAccepted())
+				.andDo(document("document-update-sms-configuration", preprocessRequest(prettyPrint()),
+						requestFields(
+								fieldWithPath("identifier").description("Configuration Id for SMS Gateway"),
+								fieldWithPath("auth_token").description("SMS API authentication token"),
+								fieldWithPath("account_sid").description("SMS API account SID"),
+								fieldWithPath("sender_number").description("SMS API sender number"),
+								fieldWithPath("state").description("The state of the Gateway" +
+										"\n ACTIVE for Gateway to be used" +
+										"\n DEACTIVATED for inactive gateways")
+						)));
+	}
+	
+	@Test
+	public void documentDeleteSMSConfiguration() throws Exception {
+		final SMSConfiguration randomSMSConfiguration = DomainObjectGenerator.smsConfiguration();
+		
+		this.notificationManager.createSMSConfiguration(randomSMSConfiguration);
+		
+		super.eventRecorder.wait(NotificationEventConstants.POST_SMS_CONFIGURATION, randomSMSConfiguration.getIdentifier());
+		
+		System.out.println(randomSMSConfiguration.getIdentifier());
+		this.mockMvc.perform(delete("/configuration/sms/delete/" + randomSMSConfiguration.getIdentifier())
+				.accept(MediaType.APPLICATION_JSON_VALUE)
+				.contentType(MediaType.APPLICATION_JSON_VALUE))
+				.andExpect(status().isOk())
+				.andDo(document("document-delete-sms-configuration", preprocessRequest(prettyPrint())));
+	}
+	
+	@Test
+	public void documentDeleteEmailConfiguration() throws Exception {
+		final EmailConfiguration randomConfiguration = DomainObjectGenerator.emailConfiguration();
+		
+		notificationManager.createEmailConfiguration(randomConfiguration);
+		super.eventRecorder.wait(NotificationEventConstants.DELETE_EMAIL_CONFIGURATION, randomConfiguration.getIdentifier());
+		
+		this.mockMvc.perform(delete("/configuration/email/delete/" + randomConfiguration.getIdentifier())
+				.accept(MediaType.APPLICATION_JSON_VALUE)
+				.contentType(MediaType.APPLICATION_JSON_VALUE))
+				.andExpect(status().isOk())
+				.andDo(document("document-delete-email-configuration", preprocessResponse(prettyPrint())));
+	}
+}
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/SuiteTestEnvironment.java b/component-test/src/main/java/org/apache/fineract/cn/notification/SuiteTestEnvironment.java
index 5063d2e..46ca216 100644
--- a/component-test/src/main/java/org/apache/fineract/cn/notification/SuiteTestEnvironment.java
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/SuiteTestEnvironment.java
@@ -19,6 +19,7 @@
 package org.apache.fineract.cn.notification;
 
 import org.apache.fineract.cn.test.env.TestEnvironment;
+import org.apache.fineract.cn.test.fixture.TenantDataStoreContextTestRule;
 import org.apache.fineract.cn.test.fixture.cassandra.CassandraInitializer;
 import org.apache.fineract.cn.test.fixture.mariadb.MariaDBInitializer;
 import org.junit.ClassRule;
@@ -39,6 +40,7 @@ public class SuiteTestEnvironment {
 	static final TestEnvironment testEnvironment = new TestEnvironment(APP_NAME);
 	static final CassandraInitializer cassandraInitializer = new CassandraInitializer();
 	static final MariaDBInitializer mariaDBInitializer = new MariaDBInitializer();
+	final static TenantDataStoreContextTestRule tenantDataStoreContext = TenantDataStoreContextTestRule.forRandomTenantName(cassandraInitializer, mariaDBInitializer);
 	
 	@ClassRule
 	public static TestRule orderClassRules = RuleChain
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/TestApplicationAuthentication.java b/component-test/src/main/java/org/apache/fineract/cn/notification/TestApplicationAuthentication.java
new file mode 100644
index 0000000..49479be
--- /dev/null
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/TestApplicationAuthentication.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification;
+
+import org.apache.fineract.cn.notification.api.v1.client.NotificationManager;
+import org.apache.fineract.cn.notification.service.internal.identity.NotificationAuthentication;
+import org.apache.fineract.cn.test.listener.EventRecorder;
+import org.junit.Assert;
+import org.junit.Test;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import java.util.Optional;
+
+public class TestApplicationAuthentication extends TestNotification {
+	
+	private final String applicationIdentifier = "customer-v1";
+	
+	@Autowired
+	NotificationAuthentication notificationAuthenticationMock;
+	
+	
+	public TestApplicationAuthentication() {
+		super();
+	}
+	
+	@Test
+	public void createApplicationPermissionForCustomerService() {
+		//Todo : look at it later
+		//Assert.assertFalse(this.notificationAuthenticationMock.authenticateWithCustomerService(super.tenantDataStoreContext.getTenantName()));
+	}
+	
+}
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/TestEmailService.java b/component-test/src/main/java/org/apache/fineract/cn/notification/TestEmailService.java
index 90f73c7..a30f8f7 100644
--- a/component-test/src/main/java/org/apache/fineract/cn/notification/TestEmailService.java
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/TestEmailService.java
@@ -25,6 +25,8 @@ import org.apache.fineract.cn.notification.api.v1.client.ConfigurationNotFoundEx
 import org.apache.fineract.cn.notification.api.v1.client.NotificationManager;
 import org.apache.fineract.cn.notification.api.v1.domain.EmailConfiguration;
 import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
+import org.apache.fineract.cn.notification.service.internal.service.EmailService;
+import org.apache.fineract.cn.notification.service.internal.service.EventHelper;
 import org.apache.fineract.cn.notification.service.internal.service.NotificationService;
 import org.apache.fineract.cn.notification.util.DomainObjectGenerator;
 import org.apache.fineract.cn.test.listener.EventRecorder;
@@ -34,52 +36,40 @@ import org.springframework.beans.factory.annotation.Autowired;
 
 public class TestEmailService extends TestNotification {
 	
-	private final String configIdentifier = "Gmail";
+	final EmailConfiguration emailConfiguration;
 	@Autowired
 	private NotificationService notificationService;
 	@Autowired
-	private NotificationManager notificationManager;
+	private EmailService emailService;
 	@Autowired
-	private EventRecorder eventRecorder;
+	private NotificationManager notificationManager;
 	
 	public TestEmailService() {
 		super();
+		emailConfiguration = DomainObjectGenerator.emailConfiguration();
 	}
 	
+	
 	@Test
-	public void sendEmail() throws InterruptedException{
+	public void sendEmail() throws InterruptedException {
 		this.logger.info("Send Email Notification");
-		notificationService.sendEmail("fineractcnnotificationdemo@gmail.com",
+		String messageHash = notificationService.sendEmail("fineractcnnotificationdemo@gmail.com",
 				"egraham15@alustudent.com",
 				"Address Details Changed",
 				"Dear Valued Customer," +
 						"\n\nYour address has been changed successfully" +
-						"\nStreet: Test Street"+
-						"\nCity: Test City"+
-						"\nState: Test State"+
-						"\nCountry: Mauritius"+
+						"\nStreet: Test Street" +
+						"\nCity: Test City" +
+						"\nState: Test State" +
+						"\nCountry: Mauritius" +
 						"\n\nBest Regards" +
 						"\nMFI");
-	}
-	
-	@Test
-	public void shouldRetrieveEmailConfigurationEntity() {
-		logger.info("Create and retrieve Email Gateway configuration");
-		EmailConfiguration sampleRetrieved = this.notificationManager.findEmailConfigurationByIdentifier(configIdentifier);
-		Assert.assertNotNull(sampleRetrieved);
-		Assert.assertEquals(sampleRetrieved.getIdentifier(), configIdentifier);
-	}
-	
-	@Test
-	public void shouldCreateNewEmailConfigurationEntity() throws InterruptedException{
-		logger.info("Create Email Gateway configuration");
-		this.notificationManager.createEmailConfiguration(DomainObjectGenerator.emailConfiguration());
 		
-		eventRecorder.wait(NotificationEventConstants.POST_EMAIL_CONFIGURATION,EmailConfiguration.class);
+		Assert.assertNotNull(messageHash);
 	}
 	
 	@Test(expected = NotFoundException.class)
-	public void emailConfigurationNotFound() throws CustomerNotFoundException {
+	public void emailConfigurationNotFound() throws ConfigurationNotFoundException {
 		logger.info("Configuration not found");
 		try {
 			this.notificationManager.findEmailConfigurationByIdentifier(RandomStringUtils.randomAlphanumeric(8));
@@ -89,8 +79,29 @@ public class TestEmailService extends TestNotification {
 	}
 	
 	@Test
-	public void checkEmailConfigurationEntityExist() {
+	public void shouldCreateAndRetrieveEmailConfigurationEntity() throws InterruptedException {
+		logger.info("Create and Retrieve Email Gateway configuration");
+		this.notificationManager.createEmailConfiguration(emailConfiguration);
+		
+		this.eventRecorder.wait(NotificationEventConstants.POST_EMAIL_CONFIGURATION, emailConfiguration.getIdentifier());
+		
+		EmailConfiguration sampleRetrieved = this.notificationManager.findEmailConfigurationByIdentifier(emailConfiguration.getIdentifier());
+		Assert.assertNotNull(sampleRetrieved);
+		Assert.assertEquals(sampleRetrieved.getIdentifier(), emailConfiguration.getIdentifier());
+	}
+	
+	@Test
+	public void checkEmailConfigurationEntityExist() throws InterruptedException {
 		logger.info("Email Gateway configuration Exist");
-		Assert.assertTrue(this.notificationService.emailConfigurationExists(configIdentifier));
+		this.notificationManager.createEmailConfiguration(emailConfiguration);
+		super.eventRecorder.wait(NotificationEventConstants.POST_EMAIL_CONFIGURATION, emailConfiguration.getIdentifier());
+		
+		Assert.assertTrue(this.emailService.emailConfigurationExists(emailConfiguration.getIdentifier()));
+	}
+	
+	@Test
+	public void shouldFindActiveGateway() {
+		this.logger.info("Find Active Gateway");
+		Assert.assertNotNull(this.emailService.findActiveEmailConfigurationEntity());
 	}
 }
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/TestNotification.java b/component-test/src/main/java/org/apache/fineract/cn/notification/TestNotification.java
index 6a6bf6b..521776a 100644
--- a/component-test/src/main/java/org/apache/fineract/cn/notification/TestNotification.java
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/TestNotification.java
@@ -21,14 +21,11 @@ package org.apache.fineract.cn.notification;
 import org.apache.fineract.cn.anubis.test.v1.TenantApplicationSecurityEnvironmentTestRule;
 import org.apache.fineract.cn.api.context.AutoUserContext;
 import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
-import org.apache.fineract.cn.notification.service.NotificationConfiguration;
+import org.apache.fineract.cn.notification.service.internal.config.NotificationConfiguration;
 import org.apache.fineract.cn.test.fixture.TenantDataStoreContextTestRule;
 import org.apache.fineract.cn.test.listener.EnableEventRecording;
 import org.apache.fineract.cn.test.listener.EventRecorder;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.ClassRule;
-import org.junit.Rule;
+import org.junit.*;
 import org.junit.runner.RunWith;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -52,15 +49,16 @@ public class TestNotification extends SuiteTestEnvironment {
 	
 	@ClassRule
 	public final static TenantDataStoreContextTestRule tenantDataStoreContext = TenantDataStoreContextTestRule.forRandomTenantName(cassandraInitializer, mariaDBInitializer);
-	private static final String LOGGER_NAME = "test-logger";
-	private static final String TEST_USER = "homer";
+	public static final String LOGGER_NAME = "test-logger";
+	public static final String TEST_USER = "homer";
+	
 	@SuppressWarnings("WeakerAccess")
 	@Autowired
 	@Qualifier(LOGGER_NAME)
 	Logger logger;
-	private AutoUserContext userContext;
+	public AutoUserContext userContext;
 	@Autowired
-	private EventRecorder eventRecorder;
+	public EventRecorder eventRecorder;
 	@Rule
 	public final TenantApplicationSecurityEnvironmentTestRule tenantApplicationSecurityEnvironment
 			= new TenantApplicationSecurityEnvironmentTestRule(testEnvironment, this::waitForInitialize);
@@ -96,7 +94,7 @@ public class TestNotification extends SuiteTestEnvironment {
 	@RibbonClient(name = APP_NAME)
 	@ComponentScan({"org.apache.fineract.cn.notification.listener",
 			"org.apache.fineract.cn.notification.service.internal.service",
-			"org.apache.fineract.cn.notification.service.internal.service.helperservice"
+			"org.apache.fineract.cn.notification.service.internal.service.externalServiceClients"
 	})
 	@Import({NotificationConfiguration.class})
 	public static class TestConfiguration {
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/TestSMSService.java b/component-test/src/main/java/org/apache/fineract/cn/notification/TestSMSService.java
index e25a3e8..06af8c0 100644
--- a/component-test/src/main/java/org/apache/fineract/cn/notification/TestSMSService.java
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/TestSMSService.java
@@ -27,6 +27,7 @@ import org.apache.fineract.cn.notification.api.v1.domain.EmailConfiguration;
 import org.apache.fineract.cn.notification.api.v1.domain.SMSConfiguration;
 import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
 import org.apache.fineract.cn.notification.service.internal.service.NotificationService;
+import org.apache.fineract.cn.notification.service.internal.service.SMSService;
 import org.apache.fineract.cn.notification.util.DomainObjectGenerator;
 import org.apache.fineract.cn.test.listener.EventRecorder;
 import org.junit.Assert;
@@ -35,68 +36,60 @@ import org.springframework.beans.factory.annotation.Autowired;
 
 public class TestSMSService extends TestNotification {
 	
+	final SMSConfiguration smsConfiguration;
 	@Autowired
 	private NotificationService notificationService;
-	
+	@Autowired
+	private SMSService smsService;
 	@Autowired
 	private NotificationManager notificationManager;
-	
 	@Autowired
 	private EventRecorder eventRecorder;
 	
-	private String configIdentifier = "Twilio";
-	
 	public TestSMSService() {
 		super();
+		this.smsConfiguration = DomainObjectGenerator.smsConfiguration();
 	}
 	
-	
-	@Test
-	public void shouldCreateNewSMSConfigurationEntity() throws InterruptedException{
-		logger.info("Create SMS Gateway configuration");
-		this.notificationManager.createSMSConfiguration(DomainObjectGenerator.smsConfiguration());
-		
-		eventRecorder.wait(NotificationEventConstants.POST_EMAIL_CONFIGURATION, SMSConfiguration.class);
+	@Test(expected = NotFoundException.class)
+	public void smsConfigurationNotFound() {
+		super.logger.info("SMS Gateway configuration Not Found");
+		this.notificationManager.findSMSConfigurationByIdentifier(RandomStringUtils.randomAlphanumeric(8));
 	}
 	
 	@Test
-	public void shouldTriggerCustomerCreated() throws InterruptedException{
-		logger.info("Create SMS Gateway configuration");
+	public void shouldCreateAndRetrieveSMSConfigurationEntity() throws InterruptedException {
+		logger.info("Create and Retrieve SMS Gateway configuration");
+		this.notificationManager.createSMSConfiguration(smsConfiguration);
 		
-		eventRecorder.wait(NotificationEventConstants.POST_EMAIL_CONFIGURATION, SMSConfiguration.class);
-	}
-	
-	@Test(expected = NotFoundException.class)
-	public void smsConfigurationNotFound() throws CustomerNotFoundException {
-		logger.info("SMS Gateway configuration Not Found");
-		try {
-			this.notificationManager.findSMSConfigurationByIdentifier(RandomStringUtils.randomAlphanumeric(8));
-		} catch (final ConfigurationNotFoundException ex) {
-			logger.info("Error Asserted");
-		}
+		this.eventRecorder.wait(NotificationEventConstants.POST_SMS_CONFIGURATION, smsConfiguration.getIdentifier());
+		
+		SMSConfiguration sampleRetrieved = this.notificationManager.findSMSConfigurationByIdentifier(smsConfiguration.getIdentifier());
+		Assert.assertNotNull(sampleRetrieved);
+		Assert.assertEquals(sampleRetrieved.getIdentifier(), smsConfiguration.getIdentifier());
 	}
 	
 	@Test
-	public void sendSMS() {
-		this.logger.info("Send SMS Notification");
-		this.notificationService.sendSMS("+23058409206",
-				"Dear Valued Customer\n\nTalk is cheap show me the code\n\nBest Regards\nYour MFI");
-}
+	public void shouldFindActiveGateway() {
+		this.logger.info("Find Active Gateway");
+		Assert.assertNotNull(this.smsService.findActiveSMSConfigurationEntity());
+	}
 	
 	@Test
-	public void shouldCreateAndRetrieveSMSConfigurationEntity() {
-		logger.info("Create and Retrieve SMS Gateway configuration");
-		final SMSConfiguration smsConfiguration = DomainObjectGenerator.smsConfiguration();
+	public void checkIfConfigurationAlreadyExists() throws InterruptedException{
+		logger.info("SMS Gateway configuration Exist");
+		
 		this.notificationManager.createSMSConfiguration(smsConfiguration);
+		this.eventRecorder.wait(NotificationEventConstants.POST_SMS_CONFIGURATION, smsConfiguration.getIdentifier());
 		
-		SMSConfiguration sampleRetrieved = this.notificationManager.findSMSConfigurationByIdentifier(configIdentifier);
-		Assert.assertNotNull(sampleRetrieved);
-		Assert.assertEquals(sampleRetrieved.getIdentifier(), configIdentifier);
+		Assert.assertTrue(this.smsService.smsConfigurationExists(this.smsConfiguration.getIdentifier()));
 	}
 	
 	@Test
-	public void checkSMSConfigurationEntityExist() {
-		logger.info("SMS Gateway configuration Exist");
-		Assert.assertTrue(this.notificationService.smsConfigurationExists(configIdentifier));
+	public void sendSMS() {
+		this.logger.info("Send SMS Notification");
+		String messageHash = this.notificationService.sendSMS("+23058409206",
+				"Dear Valued Customer\n\nTalk is cheap show me the code\n\nBest Regards\nYour MFI");
+		Assert.assertNotNull(messageHash);
 	}
 }
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/TestSuite.java b/component-test/src/main/java/org/apache/fineract/cn/notification/TestSuite.java
index 868e949..af10e31 100644
--- a/component-test/src/main/java/org/apache/fineract/cn/notification/TestSuite.java
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/TestSuite.java
@@ -25,6 +25,8 @@ import org.junit.runners.Suite;
 @Suite.SuiteClasses({
 		TestEmailService.class,
 		TestSMSService.class,
+		TestApplicationAuthentication.class,
+		NotificationApiDocumentation.class
 })
 public class TestSuite extends SuiteTestEnvironment {
 }
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/listener/NotificationEventListener.java b/component-test/src/main/java/org/apache/fineract/cn/notification/listener/NotificationEventListener.java
deleted file mode 100644
index 838b2c7..0000000
--- a/component-test/src/main/java/org/apache/fineract/cn/notification/listener/NotificationEventListener.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.fineract.cn.notification.listener;
-
-import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
-import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
-import org.apache.fineract.cn.test.listener.EventRecorder;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.jms.annotation.JmsListener;
-import org.springframework.messaging.handler.annotation.Header;
-import org.springframework.stereotype.Component;
-
-@SuppressWarnings("unused")
-@Component
-public class NotificationEventListener {
-	
-	private final EventRecorder eventRecorder;
-	
-	@Autowired
-	public NotificationEventListener(@SuppressWarnings("SpringJavaAutowiringInspection") final EventRecorder eventRecorder) {
-		super();
-		this.eventRecorder = eventRecorder;
-	}
-	
-	@JmsListener(
-			subscription = NotificationEventConstants.DESTINATION,
-			destination = NotificationEventConstants.DESTINATION,
-			selector = NotificationEventConstants.SELECTOR_POST_SMS_NOTIFICATION
-	)
-	public void onPostSMS(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-	                      final String payload) {
-		this.eventRecorder.event(tenant, NotificationEventConstants.POST_SMS_NOTIFICATION, payload, String.class);
-	}
-	
-	@JmsListener(
-			subscription = NotificationEventConstants.DESTINATION,
-			destination = NotificationEventConstants.DESTINATION,
-			selector = NotificationEventConstants.SELECTOR_POST_SMS_CONFIGURATION
-	)
-	public void onCreateSMSConfiguration(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-	                                     final String payload) {
-		this.eventRecorder.event(tenant, NotificationEventConstants.POST_SMS_NOTIFICATION, payload, String.class);
-	}
-}
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/util/DomainObjectGenerator.java b/component-test/src/main/java/org/apache/fineract/cn/notification/util/DomainObjectGenerator.java
index d323eea..b39a7b4 100644
--- a/component-test/src/main/java/org/apache/fineract/cn/notification/util/DomainObjectGenerator.java
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/util/DomainObjectGenerator.java
@@ -28,11 +28,11 @@ import org.apache.fineract.cn.notification.api.v1.domain.SMSConfiguration;
 public class DomainObjectGenerator {
 	
 	public static EmailConfiguration emailConfiguration() {
-		EmailConfiguration emailConfiguration = EmailConfiguration.create("emailtest",
-				"smtp.google.com",
-				"1233",
+		EmailConfiguration emailConfiguration = EmailConfiguration.create(RandomStringUtils.randomAlphanumeric(14),
+				"smtp.example.com",
+				"8443",
 				"smtp",
-				"example",
+				"user@example.com",
 				RandomStringUtils.randomAlphanumeric(16),
 				"true",
 				"true",
@@ -42,11 +42,11 @@ public class DomainObjectGenerator {
 	
 	public static SMSConfiguration smsConfiguration() {
 		SMSConfiguration smsConfiguration = SMSConfiguration.create(
-				RandomStringUtils.randomAlphanumeric(8),
-				RandomStringUtils.randomAlphanumeric(16),
-				RandomStringUtils.randomAlphanumeric(16),
-				"+309483932",
-				"ACTIVE");
+				RandomStringUtils.randomAlphanumeric(10),
+				RandomStringUtils.randomAlphanumeric(24),
+				RandomStringUtils.randomAlphanumeric(24),
+				"+233 27 309 4932",
+				"DEACTIVATED");
 		
 		return smsConfiguration;
 	}
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index 400f155..341fca8 100644
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index c563c1a..b586735 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,4 +1,4 @@
-#Fri May 18 16:18:58 MUT 2018
+#Sat Dec 01 23:10:38 MUT 2018
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
diff --git a/local.properties b/local.properties
new file mode 100644
index 0000000..3fea7c3
--- /dev/null
+++ b/local.properties
@@ -0,0 +1,9 @@
+## This file must *NOT* be checked into Version Control Systems,
+# as it contains information specific to your local configuration.
+#
+# Location of the SDK. This is only used by Gradle.
+# For customization when using a Version Control System, please read the
+# header note.
+#Sat Dec 01 15:14:19 MUT 2018
+ndk.dir=/home/ebenezergraham/Android/Sdk/ndk-bundle
+sdk.dir=/home/ebenezergraham/Android/Sdk
diff --git a/service/build.gradle b/service/build.gradle
index cb2d88c..3bf06c1 100644
--- a/service/build.gradle
+++ b/service/build.gradle
@@ -64,6 +64,7 @@ dependencies {
             [group: 'org.apache.fineract.cn', name: 'cassandra', version: versions.frameworkcassandra],
             [group: 'org.apache.fineract.cn', name: 'mariadb', version: versions.frameworkmariadb],
             [group: 'org.apache.fineract.cn', name: 'command', version: versions.frameworkcommand],
+            [group: 'org.apache.fineract.cn.permitted-feign-client', name: 'library', version: versions.frameworkpermittedfeignclient],
             [group: 'org.hibernate', name: 'hibernate-validator', version: versions.validator]
     )
 }
diff --git a/service/out/production/resources/application.yml b/service/out/production/resources/application.yml
deleted file mode 100644
index fa7165e..0000000
--- a/service/out/production/resources/application.yml
+++ /dev/null
@@ -1,88 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-spring:
-  cloud:
-    discovery:
-      enabled: false
-    config:
-      enabled: false
-    mail:
-      host: smtp.gmail.com
-      port: 587
-      username:
-      password:
-      properties:
-        debug: true
-        mail:
-          smtp:
-            auth: true
-            starttls:
-              enable: true
-
-
-
-eureka:
-  client:
-    serviceUrl:
-      defaultZone: http://localhost:8761/eureka/
-
-server:
-  port: 8081
-  contextPath: /notification/v1/*
-
-cassandra:
-  clusterName: staging_cluster
-  contactPoints: 127.0.0.1:9042,127.0.0.2:9042,127.0.0.3:9042
-  keyspace: seshat
-  cl:
-    read: LOCAL_QUORUM
-    write: LOCAL_QUORUM
-    delete: LOCAL_QUORUM
-
-mariadb:
-  driverClass: org.mariadb.jdbc.Driver
-  database: seshat
-  host: localhost
-  port: 3306
-  user: root
-  password: mysql
-
-bonecp:
-  idleMaxAgeInMinutes: 240
-  idleConnectionTestPeriodInMinutes: 60
-  maxConnectionsPerPartition: 10
-  minConnectionsPerPartition: 1
-  partitionCount: 2
-  acquireIncrement: 5
-  statementsCacheSize: 100
-
-async:
-  corePoolSize: 32
-  maxPoolSize: 16384
-  queueCapacity: 0
-  threadName: async-processor-
-
-flyway:
-  enabled: false
-
-smssender:
-  accountSID: AC1fde2c6f26f367b93231c5fdb944c908
-  authToken: bc9a53e41745b8471e0ecafc859d86aa
-  senderNumber: +1 510-944-1898
diff --git a/service/out/production/resources/bootstrap.yml b/service/out/production/resources/bootstrap.yml
deleted file mode 100644
index 76c2441..0000000
--- a/service/out/production/resources/bootstrap.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-spring:
-    application:
-        name: notification-v1
diff --git a/service/out/production/resources/db/migrations/mariadb/V1__initial_setup.sql b/service/out/production/resources/db/migrations/mariadb/V1__initial_setup.sql
deleted file mode 100644
index 57cefe1..0000000
--- a/service/out/production/resources/db/migrations/mariadb/V1__initial_setup.sql
+++ /dev/null
@@ -1,56 +0,0 @@
---
--- Licensed to the Apache Software Foundation (ASF) under one
--- or more contributor license agreements.  See the NOTICE file
--- distributed with this work for additional information
--- regarding copyright ownership.  The ASF licenses this file
--- to you under the Apache License, Version 2.0 (the
--- "License"); you may not use this file except in compliance
--- with the License.  You may obtain a copy of the License at
---
---   http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing,
--- software distributed under the License is distributed on an
--- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
--- KIND, either express or implied.  See the License for the
--- specific language governing permissions and limitations
--- under the License.
---
-
--- -----------------------------------------------------
--- Table wada_sms_gateway_configurations
--- -----------------------------------------------------
-CREATE TABLE wada_sms_gateway_configurations (
-  id INT(11) NOT NULL AUTO_INCREMENT,
-  identifier VARCHAR(45) NULL DEFAULT NULL,
-  account_sid VARCHAR(255) NOT NULL,
-  auth_token VARCHAR(255) NOT NULL,
-  sender_number VARCHAR(45) NOT NULL,
-  state VARCHAR(45) NULL DEFAULT NULL,
-  PRIMARY KEY (id));
-
--- -----------------------------------------------------
--- Table wada_email_gateway_configurations
--- -----------------------------------------------------
-CREATE TABLE wada_email_gateway_configurations (
-  id INT(11) NOT NULL AUTO_INCREMENT,
-  identifier VARCHAR(45) NULL DEFAULT NULL,
-  host VARCHAR(45) NOT NULL,
-  port VARCHAR(45) NOT NULL,
-  username VARCHAR(45) NOT NULL,
-  app_password VARCHAR(255) NOT NULL,
-  protocol VARCHAR(45)NOT NULL,
-  smtp_auth VARCHAR (45)NOT NULL,
-  start_tls VARCHAR (45)NOT NULL,
-  state VARCHAR(45)NOT NULL,
-  PRIMARY KEY (id));
-
--- -----------------------------------------------------
--- Table wada_templates
--- -----------------------------------------------------
-CREATE TABLE wada_templates (
-  id INT(11) NOT NULL AUTO_INCREMENT,
-  identifier VARCHAR(45) NULL DEFAULT NULL,
-  event VARCHAR(45) NULL DEFAULT NULL,
-  url VARCHAR(255) NOT NULL,
-  PRIMARY KEY (id));
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/NotificationApplication.java b/service/src/main/java/org/apache/fineract/cn/notification/service/NotificationApplication.java
index 29d448b..53be40c 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/NotificationApplication.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/NotificationApplication.java
@@ -18,6 +18,7 @@
  */
 package org.apache.fineract.cn.notification.service;
 
+import org.apache.fineract.cn.notification.service.internal.config.NotificationConfiguration;
 import org.springframework.boot.SpringApplication;
 
 public class NotificationApplication {
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/ServiceConstants.java b/service/src/main/java/org/apache/fineract/cn/notification/service/ServiceConstants.java
index dc96c42..50816ad 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/ServiceConstants.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/ServiceConstants.java
@@ -21,10 +21,21 @@ package org.apache.fineract.cn.notification.service;
 public interface ServiceConstants {
 	String LOGGER_NAME = "notification-logger";
 	
+	String CUSTOMER_SERVICE_NAME ="customer-v1";
+	String ACCOUNT_SERVICE_NAME ="account-v1";
+	String PORTFOLIO_SERVICE_NAME ="porfolio-v1";
+	
 	String MAIL_TRANSPORT_PROTOCOL_PROPERTY = "mail.transport.protocol";
 	String MAIL_TRANSPORT_PROTOCOL_VALUE = "smtp";
 	String MAIL_SMTP_AUTH_PROPERTY = "mail.smtp.auth";
 	String MAIL_SMTP_AUTH_VALUE = "true";
 	String MAIL_SMTP_STARTTLS_ENABLE_PROPERTY = "mail.smtp.starttls.enable";
 	String MAIL_SMTP_STARTTLS_ENABLE_VALUE = "true";
+	
+	String GOOGLE_MAIL_SERVER = "smtp.gmail.com";
+	String YAHOO_MAIL_SERVER = "smtp.mail.yahoo.com";
+	
+	String MAIL_SMTP_TIMEOUT_PROPERTY = "";
+	String MAIL_SMTP_TIMEOUT_VALUE = "";
+	
 }
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/PostSMSCommand.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/DeleteApplicationCommand.java
similarity index 54%
copy from service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/PostSMSCommand.java
copy to service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/DeleteApplicationCommand.java
index 2ffc416..ecdae58 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/PostSMSCommand.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/DeleteApplicationCommand.java
@@ -18,23 +18,30 @@
  */
 package org.apache.fineract.cn.notification.service.internal.command;
 
-public class PostSMSCommand {
-	
-	private final String identifier;
-	
-	public PostSMSCommand(final String identifier) {
-		super();
-		this.identifier = identifier;
-	}
-	
-	public String getIdentifier() {
-		return this.identifier;
-	}
-	
-	@Override
-	public String toString() {
-		return "PostSMSCommand{"
-				+ "PostSMS=" + identifier
-				+ '}';
-	}
+public class DeleteApplicationCommand {
+
+  private final String tenantIdentifier;
+  private final String applicationIdentifier;
+
+  public DeleteApplicationCommand(String tenantIdentifier, final String applicationIdentifier) {
+    super();
+    this.tenantIdentifier = tenantIdentifier;
+    this.applicationIdentifier = applicationIdentifier;
+  }
+
+  public String getTenantIdentifier() {
+    return tenantIdentifier;
+  }
+
+  public String getApplicationIdentifier() {
+    return this.applicationIdentifier;
+  }
+
+  @Override
+  public String toString() {
+    return "DeleteApplicationCommand{" +
+            "tenantIdentifier='" + tenantIdentifier + '\'' +
+            ", applicationIdentifier='" + applicationIdentifier + '\'' +
+            '}';
+  }
 }
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/PostSMSCommand.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/DeleteEmailConfigurationCommand.java
similarity index 83%
copy from service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/PostSMSCommand.java
copy to service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/DeleteEmailConfigurationCommand.java
index 2ffc416..d7ce1d0 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/PostSMSCommand.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/DeleteEmailConfigurationCommand.java
@@ -18,11 +18,11 @@
  */
 package org.apache.fineract.cn.notification.service.internal.command;
 
-public class PostSMSCommand {
+public class DeleteEmailConfigurationCommand {
 	
 	private final String identifier;
 	
-	public PostSMSCommand(final String identifier) {
+	public DeleteEmailConfigurationCommand(final String identifier) {
 		super();
 		this.identifier = identifier;
 	}
@@ -33,8 +33,8 @@ public class PostSMSCommand {
 	
 	@Override
 	public String toString() {
-		return "PostSMSCommand{"
-				+ "PostSMS=" + identifier
-				+ '}';
+		return "DeleteEmailConfigurationCommand{" +
+				"identifier='" + identifier + '\'' +
+				'}';
 	}
 }
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/PostSMSCommand.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/DeleteSMSConfigurationCommand.java
similarity index 84%
copy from service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/PostSMSCommand.java
copy to service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/DeleteSMSConfigurationCommand.java
index 2ffc416..3547c3d 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/PostSMSCommand.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/DeleteSMSConfigurationCommand.java
@@ -18,11 +18,11 @@
  */
 package org.apache.fineract.cn.notification.service.internal.command;
 
-public class PostSMSCommand {
+public class DeleteSMSConfigurationCommand {
 	
 	private final String identifier;
 	
-	public PostSMSCommand(final String identifier) {
+	public DeleteSMSConfigurationCommand(final String identifier) {
 		super();
 		this.identifier = identifier;
 	}
@@ -33,8 +33,8 @@ public class PostSMSCommand {
 	
 	@Override
 	public String toString() {
-		return "PostSMSCommand{"
-				+ "PostSMS=" + identifier
-				+ '}';
+		return "DeleteSMSConfigurationCommand{" +
+				"identifier='" + identifier + '\'' +
+				'}';
 	}
 }
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/PostSMSCommand.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/SaveApplicationCommand.java
similarity index 54%
copy from service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/PostSMSCommand.java
copy to service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/SaveApplicationCommand.java
index 2ffc416..5bb8879 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/PostSMSCommand.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/SaveApplicationCommand.java
@@ -18,23 +18,30 @@
  */
 package org.apache.fineract.cn.notification.service.internal.command;
 
-public class PostSMSCommand {
-	
-	private final String identifier;
-	
-	public PostSMSCommand(final String identifier) {
-		super();
-		this.identifier = identifier;
-	}
-	
-	public String getIdentifier() {
-		return this.identifier;
-	}
-	
-	@Override
-	public String toString() {
-		return "PostSMSCommand{"
-				+ "PostSMS=" + identifier
-				+ '}';
-	}
+public class SaveApplicationCommand {
+
+  private final String tenantIdentifier;
+  private final String applicationIdentifier;
+
+  public SaveApplicationCommand(String tenantIdentifier, final String applicationIdentifier) {
+    super();
+    this.tenantIdentifier = tenantIdentifier;
+    this.applicationIdentifier = applicationIdentifier;
+  }
+
+  public String getTenantIdentifier() {
+    return tenantIdentifier;
+  }
+
+  public String getApplicationIdentifier() {
+    return this.applicationIdentifier;
+  }
+
+  @Override
+  public String toString() {
+    return "SaveApplicationCommand{" +
+            "tenantIdentifier='" + tenantIdentifier + '\'' +
+            ", applicationIdentifier='" + applicationIdentifier + '\'' +
+            '}';
+  }
 }
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/PostSMSCommand.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/UpdateEmailConfigurationCommand.java
similarity index 65%
copy from service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/PostSMSCommand.java
copy to service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/UpdateEmailConfigurationCommand.java
index 2ffc416..cf47bc5 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/PostSMSCommand.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/UpdateEmailConfigurationCommand.java
@@ -18,23 +18,25 @@
  */
 package org.apache.fineract.cn.notification.service.internal.command;
 
-public class PostSMSCommand {
+import org.apache.fineract.cn.notification.api.v1.domain.EmailConfiguration;
+
+public class UpdateEmailConfigurationCommand {
 	
-	private final String identifier;
+	private final EmailConfiguration emailConfiguration;
 	
-	public PostSMSCommand(final String identifier) {
+	public UpdateEmailConfigurationCommand(final EmailConfiguration emailConfiguration) {
 		super();
-		this.identifier = identifier;
+		this.emailConfiguration = emailConfiguration;
 	}
 	
-	public String getIdentifier() {
-		return this.identifier;
+	public EmailConfiguration getEmailConfiguration() {
+		return this.emailConfiguration;
 	}
 	
 	@Override
 	public String toString() {
-		return "PostSMSCommand{"
-				+ "PostSMS=" + identifier
+		return "UpdateEmailConfigurationCommand{"
+				+ "EmailConfiguration=" + emailConfiguration.getIdentifier()
 				+ '}';
 	}
 }
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/PostSMSCommand.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/UpdateSMSConfigurationCommand.java
similarity index 66%
rename from service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/PostSMSCommand.java
rename to service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/UpdateSMSConfigurationCommand.java
index 2ffc416..a2ecf6c 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/PostSMSCommand.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/UpdateSMSConfigurationCommand.java
@@ -18,23 +18,25 @@
  */
 package org.apache.fineract.cn.notification.service.internal.command;
 
-public class PostSMSCommand {
+import org.apache.fineract.cn.notification.api.v1.domain.SMSConfiguration;
+
+public class UpdateSMSConfigurationCommand {
 	
-	private final String identifier;
+	private final SMSConfiguration smsConfiguration;
 	
-	public PostSMSCommand(final String identifier) {
+	public UpdateSMSConfigurationCommand(final SMSConfiguration smsConfiguration) {
 		super();
-		this.identifier = identifier;
+		this.smsConfiguration = smsConfiguration;
 	}
 	
-	public String getIdentifier() {
-		return this.identifier;
+	public SMSConfiguration getSMSConfiguration() {
+		return this.smsConfiguration;
 	}
 	
 	@Override
 	public String toString() {
-		return "PostSMSCommand{"
-				+ "PostSMS=" + identifier
+		return "UpdateSMSConfigurationCommand{"
+				+ "SMSConfiguration=" + smsConfiguration.getIdentifier()
 				+ '}';
 	}
 }
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/EventsAggregate.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/ApplicationCommandHandler.java
similarity index 55%
rename from service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/EventsAggregate.java
rename to service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/ApplicationCommandHandler.java
index 27f129b..55de62d 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/EventsAggregate.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/ApplicationCommandHandler.java
@@ -22,28 +22,42 @@ import org.apache.fineract.cn.command.annotation.Aggregate;
 import org.apache.fineract.cn.command.annotation.CommandHandler;
 import org.apache.fineract.cn.command.annotation.CommandLogLevel;
 import org.apache.fineract.cn.command.annotation.EventEmitter;
-import org.apache.fineract.cn.notification.api.v1.domain.SMSConfiguration;
 import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
-import org.apache.fineract.cn.notification.service.internal.command.CreateSMSConfigurationCommand;
-import org.apache.fineract.cn.notification.service.internal.command.PostSMSCommand;
-import org.apache.fineract.cn.notification.service.internal.mapper.SMSConfigurationMapper;
-import org.apache.fineract.cn.notification.service.internal.repository.SMSGatewayConfigurationEntity;
-import org.apache.fineract.cn.notification.service.internal.repository.SMSGatewayConfigurationRepository;
+import org.apache.fineract.cn.notification.service.internal.command.SaveApplicationCommand;
+import org.apache.fineract.cn.notification.service.internal.repository.ApplicationEntity;
+import org.apache.fineract.cn.notification.service.internal.repository.ApplicationRepository;
+import org.apache.fineract.cn.notification.service.internal.command.DeleteApplicationCommand;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
 @SuppressWarnings("unused")
 @Aggregate
-public class EventsAggregate {
-	
-	public EventsAggregate() {
-		super();
-	}
+public class ApplicationCommandHandler {
+  private final ApplicationRepository applicationRepository;
+
+  @Autowired
+  public ApplicationCommandHandler(
+          final ApplicationRepository applicationRepository
+          ) {
+    super();
+    this.applicationRepository = applicationRepository;
+  }
+  
+  @CommandHandler(logStart = CommandLogLevel.INFO,logFinish = CommandLogLevel.INFO)
+	@Transactional
+	@EventEmitter(selectorName = NotificationEventConstants.SELECTOR_NAME,selectorValue = NotificationEventConstants.POST_SOURCE_APPLICATION)
+	public String process(SaveApplicationCommand saveApplicationCommand){
+	  ApplicationEntity applicationEntity = new ApplicationEntity();
+	  applicationEntity.setApplicationIdentifier(saveApplicationCommand.getApplicationIdentifier());
+	  applicationEntity.setTenantIdentifier(saveApplicationCommand.getTenantIdentifier());
+  	this.applicationRepository.save(applicationEntity);
+  	return saveApplicationCommand.getApplicationIdentifier();
+  }
 	
 	@CommandHandler(logStart = CommandLogLevel.INFO, logFinish = CommandLogLevel.INFO)
 	@Transactional
-	@EventEmitter(selectorName = NotificationEventConstants.SELECTOR_NAME, selectorValue = NotificationEventConstants.POST_SMS_NOTIFICATION)
-	public String postSMS(final PostSMSCommand postSMSCommand) {
-		return postSMSCommand.getIdentifier();
+	@EventEmitter(selectorName = NotificationEventConstants.SELECTOR_NAME,selectorValue = NotificationEventConstants.DELETE_SOURCE_APPLICATION)
+	public void process(final DeleteApplicationCommand deleteApplicationCommand) {
+		this.applicationRepository.deleteByTenantIdentifierAndApplicationIdentifier(deleteApplicationCommand.getTenantIdentifier(), deleteApplicationCommand.getApplicationIdentifier());
 	}
 }
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/EmailConfigurationAggregate.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/EmailConfigurationCommandHandler.java
similarity index 57%
rename from service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/EmailConfigurationAggregate.java
rename to service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/EmailConfigurationCommandHandler.java
index 6cc80d0..3c7928d 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/EmailConfigurationAggregate.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/EmailConfigurationCommandHandler.java
@@ -24,7 +24,9 @@ import org.apache.fineract.cn.command.annotation.CommandLogLevel;
 import org.apache.fineract.cn.command.annotation.EventEmitter;
 import org.apache.fineract.cn.notification.api.v1.domain.EmailConfiguration;
 import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
+import org.apache.fineract.cn.notification.service.internal.command.UpdateEmailConfigurationCommand;
 import org.apache.fineract.cn.notification.service.internal.command.CreateEmailConfigurationCommand;
+import org.apache.fineract.cn.notification.service.internal.command.DeleteEmailConfigurationCommand;
 import org.apache.fineract.cn.notification.service.internal.mapper.EmailConfigurationMapper;
 import org.apache.fineract.cn.notification.service.internal.repository.EmailGatewayConfigurationEntity;
 import org.apache.fineract.cn.notification.service.internal.repository.EmailGatewayConfigurationRepository;
@@ -33,20 +35,20 @@ import org.springframework.transaction.annotation.Transactional;
 
 @SuppressWarnings("unused")
 @Aggregate
-public class EmailConfigurationAggregate {
+public class EmailConfigurationCommandHandler {
 	
 	private final EmailGatewayConfigurationRepository emailGatewayConfigurationRepository;
 	
 	@Autowired
-	public EmailConfigurationAggregate(EmailGatewayConfigurationRepository emailGatewayConfigurationRepository) {
+	public EmailConfigurationCommandHandler(EmailGatewayConfigurationRepository emailGatewayConfigurationRepository) {
 		super();
 		this.emailGatewayConfigurationRepository = emailGatewayConfigurationRepository;
 	}
 	
-	@CommandHandler(logStart = CommandLogLevel.DEBUG, logFinish = CommandLogLevel.DEBUG)
+	@CommandHandler(logStart = CommandLogLevel.INFO, logFinish = CommandLogLevel.INFO)
 	@Transactional
 	@EventEmitter(selectorName = NotificationEventConstants.SELECTOR_NAME, selectorValue = NotificationEventConstants.POST_EMAIL_CONFIGURATION)
-	public String createEmailConfiguration(final CreateEmailConfigurationCommand createEmailConfigurationCommand) {
+	public String process(final CreateEmailConfigurationCommand createEmailConfigurationCommand) {
 		
 		EmailConfiguration emailConfiguration = createEmailConfigurationCommand.getEmailConfiguration();
 		final EmailGatewayConfigurationEntity entity = EmailConfigurationMapper.map(emailConfiguration);
@@ -54,4 +56,24 @@ public class EmailConfigurationAggregate {
 		
 		return emailConfiguration.getIdentifier();
 	}
+	
+	@CommandHandler(logStart = CommandLogLevel.INFO, logFinish = CommandLogLevel.INFO)
+	@Transactional
+	@EventEmitter(selectorName = NotificationEventConstants.SELECTOR_NAME, selectorValue = NotificationEventConstants.UPDATE_EMAIL_CONFIGURATION)
+	public String process(final UpdateEmailConfigurationCommand updateEmailConfigurationCommand) {
+		EmailConfiguration emailConfiguration = updateEmailConfigurationCommand.getEmailConfiguration();
+		final EmailGatewayConfigurationEntity newEntity = EmailConfigurationMapper.map(emailConfiguration);
+		this.emailGatewayConfigurationRepository.deleteEmailGatewayConfigurationEntityBy(newEntity.getIdentifier());
+		this.emailGatewayConfigurationRepository.save(newEntity);
+		
+		return emailConfiguration.getIdentifier();
+	}
+	
+	@CommandHandler(logStart = CommandLogLevel.INFO, logFinish = CommandLogLevel.INFO)
+	@Transactional
+	@EventEmitter(selectorName = NotificationEventConstants.SELECTOR_NAME, selectorValue = NotificationEventConstants.DELETE_EMAIL_CONFIGURATION)
+	public String process(final DeleteEmailConfigurationCommand deleteEmailConfigurationCommand) {
+		this.emailGatewayConfigurationRepository.deleteEmailGatewayConfigurationEntityBy(deleteEmailConfigurationCommand.getIdentifier());
+		return deleteEmailConfigurationCommand.getIdentifier();
+	}
 }
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/MigrationAggregate.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/MigrationCommandHandler.java
similarity index 88%
rename from service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/MigrationAggregate.java
rename to service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/MigrationCommandHandler.java
index 1abc754..7825060 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/MigrationAggregate.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/MigrationCommandHandler.java
@@ -38,7 +38,7 @@ import javax.sql.DataSource;
 		"unused"
 })
 @Aggregate
-public class MigrationAggregate {
+public class MigrationCommandHandler {
 	
 	private final Logger logger;
 	private final DataSource dataSource;
@@ -46,10 +46,10 @@ public class MigrationAggregate {
 	private final ApplicationName applicationName;
 	
 	@Autowired
-	public MigrationAggregate(@Qualifier(ServiceConstants.LOGGER_NAME) final Logger logger,
-	                          final DataSource dataSource,
-	                          final FlywayFactoryBean flywayFactoryBean,
-	                          final ApplicationName applicationName) {
+	public MigrationCommandHandler(@Qualifier(ServiceConstants.LOGGER_NAME) final Logger logger,
+	                               final DataSource dataSource,
+	                               final FlywayFactoryBean flywayFactoryBean,
+	                               final ApplicationName applicationName) {
 		super();
 		this.logger = logger;
 		this.dataSource = dataSource;
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/SMSConfigurationAggregate.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/SMSConfigurationCommandHandler.java
similarity index 63%
rename from service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/SMSConfigurationAggregate.java
rename to service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/SMSConfigurationCommandHandler.java
index 1d240fb..e3234db 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/SMSConfigurationAggregate.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/SMSConfigurationCommandHandler.java
@@ -24,7 +24,9 @@ import org.apache.fineract.cn.command.annotation.CommandLogLevel;
 import org.apache.fineract.cn.command.annotation.EventEmitter;
 import org.apache.fineract.cn.notification.api.v1.domain.SMSConfiguration;
 import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
+import org.apache.fineract.cn.notification.service.internal.command.UpdateSMSConfigurationCommand;
 import org.apache.fineract.cn.notification.service.internal.command.CreateSMSConfigurationCommand;
+import org.apache.fineract.cn.notification.service.internal.command.DeleteSMSConfigurationCommand;
 import org.apache.fineract.cn.notification.service.internal.mapper.SMSConfigurationMapper;
 import org.apache.fineract.cn.notification.service.internal.repository.SMSGatewayConfigurationEntity;
 import org.apache.fineract.cn.notification.service.internal.repository.SMSGatewayConfigurationRepository;
@@ -33,12 +35,12 @@ import org.springframework.transaction.annotation.Transactional;
 
 @SuppressWarnings("unused")
 @Aggregate
-public class SMSConfigurationAggregate {
+public class SMSConfigurationCommandHandler {
 	
 	private final SMSGatewayConfigurationRepository smsGatewayConfigurationRepository;
 	
 	@Autowired
-	public SMSConfigurationAggregate(SMSGatewayConfigurationRepository smsGatewayConfigurationRepository) {
+	public SMSConfigurationCommandHandler(SMSGatewayConfigurationRepository smsGatewayConfigurationRepository) {
 		super();
 		this.smsGatewayConfigurationRepository = smsGatewayConfigurationRepository;
 	}
@@ -46,11 +48,29 @@ public class SMSConfigurationAggregate {
 	@CommandHandler(logStart = CommandLogLevel.INFO, logFinish = CommandLogLevel.INFO)
 	@Transactional
 	@EventEmitter(selectorName = NotificationEventConstants.SELECTOR_NAME, selectorValue = NotificationEventConstants.POST_SMS_CONFIGURATION)
-	public String createSMSConfiguration(final CreateSMSConfigurationCommand createSMSConfigurationCommand) {
+	public String process(final CreateSMSConfigurationCommand createSMSConfigurationCommand) {
 		SMSConfiguration smsConfiguration = createSMSConfigurationCommand.getSMSConfiguration();
 		final SMSGatewayConfigurationEntity entity = SMSConfigurationMapper.map(smsConfiguration);
 		this.smsGatewayConfigurationRepository.save(entity);
 		
 		return smsConfiguration.getIdentifier();
 	}
+	
+	@CommandHandler(logStart = CommandLogLevel.INFO, logFinish = CommandLogLevel.INFO)
+	@Transactional
+	public String process(final UpdateSMSConfigurationCommand updateSMSConfigurationCommand) {
+		final SMSGatewayConfigurationEntity newEntity = SMSConfigurationMapper.map(updateSMSConfigurationCommand.getSMSConfiguration());
+		this.smsGatewayConfigurationRepository.deleteSMSGatewayConfigurationEntityBy(newEntity.getIdentifier());
+		this.smsGatewayConfigurationRepository.save(newEntity);
+		
+		return newEntity.getIdentifier();
+	}
+	
+	@CommandHandler(logStart = CommandLogLevel.INFO, logFinish = CommandLogLevel.INFO)
+	@Transactional
+	@EventEmitter(selectorName = NotificationEventConstants.SELECTOR_NAME, selectorValue = NotificationEventConstants.DELETE_SMS_CONFIGURATION)
+	public String process(final DeleteSMSConfigurationCommand deleteSMSConfigurationCommand) {
+		smsGatewayConfigurationRepository.deleteSMSGatewayConfigurationEntityBy(deleteSMSConfigurationCommand.getIdentifier());
+		return deleteSMSConfigurationCommand.getIdentifier();
+	}
 }
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/NotificationConfiguration.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/config/NotificationConfiguration.java
similarity index 87%
rename from service/src/main/java/org/apache/fineract/cn/notification/service/NotificationConfiguration.java
rename to service/src/main/java/org/apache/fineract/cn/notification/service/internal/config/NotificationConfiguration.java
index 4f9a63c..8db7f39 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/NotificationConfiguration.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/config/NotificationConfiguration.java
@@ -16,25 +16,29 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.fineract.cn.notification.service;
+package org.apache.fineract.cn.notification.service.internal.config;
 
 import org.apache.activemq.command.ActiveMQTopic;
 import org.apache.activemq.jms.pool.PooledConnectionFactory;
 import org.apache.activemq.spring.ActiveMQConnectionFactory;
-import org.apache.fineract.cn.identity.api.v1.client.IdentityManager;
 import org.apache.fineract.cn.anubis.config.EnableAnubis;
 import org.apache.fineract.cn.async.config.EnableAsync;
 import org.apache.fineract.cn.cassandra.config.EnableCassandra;
 import org.apache.fineract.cn.command.config.EnableCommandProcessing;
 import org.apache.fineract.cn.customer.api.v1.client.CustomerManager;
+import org.apache.fineract.cn.identity.api.v1.client.IdentityManager;
 import org.apache.fineract.cn.lang.ApplicationName;
 import org.apache.fineract.cn.lang.config.EnableServiceException;
 import org.apache.fineract.cn.lang.config.EnableTenantContext;
 import org.apache.fineract.cn.mariadb.config.EnableMariaDB;
+import org.apache.fineract.cn.notification.service.ServiceConstants;
+import org.apache.fineract.cn.notification.service.internal.identity.CustomerPermittedClient;
+import org.apache.fineract.cn.permittedfeignclient.config.EnablePermissionRequestingFeignClient;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
 import org.springframework.boot.autoconfigure.domain.EntityScan;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
 import org.springframework.cloud.netflix.feign.EnableFeignClients;
 import org.springframework.context.annotation.Bean;
@@ -61,18 +65,23 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
 @EnableAnubis
 @EnableServiceException
 @EnableJms
+@EnableConfigurationProperties
+@EnablePermissionRequestingFeignClient(feignClasses = {CustomerPermittedClient.class})
 @EnableFeignClients(
 		clients = {
 				CustomerManager.class,
-				IdentityManager.class
+				IdentityManager.class,
+				CustomerPermittedClient.class
 		}
 )
 @ComponentScan({
 		"org.apache.fineract.cn.notification.service.rest",
 		"org.apache.fineract.cn.notification.service.listener",
-		"org.apache.fineract.cn.notification.service.internal.service",
+		"org.apache.fineract.cn.notification.service.internal",
 		"org.apache.fineract.cn.notification.service.internal.repository",
 		"org.apache.fineract.cn.notification.service.internal.command.handler",
+		"org.apache.fineract.cn.notification.service.internal.identity",
+		"org.apache.fineract.cn.notification.service.internal.config",
 }
 )
 @EnableJpaRepositories({
@@ -88,7 +97,6 @@ public class NotificationConfiguration extends WebMvcConfigurerAdapter {
 		this.environment = environment;
 	}
 	
-	
 	@Override
 	public void configurePathMatch(final PathMatchConfigurer configurer) {
 		configurer.setUseSuffixPatternMatch(Boolean.FALSE);
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/config/NotificationProperties.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/config/NotificationProperties.java
new file mode 100644
index 0000000..a24b62c
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/config/NotificationProperties.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.config;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.stereotype.Component;
+
+@Component
+@Configuration
+@ConfigurationProperties(prefix = "notification")
+public class NotificationProperties {
+	
+	private String user;
+	
+	public NotificationProperties() {
+	}
+	
+	public String getUser() {
+		return user;
+	}
+	
+	public void setUser(String user) {
+		this.user = user;
+	}
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/identity/CustomerPermittedClient.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/identity/CustomerPermittedClient.java
new file mode 100644
index 0000000..375d152
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/identity/CustomerPermittedClient.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.identity;
+
+import org.apache.fineract.cn.anubis.annotation.Permittable;
+import org.apache.fineract.cn.api.annotation.ThrowsException;
+import org.apache.fineract.cn.customer.api.v1.client.CustomerNotFoundException;
+import org.apache.fineract.cn.customer.api.v1.domain.Customer;
+import org.apache.fineract.cn.permittedfeignclient.annotation.EndpointSet;
+import org.apache.fineract.cn.permittedfeignclient.annotation.PermittedFeignClientsConfiguration;
+import org.springframework.cloud.netflix.feign.FeignClient;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+@EndpointSet(identifier = "notification__v1__customer__v1")
+@FeignClient(name="customer-v1", path="/customer/v1", configuration = PermittedFeignClientsConfiguration.class)
+public interface CustomerPermittedClient {
+	@RequestMapping(
+			value = "/customers/{identifier}",
+			method = RequestMethod.GET,
+			produces = MediaType.ALL_VALUE,
+			consumes = MediaType.APPLICATION_JSON_VALUE
+	)
+	@ThrowsException(status = HttpStatus.NOT_FOUND, exception = CustomerNotFoundException.class)
+	@Permittable(groupId = org.apache.fineract.cn.customer.PermittableGroupIds.CUSTOMER)
+	Customer findCustomer(@PathVariable("identifier") final String identifier);
+}
\ No newline at end of file
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/identity/NotificationAuthentication.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/identity/NotificationAuthentication.java
new file mode 100644
index 0000000..d38ba3f
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/identity/NotificationAuthentication.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.identity;
+
+import org.apache.fineract.cn.api.context.AutoUserContext;
+import org.apache.fineract.cn.api.util.InvalidTokenException;
+import org.apache.fineract.cn.customer.api.v1.domain.Customer;
+import org.apache.fineract.cn.lang.AutoTenantContext;
+import org.apache.fineract.cn.notification.service.ServiceConstants;
+import org.apache.fineract.cn.notification.service.internal.config.NotificationProperties;
+import org.apache.fineract.cn.permittedfeignclient.service.ApplicationAccessTokenService;
+import org.slf4j.Logger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Component;
+
+import java.util.Optional;
+
+@Component
+public class NotificationAuthentication {
+	private final ApplicationAccessTokenService applicationAccessTokenService;
+	private Logger logger;
+	private CustomerPermittedClient customerPermittedClient;
+	private NotificationProperties notificationProperties;
+	
+	@Autowired
+	public NotificationAuthentication(final NotificationProperties notificationPropertities,
+	                                  final CustomerPermittedClient customerPermittedClient,
+	                                  @SuppressWarnings("SpringJavaAutowiringInspection")final ApplicationAccessTokenService applicationAccessTokenService,
+	                                  @Qualifier(ServiceConstants.LOGGER_NAME) final Logger logger) {
+		this.logger = logger;
+		this.customerPermittedClient = customerPermittedClient;
+		this.notificationProperties = notificationPropertities;
+		this.applicationAccessTokenService = applicationAccessTokenService;
+	}
+	
+	public Optional<Customer> getCustomer(String tenantIdentifier, String customerId) {
+			try (final AutoTenantContext ignored = new AutoTenantContext(tenantIdentifier)) {
+				final String accessToken = applicationAccessTokenService.getAccessToken(notificationProperties.getUser(), tenantIdentifier);
+				logger.debug("Access token: {}", accessToken);
+				try (final AutoUserContext ignored2 = new AutoUserContext(notificationProperties.getUser(), accessToken)) {
+					try {
+						logger.debug("Getting Customer {}", customerId);
+						return Optional.of(this.customerPermittedClient.findCustomer(customerId));
+					} catch (final InvalidTokenException e) {
+						logger.error("Failed to get customer with id {}, in tenant {} because notification does not have permission to access identity.", customerId, tenantIdentifier, e);
+					}
+				}
+				return Optional.empty();
+			}
+	}
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/mapper/EmailConfigurationMapper.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/mapper/EmailConfigurationMapper.java
index d9c5649..5dcfbae 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/mapper/EmailConfigurationMapper.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/mapper/EmailConfigurationMapper.java
@@ -21,6 +21,7 @@ package org.apache.fineract.cn.notification.service.internal.mapper;
 
 import org.apache.fineract.cn.notification.api.v1.domain.EmailConfiguration;
 import org.apache.fineract.cn.notification.service.internal.repository.EmailGatewayConfigurationEntity;
+import org.apache.fineract.cn.notification.service.internal.repository.SMSGatewayConfigurationEntity;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -61,6 +62,5 @@ public class EmailConfigurationMapper {
 		emailConfigurationList.addAll(emailGatewayConfigurationEntity.stream().map(EmailConfigurationMapper::map).collect(Collectors.toList()));
 		return emailConfigurationList;
 	}
-	
 }
 
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/ApplicationEntity.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/ApplicationEntity.java
new file mode 100644
index 0000000..0e22a04
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/ApplicationEntity.java
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.repository;
+
+import javax.persistence.*;
+import java.util.Objects;
+
+@SuppressWarnings({"unused", "WeakerAccess"})
+@Entity
+@Table(name = "wada_data_source_application")
+public class ApplicationEntity {
+  @Id
+  @GeneratedValue(strategy = GenerationType.IDENTITY)
+  @Column(name = "id")
+  private Long id;
+
+  @Column(name = "tenant_identifier", nullable = false)
+  private String tenantIdentifier;
+
+  @Column(name = "application_identifier", nullable = false)
+  private String applicationIdentifier;
+
+  @Column(name = "permittable_identifier")
+  private String permittableGroupIdentifier;
+
+  public ApplicationEntity() {
+  }
+
+  public ApplicationEntity(String tenantIdentifier, String applicationIdentifier, String permittableGroupIdentifier) {
+    this.tenantIdentifier = tenantIdentifier;
+    this.applicationIdentifier = applicationIdentifier;
+    this.permittableGroupIdentifier = permittableGroupIdentifier;
+  }
+
+  public Long getId() {
+    return id;
+  }
+
+  public void setId(Long id) {
+    this.id = id;
+  }
+
+  public String getTenantIdentifier() {
+    return tenantIdentifier;
+  }
+
+  public void setTenantIdentifier(String tenantIdentifier) {
+    this.tenantIdentifier = tenantIdentifier;
+  }
+
+  public String getApplicationIdentifier() {
+    return applicationIdentifier;
+  }
+
+  public void setApplicationIdentifier(String applicationIdentifier) {
+    this.applicationIdentifier = applicationIdentifier;
+  }
+
+  public String getPermittableGroupIdentifier() {
+    return permittableGroupIdentifier;
+  }
+
+  public void setPermittableGroupIdentifier(String permittableGroupIdentifier) {
+    this.permittableGroupIdentifier = permittableGroupIdentifier;
+  }
+
+  @Override
+  public boolean equals(Object o) {
+    if (this == o) return true;
+    if (o == null || getClass() != o.getClass()) return false;
+    ApplicationEntity that = (ApplicationEntity) o;
+    return Objects.equals(tenantIdentifier, that.tenantIdentifier) &&
+            Objects.equals(applicationIdentifier, that.applicationIdentifier);
+  }
+
+  @Override
+  public int hashCode() {
+    return Objects.hash(tenantIdentifier, applicationIdentifier);
+  }
+
+  @Override
+  public String toString() {
+    return "ApplicationEntity{" +
+            "id=" + id +
+            ", tenantIdentifier='" + tenantIdentifier + '\'' +
+            ", applicationIdentifier='" + applicationIdentifier + '\'' +
+            ", permittableGroupIdentifier='" + permittableGroupIdentifier + '\'' +
+            '}';
+  }
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SMSGatewayConfigurationRepository.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/ApplicationRepository.java
similarity index 66%
copy from service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SMSGatewayConfigurationRepository.java
copy to service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/ApplicationRepository.java
index ebac1c7..9eb4b1c 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SMSGatewayConfigurationRepository.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/ApplicationRepository.java
@@ -19,16 +19,16 @@
 package org.apache.fineract.cn.notification.service.internal.repository;
 
 import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.Query;
-import org.springframework.data.repository.query.Param;
+import org.springframework.data.jpa.repository.Lock;
 import org.springframework.stereotype.Repository;
 
+import javax.persistence.LockModeType;
 import java.util.Optional;
 
 @Repository
-public interface SMSGatewayConfigurationRepository extends JpaRepository<SMSGatewayConfigurationEntity, Long> {
-	Optional<SMSGatewayConfigurationEntity> findByIdentifier(String identifier);
-	
-	@Query("SELECT CASE WHEN COUNT(c) > 0 THEN 'true' ELSE 'false' END FROM SMSGatewayConfigurationEntity c WHERE c.identifier = :identifier")
-	Boolean existsByIdentifier(@Param("identifier") final String identifier);
+public interface ApplicationRepository extends JpaRepository<ApplicationEntity, Long> {
+  @Lock(LockModeType.PESSIMISTIC_WRITE)
+  void deleteByTenantIdentifierAndApplicationIdentifier(String tenantIdentifier, String applicationIdentifier);
+  
+  Optional<ApplicationEntity> findByTenantIdentifierAndApplicationIdentifier(String tenantIdentifier, String applicationIdentifier);
 }
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/EmailGatewayConfigurationRepository.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/EmailGatewayConfigurationRepository.java
index 1a5af4c..93785be 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/EmailGatewayConfigurationRepository.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/EmailGatewayConfigurationRepository.java
@@ -31,4 +31,9 @@ public interface EmailGatewayConfigurationRepository extends JpaRepository<Email
 	
 	@Query("SELECT CASE WHEN COUNT(c) > 0 THEN 'true' ELSE 'false' END FROM EmailGatewayConfigurationEntity c WHERE c.identifier = :identifier")
 	Boolean existsByIdentifier(@Param("identifier") final String identifier);
+	
+	@Query("SELECT entity FROM EmailGatewayConfigurationEntity entity WHERE entity.state='ACTIVE'")
+	Optional<EmailGatewayConfigurationEntity> active();
+	
+	void deleteEmailGatewayConfigurationEntityBy(String identifier);
 }
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SMSGatewayConfigurationRepository.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SMSGatewayConfigurationRepository.java
index ebac1c7..9b440e5 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SMSGatewayConfigurationRepository.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SMSGatewayConfigurationRepository.java
@@ -31,4 +31,9 @@ public interface SMSGatewayConfigurationRepository extends JpaRepository<SMSGate
 	
 	@Query("SELECT CASE WHEN COUNT(c) > 0 THEN 'true' ELSE 'false' END FROM SMSGatewayConfigurationEntity c WHERE c.identifier = :identifier")
 	Boolean existsByIdentifier(@Param("identifier") final String identifier);
+	
+	@Query("SELECT entity FROM SMSGatewayConfigurationEntity entity WHERE entity.state='ACTIVE'")
+	Optional<SMSGatewayConfigurationEntity> active();
+	
+	void deleteSMSGatewayConfigurationEntityBy(String identifier);
 }
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/EmailService.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/EmailService.java
index 5260e98..bc006c6 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/EmailService.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/EmailService.java
@@ -18,62 +18,153 @@
  */
 package org.apache.fineract.cn.notification.service.internal.service;
 
+import org.apache.fineract.cn.command.annotation.Aggregate;
+import org.apache.fineract.cn.command.annotation.CommandHandler;
+import org.apache.fineract.cn.command.annotation.CommandLogLevel;
+import org.apache.fineract.cn.command.annotation.EventEmitter;
+import org.apache.fineract.cn.notification.api.v1.domain.EmailConfiguration;
+import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
 import org.apache.fineract.cn.notification.service.ServiceConstants;
+import org.apache.fineract.cn.notification.service.internal.mapper.EmailConfigurationMapper;
+import org.apache.fineract.cn.notification.service.internal.repository.EmailGatewayConfigurationRepository;
+
 import org.slf4j.Logger;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.mail.MailException;
 import org.springframework.mail.SimpleMailMessage;
-import org.springframework.mail.javamail.JavaMailSender;
 import org.springframework.mail.javamail.JavaMailSenderImpl;
 import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
 
+import javax.annotation.PostConstruct;
+import java.util.List;
+import java.util.Optional;
 import java.util.Properties;
 
 @Component
+@Aggregate
 public class EmailService {
 	
+	static boolean isConfigured;
+	
+	private final EmailGatewayConfigurationRepository emailGatewayConfigurationRepository;
+	private JavaMailSenderImpl mailSender;
+	
 	private Logger logger;
+	private String host;
+	private String email;
+	private int port;
+	private String password;
 	
 	@Autowired
-	public EmailService(@Qualifier(ServiceConstants.LOGGER_NAME) final Logger logger) {
+	public EmailService(final EmailGatewayConfigurationRepository emailGatewayConfigurationRepository,
+	                    @Qualifier(ServiceConstants.LOGGER_NAME) final Logger logger) {
 		super();
+		this.isConfigured = false;
 		this.logger = logger;
+		this.mailSender = new JavaMailSenderImpl();
+		this.emailGatewayConfigurationRepository = emailGatewayConfigurationRepository;
 	}
 	
-	public void sendEmail(String from, String to, String subject, String message) {
-		
-		JavaMailSender sender = getJavaMailSender();
-		try {
-			SimpleMailMessage mail = new SimpleMailMessage();
-			mail.setFrom(from);
-			mail.setTo(to);
-			mail.setSubject(subject);
-			mail.setText(message);
-			sender.send(mail);
-		} catch (MailException exception) {
-			logger.debug("Caused by:" + exception.getCause().toString());
+	//@PostConstruct
+	public void init() {
+		if (findActiveEmailConfigurationEntity().isPresent()){
+			configureEmailGatewayWithActiveConfiguration();
+		}else{
+			//Todo: Send an alert on the interface to configure the service
 		}
 	}
 	
-	public JavaMailSender getJavaMailSender() {
+	public boolean configureEmailGatewayWithActiveConfiguration() {
+		EmailConfiguration configuration = findActiveEmailConfigurationEntity().get();
 		
-		JavaMailSenderImpl mailSender = new JavaMailSenderImpl();
-		mailSender.setHost("smtp.gmail.com");
-		mailSender.setPort(587);
-		mailSender.setUsername("fineractcnnotificationdemo@gmail.com");
-		//mailSender.setPassword("pnuugpwmcibipdpw");
-		mailSender.setPassword("fineractcnnotification");
+		this.host = configuration.getHost();
+		this.email = configuration.getUsername();
+		this.port = Integer.parseInt(configuration.getPort());
+		this.password = configuration.getApp_password();
+		return this.isConfigured = setJavaMailSender();
+	}
+	
+	public boolean customConfiguration(String identifier) {
+		return this.isConfigured = setCustomProperties(identifier);
+	}
+	
+	public List<EmailConfiguration> findAllActiveEmailConfigurationEntities() {
+		return EmailConfigurationMapper.map(this.emailGatewayConfigurationRepository.findAll());
+	}
+	
+	public Optional<EmailConfiguration> findActiveEmailConfigurationEntity() {
+		return this.emailGatewayConfigurationRepository.active().map(EmailConfigurationMapper::map);
+	}
+	
+	public Optional<EmailConfiguration> findEmailConfigurationByIdentifier(final String identifier) {
+		return this.emailGatewayConfigurationRepository.findByIdentifier(identifier).map(EmailConfigurationMapper::map);
+	}
+	
+	public Boolean emailConfigurationExists(final String identifier) {
+		return this.emailGatewayConfigurationRepository.existsByIdentifier(identifier);
+	}
+	
+	public boolean setJavaMailSender() {
+		mailSender.setHost(host);
+		mailSender.setPort(port);
+		mailSender.setUsername(email);
+		mailSender.setPassword(password);
 		
-		Properties properties = mailSender.getJavaMailProperties();
+		switch (host.toLowerCase()) {
+			case ServiceConstants.GOOGLE_MAIL_SERVER:
+				return setProperties();
+			case ServiceConstants.YAHOO_MAIL_SERVER:
+				return setProperties();
+		}
+		return false;
+	}
+	
+	public boolean setProperties() {
+		Properties properties = new Properties();
 		properties.put(ServiceConstants.MAIL_TRANSPORT_PROTOCOL_PROPERTY,
 				ServiceConstants.MAIL_TRANSPORT_PROTOCOL_VALUE);
 		properties.put(ServiceConstants.MAIL_SMTP_AUTH_PROPERTY,
 				ServiceConstants.MAIL_SMTP_AUTH_VALUE);
 		properties.put(ServiceConstants.MAIL_SMTP_STARTTLS_ENABLE_PROPERTY,
 				ServiceConstants.MAIL_SMTP_STARTTLS_ENABLE_VALUE);
-		mailSender.setJavaMailProperties(properties);
+		this.mailSender.setJavaMailProperties(properties);
+		return true;
+	}
+	
+	public boolean setCustomProperties(String identifier) {
+		EmailConfiguration configuration = findEmailConfigurationByIdentifier(identifier).get();
+		this.mailSender.setHost(configuration.getHost());
+		this.mailSender.setPort(Integer.parseInt(configuration.getPort()));
+		this.mailSender.setUsername(configuration.getUsername());
+		this.mailSender.setPassword(configuration.getApp_password());
 		
-		return mailSender;
+		Properties properties = new Properties();
+		properties.put(ServiceConstants.MAIL_TRANSPORT_PROTOCOL_PROPERTY, configuration.getProtocol());
+		properties.put(ServiceConstants.MAIL_SMTP_AUTH_PROPERTY, configuration.getSmtp_auth());
+		properties.put(ServiceConstants.MAIL_SMTP_STARTTLS_ENABLE_PROPERTY, configuration.getStart_tls());
+		//properties.put(ServiceConstants.MAIL_SMTP_TIMEOUT_PROPERTY, ServiceConstants.MAIL_SMTP_TIMEOUT_VALUE);
+		this.mailSender.setJavaMailProperties(properties);
+		return true;
+	}
+	
+	@CommandHandler(logStart = CommandLogLevel.INFO, logFinish = CommandLogLevel.INFO)
+	@Transactional
+	@EventEmitter(selectorName = NotificationEventConstants.SELECTOR_NAME, selectorValue = NotificationEventConstants.POST_SEND_EMAIL_NOTIFICATION)
+	public String sendEmail(String from, String to, String subject, String message) {
+		SimpleMailMessage mail = new SimpleMailMessage();
+		
+		try {
+			mail.setFrom(from);
+			mail.setTo(to);
+			mail.setSubject(subject);
+			mail.setText(message);
+			
+			this.mailSender.send(mail);
+		} catch (MailException exception) {
+			logger.debug("Caused by:" + exception.getCause().toString());
+		}
+		return to.concat(" - " + mailSender.hashCode());
 	}
-}
+}
\ No newline at end of file
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/EventHelper.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/EventHelper.java
new file mode 100644
index 0000000..96685ff
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/EventHelper.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.service;
+
+import com.google.gson.Gson;
+import org.apache.fineract.cn.command.util.CommandConstants;
+import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
+import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.jms.core.JmsTemplate;
+import org.springframework.stereotype.Component;
+
+@SuppressWarnings("WeakerAccess")
+@Component
+public class EventHelper {
+	private final Gson gson;
+	private final JmsTemplate jmsTemplate;
+	
+	public EventHelper(final @Qualifier(CommandConstants.SERIALIZER) Gson gson, final JmsTemplate jmsTemplate) {
+		this.gson = gson;
+		this.jmsTemplate = jmsTemplate;
+	}
+	
+	public void sendEvent(final String eventName, final String tenantIdentifier, final Object payload) {
+		this.jmsTemplate.convertAndSend(
+				this.gson.toJson(payload),
+				message -> {
+					message.setStringProperty(
+							TenantHeaderFilter.TENANT_HEADER,
+							tenantIdentifier);
+					message.setStringProperty(
+							NotificationEventConstants.SELECTOR_NAME,
+							eventName
+					);
+					return message;
+				}
+		);
+	}
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/NotificationService.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/NotificationService.java
index 8b25f1b..783adc8 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/NotificationService.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/NotificationService.java
@@ -19,100 +19,70 @@
 package org.apache.fineract.cn.notification.service.internal.service;
 
 import org.apache.fineract.cn.customer.api.v1.domain.Customer;
-import org.apache.fineract.cn.notification.api.v1.domain.EmailConfiguration;
-import org.apache.fineract.cn.notification.api.v1.domain.SMSConfiguration;
 import org.apache.fineract.cn.notification.service.ServiceConstants;
-import org.apache.fineract.cn.notification.service.internal.mapper.EmailConfigurationMapper;
-import org.apache.fineract.cn.notification.service.internal.mapper.SMSConfigurationMapper;
-import org.apache.fineract.cn.notification.service.internal.repository.EmailGatewayConfigurationRepository;
-import org.apache.fineract.cn.notification.service.internal.repository.SMSGatewayConfigurationRepository;
-import org.apache.fineract.cn.notification.service.internal.service.helperservice.CustomerAdaptor;
-import org.apache.fineract.cn.notification.service.internal.service.helperservice.NotificationAuthentication;
+import org.apache.fineract.cn.notification.service.internal.identity.CustomerPermittedClient;
+import org.apache.fineract.cn.notification.service.internal.identity.NotificationAuthentication;
+import org.apache.fineract.cn.notification.service.internal.service.externalServiceClients.CustomerService;
 import org.slf4j.Logger;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.stereotype.Service;
 
-import java.util.List;
 import java.util.Optional;
 
 @Service
 public class NotificationService {
+	
 	private final SMSService smsService;
 	private final EmailService emailService;
 	
-	private final SMSGatewayConfigurationRepository smsGatewayConfigurationRepository;
-	private final EmailGatewayConfigurationRepository emailGatewayConfigurationRepository;
-	
 	private final NotificationAuthentication notificationAuthentication;
-	private final CustomerAdaptor customerAdaptor;
+	private final CustomerService customerService;
 	private final Logger logger;
-	
-	private final String configureIdentifier = "Twilio";
+	private final CustomerPermittedClient customerPermittedClient;
 	
 	@Autowired
-	public NotificationService(final SMSGatewayConfigurationRepository smsGatewayConfigurationRepository,
-	                           final EmailGatewayConfigurationRepository emailGatewayConfigurationRepository,
-	                           final CustomerAdaptor customerAdaptor,
+	
+	public NotificationService(final CustomerService customerService,
 	                           final SMSService smsService,
 	                           final EmailService emailService,
 	                           final NotificationAuthentication notificationAuthentication,
+	                           final CustomerPermittedClient customerPermittedClient,
 	                           @Qualifier(ServiceConstants.LOGGER_NAME) final Logger logger
 	) {
 		super();
-		this.smsGatewayConfigurationRepository = smsGatewayConfigurationRepository;
-		this.emailGatewayConfigurationRepository = emailGatewayConfigurationRepository;
-		this.customerAdaptor = customerAdaptor;
+		this.customerService = customerService;
 		this.smsService = smsService;
 		this.emailService = emailService;
 		this.notificationAuthentication = notificationAuthentication;
+		this.customerPermittedClient = customerPermittedClient;
 		this.logger = logger;
-		this.logger.debug("{} has been initiated", this.getClass());
-	}
-	
-	
-	public List<SMSConfiguration> findAllActiveSMSConfigurationEntities() {
-		return SMSConfigurationMapper.map(this.smsGatewayConfigurationRepository.findAll());
-	}
-	
-	public List<EmailConfiguration> findAllActiveEmailConfigurationEntities() {
-		return EmailConfigurationMapper.map(this.emailGatewayConfigurationRepository.findAll());
-	}
-	
-	public Optional<SMSConfiguration> findSMSConfigurationByIdentifier(final String identifier) {
-		return this.smsGatewayConfigurationRepository.findByIdentifier(identifier).map(SMSConfigurationMapper::map);
-	}
-	
-	
-	public Optional<EmailConfiguration> findEmailConfigurationByIdentifier(final String identifier) {
-		return this.emailGatewayConfigurationRepository.findByIdentifier(identifier).map(EmailConfigurationMapper::map);
 	}
 	
 	public Optional<Customer> findCustomer(final String customerIdentifier, String tenant) {
-		notificationAuthentication.authenticate(tenant);
-		return this.customerAdaptor.findCustomer(customerIdentifier);
-	}
-	
-	public Boolean smsConfigurationExists(final String identifier) {
-		return this.smsGatewayConfigurationRepository.existsByIdentifier(identifier);
+		return notificationAuthentication.getCustomer(tenant,customerIdentifier);
+		//return Optional.of(this.customerPermittedClient.findCustomer(customerIdentifier));
 	}
 	
-	public Boolean emailConfigurationExists(final String identifier) {
-		return this.emailGatewayConfigurationRepository.existsByIdentifier(identifier);
+	//SMS Related Operations
+	public SMSService setNewSMSService(SMSService smsService, String configurationId){
+		smsService.customConfiguration(configurationId);
+		return smsService;
 	}
 	
-	public void configureSMSSender() {
-		SMSConfiguration configuration = findSMSConfigurationByIdentifier(configureIdentifier).get();
-		smsService.configure(configuration.getAccount_sid(),
-				configuration.getAuth_token(),
-				configuration.getSender_number());
+	public String sendSMS(String receiver, String template) {
+		if (!this.smsService.isConfigured) this.smsService.configureSMSGatewayWithActiveConfiguration();
+		return this.smsService.sendSMS(receiver, template);
 	}
 	
-	public void sendSMS(String receiver, String template) {
-		this.smsService.sendSMS(receiver, template);
+	//Email Related Operations
+	public String sendEmail(String from, String to, String subject, String message) {
+		if (!emailService.isConfigured) emailService.configureEmailGatewayWithActiveConfiguration();
+		return this.emailService.sendEmail(from, to, subject, message);
 	}
 	
-	public void sendEmail(String from, String to, String subject, String message) {
-		this.emailService.sendEmail(from, to, subject, message);
+	public EmailService setNewEmailService(EmailService emailService, String configurationId){
+		emailService.customConfiguration(configurationId);
+		return emailService;
 	}
 }
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SMSService.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SMSService.java
index fca2476..f618d1a 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SMSService.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SMSService.java
@@ -23,46 +23,95 @@ import com.twilio.Twilio;
 import com.twilio.rest.api.v2010.account.Message;
 import com.twilio.rest.api.v2010.account.MessageCreator;
 import com.twilio.type.PhoneNumber;
+import org.apache.fineract.cn.command.annotation.CommandHandler;
+import org.apache.fineract.cn.command.annotation.CommandLogLevel;
+import org.apache.fineract.cn.command.annotation.EventEmitter;
+import org.apache.fineract.cn.notification.api.v1.domain.SMSConfiguration;
+import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
 import org.apache.fineract.cn.notification.service.ServiceConstants;
+import org.apache.fineract.cn.notification.service.internal.mapper.SMSConfigurationMapper;
+import org.apache.fineract.cn.notification.service.internal.repository.SMSGatewayConfigurationRepository;
 import org.slf4j.Logger;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.PostConstruct;
+import java.util.List;
+import java.util.Optional;
 
 @Service
 public class SMSService {
 	
+	static boolean isConfigured;
+	private final SMSGatewayConfigurationRepository smsGatewayConfigurationRepository;
 	private final Logger logger;
-	@Value("${smssender.accountSID}")
-	private String ACCOUNT_SID;
-	@Value("${smssender.authToken}")
-	private String AUTH_TOKEN;
-	@Value("${smssender.senderNumber}")
-	private String SENDERNUMBER;
+	private String accountSid;
+	private String authToken;
+	private String senderNumber;
 	
 	@Autowired
-	public SMSService(@Qualifier(ServiceConstants.LOGGER_NAME) Logger logger) {
+	public SMSService(final SMSGatewayConfigurationRepository smsGatewayConfigurationRepository,
+	                  @Qualifier(ServiceConstants.LOGGER_NAME) Logger logger) {
 		super();
 		this.logger = logger;
+		this.isConfigured = false;
+		this.smsGatewayConfigurationRepository = smsGatewayConfigurationRepository;
+	}
+	
+	//@PostConstruct
+	public void init() {
+		if (findActiveSMSConfigurationEntity().isPresent()){
+			configureSMSGatewayWithActiveConfiguration();
+		}else{
+			//Todo: Send an alert on the interface to configure the service
+		}
+	}
+	
+	public boolean configureSMSGatewayWithActiveConfiguration() {
+		SMSConfiguration configuration = findActiveSMSConfigurationEntity().get();
+		this.accountSid = configuration.getAccount_sid();
+		this.authToken = configuration.getAuth_token();
+		this.senderNumber = configuration.getSender_number();
+		return this.isConfigured = true;
+	}
+	
+	public boolean customConfiguration(String identifier) {
+		SMSConfiguration configuration = findSMSConfigurationByIdentifier(identifier).get();
+		this.accountSid = configuration.getAccount_sid();
+		this.authToken = configuration.getAuth_token();
+		this.senderNumber = configuration.getSender_number();
+		return this.isConfigured = true;
+	}
+	
+	public Optional<SMSConfiguration> findActiveSMSConfigurationEntity() {
+		return this.smsGatewayConfigurationRepository.active().map(SMSConfigurationMapper::map);
+	}
+	
+	public Boolean smsConfigurationExists(final String identifier) {
+		return this.smsGatewayConfigurationRepository.existsByIdentifier(identifier);
+	}
+	
+	public Optional<SMSConfiguration> findSMSConfigurationByIdentifier(final String identifier) {
+		return this.smsGatewayConfigurationRepository.findByIdentifier(identifier).map(SMSConfigurationMapper::map);
 	}
 	
-	public void configure(String accountSID,
-	                      String authToken,
-	                      String senderNumber) {
-		ACCOUNT_SID = accountSID;
-		AUTH_TOKEN = authToken;
-		SENDERNUMBER = senderNumber;
+	public List<SMSConfiguration> findAllActiveSMSConfigurationEntities() {
+		return SMSConfigurationMapper.map(this.smsGatewayConfigurationRepository.findAll());
 	}
 	
-	public void sendSMS(String receiver, String template) {
-		this.logger.debug("sendSMS invoked");
-		Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
-		MessageCreator messageCreator = Message.creator(ACCOUNT_SID,
+	@CommandHandler(logStart = CommandLogLevel.INFO, logFinish = CommandLogLevel.INFO)
+	@Transactional
+	@EventEmitter(selectorName = NotificationEventConstants.SELECTOR_NAME, selectorValue = NotificationEventConstants.POST_SEND_SMS_NOTIFICATION)
+	public String sendSMS(String receiver, String template) {
+		Twilio.init(this.accountSid, this.authToken);
+		MessageCreator messageCreator = Message.creator(this.accountSid,
 				new PhoneNumber(receiver),
-				new PhoneNumber(SENDERNUMBER),
+				new PhoneNumber(this.senderNumber),
 				template);
 		Message message = messageCreator.create();
-		System.out.println(message.getSid());
+		return message.getTo().concat(" - " + message.getSid());
 	}
 }
\ No newline at end of file
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/helperservice/CustomerAdaptor.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/externalServiceClients/CustomerService.java
similarity index 94%
rename from service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/helperservice/CustomerAdaptor.java
rename to service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/externalServiceClients/CustomerService.java
index 33a79f4..0532759 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/helperservice/CustomerAdaptor.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/externalServiceClients/CustomerService.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.fineract.cn.notification.service.internal.service.helperservice;
+package org.apache.fineract.cn.notification.service.internal.service.externalServiceClients;
 
 import org.apache.fineract.cn.customer.api.v1.client.CustomerManager;
 import org.apache.fineract.cn.customer.api.v1.client.CustomerNotFoundException;
@@ -30,13 +30,13 @@ import org.springframework.stereotype.Service;
 import java.util.Optional;
 
 @Service
-public class CustomerAdaptor {
+public class CustomerService {
 	
 	private final Logger logger;
 	private final CustomerManager customerManager;
 	
 	@Autowired
-	public CustomerAdaptor(@Qualifier(ServiceConstants.LOGGER_NAME) final Logger logger,
+	public CustomerService(@Qualifier(ServiceConstants.LOGGER_NAME) final Logger logger,
 	                       final CustomerManager customerManager) {
 		super();
 		this.logger = logger;
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/helperservice/NotificationAuthentication.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/helperservice/NotificationAuthentication.java
deleted file mode 100644
index a4ab97c..0000000
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/helperservice/NotificationAuthentication.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.fineract.cn.notification.service.internal.service.helperservice;
-
-/*
- ebenezergraham created on 8/4/18
-*/
-
-import org.apache.fineract.cn.api.util.UserContextHolder;
-import org.apache.fineract.cn.identity.api.v1.client.IdentityManager;
-import org.apache.fineract.cn.identity.api.v1.domain.Authentication;
-import org.apache.fineract.cn.lang.TenantContextHolder;
-import org.apache.fineract.cn.notification.service.ServiceConstants;
-import org.slf4j.Logger;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.stereotype.Component;
-import org.springframework.util.Base64Utils;
-
-@Component
-public class NotificationAuthentication {
-	private final String USER_PASSWORD = "init1@l";
-	private final String USER_IDENTIFIER = "operator";
-	
-	private IdentityManager identityManager;
-	private Logger logger;
-	
-	@Autowired
-	public NotificationAuthentication(IdentityManager identityManager,
-	                                 @Qualifier(ServiceConstants.LOGGER_NAME) final Logger logger) {
-		this.identityManager = identityManager;
-		this.logger = logger;
-		}
-	
-	public void authenticate(String tenant) {
-		TenantContextHolder.clear();
-		TenantContextHolder.setIdentifier(tenant);
-		
-		final Authentication authentication =
-				this.identityManager.login(USER_IDENTIFIER, Base64Utils.encodeToString(USER_PASSWORD.getBytes()));
-		UserContextHolder.clear();
-		UserContextHolder.setAccessToken(USER_IDENTIFIER, authentication.getAccessToken());
-	}
-}
\ No newline at end of file
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/CustomerEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/CustomerEventListener.java
index d1cb4d6..ce5325e 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/CustomerEventListener.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/CustomerEventListener.java
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
     /*
      * Licensed to the Apache Software Foundation (ASF) under one
      * or more contributor license agreements.  See the NOTICE file
@@ -51,7 +69,7 @@
 	    public void customerCreatedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
 	                                     final String payload) {
 		    Customer customer = this.notificationService.findCustomer(payload, tenant).get();
-		    this.logger.debug("{} has been invoked", "customerCreatedEvent");
+		    this.logger.info("{} has been invoked", "customerCreatedEvent");
 		
 		    customer.getContactDetails().forEach(contact -> {
 			    if (contact.getType().equals(ContactDetail.Type.PHONE.toString())) {
@@ -83,7 +101,7 @@
 	    )
 	    public void customerUpdatedEvents(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
 	                                      final String payload) {
-		    this.logger.debug("{} has been invoked", "customerUpdatedEvents");
+		    this.logger.info("{} has been invoked", "customerUpdatedEvents");
 		    Customer customer = this.notificationService.findCustomer(payload, tenant).get();
 		
 		    customer.getContactDetails().forEach(contact -> {
@@ -102,7 +120,7 @@
 				    // TODO: Pass message to template
 				    notificationService.sendEmail("fineractcnnotificationdemo@gmail.com",
 						    emailAddress,
-						    "Account created",
+						    "Account updated",
 						    "Dear Valued Customer," +
 								    "\n\nYour account has been Updated" +
 								    "\n\nBest Regards," +
@@ -117,7 +135,7 @@
 	    )
 	    public void customerActivatedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
 	                                       final String payload) {
-		    this.logger.debug("{} has been invoked", "customerActivatedEvent");
+		    this.logger.info("{} has been invoked", "customerActivatedEvent");
 		    Customer customer = this.notificationService.findCustomer(payload, tenant).get();
 		
 		    customer.getContactDetails().forEach(contact -> {
@@ -134,7 +152,7 @@
 				    // TODO: Pass message to template
 				    notificationService.sendEmail("fineractcnnotificationdemo@gmail.com",
 						    emailAddress,
-						    "Account created",
+						    "Account activated",
 						    "Dear Valued Customer," +
 								    "\n\nYour account has been Activated" +
 								    "\n\nBest Regards," +
@@ -149,7 +167,7 @@
 	    )
 	    public void customerLockedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
 	                                    final String payload) {
-		    this.logger.debug("{} has been invoked", "customerLockedEvent");
+		    this.logger.info("{} has been invoked", "customerLockedEvent");
 		    Customer customer = this.notificationService.findCustomer(payload, tenant).get();
 		
 		    customer.getContactDetails().forEach(contact -> {
@@ -165,7 +183,7 @@
 				    // TODO: Localize message
 				    // TODO: Pass message to template
 				    notificationService.sendEmail("fineractcnnotificationdemo@gmail.com",
-						    emailAddress, "Account created",
+						    emailAddress, "Account locked",
 						    "Dear Valued Customer," +
 								    "\n\nYour account has been Locked" +
 								    "\n\nBest Regards," +
@@ -180,7 +198,7 @@
 	    )
 	    public void customerUnlockedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
 	                                      final String payload) {
-		    this.logger.debug("{} has been invoked", "customerUnlockedEvent");
+		    this.logger.info("{} has been invoked", "customerUnlockedEvent");
 		    Customer customer = this.notificationService.findCustomer(payload, tenant).get();
 		
 		    customer.getContactDetails().forEach(contact -> {
@@ -212,7 +230,7 @@
 	    )
 	    public void customerClosedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
 	                                    final String payload) {
-		    this.logger.debug("{} has been invoked", "customerClosedEvent");
+		    this.logger.info("{} has been invoked", "customerClosedEvent");
 		    Customer customer = this.notificationService.findCustomer(payload, tenant).get();
 		
 		    customer.getContactDetails().forEach(contact -> {
@@ -228,7 +246,7 @@
 				    // TODO: Localize message
 				    // TODO: Pass message to template
 				    notificationService.sendEmail("fineractcnnotificationdemo@gmail.com",
-						    emailAddress, "Account created",
+						    emailAddress, "Account closed",
 						    "Dear Valued Customer," +
 								    "\n\nYour account has been Closed" +
 								    "\n\nBest Regards," +
@@ -243,7 +261,7 @@
 	    )
 	    public void customerReopenedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
 	                                      final String payload) {
-		    this.logger.debug("{} has been invoked", "customerReopenedEvent");
+		    this.logger.info("{} has been invoked", "customerReopenedEvent");
 		    Customer customer = this.notificationService.findCustomer(payload, tenant).get();
 		
 		    customer.getContactDetails().forEach(contact -> {
@@ -275,7 +293,7 @@
 	    )
 	    public void contactDetailsChangedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
 	                                           final String payload) {
-		    this.logger.debug("{} has been invoked", "contactDetailsChangedEvent");
+		    this.logger.info("{} has been invoked", "contactDetailsChangedEvent");
 		    Customer customer = this.notificationService.findCustomer(payload, tenant).get();
 		
 		    customer.getContactDetails().forEach(contact -> {
@@ -309,7 +327,7 @@
 	    )
 	    public void addressChangedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
 	                                    final String payload) {
-		    this.logger.debug("{} has been invoked", "addressChangedEvent");
+		    this.logger.info("{} has been invoked", "addressChangedEvent");
 		
 		    Customer customer = this.notificationService.findCustomer(payload, tenant).get();
 		
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PortfolioEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PortfolioEventListener.java
index 2f860e5..acb116b 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PortfolioEventListener.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PortfolioEventListener.java
@@ -55,6 +55,12 @@ public class PortfolioEventListener {
 	)
 	public void onOpen(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
 	                   final String payload) {
+		logger.debug("Payload: " + payload+ "Tenant" +tenant);
+		this.notificationService.sendSMS("+23058409206",
+				"Dear Valued Customer," +
+						"\n\nYour loan request has been denied" +
+						"\n\nBest Regards" +
+						"\nYour MFI");
 	}
 	
 	@JmsListener(
@@ -65,7 +71,10 @@ public class PortfolioEventListener {
 	public void onDeny(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
 	                   final String payload) {
 		this.notificationService.sendSMS("+23058409206",
-				"Dear Valued Customer,\n\nYour loan request has been denied\n\nBest Regards\nYour MFI");
+				"Dear Valued Customer," +
+						"\n\nYour loan request has been denied" +
+						"\n\nBest Regards" +
+						"\nYour MFI");
 	}
 	
 	@JmsListener(
@@ -77,7 +86,10 @@ public class PortfolioEventListener {
 	                      final String payload) {
 		logger.info(payload);
 		this.notificationService.sendSMS("+23058409206",
-				"Dear Valued Customer,\n\nYour loan has been Approved and waiting disbursal\n\nBest Regards\nYour MFI");
+				"Dear Valued Customer," +
+						"\n\nYour loan has been Approved and waiting disbursal" +
+						"\n\nBest Regards" +
+						"\nYour MFI");
 	}
 	
 	@JmsListener(
@@ -87,18 +99,12 @@ public class PortfolioEventListener {
 	)
 	public void onDisburse(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
 	                       final String payload) {
-		logger.info(payload);
+		logger.info(payload.toString());
 		this.notificationService.sendSMS("+23058409206",
-			"Dear Valued Customer,\n\nYour loan has been disbursed\n\nBest Regards\nYour MFI");
-	}
-	
-	@JmsListener(
-			subscription = IndividualLoanEventConstants.DESTINATION,
-			destination = IndividualLoanEventConstants.DESTINATION,
-			selector = IndividualLoanEventConstants.SELECTOR_APPLY_INTEREST_INDIVIDUALLOAN_CASE
-	)
-	public void onApplyInterest(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-	                            final String payload) {
+			"Dear Valued Customer," +
+					"\n\nYour loan has been disbursed" +
+					"\n\nBest Regards" +
+					"\nYour MFI");
 	}
 	
 	@JmsListener(
@@ -108,15 +114,11 @@ public class PortfolioEventListener {
 	)
 	public void onAcceptPayment(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
 	                            final String payload) {
-	}
-	
-	@JmsListener(
-			subscription = IndividualLoanEventConstants.DESTINATION,
-			destination = IndividualLoanEventConstants.DESTINATION,
-			selector = IndividualLoanEventConstants.SELECTOR_CHECK_LATE_INDIVIDUALLOAN_CASE
-	)
-	public void onCheckLate(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-	                        final String payload) {
+		this.notificationService.sendSMS("+23058409206",
+				"Dear Valued Customer," +
+						"\n\nYour payment has been accepted" +
+						"\n\nBest Regards" +
+						"\nYour MFI");
 	}
 	
 	@JmsListener(
@@ -126,6 +128,12 @@ public class PortfolioEventListener {
 	)
 	public void onMarkLate(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
 	                       final String payload) {
+		
+		this.notificationService.sendSMS("+23058409206",
+				"Dear Valued Customer," +
+						"\n\nYour payment for your loan is late" +
+						"\n\nBest Regards" +
+						"\nYour MFI");
 	}
 	
 	@JmsListener(
@@ -135,15 +143,11 @@ public class PortfolioEventListener {
 	)
 	public void onMarkInArrears(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
 	                            final String payload) {
-	}
-	
-	@JmsListener(
-			subscription = IndividualLoanEventConstants.DESTINATION,
-			destination = IndividualLoanEventConstants.DESTINATION,
-			selector = IndividualLoanEventConstants.SELECTOR_WRITE_OFF_INDIVIDUALLOAN_CASE
-	)
-	public void onWriteOff(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
-	                       final String payload) {
+		this.notificationService.sendSMS("+23058409206",
+				"Dear Valued Customer," +
+						"\n\nYour payment has been marked as arrears for next payment" +
+						"\n\nBest Regards" +
+						"\nYour MFI");
 	}
 	
 	@JmsListener(
@@ -153,6 +157,11 @@ public class PortfolioEventListener {
 	)
 	public void onClose(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
 	                    final String payload) {
+		this.notificationService.sendSMS("+23058409206",
+				"Dear Valued Customer," +
+						"\n\nYour loan has been closed" +
+						"\n\nBest Regards" +
+						"\nYour MFI");
 	}
 	
 	@JmsListener(
@@ -162,5 +171,10 @@ public class PortfolioEventListener {
 	)
 	public void onRecover(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
 	                      final String payload) {
+		this.notificationService.sendSMS("+23058409206",
+				"Dear Valued Customer," +
+						"\n\nYour arrears have been recovered" +
+						"\n\nBest Regards" +
+						"\nYour MFI");
 	}
 }
\ No newline at end of file
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/rest/NotificationRestController.java b/service/src/main/java/org/apache/fineract/cn/notification/service/rest/EmailServiceRestController.java
similarity index 56%
copy from service/src/main/java/org/apache/fineract/cn/notification/service/rest/NotificationRestController.java
copy to service/src/main/java/org/apache/fineract/cn/notification/service/rest/EmailServiceRestController.java
index df36f03..2823b6d 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/rest/NotificationRestController.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/rest/EmailServiceRestController.java
@@ -23,18 +23,16 @@ import org.apache.fineract.cn.anubis.annotation.Permittable;
 import org.apache.fineract.cn.command.gateway.CommandGateway;
 import org.apache.fineract.cn.lang.ServiceException;
 import org.apache.fineract.cn.notification.api.v1.PermittableGroupIds;
-import org.apache.fineract.cn.notification.api.v1.client.ConfigurationNotFoundException;
 import org.apache.fineract.cn.notification.api.v1.domain.EmailConfiguration;
 import org.apache.fineract.cn.notification.api.v1.domain.SMSConfiguration;
 import org.apache.fineract.cn.notification.service.ServiceConstants;
-import org.apache.fineract.cn.notification.service.internal.command.CreateEmailConfigurationCommand;
-import org.apache.fineract.cn.notification.service.internal.command.CreateSMSConfigurationCommand;
-import org.apache.fineract.cn.notification.service.internal.command.InitializeServiceCommand;
-import org.apache.fineract.cn.notification.service.internal.command.PostSMSCommand;
+import org.apache.fineract.cn.notification.service.internal.command.*;
+import org.apache.fineract.cn.notification.service.internal.service.EmailService;
 import org.apache.fineract.cn.notification.service.internal.service.NotificationService;
 import org.slf4j.Logger;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.http.HttpStatus;
 import org.springframework.http.MediaType;
 import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.*;
@@ -44,53 +42,52 @@ import java.util.List;
 
 @SuppressWarnings("unused")
 @RestController
-@RequestMapping("/")
-public class NotificationRestController {
+@RequestMapping("/configuration/email")
+public class EmailServiceRestController {
 	
 	private final Logger logger;
 	private final CommandGateway commandGateway;
-	private final NotificationService notificationService;
+	private EmailService emailService;
 	
 	@Autowired
-	public NotificationRestController(@Qualifier(ServiceConstants.LOGGER_NAME) final Logger logger,
+	public EmailServiceRestController(@Qualifier(ServiceConstants.LOGGER_NAME) final Logger logger,
 	                                  final CommandGateway commandGateway,
-	                                  final NotificationService notificationService) {
+	                                  final EmailService emailService) {
 		super();
 		this.logger = logger;
 		this.commandGateway = commandGateway;
-		this.notificationService = notificationService;
+		this.emailService = emailService;
 	}
 	
-	@Permittable(value = AcceptedTokenType.SYSTEM)
-	@RequestMapping(
-			value = "/initialize",
-			method = RequestMethod.POST,
-			consumes = MediaType.ALL_VALUE,
+	@Permittable(value = AcceptedTokenType.TENANT, groupId = PermittableGroupIds.SELF_MANAGEMENT)
+	@RequestMapping(value = "/update",
+			method = RequestMethod.PUT,
+			consumes = MediaType.APPLICATION_JSON_VALUE,
 			produces = MediaType.APPLICATION_JSON_VALUE
 	)
 	public
 	@ResponseBody
-	ResponseEntity<Void> initialize() throws InterruptedException {
-		this.commandGateway.process(new InitializeServiceCommand());
+	ResponseEntity<Void> updateEmailConfiguration(@RequestBody @Valid final EmailConfiguration emailConfiguration) {
+		this.commandGateway.process(new UpdateEmailConfigurationCommand(emailConfiguration));
 		return ResponseEntity.accepted().build();
 	}
 	
 	@Permittable(value = AcceptedTokenType.TENANT, groupId = PermittableGroupIds.SELF_MANAGEMENT)
-	@RequestMapping(
-			value = "/notification/sms/active",
-			method = RequestMethod.GET,
-			consumes = MediaType.ALL_VALUE,
+	@RequestMapping(value = "/delete/{identifier}",
+			method = RequestMethod.DELETE,
+			consumes = MediaType.APPLICATION_JSON_VALUE,
 			produces = MediaType.APPLICATION_JSON_VALUE
 	)
 	public
 	@ResponseBody
-	List<SMSConfiguration> findAllActiveSMSConfigurationEntities() {
-		return this.notificationService.findAllActiveSMSConfigurationEntities();
+	ResponseEntity<Void> deleteEmailConfiguration(@PathVariable @Valid final String identifier) {
+		this.commandGateway.process(new DeleteEmailConfigurationCommand(identifier));
+		return ResponseEntity.ok().build();
 	}
 	
 	@Permittable(value = AcceptedTokenType.TENANT, groupId = PermittableGroupIds.SELF_MANAGEMENT)
 	@RequestMapping(
-			value = "/notification/email/active",
+			value = "/active",
 			method = RequestMethod.GET,
 			consumes = MediaType.ALL_VALUE,
 			produces = MediaType.APPLICATION_JSON_VALUE
@@ -98,62 +95,27 @@ public class NotificationRestController {
 	public
 	@ResponseBody
 	List<EmailConfiguration> findAllActiveEmailConfigurationEntities() {
-		return this.notificationService.findAllActiveEmailConfigurationEntities();
+		return this.emailService.findAllActiveEmailConfigurationEntities();
 	}
 	
 	@Permittable(value = AcceptedTokenType.TENANT, groupId = PermittableGroupIds.SELF_MANAGEMENT)
 	@RequestMapping(
-			value = "/notification/sms/{identifier}",
+			value = "/{identifier}",
 			method = RequestMethod.GET,
 			consumes = MediaType.ALL_VALUE,
 			produces = MediaType.APPLICATION_JSON_VALUE
 	)
 	public
 	@ResponseBody
-	ResponseEntity<SMSConfiguration> findSMSConfigurationByIdentifier(@PathVariable("identifier") final String identifier)
-	throws ConfigurationNotFoundException {
-		return this.notificationService.findSMSConfigurationByIdentifier(identifier)
-				.map(ResponseEntity::ok)
-				.orElseThrow(() -> ServiceException.notFound("SMS Gateway Configuration with identifier " + identifier + " doesn't exist."));
-	}
-	
-	@Permittable(value = AcceptedTokenType.TENANT, groupId = PermittableGroupIds.SELF_MANAGEMENT)
-	@RequestMapping(
-			value = "/notification/email/{identifier}",
-			method = RequestMethod.GET,
-			consumes = MediaType.ALL_VALUE,
-			produces = MediaType.APPLICATION_JSON_VALUE
-	)
-	public
-	@ResponseBody
-	ResponseEntity<EmailConfiguration> findEmailConfigurationByIdentifier(@PathVariable("identifier") final String identifier)
-			throws ConfigurationNotFoundException {
-		return this.notificationService.findEmailConfigurationByIdentifier(identifier)
+	ResponseEntity<EmailConfiguration> findEmailConfigurationByIdentifier(@PathVariable("identifier") final String identifier) {
+		return this.emailService.findEmailConfigurationByIdentifier(identifier)
 				.map(ResponseEntity::ok)
 				.orElseThrow(() -> ServiceException.notFound("Email Gateway Configuration with identifier " + identifier + " doesn't exist."));
 	}
 	
 	@Permittable(value = AcceptedTokenType.TENANT, groupId = PermittableGroupIds.SELF_MANAGEMENT)
 	@RequestMapping(
-			value = "/notification/sms/create",
-			method = RequestMethod.POST,
-			consumes = MediaType.APPLICATION_JSON_VALUE,
-			produces = MediaType.APPLICATION_JSON_VALUE
-	)
-	public
-	@ResponseBody
-	ResponseEntity<Void> createSMSConfiguration(@RequestBody @Valid final SMSConfiguration smsConfiguration) throws InterruptedException {
-		if (this.notificationService.smsConfigurationExists(smsConfiguration.getIdentifier())) {
-			throw ServiceException.conflict("Configuration {0} already exists.", smsConfiguration.getIdentifier());
-		}
-		
-		this.commandGateway.process(new CreateSMSConfigurationCommand(smsConfiguration));
-		return ResponseEntity.accepted().build();
-	}
-	
-	@Permittable(value = AcceptedTokenType.TENANT, groupId = PermittableGroupIds.SELF_MANAGEMENT)
-	@RequestMapping(
-			value = "/notification/email/create",
+			value = "/create",
 			method = RequestMethod.POST,
 			consumes = MediaType.APPLICATION_JSON_VALUE,
 			produces = MediaType.APPLICATION_JSON_VALUE
@@ -161,10 +123,11 @@ public class NotificationRestController {
 	public
 	@ResponseBody
 	ResponseEntity<Void> createEmailConfiguration(@RequestBody @Valid final EmailConfiguration emailConfiguration) throws InterruptedException {
-		if (this.notificationService.emailConfigurationExists(emailConfiguration.getIdentifier())) {
+		if (this.emailService.emailConfigurationExists(emailConfiguration.getIdentifier())) {
 			throw ServiceException.conflict("Configuration {0} already exists.", emailConfiguration.getIdentifier());
 		}
+		
 		this.commandGateway.process(new CreateEmailConfigurationCommand(emailConfiguration));
-		return ResponseEntity.accepted().build();
+		return new ResponseEntity<>(HttpStatus.CREATED);
 	}
 }
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/rest/NotificationRestController.java b/service/src/main/java/org/apache/fineract/cn/notification/service/rest/NotificationRestController.java
index df36f03..5c1ceaa 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/rest/NotificationRestController.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/rest/NotificationRestController.java
@@ -23,14 +23,12 @@ import org.apache.fineract.cn.anubis.annotation.Permittable;
 import org.apache.fineract.cn.command.gateway.CommandGateway;
 import org.apache.fineract.cn.lang.ServiceException;
 import org.apache.fineract.cn.notification.api.v1.PermittableGroupIds;
-import org.apache.fineract.cn.notification.api.v1.client.ConfigurationNotFoundException;
 import org.apache.fineract.cn.notification.api.v1.domain.EmailConfiguration;
 import org.apache.fineract.cn.notification.api.v1.domain.SMSConfiguration;
 import org.apache.fineract.cn.notification.service.ServiceConstants;
 import org.apache.fineract.cn.notification.service.internal.command.CreateEmailConfigurationCommand;
 import org.apache.fineract.cn.notification.service.internal.command.CreateSMSConfigurationCommand;
 import org.apache.fineract.cn.notification.service.internal.command.InitializeServiceCommand;
-import org.apache.fineract.cn.notification.service.internal.command.PostSMSCommand;
 import org.apache.fineract.cn.notification.service.internal.service.NotificationService;
 import org.slf4j.Logger;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -75,96 +73,4 @@ public class NotificationRestController {
 		return ResponseEntity.accepted().build();
 	}
 	
-	@Permittable(value = AcceptedTokenType.TENANT, groupId = PermittableGroupIds.SELF_MANAGEMENT)
-	@RequestMapping(
-			value = "/notification/sms/active",
-			method = RequestMethod.GET,
-			consumes = MediaType.ALL_VALUE,
-			produces = MediaType.APPLICATION_JSON_VALUE
-	)
-	public
-	@ResponseBody
-	List<SMSConfiguration> findAllActiveSMSConfigurationEntities() {
-		return this.notificationService.findAllActiveSMSConfigurationEntities();
-	}
-	
-	@Permittable(value = AcceptedTokenType.TENANT, groupId = PermittableGroupIds.SELF_MANAGEMENT)
-	@RequestMapping(
-			value = "/notification/email/active",
-			method = RequestMethod.GET,
-			consumes = MediaType.ALL_VALUE,
-			produces = MediaType.APPLICATION_JSON_VALUE
-	)
-	public
-	@ResponseBody
-	List<EmailConfiguration> findAllActiveEmailConfigurationEntities() {
-		return this.notificationService.findAllActiveEmailConfigurationEntities();
-	}
-	
-	@Permittable(value = AcceptedTokenType.TENANT, groupId = PermittableGroupIds.SELF_MANAGEMENT)
-	@RequestMapping(
-			value = "/notification/sms/{identifier}",
-			method = RequestMethod.GET,
-			consumes = MediaType.ALL_VALUE,
-			produces = MediaType.APPLICATION_JSON_VALUE
-	)
-	public
-	@ResponseBody
-	ResponseEntity<SMSConfiguration> findSMSConfigurationByIdentifier(@PathVariable("identifier") final String identifier)
-	throws ConfigurationNotFoundException {
-		return this.notificationService.findSMSConfigurationByIdentifier(identifier)
-				.map(ResponseEntity::ok)
-				.orElseThrow(() -> ServiceException.notFound("SMS Gateway Configuration with identifier " + identifier + " doesn't exist."));
-	}
-	
-	@Permittable(value = AcceptedTokenType.TENANT, groupId = PermittableGroupIds.SELF_MANAGEMENT)
-	@RequestMapping(
-			value = "/notification/email/{identifier}",
-			method = RequestMethod.GET,
-			consumes = MediaType.ALL_VALUE,
-			produces = MediaType.APPLICATION_JSON_VALUE
-	)
-	public
-	@ResponseBody
-	ResponseEntity<EmailConfiguration> findEmailConfigurationByIdentifier(@PathVariable("identifier") final String identifier)
-			throws ConfigurationNotFoundException {
-		return this.notificationService.findEmailConfigurationByIdentifier(identifier)
-				.map(ResponseEntity::ok)
-				.orElseThrow(() -> ServiceException.notFound("Email Gateway Configuration with identifier " + identifier + " doesn't exist."));
-	}
-	
-	@Permittable(value = AcceptedTokenType.TENANT, groupId = PermittableGroupIds.SELF_MANAGEMENT)
-	@RequestMapping(
-			value = "/notification/sms/create",
-			method = RequestMethod.POST,
-			consumes = MediaType.APPLICATION_JSON_VALUE,
-			produces = MediaType.APPLICATION_JSON_VALUE
-	)
-	public
-	@ResponseBody
-	ResponseEntity<Void> createSMSConfiguration(@RequestBody @Valid final SMSConfiguration smsConfiguration) throws InterruptedException {
-		if (this.notificationService.smsConfigurationExists(smsConfiguration.getIdentifier())) {
-			throw ServiceException.conflict("Configuration {0} already exists.", smsConfiguration.getIdentifier());
-		}
-		
-		this.commandGateway.process(new CreateSMSConfigurationCommand(smsConfiguration));
-		return ResponseEntity.accepted().build();
-	}
-	
-	@Permittable(value = AcceptedTokenType.TENANT, groupId = PermittableGroupIds.SELF_MANAGEMENT)
-	@RequestMapping(
-			value = "/notification/email/create",
-			method = RequestMethod.POST,
-			consumes = MediaType.APPLICATION_JSON_VALUE,
-			produces = MediaType.APPLICATION_JSON_VALUE
-	)
-	public
-	@ResponseBody
-	ResponseEntity<Void> createEmailConfiguration(@RequestBody @Valid final EmailConfiguration emailConfiguration) throws InterruptedException {
-		if (this.notificationService.emailConfigurationExists(emailConfiguration.getIdentifier())) {
-			throw ServiceException.conflict("Configuration {0} already exists.", emailConfiguration.getIdentifier());
-		}
-		this.commandGateway.process(new CreateEmailConfigurationCommand(emailConfiguration));
-		return ResponseEntity.accepted().build();
-	}
 }
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/rest/NotificationRestController.java b/service/src/main/java/org/apache/fineract/cn/notification/service/rest/SMSServiceRestController.java
similarity index 53%
copy from service/src/main/java/org/apache/fineract/cn/notification/service/rest/NotificationRestController.java
copy to service/src/main/java/org/apache/fineract/cn/notification/service/rest/SMSServiceRestController.java
index df36f03..b9a6e83 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/rest/NotificationRestController.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/rest/SMSServiceRestController.java
@@ -23,18 +23,16 @@ import org.apache.fineract.cn.anubis.annotation.Permittable;
 import org.apache.fineract.cn.command.gateway.CommandGateway;
 import org.apache.fineract.cn.lang.ServiceException;
 import org.apache.fineract.cn.notification.api.v1.PermittableGroupIds;
-import org.apache.fineract.cn.notification.api.v1.client.ConfigurationNotFoundException;
-import org.apache.fineract.cn.notification.api.v1.domain.EmailConfiguration;
+import org.apache.fineract.cn.notification.api.v1.domain.SMSConfiguration;
 import org.apache.fineract.cn.notification.api.v1.domain.SMSConfiguration;
 import org.apache.fineract.cn.notification.service.ServiceConstants;
-import org.apache.fineract.cn.notification.service.internal.command.CreateEmailConfigurationCommand;
-import org.apache.fineract.cn.notification.service.internal.command.CreateSMSConfigurationCommand;
-import org.apache.fineract.cn.notification.service.internal.command.InitializeServiceCommand;
-import org.apache.fineract.cn.notification.service.internal.command.PostSMSCommand;
+import org.apache.fineract.cn.notification.service.internal.command.*;
 import org.apache.fineract.cn.notification.service.internal.service.NotificationService;
+import org.apache.fineract.cn.notification.service.internal.service.SMSService;
 import org.slf4j.Logger;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.http.HttpStatus;
 import org.springframework.http.MediaType;
 import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.*;
@@ -44,40 +42,26 @@ import java.util.List;
 
 @SuppressWarnings("unused")
 @RestController
-@RequestMapping("/")
-public class NotificationRestController {
+@RequestMapping("/configuration/sms/")
+public class SMSServiceRestController {
 	
 	private final Logger logger;
 	private final CommandGateway commandGateway;
-	private final NotificationService notificationService;
+	private final SMSService smsService;
 	
 	@Autowired
-	public NotificationRestController(@Qualifier(ServiceConstants.LOGGER_NAME) final Logger logger,
-	                                  final CommandGateway commandGateway,
-	                                  final NotificationService notificationService) {
+	public SMSServiceRestController(@Qualifier(ServiceConstants.LOGGER_NAME) final Logger logger,
+	                                final CommandGateway commandGateway,
+	                                final SMSService smsService) {
 		super();
 		this.logger = logger;
 		this.commandGateway = commandGateway;
-		this.notificationService = notificationService;
-	}
-	
-	@Permittable(value = AcceptedTokenType.SYSTEM)
-	@RequestMapping(
-			value = "/initialize",
-			method = RequestMethod.POST,
-			consumes = MediaType.ALL_VALUE,
-			produces = MediaType.APPLICATION_JSON_VALUE
-	)
-	public
-	@ResponseBody
-	ResponseEntity<Void> initialize() throws InterruptedException {
-		this.commandGateway.process(new InitializeServiceCommand());
-		return ResponseEntity.accepted().build();
+		this.smsService = smsService;
 	}
 	
 	@Permittable(value = AcceptedTokenType.TENANT, groupId = PermittableGroupIds.SELF_MANAGEMENT)
 	@RequestMapping(
-			value = "/notification/sms/active",
+			value = "/active",
 			method = RequestMethod.GET,
 			consumes = MediaType.ALL_VALUE,
 			produces = MediaType.APPLICATION_JSON_VALUE
@@ -85,86 +69,65 @@ public class NotificationRestController {
 	public
 	@ResponseBody
 	List<SMSConfiguration> findAllActiveSMSConfigurationEntities() {
-		return this.notificationService.findAllActiveSMSConfigurationEntities();
-	}
-	
-	@Permittable(value = AcceptedTokenType.TENANT, groupId = PermittableGroupIds.SELF_MANAGEMENT)
-	@RequestMapping(
-			value = "/notification/email/active",
-			method = RequestMethod.GET,
-			consumes = MediaType.ALL_VALUE,
-			produces = MediaType.APPLICATION_JSON_VALUE
-	)
-	public
-	@ResponseBody
-	List<EmailConfiguration> findAllActiveEmailConfigurationEntities() {
-		return this.notificationService.findAllActiveEmailConfigurationEntities();
+		return this.smsService.findAllActiveSMSConfigurationEntities();
 	}
 	
 	@Permittable(value = AcceptedTokenType.TENANT, groupId = PermittableGroupIds.SELF_MANAGEMENT)
 	@RequestMapping(
-			value = "/notification/sms/{identifier}",
+			value = "/{identifier}",
 			method = RequestMethod.GET,
 			consumes = MediaType.ALL_VALUE,
 			produces = MediaType.APPLICATION_JSON_VALUE
 	)
 	public
 	@ResponseBody
-	ResponseEntity<SMSConfiguration> findSMSConfigurationByIdentifier(@PathVariable("identifier") final String identifier)
-	throws ConfigurationNotFoundException {
-		return this.notificationService.findSMSConfigurationByIdentifier(identifier)
+	ResponseEntity<SMSConfiguration> findSMSConfigurationByIdentifier(@PathVariable("identifier") final String identifier) {
+		return this.smsService.findSMSConfigurationByIdentifier(identifier)
 				.map(ResponseEntity::ok)
 				.orElseThrow(() -> ServiceException.notFound("SMS Gateway Configuration with identifier " + identifier + " doesn't exist."));
 	}
 	
 	@Permittable(value = AcceptedTokenType.TENANT, groupId = PermittableGroupIds.SELF_MANAGEMENT)
 	@RequestMapping(
-			value = "/notification/email/{identifier}",
-			method = RequestMethod.GET,
-			consumes = MediaType.ALL_VALUE,
+			value = "/create",
+			method = RequestMethod.POST,
+			consumes = MediaType.APPLICATION_JSON_VALUE,
 			produces = MediaType.APPLICATION_JSON_VALUE
 	)
 	public
 	@ResponseBody
-	ResponseEntity<EmailConfiguration> findEmailConfigurationByIdentifier(@PathVariable("identifier") final String identifier)
-			throws ConfigurationNotFoundException {
-		return this.notificationService.findEmailConfigurationByIdentifier(identifier)
-				.map(ResponseEntity::ok)
-				.orElseThrow(() -> ServiceException.notFound("Email Gateway Configuration with identifier " + identifier + " doesn't exist."));
+	ResponseEntity<Void> createSMSConfiguration(@RequestBody @Valid final SMSConfiguration smsConfiguration) throws InterruptedException {
+		if (this.smsService.smsConfigurationExists(smsConfiguration.getIdentifier())) {
+			throw ServiceException.conflict("Configuration {0} already exists.", smsConfiguration.getIdentifier());
+		}
+		
+		this.commandGateway.process(new CreateSMSConfigurationCommand(smsConfiguration));
+		return new ResponseEntity<>(HttpStatus.CREATED);
 	}
 	
 	@Permittable(value = AcceptedTokenType.TENANT, groupId = PermittableGroupIds.SELF_MANAGEMENT)
-	@RequestMapping(
-			value = "/notification/sms/create",
-			method = RequestMethod.POST,
+	@RequestMapping(value = "/update",
+			method = RequestMethod.PUT,
 			consumes = MediaType.APPLICATION_JSON_VALUE,
 			produces = MediaType.APPLICATION_JSON_VALUE
 	)
 	public
 	@ResponseBody
-	ResponseEntity<Void> createSMSConfiguration(@RequestBody @Valid final SMSConfiguration smsConfiguration) throws InterruptedException {
-		if (this.notificationService.smsConfigurationExists(smsConfiguration.getIdentifier())) {
-			throw ServiceException.conflict("Configuration {0} already exists.", smsConfiguration.getIdentifier());
-		}
-		
-		this.commandGateway.process(new CreateSMSConfigurationCommand(smsConfiguration));
+	ResponseEntity<Void> updateSMSConfiguration(@RequestBody @Valid final SMSConfiguration smsConfiguration) {
+		this.commandGateway.process(new UpdateSMSConfigurationCommand(smsConfiguration));
 		return ResponseEntity.accepted().build();
 	}
 	
 	@Permittable(value = AcceptedTokenType.TENANT, groupId = PermittableGroupIds.SELF_MANAGEMENT)
-	@RequestMapping(
-			value = "/notification/email/create",
-			method = RequestMethod.POST,
+	@RequestMapping(value = "/delete/{identifier}",
+			method = RequestMethod.DELETE,
 			consumes = MediaType.APPLICATION_JSON_VALUE,
 			produces = MediaType.APPLICATION_JSON_VALUE
 	)
 	public
 	@ResponseBody
-	ResponseEntity<Void> createEmailConfiguration(@RequestBody @Valid final EmailConfiguration emailConfiguration) throws InterruptedException {
-		if (this.notificationService.emailConfigurationExists(emailConfiguration.getIdentifier())) {
-			throw ServiceException.conflict("Configuration {0} already exists.", emailConfiguration.getIdentifier());
-		}
-		this.commandGateway.process(new CreateEmailConfigurationCommand(emailConfiguration));
-		return ResponseEntity.accepted().build();
+	ResponseEntity<Void> deleteSMSConfiguration(@PathVariable @Valid final String identifier) {
+		this.commandGateway.process(new DeleteSMSConfigurationCommand(identifier));
+		return ResponseEntity.ok().build();
 	}
 }
diff --git a/service/src/main/resources/application.yml b/service/src/main/resources/application.yml
index fa7165e..a1d6207 100644
--- a/service/src/main/resources/application.yml
+++ b/service/src/main/resources/application.yml
@@ -82,7 +82,5 @@ async:
 flyway:
   enabled: false
 
-smssender:
-  accountSID: AC1fde2c6f26f367b93231c5fdb944c908
-  authToken: bc9a53e41745b8471e0ecafc859d86aa
-  senderNumber: +1 510-944-1898
+notification:
+  user: wadaadmin
\ No newline at end of file
diff --git a/service/src/main/resources/db/migrations/mariadb/V1__initial_setup.sql b/service/src/main/resources/db/migrations/mariadb/V1__initial_setup.sql
index 57cefe1..7f66214 100644
--- a/service/src/main/resources/db/migrations/mariadb/V1__initial_setup.sql
+++ b/service/src/main/resources/db/migrations/mariadb/V1__initial_setup.sql
@@ -21,12 +21,12 @@
 -- Table wada_sms_gateway_configurations
 -- -----------------------------------------------------
 CREATE TABLE wada_sms_gateway_configurations (
-  id INT(11) NOT NULL AUTO_INCREMENT,
+  id INT(45) NOT NULL AUTO_INCREMENT,
   identifier VARCHAR(45) NULL DEFAULT NULL,
   account_sid VARCHAR(255) NOT NULL,
   auth_token VARCHAR(255) NOT NULL,
   sender_number VARCHAR(45) NOT NULL,
-  state VARCHAR(45) NULL DEFAULT NULL,
+  state VARCHAR(20) NULL DEFAULT NULL,
   PRIMARY KEY (id));
 
 -- -----------------------------------------------------
@@ -42,7 +42,7 @@ CREATE TABLE wada_email_gateway_configurations (
   protocol VARCHAR(45)NOT NULL,
   smtp_auth VARCHAR (45)NOT NULL,
   start_tls VARCHAR (45)NOT NULL,
-  state VARCHAR(45)NOT NULL,
+  state VARCHAR(10)NOT NULL,
   PRIMARY KEY (id));
 
 -- -----------------------------------------------------
@@ -54,3 +54,17 @@ CREATE TABLE wada_templates (
   event VARCHAR(45) NULL DEFAULT NULL,
   url VARCHAR(255) NOT NULL,
   PRIMARY KEY (id));
+
+-- -----------------------------------------------------
+-- Table wada_data_source_application
+-- -----------------------------------------------------
+  CREATE TABLE wada_data_source_application (
+  id BIGINT NOT NULL AUTO_INCREMENT,
+  tenant_identifier        VARCHAR(32) NOT NULL,
+  application_identifier   VARCHAR(32) NOT NULL,
+  permittable_identifier   VARCHAR(32) NOT NULL,
+  PRIMARY KEY (id)
+);
+
+INSERT INTO wada_sms_gateway_configurations VALUES ('1', 'Twilio', 'AC1fde2c6f26f367b93231c5fdb944c908', 'bc9a53e41745b8471e0ecafc859d86aa', '+1 510-944-1898', 'ACTIVE');
+INSERT INTO wada_email_gateway_configurations VALUES ('1', 'Gmail', 'smtp.gmail.com', '587','fineractcnnotificationdemo@gmail.com', 'pnuugpwmcibipdpw', 'smtp', 'true', 'true', 'ACTIVE');
\ No newline at end of file
diff --git a/service/src/main/resources/db/migrations/mariadb/V2__sms_gateway_configurations.sql b/service/src/main/resources/db/migrations/mariadb/V2__sms_gateway_configurations.sql
deleted file mode 100644
index d795f01..0000000
--- a/service/src/main/resources/db/migrations/mariadb/V2__sms_gateway_configurations.sql
+++ /dev/null
@@ -1,20 +0,0 @@
---
--- Licensed to the Apache Software Foundation (ASF) under one
--- or more contributor license agreements.  See the NOTICE file
--- distributed with this work for additional information
--- regarding copyright ownership.  The ASF licenses this file
--- to you under the Apache License, Version 2.0 (the
--- "License"); you may not use this file except in compliance
--- with the License.  You may obtain a copy of the License at
---
---   http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing,
--- software distributed under the License is distributed on an
--- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
--- KIND, either express or implied.  See the License for the
--- specific language governing permissions and limitations
--- under the License.
---
-
-INSERT INTO wada_sms_gateway_configurations VALUES ('1', 'Twilio', 'AC1fde2c6f26f367b93231c5fdb944c908', 'c9a53e41745b8471e0ecafc859d86aa', '+1 510-944-1898', 'ACTIVE');
\ No newline at end of file
diff --git a/service/src/main/resources/db/migrations/mariadb/V3__email_gateway_configurations.sql b/service/src/main/resources/db/migrations/mariadb/V3__email_gateway_configurations.sql
deleted file mode 100644
index 9482b7c..0000000
--- a/service/src/main/resources/db/migrations/mariadb/V3__email_gateway_configurations.sql
+++ /dev/null
@@ -1,20 +0,0 @@
---
--- Licensed to the Apache Software Foundation (ASF) under one
--- or more contributor license agreements.  See the NOTICE file
--- distributed with this work for additional information
--- regarding copyright ownership.  The ASF licenses this file
--- to you under the Apache License, Version 2.0 (the
--- "License"); you may not use this file except in compliance
--- with the License.  You may obtain a copy of the License at
---
---   http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing,
--- software distributed under the License is distributed on an
--- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
--- KIND, either express or implied.  See the License for the
--- specific language governing permissions and limitations
--- under the License.
---
-
-INSERT INTO wada_email_gateway_configurations VALUES ('1', 'Gmail', 'smtp.gmail.com', '587','fineractcnnotificationdemo@gmail.com', 'pnuugpwmcibipdpw', 'smtp', 'true', 'true', 'ACTIVE');
\ No newline at end of file
diff --git a/shared.gradle b/shared.gradle
index 6b000b7..426ccf2 100644
--- a/shared.gradle
+++ b/shared.gradle
@@ -19,25 +19,27 @@ group 'org.apache.fineract.cn.notification'
 version '0.1.0-BUILD-SNAPSHOT'
 
 ext.versions = [
-        fineractcnidentity      : '0.1.0-BUILD-SNAPSHOT',
-        fineractcnoffice        : '0.1.0-BUILD-SNAPSHOT',
-        fineractcncustomer      : '0.1.0-BUILD-SNAPSHOT',
-        fineractcnaccounting    : '0.1.0-BUILD-SNAPSHOT',
-        fineractcnportfolio     : '0.1.0-BUILD-SNAPSHOT',
-        fineractcnteller        : '0.1.0-BUILD-SNAPSHOT',
-        fineractcnpayroll       : '0.1.0-BUILD-SNAPSHOT',
-        fineractcngroup         : '0.1.0-BUILD-SNAPSHOT',
-        frameworkapi            : '0.1.0-BUILD-SNAPSHOT',
-        frameworklang           : '0.1.0-BUILD-SNAPSHOT',
-        frameworkasync          : '0.1.0-BUILD-SNAPSHOT',
-        frameworkcassandra      : '0.1.0-BUILD-SNAPSHOT',
-        frameworkmariadb        : '0.1.0-BUILD-SNAPSHOT',
-        frameworkcommand        : '0.1.0-BUILD-SNAPSHOT',
-        frameworktest           : '0.1.0-BUILD-SNAPSHOT',
-        frameworkanubis         : '0.1.0-BUILD-SNAPSHOT',
-        validator               : '5.3.0.Final',
-        springjavamail          : '1.4.1.RELEASE',
-        twilioapi               : '7.17.+'
+        fineractcnidentity              : '0.1.0-BUILD-SNAPSHOT',
+        fineractcnoffice                : '0.1.0-BUILD-SNAPSHOT',
+        fineractcncustomer              : '0.1.0-BUILD-SNAPSHOT',
+        fineractcnaccounting            : '0.1.0-BUILD-SNAPSHOT',
+        fineractcnportfolio             : '0.1.0-BUILD-SNAPSHOT',
+        fineractcnteller                : '0.1.0-BUILD-SNAPSHOT',
+        fineractcnpayroll               : '0.1.0-BUILD-SNAPSHOT',
+        fineractcngroup                 : '0.1.0-BUILD-SNAPSHOT',
+        frameworkapi                    : '0.1.0-BUILD-SNAPSHOT',
+        frameworklang                   : '0.1.0-BUILD-SNAPSHOT',
+        frameworkasync                  : '0.1.0-BUILD-SNAPSHOT',
+        frameworkcassandra              : '0.1.0-BUILD-SNAPSHOT',
+        frameworkmariadb                : '0.1.0-BUILD-SNAPSHOT',
+        frameworkcommand                : '0.1.0-BUILD-SNAPSHOT',
+        frameworktest                   : '0.1.0-BUILD-SNAPSHOT',
+        frameworkanubis                 : '0.1.0-BUILD-SNAPSHOT',
+        frameworkpermittedfeignclient   : '0.1.0-BUILD-SNAPSHOT',
+        validator                       : '5.3.0.Final',
+        springjavamail                  : '1.4.1.RELEASE',
+        twilioapi                       : '7.17.+',
+        junit                           : '4.12'
 ]
 
 apply plugin: 'java'


[fineract-cn-notifications] 23/36: Changed Notification Admin to OrgAdmin

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

awasum pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-notifications.git

commit 184aea0f5afe0a4c80e217b3fac53cf2e827000d
Author: Ebenezer Graham <eg...@alustudent.com>
AuthorDate: Thu May 9 07:54:23 2019 +0400

    Changed Notification Admin to OrgAdmin
---
 .gitignore                                         |   8 +-
 .../cn/notification/EmailApiDocumentation.java     |  81 +++++-
 .../notification/NotificationApiDocumentation.java | 289 ---------------------
 .../cn/notification/SmsApiDocumentation.java       |  94 +++++--
 .../TestApplicationAuthentication.java             |  48 ----
 .../fineract/cn/notification/TestEmailService.java |   2 +-
 .../fineract/cn/notification/TestSMSService.java   |   2 +-
 .../apache/fineract/cn/notification/TestSuite.java |   4 +-
 .../internal/config/NotificationProperties.java    |   9 +
 .../identity/NotificationAuthentication.java       |  23 +-
 .../internal/service/NotificationService.java      |   5 +-
 service/src/main/resources/application.yml         |   3 +-
 .../db/migrations/mariadb/V1__initial_setup.sql    |   4 +-
 13 files changed, 188 insertions(+), 384 deletions(-)

diff --git a/.gitignore b/.gitignore
index 3349144..f295929 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,12 +2,8 @@
 .idea
 build/
 target/
-api/out/
-api/build/
-service/out/
-service/build/
-component-test/out/
-component-test/build/
+**/out/
+**/build/
 
 # Ignore Gradle GUI config
 gradle-app.setting
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/EmailApiDocumentation.java b/component-test/src/main/java/org/apache/fineract/cn/notification/EmailApiDocumentation.java
index 1632f0c..3aa0e48 100644
--- a/component-test/src/main/java/org/apache/fineract/cn/notification/EmailApiDocumentation.java
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/EmailApiDocumentation.java
@@ -37,10 +37,9 @@ import org.springframework.web.context.WebApplicationContext;
 
 import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document;
 import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.documentationConfiguration;
-import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.get;
-import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.post;
-import static org.springframework.restdocs.operation.preprocess.Preprocessors.preprocessRequest;
-import static org.springframework.restdocs.operation.preprocess.Preprocessors.prettyPrint;
+import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.*;
+import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.delete;
+import static org.springframework.restdocs.operation.preprocess.Preprocessors.*;
 import static org.springframework.restdocs.payload.PayloadDocumentation.*;
 import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
 
@@ -50,8 +49,9 @@ public class EmailApiDocumentation extends AbstractNotificationTest {
 
   @Autowired
   private WebApplicationContext context;
-
-  private MockMvc mockMvc;
+	private Gson gson = new Gson();
+	
+	private MockMvc mockMvc;
 
   @Autowired
   private NotificationManager notificationManager;
@@ -71,12 +71,11 @@ public class EmailApiDocumentation extends AbstractNotificationTest {
   public void documentCreateEmailConfiguration() throws Exception {
     final EmailConfiguration emailConfiguration = DomainObjectGenerator.emailConfiguration();
 
-    Gson gson = new Gson();
-    this.mockMvc.perform(post("/notification/email/create")
+    this.mockMvc.perform(post("/configuration/email/create")
             .accept(MediaType.APPLICATION_JSON_VALUE)
             .contentType(MediaType.APPLICATION_JSON_VALUE)
             .content(gson.toJson(emailConfiguration)))
-            .andExpect(status().isAccepted())
+            .andExpect(status().isCreated())
             .andDo(document("document-create-emailconfiguration", preprocessRequest(prettyPrint()),
                     requestFields(
                             fieldWithPath("identifier").description("EmailConfiguration's identifier"),
@@ -107,7 +106,7 @@ public class EmailApiDocumentation extends AbstractNotificationTest {
     this.notificationManager.createEmailConfiguration(emailConfiguration);
     eventRecorder.wait(NotificationEventConstants.POST_EMAIL_CONFIGURATION, EmailConfiguration.class);
 
-    this.mockMvc.perform(get("/notification/email/" + emailConfiguration.getIdentifier())
+    this.mockMvc.perform(get("/configuration/email/" + emailConfiguration.getIdentifier())
             .accept(MediaType.ALL_VALUE)
             .contentType(MediaType.APPLICATION_JSON_VALUE))
             .andExpect(status().isOk())
@@ -125,4 +124,66 @@ public class EmailApiDocumentation extends AbstractNotificationTest {
                     )
             ));
   }
+  
+  @Test
+  public void documentUpdateEmailConfiguration() throws Exception {
+    
+    final EmailConfiguration randomEmailConfiguration = DomainObjectGenerator.emailConfiguration();
+    final EmailConfiguration newRandomConfiguration = DomainObjectGenerator.emailConfiguration();
+    
+    this.notificationManager.createEmailConfiguration(randomEmailConfiguration);
+    
+    super.eventRecorder.wait(NotificationEventConstants.POST_EMAIL_CONFIGURATION, randomEmailConfiguration.getIdentifier());
+    
+    newRandomConfiguration.setIdentifier(randomEmailConfiguration.getIdentifier());
+    newRandomConfiguration.setHost("new.host.com");
+    newRandomConfiguration.setApp_password("changePassword");
+    newRandomConfiguration.setPort("554");
+    newRandomConfiguration.setProtocol("pop3");
+    newRandomConfiguration.setUsername("newaddress@example.com");
+    newRandomConfiguration.setSmtp_auth("false");
+    newRandomConfiguration.setStart_tls("false");
+    newRandomConfiguration.setState("ACTIVE");
+    
+    notificationManager.updateEmailConfiguration(newRandomConfiguration);
+    
+    super.eventRecorder.wait(NotificationEventConstants.UPDATE_EMAIL_CONFIGURATION, newRandomConfiguration.getIdentifier());
+    
+    this.mockMvc.perform(put("/configuration/sms/update")
+        .accept(MediaType.APPLICATION_JSON_VALUE)
+        .contentType(MediaType.APPLICATION_JSON_VALUE)
+        .content(gson.toJson(newRandomConfiguration)))
+        .andExpect(status().isAccepted())
+        .andDo(document("document-update-email-configuration", preprocessRequest(prettyPrint()),
+            requestFields(
+                fieldWithPath("identifier").description("Configuration Id for Email Server"),
+                fieldWithPath("host").description("Email Server host address"),
+                fieldWithPath("port").description("Email Server port number"),
+                fieldWithPath("protocol").description("Type of protocol in use " +
+                    "\nSMTP" +
+                    "\nPOP3" +
+                    "\nIMAP"),
+                fieldWithPath("username").description("Email address"),
+                fieldWithPath("app_password").description("Email app password or normal password"),
+                fieldWithPath("smtp_auth").description("Enable SMTP"),
+                fieldWithPath("start_tls").description("Enable TLS"),
+                fieldWithPath("state").description("" +
+                    "\n ACTIVE for Gateway to be used" +
+                    "\n DEACTIVATED for inactive gateways")
+            )));
+  }
+  
+  @Test
+  public void documentDeleteEmailConfiguration() throws Exception {
+    final EmailConfiguration randomConfiguration = DomainObjectGenerator.emailConfiguration();
+    
+    notificationManager.createEmailConfiguration(randomConfiguration);
+    super.eventRecorder.wait(NotificationEventConstants.DELETE_EMAIL_CONFIGURATION, randomConfiguration.getIdentifier());
+    
+    this.mockMvc.perform(delete("/configuration/email/delete/" + randomConfiguration.getIdentifier())
+        .accept(MediaType.APPLICATION_JSON_VALUE)
+        .contentType(MediaType.APPLICATION_JSON_VALUE))
+        .andExpect(status().isOk())
+        .andDo(document("document-delete-email-configuration", preprocessResponse(prettyPrint())));
+  }
 }
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/NotificationApiDocumentation.java b/component-test/src/main/java/org/apache/fineract/cn/notification/NotificationApiDocumentation.java
deleted file mode 100644
index 2473159..0000000
--- a/component-test/src/main/java/org/apache/fineract/cn/notification/NotificationApiDocumentation.java
+++ /dev/null
@@ -1,289 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.fineract.cn.notification;
-
-import com.google.gson.Gson;
-import org.apache.fineract.cn.notification.api.v1.client.NotificationManager;
-import org.apache.fineract.cn.notification.api.v1.domain.EmailConfiguration;
-import org.apache.fineract.cn.notification.api.v1.domain.SMSConfiguration;
-import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
-import org.apache.fineract.cn.notification.util.DomainObjectGenerator;
-import org.junit.*;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.MediaType;
-import org.springframework.restdocs.JUnitRestDocumentation;
-import org.springframework.test.web.servlet.MockMvc;
-import org.springframework.test.web.servlet.setup.MockMvcBuilders;
-import org.springframework.web.context.WebApplicationContext;
-
-import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.*;
-import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.*;
-import static org.springframework.restdocs.operation.preprocess.Preprocessors.*;
-import static org.springframework.restdocs.payload.PayloadDocumentation.*;
-import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
-
-@SuppressWarnings("Unused")
-public class NotificationApiDocumentation extends TestNotification {
-	
-	@Rule
-	public final JUnitRestDocumentation restDocumentation = new JUnitRestDocumentation("build/doc/generated-snippets/test-notification");
-	
-	private final Gson serialize = new Gson();
-	private MockMvc mockMvc;
-	
-	@Autowired
-	NotificationManager notificationManager;
-	@Autowired
-	private WebApplicationContext context;
-	
-	public NotificationApiDocumentation() {
-		super();
-	}
-	
-	@Before
-	public void setUp() {
-		this.mockMvc = MockMvcBuilders.webAppContextSetup(this.context)
-				.apply(documentationConfiguration(this.restDocumentation))
-				.alwaysDo(document("{method-name}", preprocessRequest(prettyPrint()), preprocessResponse(prettyPrint())))
-				.build();
-	}
-	
-	@Test
-	public void documentCreateSMSConfiguration() throws Exception {
-		final SMSConfiguration randomSMSConfiguration = DomainObjectGenerator.smsConfiguration();
-		
-		this.mockMvc.perform(post("/configuration/sms/create")
-				.accept(MediaType.APPLICATION_JSON_VALUE)
-				.contentType(MediaType.APPLICATION_JSON_VALUE)
-				.content(serialize.toJson(randomSMSConfiguration)))
-				.andExpect(status().isCreated())
-				.andDo(document("document-create-sms-configuration", preprocessRequest(prettyPrint()),
-						requestFields(
-								fieldWithPath("identifier").description("Configuration Id for SMS Gateway"),
-								fieldWithPath("auth_token").description("SMS API authentication token"),
-								fieldWithPath("account_sid").description("SMS API account SID"),
-								fieldWithPath("sender_number").description("SMS API sender number"),
-								fieldWithPath("state").description("The state of the Gateway" +
-										"\n ACTIVE for Gateway to be used" +
-										"\n DEACTIVATED for inactive gateways")
-						)));
-	}
-	
-	@Test
-	public void documentCreateEmailConfiguration() throws Exception {
-		final EmailConfiguration randomEmailConfiguration = DomainObjectGenerator.emailConfiguration();
-		
-		this.mockMvc.perform(post("/configuration/email/create")
-				.accept(MediaType.APPLICATION_JSON_VALUE)
-				.contentType(MediaType.APPLICATION_JSON_VALUE)
-				.content(serialize.toJson(randomEmailConfiguration)))
-				.andExpect(status().isCreated())
-				.andDo(document("document-create-email-configuration", preprocessRequest(prettyPrint()),
-						requestFields(
-								fieldWithPath("identifier").description("Configuration Id for Email Server"),
-								fieldWithPath("host").description("Email Server host address"),
-								fieldWithPath("port").description("Email Server port number"),
-								fieldWithPath("protocol").description("Type of protocol in use " +
-										"\nSMTP" +
-										"\nPOP3" +
-										"\nIMAP"),
-								fieldWithPath("username").description("Email address"),
-								fieldWithPath("app_password").description("Email app password or normal password"),
-								fieldWithPath("smtp_auth").description("Enable SMTP"),
-								fieldWithPath("start_tls").description("Enable TLS"),
-								fieldWithPath("state").description("" +
-										"\n ACTIVE for Gateway to be used" +
-										"\n DEACTIVATED for inactive gateways")
-						)));
-	}
-	
-	@Test
-	public void documentFindSMSConfiguration() throws Exception {
-		final SMSConfiguration randomSMSConfiguration = DomainObjectGenerator.smsConfiguration();
-		
-		this.notificationManager.createSMSConfiguration(randomSMSConfiguration);
-		
-		super.eventRecorder.wait(NotificationEventConstants.POST_SMS_CONFIGURATION, randomSMSConfiguration.getIdentifier());
-		
-		notificationManager.findSMSConfigurationByIdentifier(randomSMSConfiguration.getIdentifier());
-		
-		this.mockMvc.perform(get("/configuration/sms/" + randomSMSConfiguration.getIdentifier())
-				.accept(MediaType.APPLICATION_JSON_VALUE)
-				.contentType(MediaType.APPLICATION_JSON_VALUE)
-				.content(serialize.toJson(randomSMSConfiguration.getIdentifier())))
-				.andExpect(status().isOk())
-				.andDo(document("document-find-sms-configuration", preprocessRequest(prettyPrint()),
-						responseFields(
-								fieldWithPath("identifier").description("Configuration Id for SMS Gateway"),
-								fieldWithPath("auth_token").description("SMS API authentication token"),
-								fieldWithPath("account_sid").description("SMS API account SID"),
-								fieldWithPath("sender_number").description("SMS API sender number"),
-								fieldWithPath("type").description("Type of Configuration"),
-								fieldWithPath("state").description("The state of the Gateway" +
-										"\n ACTIVE for Gateway to be used" +
-										"\n DEACTIVATED for inactive gateways")
-						)));
-	}
-	
-	@Test
-	public void documentFindEmailConfiguration() throws Exception {
-		final EmailConfiguration randomEmailConfiguration = DomainObjectGenerator.emailConfiguration();
-		
-		this.notificationManager.createEmailConfiguration(randomEmailConfiguration);
-		
-		super.eventRecorder.wait(NotificationEventConstants.POST_EMAIL_CONFIGURATION, randomEmailConfiguration.getIdentifier());
-		
-		this.notificationManager.findEmailConfigurationByIdentifier(randomEmailConfiguration.getIdentifier());
-		
-		this.mockMvc.perform(get("/configuration/email/" + randomEmailConfiguration.getIdentifier())
-				.accept(MediaType.APPLICATION_JSON_VALUE)
-				.contentType(MediaType.APPLICATION_JSON_VALUE)
-				.content(serialize.toJson(randomEmailConfiguration.getIdentifier())))
-				.andExpect(status().isOk())
-				.andDo(document("document-find-email-configuration", preprocessRequest(prettyPrint()),
-						responseFields(
-								fieldWithPath("identifier").description("Configuration Id for Email Server"),
-								fieldWithPath("host").description("Email Server host address"),
-								fieldWithPath("port").description("Email Server port number"),
-								fieldWithPath("protocol").description("Type of protocol being used by server " +
-										"\nSMTP" +
-										"\nPOP3" +
-										"\nIMAP"),
-								fieldWithPath("username").description("Email address"),
-								fieldWithPath("app_password").description("Email app password or normal password"),
-								fieldWithPath("smtp_auth").description("Enable SMTP"),
-								fieldWithPath("start_tls").description("Enable TLS"),
-								fieldWithPath("state").description("" +
-										"\n ACTIVE for Gateway to be used" +
-										"\n DEACTIVATED for inactive gateways")
-						)));
-	}
-	
-	@Test
-	public void documentUpdateEmailConfiguration() throws Exception {
-		
-		final EmailConfiguration randomEmailConfiguration = DomainObjectGenerator.emailConfiguration();
-		final EmailConfiguration newRandomConfiguration = DomainObjectGenerator.emailConfiguration();
-		
-		this.notificationManager.createEmailConfiguration(randomEmailConfiguration);
-		
-		super.eventRecorder.wait(NotificationEventConstants.POST_EMAIL_CONFIGURATION, randomEmailConfiguration.getIdentifier());
-		
-		newRandomConfiguration.setIdentifier(randomEmailConfiguration.getIdentifier());
-		newRandomConfiguration.setHost("new.host.com");
-		newRandomConfiguration.setApp_password("changePassword");
-		newRandomConfiguration.setPort("554");
-		newRandomConfiguration.setProtocol("pop3");
-		newRandomConfiguration.setUsername("newaddress@example.com");
-		newRandomConfiguration.setSmtp_auth("false");
-		newRandomConfiguration.setStart_tls("false");
-		newRandomConfiguration.setState("ACTIVE");
-		
-		notificationManager.updateEmailConfiguration(newRandomConfiguration);
-		
-		super.eventRecorder.wait(NotificationEventConstants.UPDATE_EMAIL_CONFIGURATION, newRandomConfiguration.getIdentifier());
-		
-		this.mockMvc.perform(put("/configuration/sms/update")
-				.accept(MediaType.APPLICATION_JSON_VALUE)
-				.contentType(MediaType.APPLICATION_JSON_VALUE)
-				.content(serialize.toJson(newRandomConfiguration)))
-				.andExpect(status().isAccepted())
-				.andDo(document("document-update-email-configuration", preprocessRequest(prettyPrint()),
-						requestFields(
-								fieldWithPath("identifier").description("Configuration Id for Email Server"),
-								fieldWithPath("host").description("Email Server host address"),
-								fieldWithPath("port").description("Email Server port number"),
-								fieldWithPath("protocol").description("Type of protocol in use " +
-										"\nSMTP" +
-										"\nPOP3" +
-										"\nIMAP"),
-								fieldWithPath("username").description("Email address"),
-								fieldWithPath("app_password").description("Email app password or normal password"),
-								fieldWithPath("smtp_auth").description("Enable SMTP"),
-								fieldWithPath("start_tls").description("Enable TLS"),
-								fieldWithPath("state").description("" +
-										"\n ACTIVE for Gateway to be used" +
-										"\n DEACTIVATED for inactive gateways")
-						)));
-	}
-	
-	@Test
-	public void documentUpdateSMSConfiguration() throws Exception {
-		final SMSConfiguration newRandomConfiguration = DomainObjectGenerator.smsConfiguration();
-		final SMSConfiguration randomSMSConfiguration = DomainObjectGenerator.smsConfiguration();
-		
-		this.notificationManager.createSMSConfiguration(randomSMSConfiguration);
-		
-		super.eventRecorder.wait(NotificationEventConstants.POST_SMS_CONFIGURATION, randomSMSConfiguration.getIdentifier());
-		
-		newRandomConfiguration.setIdentifier(randomSMSConfiguration.getIdentifier());
-		newRandomConfiguration.setSender_number("new.host.com");
-		newRandomConfiguration.setState("ACTIVE");
-		newRandomConfiguration.setAccount_sid("asdLAKSKFssdfasdf554");
-		newRandomConfiguration.setAuth_token("aalkeifjlasdfalje333");
-		
-		notificationManager.updateSMSConfiguration(randomSMSConfiguration);
-		
-		this.mockMvc.perform(put("/configuration/sms/update")
-				.accept(MediaType.APPLICATION_JSON_VALUE)
-				.contentType(MediaType.APPLICATION_JSON_VALUE)
-				.content(serialize.toJson(randomSMSConfiguration)))
-				.andExpect(status().isAccepted())
-				.andDo(document("document-update-sms-configuration", preprocessRequest(prettyPrint()),
-						requestFields(
-								fieldWithPath("identifier").description("Configuration Id for SMS Gateway"),
-								fieldWithPath("auth_token").description("SMS API authentication token"),
-								fieldWithPath("account_sid").description("SMS API account SID"),
-								fieldWithPath("sender_number").description("SMS API sender number"),
-								fieldWithPath("state").description("The state of the Gateway" +
-										"\n ACTIVE for Gateway to be used" +
-										"\n DEACTIVATED for inactive gateways")
-						)));
-	}
-	
-	@Test
-	public void documentDeleteSMSConfiguration() throws Exception {
-		final SMSConfiguration randomSMSConfiguration = DomainObjectGenerator.smsConfiguration();
-		
-		this.notificationManager.createSMSConfiguration(randomSMSConfiguration);
-		
-		super.eventRecorder.wait(NotificationEventConstants.POST_SMS_CONFIGURATION, randomSMSConfiguration.getIdentifier());
-		
-		System.out.println(randomSMSConfiguration.getIdentifier());
-		this.mockMvc.perform(delete("/configuration/sms/delete/" + randomSMSConfiguration.getIdentifier())
-				.accept(MediaType.APPLICATION_JSON_VALUE)
-				.contentType(MediaType.APPLICATION_JSON_VALUE))
-				.andExpect(status().isOk())
-				.andDo(document("document-delete-sms-configuration", preprocessRequest(prettyPrint())));
-	}
-	
-	@Test
-	public void documentDeleteEmailConfiguration() throws Exception {
-		final EmailConfiguration randomConfiguration = DomainObjectGenerator.emailConfiguration();
-		
-		notificationManager.createEmailConfiguration(randomConfiguration);
-		super.eventRecorder.wait(NotificationEventConstants.DELETE_EMAIL_CONFIGURATION, randomConfiguration.getIdentifier());
-		
-		this.mockMvc.perform(delete("/configuration/email/delete/" + randomConfiguration.getIdentifier())
-				.accept(MediaType.APPLICATION_JSON_VALUE)
-				.contentType(MediaType.APPLICATION_JSON_VALUE))
-				.andExpect(status().isOk())
-				.andDo(document("document-delete-email-configuration", preprocessResponse(prettyPrint())));
-	}
-}
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/SmsApiDocumentation.java b/component-test/src/main/java/org/apache/fineract/cn/notification/SmsApiDocumentation.java
index 1655289..7566309 100644
--- a/component-test/src/main/java/org/apache/fineract/cn/notification/SmsApiDocumentation.java
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/SmsApiDocumentation.java
@@ -37,8 +37,8 @@ import org.springframework.web.context.WebApplicationContext;
 
 import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document;
 import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.documentationConfiguration;
-import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.post;
-import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.get;
+import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.*;
+import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.delete;
 import static org.springframework.restdocs.operation.preprocess.Preprocessors.preprocessRequest;
 import static org.springframework.restdocs.operation.preprocess.Preprocessors.prettyPrint;
 import static org.springframework.restdocs.payload.PayloadDocumentation.*;
@@ -50,7 +50,9 @@ public class SmsApiDocumentation extends AbstractNotificationTest {
 
   @Autowired
   private WebApplicationContext context;
-
+  private Gson gson = new Gson();
+  
+  
   private MockMvc mockMvc;
 
   @Autowired
@@ -69,23 +71,23 @@ public class SmsApiDocumentation extends AbstractNotificationTest {
 
   @Test
   public void documentCreateSMSConfiguration() throws Exception {
-    final SMSConfiguration smsConfiguration = DomainObjectGenerator.smsConfiguration();
-
-    Gson gson = new Gson();
-    this.mockMvc.perform(post("/notification/sms/create")
-            .accept(MediaType.APPLICATION_JSON_VALUE)
-            .contentType(MediaType.APPLICATION_JSON_VALUE)
-            .content(gson.toJson(smsConfiguration)))
-            .andExpect(status().isAccepted())
-            .andDo(document("document-create-smsconfiguration", preprocessRequest(prettyPrint()),
-                    requestFields(
-                            fieldWithPath("identifier").description("SMSConfiguration's identifier"),
-                            fieldWithPath("auth_token").description("SMSConfiguration's auth_token"),
-                            fieldWithPath("account_sid").description("SMSConfiguration's account_sid"),
-                            fieldWithPath("sender_number").description("Sender's number"),
-                            fieldWithPath("state").description("SMSConfiguration's state")
-                    )
-            ));
+    final SMSConfiguration randomSMSConfiguration = DomainObjectGenerator.smsConfiguration();
+  
+    this.mockMvc.perform(post("/configuration/sms/create")
+        .accept(MediaType.APPLICATION_JSON_VALUE)
+        .contentType(MediaType.APPLICATION_JSON_VALUE)
+        .content(gson.toJson(randomSMSConfiguration)))
+        .andExpect(status().isCreated())
+        .andDo(document("document-create-sms-configuration", preprocessRequest(prettyPrint()),
+            requestFields(
+                fieldWithPath("identifier").description("Configuration Id for SMS Gateway"),
+                fieldWithPath("auth_token").description("SMS API authentication token"),
+                fieldWithPath("account_sid").description("SMS API account SID"),
+                fieldWithPath("sender_number").description("SMS API sender number"),
+                fieldWithPath("state").description("The state of the Gateway" +
+                    "\n ACTIVE for Gateway to be used" +
+                    "\n DEACTIVATED for inactive gateways")
+            )));
   }
 
   @Test
@@ -100,7 +102,7 @@ public class SmsApiDocumentation extends AbstractNotificationTest {
     this.notificationManager.createSMSConfiguration(smsConfiguration);
     this.eventRecorder.wait(NotificationEventConstants.POST_SMS_CONFIGURATION, SMSConfiguration.class);
 
-    this.mockMvc.perform(get("/notification/sms/" + smsConfiguration.getIdentifier())
+    this.mockMvc.perform(get("/configuration/sms/" + smsConfiguration.getIdentifier())
             .accept(MediaType.ALL_VALUE)
             .contentType(MediaType.APPLICATION_JSON_VALUE))
             .andExpect(status().isOk())
@@ -115,4 +117,54 @@ public class SmsApiDocumentation extends AbstractNotificationTest {
                     )
             ));
   }
+  
+  @Test
+  public void documentUpdateSMSConfiguration() throws Exception {
+    final SMSConfiguration newRandomConfiguration = DomainObjectGenerator.smsConfiguration();
+    final SMSConfiguration randomSMSConfiguration = DomainObjectGenerator.smsConfiguration();
+    
+    this.notificationManager.createSMSConfiguration(randomSMSConfiguration);
+    
+    super.eventRecorder.wait(NotificationEventConstants.POST_SMS_CONFIGURATION, randomSMSConfiguration.getIdentifier());
+    
+    newRandomConfiguration.setIdentifier(randomSMSConfiguration.getIdentifier());
+    newRandomConfiguration.setSender_number("new.host.com");
+    newRandomConfiguration.setState("ACTIVE");
+    newRandomConfiguration.setAccount_sid("asdLAKSKFssdfasdf554");
+    newRandomConfiguration.setAuth_token("aalkeifjlasdfalje333");
+    
+    notificationManager.updateSMSConfiguration(randomSMSConfiguration);
+    
+    this.mockMvc.perform(put("/configuration/sms/update")
+        .accept(MediaType.APPLICATION_JSON_VALUE)
+        .contentType(MediaType.APPLICATION_JSON_VALUE)
+        .content(gson.toJson(randomSMSConfiguration)))
+        .andExpect(status().isAccepted())
+        .andDo(document("document-update-sms-configuration", preprocessRequest(prettyPrint()),
+            requestFields(
+                fieldWithPath("identifier").description("Configuration Id for SMS Gateway"),
+                fieldWithPath("auth_token").description("SMS API authentication token"),
+                fieldWithPath("account_sid").description("SMS API account SID"),
+                fieldWithPath("sender_number").description("SMS API sender number"),
+                fieldWithPath("state").description("The state of the Gateway" +
+                    "\n ACTIVE for Gateway to be used" +
+                    "\n DEACTIVATED for inactive gateways")
+            )));
+  }
+  
+  @Test
+  public void documentDeleteSMSConfiguration() throws Exception {
+    final SMSConfiguration randomSMSConfiguration = DomainObjectGenerator.smsConfiguration();
+    
+    this.notificationManager.createSMSConfiguration(randomSMSConfiguration);
+    
+    super.eventRecorder.wait(NotificationEventConstants.POST_SMS_CONFIGURATION, randomSMSConfiguration.getIdentifier());
+    
+    System.out.println(randomSMSConfiguration.getIdentifier());
+    this.mockMvc.perform(delete("/configuration/sms/delete/" + randomSMSConfiguration.getIdentifier())
+        .accept(MediaType.APPLICATION_JSON_VALUE)
+        .contentType(MediaType.APPLICATION_JSON_VALUE))
+        .andExpect(status().isOk())
+        .andDo(document("document-delete-sms-configuration", preprocessRequest(prettyPrint())));
+  }
 }
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/TestApplicationAuthentication.java b/component-test/src/main/java/org/apache/fineract/cn/notification/TestApplicationAuthentication.java
deleted file mode 100644
index 49479be..0000000
--- a/component-test/src/main/java/org/apache/fineract/cn/notification/TestApplicationAuthentication.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.fineract.cn.notification;
-
-import org.apache.fineract.cn.notification.api.v1.client.NotificationManager;
-import org.apache.fineract.cn.notification.service.internal.identity.NotificationAuthentication;
-import org.apache.fineract.cn.test.listener.EventRecorder;
-import org.junit.Assert;
-import org.junit.Test;
-import org.springframework.beans.factory.annotation.Autowired;
-
-import java.util.Optional;
-
-public class TestApplicationAuthentication extends TestNotification {
-	
-	private final String applicationIdentifier = "customer-v1";
-	
-	@Autowired
-	NotificationAuthentication notificationAuthenticationMock;
-	
-	
-	public TestApplicationAuthentication() {
-		super();
-	}
-	
-	@Test
-	public void createApplicationPermissionForCustomerService() {
-		//Todo : look at it later
-		//Assert.assertFalse(this.notificationAuthenticationMock.authenticateWithCustomerService(super.tenantDataStoreContext.getTenantName()));
-	}
-	
-}
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/TestEmailService.java b/component-test/src/main/java/org/apache/fineract/cn/notification/TestEmailService.java
index 65adbc6..6808678 100644
--- a/component-test/src/main/java/org/apache/fineract/cn/notification/TestEmailService.java
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/TestEmailService.java
@@ -51,7 +51,7 @@ public class TestEmailService extends AbstractNotificationTest {
 	
 	
 	@Test
-	public void sendEmail() throws InterruptedException {
+	public void shouldSendAnEmail() throws InterruptedException {
 		this.logger.info("Send Email Notification");
 		String messageHash = notificationService.sendEmail("fineractcnnotificationdemo@gmail.com",
 				"egraham15@alustudent.com",
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/TestSMSService.java b/component-test/src/main/java/org/apache/fineract/cn/notification/TestSMSService.java
index 315c79b..37ab85f 100644
--- a/component-test/src/main/java/org/apache/fineract/cn/notification/TestSMSService.java
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/TestSMSService.java
@@ -85,7 +85,7 @@ public class TestSMSService extends AbstractNotificationTest {
 	}
 	
 	@Test
-	public void sendSMS() {
+	public void shouldSendAnSMS() {
 		this.logger.info("Send SMS Notification");
 		String messageHash = this.notificationService.sendSMS("+23058409206",
 				"Dear Valued Customer\n\nTalk is cheap show me the code\n\nBest Regards\nYour MFI");
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/TestSuite.java b/component-test/src/main/java/org/apache/fineract/cn/notification/TestSuite.java
index af10e31..ad4208a 100644
--- a/component-test/src/main/java/org/apache/fineract/cn/notification/TestSuite.java
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/TestSuite.java
@@ -25,8 +25,8 @@ import org.junit.runners.Suite;
 @Suite.SuiteClasses({
 		TestEmailService.class,
 		TestSMSService.class,
-		TestApplicationAuthentication.class,
-		NotificationApiDocumentation.class
+		EmailApiDocumentation.class,
+		SmsApiDocumentation.class,
 })
 public class TestSuite extends SuiteTestEnvironment {
 }
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/config/NotificationProperties.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/config/NotificationProperties.java
index a24b62c..93e31ba 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/config/NotificationProperties.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/config/NotificationProperties.java
@@ -46,6 +46,7 @@ import org.springframework.stereotype.Component;
 public class NotificationProperties {
 	
 	private String user;
+	private String password;
 	
 	public NotificationProperties() {
 	}
@@ -57,4 +58,12 @@ public class NotificationProperties {
 	public void setUser(String user) {
 		this.user = user;
 	}
+	
+	public String getPassword() {
+		return password;
+	}
+	
+	public void setPassword(String password) {
+		this.password = password;
+	}
 }
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/identity/NotificationAuthentication.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/identity/NotificationAuthentication.java
index d38ba3f..b3c357b 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/identity/NotificationAuthentication.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/identity/NotificationAuthentication.java
@@ -20,8 +20,14 @@ package org.apache.fineract.cn.notification.service.internal.identity;
 
 import org.apache.fineract.cn.api.context.AutoUserContext;
 import org.apache.fineract.cn.api.util.InvalidTokenException;
+import org.apache.fineract.cn.api.util.UserContextHolder;
+import org.apache.fineract.cn.customer.api.v1.client.CustomerManager;
+import org.apache.fineract.cn.customer.api.v1.client.CustomerNotFoundException;
 import org.apache.fineract.cn.customer.api.v1.domain.Customer;
+import org.apache.fineract.cn.identity.api.v1.client.IdentityManager;
+import org.apache.fineract.cn.identity.api.v1.domain.Authentication;
 import org.apache.fineract.cn.lang.AutoTenantContext;
+import org.apache.fineract.cn.lang.TenantContextHolder;
 import org.apache.fineract.cn.notification.service.ServiceConstants;
 import org.apache.fineract.cn.notification.service.internal.config.NotificationProperties;
 import org.apache.fineract.cn.permittedfeignclient.service.ApplicationAccessTokenService;
@@ -29,6 +35,7 @@ import org.slf4j.Logger;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.stereotype.Component;
+import org.springframework.util.Base64Utils;
 
 import java.util.Optional;
 
@@ -38,16 +45,20 @@ public class NotificationAuthentication {
 	private Logger logger;
 	private CustomerPermittedClient customerPermittedClient;
 	private NotificationProperties notificationProperties;
+	private IdentityManager identityManager;
+	
 	
 	@Autowired
 	public NotificationAuthentication(final NotificationProperties notificationPropertities,
-	                                  final CustomerPermittedClient customerPermittedClient,
+	                                  final IdentityManager identityManager,
+			                              final CustomerPermittedClient customerPermittedClient,
 	                                  @SuppressWarnings("SpringJavaAutowiringInspection")final ApplicationAccessTokenService applicationAccessTokenService,
 	                                  @Qualifier(ServiceConstants.LOGGER_NAME) final Logger logger) {
 		this.logger = logger;
 		this.customerPermittedClient = customerPermittedClient;
 		this.notificationProperties = notificationPropertities;
 		this.applicationAccessTokenService = applicationAccessTokenService;
+		this.identityManager = identityManager;
 	}
 	
 	public Optional<Customer> getCustomer(String tenantIdentifier, String customerId) {
@@ -65,4 +76,14 @@ public class NotificationAuthentication {
 				return Optional.empty();
 			}
 	}
+	
+	public void authenticate(String tenant) {
+		TenantContextHolder.clear();
+		TenantContextHolder.setIdentifier(tenant);
+		
+		final Authentication authentication =
+				this.identityManager.login(notificationProperties.getUser(), Base64Utils.encodeToString(notificationProperties.getPassword().getBytes()));
+		UserContextHolder.clear();
+		UserContextHolder.setAccessToken(notificationProperties.getUser(), authentication.getAccessToken());
+	}
 }
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/NotificationService.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/NotificationService.java
index 783adc8..02b3621 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/NotificationService.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/NotificationService.java
@@ -60,8 +60,9 @@ public class NotificationService {
 	}
 	
 	public Optional<Customer> findCustomer(final String customerIdentifier, String tenant) {
-		return notificationAuthentication.getCustomer(tenant,customerIdentifier);
-		//return Optional.of(this.customerPermittedClient.findCustomer(customerIdentifier));
+		notificationAuthentication.authenticate(tenant);
+		//return notificationAuthentication.getCustomer(tenant,customerIdentifier);
+		return customerService.findCustomer(customerIdentifier);
 	}
 	
 	//SMS Related Operations
diff --git a/service/src/main/resources/application.yml b/service/src/main/resources/application.yml
index a1d6207..d1c0460 100644
--- a/service/src/main/resources/application.yml
+++ b/service/src/main/resources/application.yml
@@ -83,4 +83,5 @@ flyway:
   enabled: false
 
 notification:
-  user: wadaadmin
\ No newline at end of file
+  user: operator
+  password: init1@l
diff --git a/service/src/main/resources/db/migrations/mariadb/V1__initial_setup.sql b/service/src/main/resources/db/migrations/mariadb/V1__initial_setup.sql
index 7f66214..9e1aba3 100644
--- a/service/src/main/resources/db/migrations/mariadb/V1__initial_setup.sql
+++ b/service/src/main/resources/db/migrations/mariadb/V1__initial_setup.sql
@@ -66,5 +66,5 @@ CREATE TABLE wada_templates (
   PRIMARY KEY (id)
 );
 
-INSERT INTO wada_sms_gateway_configurations VALUES ('1', 'Twilio', 'AC1fde2c6f26f367b93231c5fdb944c908', 'bc9a53e41745b8471e0ecafc859d86aa', '+1 510-944-1898', 'ACTIVE');
-INSERT INTO wada_email_gateway_configurations VALUES ('1', 'Gmail', 'smtp.gmail.com', '587','fineractcnnotificationdemo@gmail.com', 'pnuugpwmcibipdpw', 'smtp', 'true', 'true', 'ACTIVE');
\ No newline at end of file
+INSERT INTO wada_sms_gateway_configurations VALUES ('1', 'Twilio', 'ACdc00866577a42133e16d98456ad15592', '0b2f78b1c083eb71599d014d1af5748e', '+12055486680', 'ACTIVE');
+INSERT INTO wada_email_gateway_configurations VALUES ('1', 'Gmail', 'smtp.gmail.com', '587','fineractcnnotificationdemo@gmail.com', 'pnuugpwmcibipdpw', 'smtp', 'true', 'true', 'ACTIVE');


[fineract-cn-notifications] 01/36: Increment One

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

awasum pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-notifications.git

commit 509bf489e94df21e73ef551243f404daff4d621b
Author: Ebenezer Graham <eg...@alustudent.com>
AuthorDate: Sun Jun 10 01:03:15 2018 +0400

    Increment One
    
    First increment of the notification Microservice
     - Created eventlisteners
     - Created repositories for configuration
     - Created SMS and Email Sender Objects
---
 README.md | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/README.md b/README.md
new file mode 100644
index 0000000..e94a392
--- /dev/null
+++ b/README.md
@@ -0,0 +1,26 @@
+# Apache Fineract CN Notification
+
+This mircroservice contains all the functionalities for SMS and Email Notification
+
+## Abstract
+Apache Fineract CN is an application framework for digital financial services, a system to support nationwide and cross-national financial transactions and help to level and speed the creation of an inclusive, interconnected digital economy for every nation in the world.
+
+## Versioning
+The version numbers follow the [Semantic Versioning](http://semver.org/) scheme.
+
+In addition to MAJOR.MINOR.PATCH the following postfixes are used to indicate the development state.
+
+* BUILD-SNAPSHOT - A release currently in development. 
+* M - A _milestone_ release include specific sets of functions and are released as soon as the functionality is complete.
+* RC - A _release candidate_ is a version with potential to be a final product, considered _code complete_.
+* RELEASE - _General availability_ indicates that this release is the best available version and is recommended for all usage.
+
+The versioning layout is {MAJOR}.{MINOR}.{PATCH}-{INDICATOR}[.{PATCH}]. Only milestones and release candidates can  have patch versions. Some examples:
+
+1.2.3.BUILD-SNAPSHOT  
+1.3.5.M.1  
+1.5.7.RC.2  
+2.0.0.RELEASE
+
+## License
+See [LICENSE](LICENSE) file.


[fineract-cn-notifications] 06/36: fixed the build error

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

awasum pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-notifications.git

commit 3cb782124fe392793fdb22317071af90b8c0995f
Author: Ebenezer Graham <eg...@alustudent.com>
AuthorDate: Thu Jun 14 23:03:30 2018 +0400

    fixed the build error
---
 .travis.yml | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..1ee78cd
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,49 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+language: java
+
+jdk: oraclejdk8
+
+sudo: enabled
+
+branches:
+  only:
+    - develop
+
+
+cache:
+  directories:
+  - $HOME/.m2
+
+install:
+ - gradle install
+
+notifications:
+  email: true
+
+  deploy:
+    -
+      on:
+        branch: develop
+      provider: bintray
+      skip_cleanup: true
+      #file: target/bin/bintray.json
+      user: ebenezergraham
+      # key: $BINTRAY_API_KEY
\ No newline at end of file


[fineract-cn-notifications] 32/36: Merge branch 'develop' into permitted-feign-client-auth

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

awasum pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-notifications.git

commit 1fba09958b51cb5eaeaea2661f19c8b8f24188f0
Merge: f3deeaa a202f47
Author: Ebenezer Graham <eb...@gmail.com>
AuthorDate: Fri May 24 16:31:35 2019 +0400

    Merge branch 'develop' into permitted-feign-client-auth

 .travis.yml                                        |   2 +-
 README.md                                          |   5 +-
 .../api/v1/events/NotificationEventConstants.java  |   8 +-
 .../fineract/cn/notification/TestEmailService.java |  15 +--
 .../fineract/cn/notification/TestSMSService.java   |   9 +-
 .../cn/notification/listener/EventListener.java    | 103 +++++++++++++++++++++
 service/build.gradle                               |   1 -
 .../service/internal/service/EmailService.java     |   7 +-
 .../service/internal/service/SMSService.java       |  10 +-
 shared.gradle                                      |   1 -
 10 files changed, 128 insertions(+), 33 deletions(-)

diff --cc .travis.yml
index 06d4b4d,b70bfc3..bffe9d0
--- a/.travis.yml
+++ b/.travis.yml
@@@ -27,4 -27,4 +27,4 @@@ env
      - BUILD_SNAPSHOTS_BRANCH=develop
      - ARTIFACTORY_URL=https://mifos.jfrog.io/mifos
      - ARTIFACTORY_USER=travis-ci
-     - secure: "E5IyImya7x5cHLB1vGLGIJUC1M+7RxKZivb5iUM+RR/xW39/7b4Qd3JeX4yBUeiPjf9lNMMxcGVyqI/4htT95++WCNc0u6OoxwGgxQEB9JHE8OWecaYgK4uLO7+651XF4DNbSiH3NVmc2b8Q0c0jBlu3MHAeEUIQ6BOiTXSsqnewtWAW0XETBooNmo2nTqZyKvzez0698oJuuYfZeFbqm8wJ9rIwtptyJluRzqcTlzw1cH/CvcIskLDmITVqbuZxAW59j1BqUnZNQpuOFZ692iqntdxq78CxliCG1MEYy4zWY8xcIWNVp28OKkMULXdi+V80oZXY4TyTwZfH6e2oZFz6/X9GpNNR6EwaHV0tT3wZi2NrkoBokD8bEBxQubIgxDCaDAFG9VMByC+++nwm0GJzerKBV4CpNSy/93XLrFAQ8+lOVauVtkVHuzFBWleLLQYcBGAXRz/C/UF4/m0m014jvD7v [...]
 -    - secure: "NHjl/OM08+Q8zRXH1GRowPmFTCarpZVgpfzvW23DnHI9kwPcAuvXHUs0liBD1FgUr3oFNlIQ8QknlWSAb2yI9CTs/+v6f7wl4t4Xx4t5gV0wFuffb3W7a41bE+m1OSUunleSGLKr4qGffjPQ63EUyAb4wrywg23iY12OHbQ3a988UvqoDg6IjK7NXKeLhkAXg6qLDRh9aHdM6NknFNUUIbYyX25PMTQj/SShDQ3xptOhrj1wOvKbBEBc2t2X4+0/3pKt36W0VwJt68HPL4YKwFNiErqSXDAmKFwcf/aZxlXAGreCYN9rNuGuP5RMpblY1bNi6sW2COG0IgTjNSvQgULfIb42GI68O9w0supKZ8OKQLnDJDIQ5q1A1rE54bqs1ey8WD9bmwc24NTUkmjKTqDMTMqCLE+gXLM7xnS2JNisOETfEfRughUFBvmHVPgnQ6fCDJ0brPWBO9Se/elPP/XWlWAk [...]
++    - secure: "NHjl/OM08+Q8zRXH1GRowPmFTCarpZVgpfzvW23DnHI9kwPcAuvXHUs0liBD1FgUr3oFNlIQ8QknlWSAb2yI9CTs/+v6f7wl4t4Xx4t5gV0wFuffb3W7a41bE+m1OSUunleSGLKr4qGffjPQ63EUyAb4wrywg23iY12OHbQ3a988UvqoDg6IjK7NXKeLhkAXg6qLDRh9aHdM6NknFNUUIbYyX25PMTQj/SShDQ3xptOhrj1wOvKbBEBc2t2X4+0/3pKt36W0VwJt68HPL4YKwFNiErqSXDAmKFwcf/aZxlXAGreCYN9rNuGuP5RMpblY1bNi6sW2COG0IgTjNSvQgULfIb42GI68O9w0supKZ8OKQLnDJDIQ5q1A1rE54bqs1ey8WD9bmwc24NTUkmjKTqDMTMqCLE+gXLM7xnS2JNisOETfEfRughUFBvmHVPgnQ6fCDJ0brPWBO9Se/elPP/XWlWAk [...]
diff --cc README.md
index 7528145,c993eee..7a6daff
--- a/README.md
+++ b/README.md
@@@ -1,6 -1,6 +1,7 @@@
- # Apache Fineract CN Notification [![Build Status](https://api.travis-ci.com/apache/fineract-cn-notification.svg?branch=develop)](https://travis-ci.com/apache/fineract-cn-notification) 
 +
- This mircroservice contains all the functionalities for SMS and Email Notification
+ # Apache Fineract CN Notification [![Build Status](https://api.travis-ci.com/apache/fineract-cn-notifications.svg?branch=develop)](https://travis-ci.com/apache/fineract-cn-notifications)
+ 
 -This mircroservice contains all the functionalities for SMS and Email Notification
++This mircroservice implements SMS and Email Notification functionalities
  
  ## Abstract
  Apache Fineract CN is an application framework for digital financial services, a system to support nationwide and cross-national financial transactions and help to level and speed the creation of an inclusive, interconnected digital economy for every nation in the world.
diff --cc api/src/main/java/org/apache/fineract/cn/notification/api/v1/events/NotificationEventConstants.java
index b6855b1,f4d1be1..cf4ba28
--- a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/events/NotificationEventConstants.java
+++ b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/events/NotificationEventConstants.java
@@@ -27,15 -27,8 +27,15 @@@ public interface NotificationEventConst
  	
  	String POST_SMS_CONFIGURATION = "post-sms-configuration";
  	String POST_EMAIL_CONFIGURATION = "post-email-configuration";
 -	String POST_SMS_NOTIFICATION = "post-sms-notification";
 -	String POST_EMAIL_NOTIFICATION = "post-email-notification";
 +	String POST_SOURCE_APPLICATION = "post-source-application";
 +	String UPDATE_SMS_CONFIGURATION = "update-sms-configuration";
 +	String UPDATE_EMAIL_CONFIGURATION = "update-email-configuration";
 +	String DELETE_SMS_CONFIGURATION = "delete-sms-configuration";
 +	String DELETE_EMAIL_CONFIGURATION = "delete-email-configuration";
 +	String DELETE_SOURCE_APPLICATION = "delete-source-application";
 +	
- 	String POST_SEND_EMAIL_NOTIFICATION = "post-send-email-notification";
- 	String POST_SEND_SMS_NOTIFICATION = "post-send-sms-notification";
++	String SEND_EMAIL_NOTIFICATION = "post-send-email-notification";
++	String SEND_SMS_NOTIFICATION = "post-send-sms-notification";
  	
  	String POST_ENABLE_CUSTOMER_CREATED_EVENT = "post-enable-customer-created-event";
  	String POST_ENABLE_CUSTOMER_UPDATED_EVENT = "post-enable-customer-updated-event";
@@@ -47,13 -40,6 +47,13 @@@
  	String SELECTOR_INITIALIZE = SELECTOR_NAME + " = '" + INITIALIZE + "'";
  	String SELECTOR_POST_SMS_CONFIGURATION = SELECTOR_NAME + " = '" + POST_SMS_CONFIGURATION + "'";
  	String SELECTOR_POST_EMAIL_CONFIGURATION = SELECTOR_NAME + " = '" + POST_EMAIL_CONFIGURATION + "'";
 -	String SELECTOR_POST_SMS_NOTIFICATION = SELECTOR_NAME + " = '" + POST_SMS_NOTIFICATION + "'";
 -	String SELECTOR_POST_EMAIL_NOTIFICATION = SELECTOR_NAME + " = '" + POST_EMAIL_NOTIFICATION + "'";
 +	String SELECTOR_UPDATE_SMS_CONFIGURATION = SELECTOR_NAME + " = '" + UPDATE_SMS_CONFIGURATION + "'";
 +	String SELECTOR_UPDATE_EMAIL_CONFIGURATION = SELECTOR_NAME + " = '" + UPDATE_EMAIL_CONFIGURATION + "'";
 +	String SELECTOR_DELETE_SMS_CONFIGURATION = SELECTOR_NAME + " = '" + DELETE_SMS_CONFIGURATION + "'";
 +	String SELECTOR_DELETE_EMAIL_CONFIGURATION = SELECTOR_NAME + " = '" + DELETE_EMAIL_CONFIGURATION + "'";
 +	String SELECTOR_POST_SOURCE_APPLICATION = SELECTOR_NAME + " = '" + POST_SOURCE_APPLICATION + "'";
 +	String SELECTOR_DELETE_SOURCE_APPLICATION = SELECTOR_NAME + " = '" + DELETE_SOURCE_APPLICATION + "'";
 +	
- 	String SELECTOR_POST_SEND_EMAIL_NOTIFICATION = SELECTOR_NAME + " = '" + POST_SEND_EMAIL_NOTIFICATION + "'";
- 	String SELECTOR_POST_SEND_SMS_NOTIFICATION = SELECTOR_NAME + " = '" + POST_SEND_SMS_NOTIFICATION + "'";
++	String SELECTOR_SEND_EMAIL_NOTIFICATION = SELECTOR_NAME + " = '" + SEND_EMAIL_NOTIFICATION + "'";
++	String SELECTOR_SEND_SMS_NOTIFICATION = SELECTOR_NAME + " = '" + SEND_SMS_NOTIFICATION + "'";
  }
diff --cc component-test/src/main/java/org/apache/fineract/cn/notification/TestEmailService.java
index 6808678,2855f68..69a1133
--- a/component-test/src/main/java/org/apache/fineract/cn/notification/TestEmailService.java
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/TestEmailService.java
@@@ -20,16 -20,14 +20,13 @@@ package org.apache.fineract.cn.notifica
  
  import org.apache.commons.lang3.RandomStringUtils;
  import org.apache.fineract.cn.api.util.NotFoundException;
--import org.apache.fineract.cn.customer.api.v1.client.CustomerNotFoundException;
  import org.apache.fineract.cn.notification.api.v1.client.ConfigurationNotFoundException;
  import org.apache.fineract.cn.notification.api.v1.client.NotificationManager;
  import org.apache.fineract.cn.notification.api.v1.domain.EmailConfiguration;
  import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
 +import org.apache.fineract.cn.notification.service.internal.service.EmailService;
- import org.apache.fineract.cn.notification.service.internal.service.EventHelper;
  import org.apache.fineract.cn.notification.service.internal.service.NotificationService;
  import org.apache.fineract.cn.notification.util.DomainObjectGenerator;
--import org.apache.fineract.cn.test.listener.EventRecorder;
  import org.junit.Assert;
  import org.junit.Test;
  import org.springframework.beans.factory.annotation.Autowired;
@@@ -46,26 -44,38 +43,26 @@@ public class TestEmailService extends A
  	
  	public TestEmailService() {
  		super();
 +		emailConfiguration = DomainObjectGenerator.emailConfiguration();
  	}
  	
 +	
  	@Test
 -	public void sendEmail() throws InterruptedException{
 +	public void shouldSendAnEmail() throws InterruptedException {
  		this.logger.info("Send Email Notification");
- 		String messageHash = notificationService.sendEmail("fineractcnnotificationdemo@gmail.com",
 -		notificationService.sendEmail("fineractcnnotificationdemo@gmail.com",
++		String to = notificationService.sendEmail("fineractcnnotificationdemo@gmail.com",
  				"egraham15@alustudent.com",
  				"Address Details Changed",
  				"Dear Valued Customer," +
  						"\n\nYour address has been changed successfully" +
 -						"\nStreet: Test Street"+
 -						"\nCity: Test City"+
 -						"\nState: Test State"+
 -						"\nCountry: Mauritius"+
 +						"\nStreet: Test Street" +
 +						"\nCity: Test City" +
 +						"\nState: Test State" +
 +						"\nCountry: Mauritius" +
  						"\n\nBest Regards" +
  						"\nMFI");
 -	}
 -	
 -	@Test
 -	public void shouldRetrieveEmailConfigurationEntity() {
 -		logger.info("Create and retrieve Email Gateway configuration");
 -		EmailConfiguration sampleRetrieved = this.notificationManager.findEmailConfigurationByIdentifier(configIdentifier);
 -		Assert.assertNotNull(sampleRetrieved);
 -		Assert.assertEquals(sampleRetrieved.getIdentifier(), configIdentifier);
 -	}
 -	
 -	@Test
 -	public void shouldCreateNewEmailConfigurationEntity() throws InterruptedException{
 -		logger.info("Create Email Gateway configuration");
 -		this.notificationManager.createEmailConfiguration(DomainObjectGenerator.emailConfiguration());
  		
- 		Assert.assertNotNull(messageHash);
 -		eventRecorder.wait(NotificationEventConstants.POST_EMAIL_CONFIGURATION,EmailConfiguration.class);
++		Assert.assertNotNull(to);
  	}
  	
  	@Test(expected = NotFoundException.class)
@@@ -79,29 -89,8 +76,27 @@@
  	}
  	
  	@Test
 -	public void checkEmailConfigurationEntityExist() {
 +	public void shouldCreateAndRetrieveEmailConfigurationEntity() throws InterruptedException {
 +		logger.info("Create and Retrieve Email Gateway configuration");
 +		this.notificationManager.createEmailConfiguration(emailConfiguration);
 +		
- 		this.eventRecorder.wait(NotificationEventConstants.POST_EMAIL_CONFIGURATION, emailConfiguration.getIdentifier());
++		Assert.assertTrue(this.eventRecorder.wait(NotificationEventConstants.POST_EMAIL_CONFIGURATION, emailConfiguration.getIdentifier()));
 +		
 +		EmailConfiguration sampleRetrieved = this.notificationManager.findEmailConfigurationByIdentifier(emailConfiguration.getIdentifier());
- 		Assert.assertNotNull(sampleRetrieved);
- 		Assert.assertEquals(sampleRetrieved.getIdentifier(), emailConfiguration.getIdentifier());
++		Assert.assertEquals(sampleRetrieved.getIdentifier(),emailConfiguration.getIdentifier());
 +	}
 +	
 +	@Test
 +	public void checkEmailConfigurationEntityExist() throws InterruptedException {
  		logger.info("Email Gateway configuration Exist");
 -		Assert.assertTrue(this.notificationService.emailConfigurationExists(configIdentifier));
 +		this.notificationManager.createEmailConfiguration(emailConfiguration);
- 		super.eventRecorder.wait(NotificationEventConstants.POST_EMAIL_CONFIGURATION, emailConfiguration.getIdentifier());
- 		
++		Assert.assertTrue(eventRecorder.wait(NotificationEventConstants.POST_EMAIL_CONFIGURATION, emailConfiguration.getIdentifier()));
 +		Assert.assertTrue(this.emailService.emailConfigurationExists(emailConfiguration.getIdentifier()));
 +	}
 +	
 +	@Test
 +	public void shouldFindActiveGateway() {
 +		this.logger.info("Find Active Gateway");
 +		Assert.assertNotNull(this.emailService.findActiveEmailConfigurationEntity());
  	}
  }
diff --cc component-test/src/main/java/org/apache/fineract/cn/notification/TestSMSService.java
index 37ab85f,33536ed..bd34c44
--- a/component-test/src/main/java/org/apache/fineract/cn/notification/TestSMSService.java
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/TestSMSService.java
@@@ -57,15 -59,20 +57,14 @@@ public class TestSMSService extends Abs
  	}
  	
  	@Test
 -	public void shouldTriggerCustomerCreated() throws InterruptedException{
 -		logger.info("Create SMS Gateway configuration");
 +	public void shouldCreateAndRetrieveSMSConfigurationEntity() throws InterruptedException {
 +		logger.info("Create and Retrieve SMS Gateway configuration");
 +		this.notificationManager.createSMSConfiguration(smsConfiguration);
  		
- 		this.eventRecorder.wait(NotificationEventConstants.POST_SMS_CONFIGURATION, smsConfiguration.getIdentifier());
 -		eventRecorder.wait(NotificationEventConstants.POST_EMAIL_CONFIGURATION, SMSConfiguration.class);
 -	}
 -	
 -	@Test(expected = NotFoundException.class)
 -	public void smsConfigurationNotFound() throws CustomerNotFoundException {
 -		logger.info("SMS Gateway configuration Not Found");
 -		try {
 -			this.notificationManager.findSMSConfigurationByIdentifier(RandomStringUtils.randomAlphanumeric(8));
 -		} catch (final ConfigurationNotFoundException ex) {
 -			logger.info("Error Asserted");
 -		}
++		Assert.assertTrue(this.eventRecorder.wait(NotificationEventConstants.POST_SMS_CONFIGURATION, smsConfiguration.getIdentifier()));
 +		
 +		SMSConfiguration sampleRetrieved = this.notificationManager.findSMSConfigurationByIdentifier(smsConfiguration.getIdentifier());
- 		Assert.assertNotNull(sampleRetrieved);
 +		Assert.assertEquals(sampleRetrieved.getIdentifier(), smsConfiguration.getIdentifier());
  	}
  	
  	@Test
@@@ -85,10 -94,8 +84,10 @@@
  	}
  	
  	@Test
- 	public void shouldSendAnSMS() {
 -	public void checkSMSConfigurationEntityExist() {
 -		logger.info("SMS Gateway configuration Exist");
 -		Assert.assertTrue(this.notificationService.smsConfigurationExists(configIdentifier));
++	public void shouldSendAnSMS(){
 +		this.logger.info("Send SMS Notification");
- 		String messageHash = this.notificationService.sendSMS("+23058409206",
++		String to = this.notificationService.sendSMS("+23058409206",
 +				"Dear Valued Customer\n\nTalk is cheap show me the code\n\nBest Regards\nYour MFI");
- 		Assert.assertNotNull(messageHash);
++		Assert.assertNotNull(to);
  	}
  }
diff --cc component-test/src/main/java/org/apache/fineract/cn/notification/listener/EventListener.java
index 0000000,0000000..8aab1ca
new file mode 100644
--- /dev/null
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/listener/EventListener.java
@@@ -1,0 -1,0 +1,103 @@@
++/*
++ * Licensed to the Apache Software Foundation (ASF) under one
++ * or more contributor license agreements.  See the NOTICE file
++ * distributed with this work for additional information
++ * regarding copyright ownership.  The ASF licenses this file
++ * to you under the Apache License, Version 2.0 (the
++ * "License"); you may not use this file except in compliance
++ * with the License.  You may obtain a copy of the License at
++ *
++ *   http://www.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing,
++ * software distributed under the License is distributed on an
++ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
++ * KIND, either express or implied.  See the License for the
++ * specific language governing permissions and limitations
++ * under the License.
++ */
++    /*
++     * Licensed to the Apache Software Foundation (ASF) under one
++     * or more contributor license agreements.  See the NOTICE file
++     * distributed with this work for additional information
++     * regarding copyright ownership.  The ASF licenses this file
++     * to you under the Apache License, Version 2.0 (the
++     * "License"); you may not use this file except in compliance
++     * with the License.  You may obtain a copy of the License at
++     *
++     *   http://www.apache.org/licenses/LICENSE-2.0
++     *
++     * Unless required by applicable law or agreed to in writing,
++     * software distributed under the License is distributed on an
++     * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
++     * KIND, either express or implied.  See the License for the
++     * specific language governing permissions and limitations
++     * under the License.
++     */
++    package org.apache.fineract.cn.notification.listener;
++
++import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
++import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
++import org.apache.fineract.cn.notification.service.ServiceConstants;
++import org.apache.fineract.cn.test.listener.EventRecorder;
++import org.slf4j.Logger;
++import org.springframework.beans.factory.annotation.Autowired;
++import org.springframework.beans.factory.annotation.Qualifier;
++import org.springframework.jms.annotation.JmsListener;
++import org.springframework.messaging.handler.annotation.Header;
++import org.springframework.stereotype.Component;
++
++@SuppressWarnings("unused")
++@Component
++public class EventListener {
++	private final EventRecorder eventRecorder;
++	private final Logger logger;
++	
++	@Autowired
++	public EventListener(final EventRecorder eventRecorder,
++	                     @Qualifier(ServiceConstants.LOGGER_NAME) final Logger logger) {
++		this.logger = logger;
++		this.eventRecorder = eventRecorder;
++	}
++	
++	@JmsListener(
++			subscription = NotificationEventConstants.DESTINATION,
++			destination = NotificationEventConstants.DESTINATION,
++			selector = NotificationEventConstants.SELECTOR_POST_EMAIL_CONFIGURATION
++	)
++	public void postEmailConfiguration(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
++	                                 final String payload) {
++		this.eventRecorder.event(tenant, NotificationEventConstants.POST_EMAIL_CONFIGURATION, payload, String.class);
++	}
++	
++	@JmsListener(
++			subscription = NotificationEventConstants.DESTINATION,
++			destination = NotificationEventConstants.DESTINATION,
++			selector = NotificationEventConstants.SELECTOR_POST_SMS_CONFIGURATION
++	)
++	public void postSMSConfiguration(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
++	                                   final String payload) {
++		this.eventRecorder.event(tenant, NotificationEventConstants.POST_SMS_CONFIGURATION, payload, String.class);
++	}
++	
++	@JmsListener(
++			subscription = NotificationEventConstants.DESTINATION,
++			destination = NotificationEventConstants.DESTINATION,
++			selector = NotificationEventConstants.SELECTOR_SEND_EMAIL_NOTIFICATION
++	)
++	public void onSendEmailTrigger(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
++	                                   final String payload) {
++		this.eventRecorder.event(tenant, NotificationEventConstants.SEND_EMAIL_NOTIFICATION, payload, String.class);
++	}
++	
++	@JmsListener(
++			subscription = NotificationEventConstants.DESTINATION,
++			destination = NotificationEventConstants.DESTINATION,
++			selector = NotificationEventConstants.SELECTOR_SEND_SMS_NOTIFICATION
++	)
++	public void onSendSmsTrigger(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
++	                               final String payload) {
++		this.eventRecorder.event(tenant, NotificationEventConstants.SEND_SMS_NOTIFICATION, payload, String.class);
++	}
++	
++}
diff --cc service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/EmailService.java
index bc006c6,5260e98..6a6a78f
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/EmailService.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/EmailService.java
@@@ -33,13 -24,10 +33,12 @@@ import org.springframework.beans.factor
  import org.springframework.beans.factory.annotation.Qualifier;
  import org.springframework.mail.MailException;
  import org.springframework.mail.SimpleMailMessage;
 -import org.springframework.mail.javamail.JavaMailSender;
  import org.springframework.mail.javamail.JavaMailSenderImpl;
  import org.springframework.stereotype.Component;
 +import org.springframework.transaction.annotation.Transactional;
  
- import javax.annotation.PostConstruct;
 +import java.util.List;
 +import java.util.Optional;
  import java.util.Properties;
  
  @Component
@@@ -129,42 -72,8 +128,42 @@@ public class EmailService 
  				ServiceConstants.MAIL_SMTP_AUTH_VALUE);
  		properties.put(ServiceConstants.MAIL_SMTP_STARTTLS_ENABLE_PROPERTY,
  				ServiceConstants.MAIL_SMTP_STARTTLS_ENABLE_VALUE);
 -		mailSender.setJavaMailProperties(properties);
 +		this.mailSender.setJavaMailProperties(properties);
 +		return true;
 +	}
 +	
 +	public boolean setCustomProperties(String identifier) {
 +		EmailConfiguration configuration = findEmailConfigurationByIdentifier(identifier).get();
 +		this.mailSender.setHost(configuration.getHost());
 +		this.mailSender.setPort(Integer.parseInt(configuration.getPort()));
 +		this.mailSender.setUsername(configuration.getUsername());
 +		this.mailSender.setPassword(configuration.getApp_password());
  		
 -		return mailSender;
 +		Properties properties = new Properties();
 +		properties.put(ServiceConstants.MAIL_TRANSPORT_PROTOCOL_PROPERTY, configuration.getProtocol());
 +		properties.put(ServiceConstants.MAIL_SMTP_AUTH_PROPERTY, configuration.getSmtp_auth());
 +		properties.put(ServiceConstants.MAIL_SMTP_STARTTLS_ENABLE_PROPERTY, configuration.getStart_tls());
 +		//properties.put(ServiceConstants.MAIL_SMTP_TIMEOUT_PROPERTY, ServiceConstants.MAIL_SMTP_TIMEOUT_VALUE);
 +		this.mailSender.setJavaMailProperties(properties);
 +		return true;
 +	}
 +	
 +	@CommandHandler(logStart = CommandLogLevel.INFO, logFinish = CommandLogLevel.INFO)
 +	@Transactional
- 	@EventEmitter(selectorName = NotificationEventConstants.SELECTOR_NAME, selectorValue = NotificationEventConstants.POST_SEND_EMAIL_NOTIFICATION)
++	@EventEmitter(selectorName = NotificationEventConstants.SELECTOR_NAME, selectorValue = NotificationEventConstants.SEND_EMAIL_NOTIFICATION)
 +	public String sendEmail(String from, String to, String subject, String message) {
 +		SimpleMailMessage mail = new SimpleMailMessage();
 +		
 +		try {
 +			mail.setFrom(from);
 +			mail.setTo(to);
 +			mail.setSubject(subject);
 +			mail.setText(message);
 +			
 +			this.mailSender.send(mail);
 +		} catch (MailException exception) {
 +			logger.debug("Caused by:" + exception.getCause().toString());
 +		}
- 		return to.concat(" - " + mailSender.hashCode());
++		return to;
  	}
- }
+ }
diff --cc service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SMSService.java
index f618d1a,fca2476..0bfe73a
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SMSService.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SMSService.java
@@@ -23,95 -23,46 +23,95 @@@ import com.twilio.Twilio
  import com.twilio.rest.api.v2010.account.Message;
  import com.twilio.rest.api.v2010.account.MessageCreator;
  import com.twilio.type.PhoneNumber;
++import org.apache.fineract.cn.command.annotation.Aggregate;
 +import org.apache.fineract.cn.command.annotation.CommandHandler;
 +import org.apache.fineract.cn.command.annotation.CommandLogLevel;
 +import org.apache.fineract.cn.command.annotation.EventEmitter;
 +import org.apache.fineract.cn.notification.api.v1.domain.SMSConfiguration;
 +import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
  import org.apache.fineract.cn.notification.service.ServiceConstants;
 +import org.apache.fineract.cn.notification.service.internal.mapper.SMSConfigurationMapper;
 +import org.apache.fineract.cn.notification.service.internal.repository.SMSGatewayConfigurationRepository;
  import org.slf4j.Logger;
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.beans.factory.annotation.Qualifier;
--import org.springframework.beans.factory.annotation.Value;
  import org.springframework.stereotype.Service;
 +import org.springframework.transaction.annotation.Transactional;
 +
- import javax.annotation.PostConstruct;
 +import java.util.List;
 +import java.util.Optional;
  
  @Service
++@Aggregate
  public class SMSService {
  	
 +	static boolean isConfigured;
 +	private final SMSGatewayConfigurationRepository smsGatewayConfigurationRepository;
  	private final Logger logger;
 -	@Value("${smssender.accountSID}")
 -	private String ACCOUNT_SID;
 -	@Value("${smssender.authToken}")
 -	private String AUTH_TOKEN;
 -	@Value("${smssender.senderNumber}")
 -	private String SENDERNUMBER;
 +	private String accountSid;
 +	private String authToken;
 +	private String senderNumber;
  	
  	@Autowired
 -	public SMSService(@Qualifier(ServiceConstants.LOGGER_NAME) Logger logger) {
 +	public SMSService(final SMSGatewayConfigurationRepository smsGatewayConfigurationRepository,
 +	                  @Qualifier(ServiceConstants.LOGGER_NAME) Logger logger) {
  		super();
  		this.logger = logger;
 +		this.isConfigured = false;
 +		this.smsGatewayConfigurationRepository = smsGatewayConfigurationRepository;
 +	}
 +	
 +	//@PostConstruct
 +	public void init() {
 +		if (findActiveSMSConfigurationEntity().isPresent()){
 +			configureSMSGatewayWithActiveConfiguration();
 +		}else{
 +			//Todo: Send an alert on the interface to configure the service
 +		}
 +	}
 +	
 +	public boolean configureSMSGatewayWithActiveConfiguration() {
 +		SMSConfiguration configuration = findActiveSMSConfigurationEntity().get();
 +		this.accountSid = configuration.getAccount_sid();
 +		this.authToken = configuration.getAuth_token();
 +		this.senderNumber = configuration.getSender_number();
 +		return this.isConfigured = true;
 +	}
 +	
 +	public boolean customConfiguration(String identifier) {
 +		SMSConfiguration configuration = findSMSConfigurationByIdentifier(identifier).get();
 +		this.accountSid = configuration.getAccount_sid();
 +		this.authToken = configuration.getAuth_token();
 +		this.senderNumber = configuration.getSender_number();
 +		return this.isConfigured = true;
 +	}
 +	
 +	public Optional<SMSConfiguration> findActiveSMSConfigurationEntity() {
 +		return this.smsGatewayConfigurationRepository.active().map(SMSConfigurationMapper::map);
 +	}
 +	
 +	public Boolean smsConfigurationExists(final String identifier) {
 +		return this.smsGatewayConfigurationRepository.existsByIdentifier(identifier);
 +	}
 +	
 +	public Optional<SMSConfiguration> findSMSConfigurationByIdentifier(final String identifier) {
 +		return this.smsGatewayConfigurationRepository.findByIdentifier(identifier).map(SMSConfigurationMapper::map);
  	}
  	
 -	public void configure(String accountSID,
 -	                      String authToken,
 -	                      String senderNumber) {
 -		ACCOUNT_SID = accountSID;
 -		AUTH_TOKEN = authToken;
 -		SENDERNUMBER = senderNumber;
 +	public List<SMSConfiguration> findAllActiveSMSConfigurationEntities() {
 +		return SMSConfigurationMapper.map(this.smsGatewayConfigurationRepository.findAll());
  	}
  	
 -	public void sendSMS(String receiver, String template) {
 -		this.logger.debug("sendSMS invoked");
 -		Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
 -		MessageCreator messageCreator = Message.creator(ACCOUNT_SID,
 +	@CommandHandler(logStart = CommandLogLevel.INFO, logFinish = CommandLogLevel.INFO)
 +	@Transactional
- 	@EventEmitter(selectorName = NotificationEventConstants.SELECTOR_NAME, selectorValue = NotificationEventConstants.POST_SEND_SMS_NOTIFICATION)
++	@EventEmitter(selectorName = NotificationEventConstants.SELECTOR_NAME, selectorValue = NotificationEventConstants.SEND_SMS_NOTIFICATION)
 +	public String sendSMS(String receiver, String template) {
 +		Twilio.init(this.accountSid, this.authToken);
 +		MessageCreator messageCreator = Message.creator(this.accountSid,
  				new PhoneNumber(receiver),
 -				new PhoneNumber(SENDERNUMBER),
 +				new PhoneNumber(this.senderNumber),
  				template);
  		Message message = messageCreator.create();
- 		return message.getTo().concat(" - " + message.getSid());
 -		System.out.println(message.getSid());
++		return message.getTo();
  	}
--}
++}


[fineract-cn-notifications] 12/36: Merge remote-tracking branch 'origin/develop' into develop

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

awasum pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-notifications.git

commit eb95c41ae22d7d8409a2af2aaf42644262f2123b
Merge: 47709b8 041ec34
Author: Ebenezer Graham <eg...@alustudent.com>
AuthorDate: Fri Jun 15 15:36:42 2018 +0400

    Merge remote-tracking branch 'origin/develop' into develop



[fineract-cn-notifications] 27/36: Added after_failure procedure to output rat report as plain text on Travis

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

awasum pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-notifications.git

commit 5a04ac377cb2fdd6cdb90838b4050ea61f901c1b
Author: ebenezergraham <eg...@alustudent.com>
AuthorDate: Sat May 25 22:26:18 2019 +0400

    Added after_failure procedure to output rat report as plain text on Travis
---
 .travis.yml   |  5 +++++
 shared.gradle | 43 ++++++++++++++++++++++---------------------
 2 files changed, 27 insertions(+), 21 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index b70bfc3..0df6a41 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -28,3 +28,8 @@ env:
     - ARTIFACTORY_URL=https://mifos.jfrog.io/mifos
     - ARTIFACTORY_USER=travis-ci
     - secure: "NHjl/OM08+Q8zRXH1GRowPmFTCarpZVgpfzvW23DnHI9kwPcAuvXHUs0liBD1FgUr3oFNlIQ8QknlWSAb2yI9CTs/+v6f7wl4t4Xx4t5gV0wFuffb3W7a41bE+m1OSUunleSGLKr4qGffjPQ63EUyAb4wrywg23iY12OHbQ3a988UvqoDg6IjK7NXKeLhkAXg6qLDRh9aHdM6NknFNUUIbYyX25PMTQj/SShDQ3xptOhrj1wOvKbBEBc2t2X4+0/3pKt36W0VwJt68HPL4YKwFNiErqSXDAmKFwcf/aZxlXAGreCYN9rNuGuP5RMpblY1bNi6sW2COG0IgTjNSvQgULfIb42GI68O9w0supKZ8OKQLnDJDIQ5q1A1rE54bqs1ey8WD9bmwc24NTUkmjKTqDMTMqCLE+gXLM7xnS2JNisOETfEfRughUFBvmHVPgnQ6fCDJ0brPWBO9Se/elPP/XWlWAkd [...]
+
+after_failure:
+  - ./gradlew rat
+  - cat api/build/reports/rat/rat-report.txt
+
diff --git a/shared.gradle b/shared.gradle
index 3cdcce8..e9f8108 100644
--- a/shared.gradle
+++ b/shared.gradle
@@ -19,25 +19,25 @@ group 'org.apache.fineract.cn.notification'
 version '0.1.0-BUILD-SNAPSHOT'
 
 ext.versions = [
-        fineractcnidentity      : '0.1.0-BUILD-SNAPSHOT',
-        fineractcnoffice        : '0.1.0-BUILD-SNAPSHOT',
-        fineractcncustomer      : '0.1.0-BUILD-SNAPSHOT',
-        fineractcnaccounting    : '0.1.0-BUILD-SNAPSHOT',
-        fineractcnportfolio     : '0.1.0-BUILD-SNAPSHOT',
-        fineractcnteller        : '0.1.0-BUILD-SNAPSHOT',
-        fineractcnpayroll       : '0.1.0-BUILD-SNAPSHOT',
-        fineractcngroup         : '0.1.0-BUILD-SNAPSHOT',
-        frameworkapi            : '0.1.0-BUILD-SNAPSHOT',
-        frameworklang           : '0.1.0-BUILD-SNAPSHOT',
-        frameworkasync          : '0.1.0-BUILD-SNAPSHOT',
-        frameworkcassandra      : '0.1.0-BUILD-SNAPSHOT',
-        frameworkmariadb        : '0.1.0-BUILD-SNAPSHOT',
-        frameworkcommand        : '0.1.0-BUILD-SNAPSHOT',
-        frameworktest           : '0.1.0-BUILD-SNAPSHOT',
-        frameworkanubis         : '0.1.0-BUILD-SNAPSHOT',
-        validator               : '5.3.0.Final',
-        springjavamail          : '1.4.1.RELEASE',
-        twilioapi               : '7.17.+'
+        fineractcnidentity  : '0.1.0-BUILD-SNAPSHOT',
+        fineractcnoffice    : '0.1.0-BUILD-SNAPSHOT',
+        fineractcncustomer  : '0.1.0-BUILD-SNAPSHOT',
+        fineractcnaccounting: '0.1.0-BUILD-SNAPSHOT',
+        fineractcnportfolio : '0.1.0-BUILD-SNAPSHOT',
+        fineractcnteller    : '0.1.0-BUILD-SNAPSHOT',
+        fineractcnpayroll   : '0.1.0-BUILD-SNAPSHOT',
+        fineractcngroup     : '0.1.0-BUILD-SNAPSHOT',
+        frameworkapi        : '0.1.0-BUILD-SNAPSHOT',
+        frameworklang       : '0.1.0-BUILD-SNAPSHOT',
+        frameworkasync      : '0.1.0-BUILD-SNAPSHOT',
+        frameworkcassandra  : '0.1.0-BUILD-SNAPSHOT',
+        frameworkmariadb    : '0.1.0-BUILD-SNAPSHOT',
+        frameworkcommand    : '0.1.0-BUILD-SNAPSHOT',
+        frameworktest       : '0.1.0-BUILD-SNAPSHOT',
+        frameworkanubis     : '0.1.0-BUILD-SNAPSHOT',
+        validator           : '5.3.0.Final',
+        springjavamail      : '1.4.1.RELEASE',
+        twilioapi           : '7.17.+'
 ]
 
 apply plugin: 'java'
@@ -94,11 +94,11 @@ artifactory {
         }
 
         defaults {
-            publications ('api', 'componentTest', 'service', 'bootService')
+            publications('api', 'componentTest', 'service', 'bootService')
         }
     }
 }
-artifactoryPublish.dependsOn('clean','publishToMavenLocal')
+artifactoryPublish.dependsOn('clean', 'publishToMavenLocal')
 
 license {
     header rootProject.file('../HEADER')
@@ -122,5 +122,6 @@ rat {
             "gradlew.bat",
             "README.md"
     ]
+    plainOutput = true
 }
 


[fineract-cn-notifications] 25/36: Merge pull request #12 from aasaru/artifactory

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

awasum pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-notifications.git

commit a202f477c4fcf80c3d17186f4a4a0a891c0b152a
Merge: 3dc6d31 9efb0b1
Author: Awasum Yannick <aw...@apache.org>
AuthorDate: Fri May 24 09:17:43 2019 +0100

    Merge pull request #12 from aasaru/artifactory
    
    FINCN-148 build with travis-ci.com and upload artifacts to Artifactory

 .travis.yml                 | 30 +++++++++++++++++++
 README.md                   |  2 +-
 api/build.gradle            |  3 +-
 build.gradle                |  8 +++++
 component-test/build.gradle |  4 ++-
 service/build.gradle        |  5 ++--
 shared.gradle               | 17 +++++++++++
 travis.sh                   | 71 +++++++++++++++++++++++++++++++++++++++++++++
 8 files changed, 135 insertions(+), 5 deletions(-)


[fineract-cn-notifications] 09/36: update

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

awasum pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-notifications.git

commit a62f69fb15d5b4d1e181e22b0fbb1f04f83b6c10
Author: Ebenezer Graham <eg...@alustudent.com>
AuthorDate: Fri Jun 15 01:09:12 2018 +0400

    update
---
 .../notification/api/v1/domain/Notification.java   | 76 ----------------------
 .../api/v1/events/NotificationEventConstants.java  |  4 --
 .../service/NotificationConfiguration.java         |  2 +
 .../service/internal/service/SMSSender.java        | 20 +++---
 service/src/main/resources/application.yml         |  5 +-
 5 files changed, 18 insertions(+), 89 deletions(-)

diff --git a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/Notification.java b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/Notification.java
deleted file mode 100644
index c685c5a..0000000
--- a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/Notification.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.fineract.cn.notification.api.v1.domain;
-
-import java.util.Objects;
-import org.apache.fineract.cn.lang.validation.constraints.ValidIdentifier;
-import org.hibernate.validator.constraints.Length;
-
-@SuppressWarnings({"WeakerAccess", "unused"})
-public class Notification {
-  @ValidIdentifier
-  private String identifier;
-  @Length(max = 512)
-  private String payload;
-
-  private String recipient;
-
-  private String message;
-
-  public Notification() {
-    super();
-  }
-
-  public static Notification create(final String identifier, final String payload) {
-    final Notification notification = new Notification();
-    notification.setIdentifier(identifier);
-    notification.setPayload(payload);
-    return notification;
-  }
-
-  public String getIdentifier() {
-    return this.identifier;
-  }
-
-  public void setIdentifier(final String identifier) {
-    this.identifier = identifier;
-  }
-
-  public String getPayload() {
-    return payload;
-  }
-
-  public void setPayload(String payload) {
-    this.payload = payload;
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    if (this == o) return true;
-    if (o == null || getClass() != o.getClass()) return false;
-    Notification notification = (Notification) o;
-    return Objects.equals(identifier, notification.identifier) &&
-            Objects.equals(payload, notification.payload);
-  }
-
-  @Override
-  public int hashCode() {
-    return Objects.hash(identifier, payload);
-  }
-}
diff --git a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/events/NotificationEventConstants.java b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/events/NotificationEventConstants.java
index 3f351c6..39c6eb0 100644
--- a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/events/NotificationEventConstants.java
+++ b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/events/NotificationEventConstants.java
@@ -28,8 +28,4 @@ public interface NotificationEventConstants {
     String SELECTOR_INITIALIZE = SELECTOR_NAME + " = '" + INITIALIZE + "'";
     String SELECTOR_POST_SAMPLE = SELECTOR_NAME + " = '" + POST_SAMPLE + "'";
 
-    //Customer constants;
-    String CUSTOMER_DESTINATION = "customer-v1";
-    String SELECTOR_POST_CUSTOMER = SELECTOR_NAME + " = 'post-customer'";
-
 }
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/NotificationConfiguration.java b/service/src/main/java/org/apache/fineract/cn/notification/service/NotificationConfiguration.java
index 01aa6d3..c38d6bd 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/NotificationConfiguration.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/NotificationConfiguration.java
@@ -79,6 +79,8 @@ public class NotificationConfiguration extends WebMvcConfigurerAdapter {
     configurer.setUseSuffixPatternMatch(Boolean.FALSE);
   }
 
+
+
   @Bean
   @Qualifier("gmail")
   public JavaMailSender getJavaMailSender() {
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SMSSender.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SMSSender.java
index 6bf7558..d626b22 100644
--- a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SMSSender.java
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SMSSender.java
@@ -23,23 +23,27 @@ import com.twilio.Twilio;
 import com.twilio.rest.api.v2010.account.Message;
 import com.twilio.type.PhoneNumber;
 import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Configuration;
 import com.twilio.rest.api.v2010.account.MessageCreator;
 import org.springframework.stereotype.Service;
 
 @Service
+@ConfigurationProperties(prefix ="smssender")
 public class SMSSender {
 
-    @Value(value = "${smssender.accountSID}")
-    public static String ACCOUNT_SID;
+    //@Value(value = "${smssender.accountSID}")
+    public String ACCOUNT_SID = "AC1fde2c6f26f367b93231c5fdb944c908";
 
-    @Value("${smssender.authToken}")
-    public static String AUTH_TOKEN;
+    //@Value("${smssender.authToken}")
+    public String AUTH_TOKEN = "bc9a53e41745b8471e0ecafc859d86aa";
 
-    @Value("${mfi.senderNumber}")
-    public static String sender;
+    //@Value("${smssender.senderNumber}")
+    public String sender = "+1 510-944-1898";
 
-    @Value("${fineract.customer.accountcreated}")
-    public String template;
+    //@Value("${fineract.customer.accountcreated}")
+
+    public String template = "Test from the demo-server";
 
     public void sendSMS(String receiver, String template) {
 
diff --git a/service/src/main/resources/application.yml b/service/src/main/resources/application.yml
index 37acaaf..ec163fc 100644
--- a/service/src/main/resources/application.yml
+++ b/service/src/main/resources/application.yml
@@ -75,4 +75,7 @@ fineract:
     accountclosed:
       message: Dear Valued Customer, Your account has been successfully closed.
 
-
+smssender:
+  accountSID: AC1fde2c6f26f367b93231c5fdb944c908
+  authtoken: bc9a53e41745b8471e0ecafc859d86aa
+  senderNumber: +1 510-944-1898


[fineract-cn-notifications] 11/36: Increment One

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

awasum pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-notifications.git

commit 47709b8ec2d1db59629cdc9e1302b208a6dcd93f
Author: Ebenezer Graham <eg...@alustudent.com>
AuthorDate: Fri Jun 15 15:36:24 2018 +0400

    Increment One
    
    Commit for increment one
    improved the repositories and entities for the configurations
    
    additions
    
    update
    
    fixed the build error
    
    fixed the build
    
    update to testSample
    
    update
    
    test
---
 .gitignore                                         |   17 +
 .travis.yml                                        |   49 +
 HEADER                                             |   16 +
 LICENSE                                            |  201 +
 NOTICE.txt                                         |    5 +
 api/build.gradle                                   |   57 +
 .../notification/api/v1/PermittableGroupIds.class  |  Bin 0 -> 328 bytes
 .../api/v1/client/IamATeapotException.class        |  Bin 0 -> 392 bytes
 .../api/v1/client/NotificationManager.class        |  Bin 0 -> 1474 bytes
 .../api/v1/domain/EmailConfiguration.class         |  Bin 0 -> 3790 bytes
 .../notification/api/v1/domain/Notification.class  |  Bin 0 -> 1820 bytes
 .../api/v1/domain/SMSConfiguration.class           |  Bin 0 -> 2972 bytes
 .../cn/notification/api/v1/domain/Sample.class     |  Bin 0 -> 1752 bytes
 .../api/v1/events/NotificationEventConstants.class |  Bin 0 -> 666 bytes
 api/settings.gradle                                |   18 +
 .../notification/api/v1/PermittableGroupIds.java   |   25 +
 .../api/v1/client/IamATeapotException.java         |   23 +
 .../api/v1/client/NotificationManager.java         |   59 +
 .../api/v1/domain/EmailConfiguration.java          |  162 +
 .../api/v1/domain/SMSConfiguration.java            |  122 +
 .../cn/notification/api/v1/domain/Sample.java      |   72 +
 .../api/v1/events/NotificationEventConstants.java  |   31 +
 .../cn/notification/api/v1/domain/SampleTest.java  |   57 +
 build.gradle                                       |   60 +
 component-test/build.gradle                        |   56 +
 component-test/settings.gradle                     |   18 +
 .../cn/notification/SuiteTestEnvironment.java      |   48 +
 .../fineract/cn/notification/TestSample.java       |  137 +
 .../apache/fineract/cn/notification/TestSuite.java |   30 +
 .../listener/MigrationEventListener.java           |   50 +
 .../notification/listener/SampleEventListener.java |   50 +
 gradle/wrapper/gradle-wrapper.jar                  |  Bin 0 -> 54212 bytes
 gradle/wrapper/gradle-wrapper.properties           |    6 +
 gradlew                                            |  172 +
 gradlew.bat                                        |   84 +
 service/build.gradle                               |   85 +
 service/out/production/resources/application.yml   |   78 +
 service/out/production/resources/bootstrap.yml     |   22 +
 .../db/migrations/mariadb/V1__initial_setup.sql    |   72 +
 service/settings.gradle                            |   18 +
 .../service/NotificationApplication.java           |   32 +
 .../service/NotificationConfiguration.java         |  103 +
 .../cn/notification/service/ServiceConstants.java  |   23 +
 .../internal/command/InitializeServiceCommand.java |   31 +
 .../service/internal/command/SampleCommand.java    |   42 +
 .../command/handler/MigrationAggregate.java        |   67 +
 .../internal/command/handler/SampleAggregate.java  |   68 +
 .../internal/mapper/EmailConfigurationMapper.java  |   49 +
 .../internal/mapper/SMSConfigurationMapper.java    |   47 +
 .../service/internal/mapper/SampleMapper.java      |   46 +
 .../repository/EmailGatewayConfiguration.java      |  124 +
 .../EmailGatewayConfigurationRepository.java       |   29 +
 .../repository/SMSGatewayConfiguration.java        |   94 +
 .../SMSGatewayConfigurationRepository.java         |   29 +
 .../internal/repository/SampleJpaEntity.java       |   64 +
 .../repository/SampleJpaEntityRepository.java      |   28 +
 .../service/internal/service/EmailSender.java      |   60 +
 .../service/internal/service/SMSSender.java        |   58 +
 .../service/internal/service/SampleService.java    |   48 +
 .../service/listener/AccountingEventListener.java  |  124 +
 .../service/listener/ChequeEventListener.java      |   85 +
 .../service/listener/CustomerEventListener.java    |  200 +
 .../service/listener/DepositEventListener.java     |   61 +
 .../service/listener/IdentityEventListener.java    |   87 +
 .../service/listener/OfficeEventListener.java      |  136 +
 .../service/listener/PayrollEventListener.java     |   61 +
 .../service/listener/PortfolioEventListener.java   |  149 +
 .../service/listener/TellerEventListener.java      |  146 +
 .../service/rest/NotificationRestController.java   |  119 +
 service/src/main/resources/application.yml         |   81 +
 service/src/main/resources/bootstrap.yml           |   22 +
 .../db/migrations/mariadb/V1__initial_setup.sql    |   72 +
 settings.gradle                                    |   23 +
 shared.gradle                                      |  111 +
 system-analysis.mdj                                | 4104 ++++++++++++++++++++
 75 files changed, 8523 insertions(+)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..99b514a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,17 @@
+.gradle
+.idea
+build/
+target/
+detail
+
+# Ignore Gradle GUI config
+gradle-app.setting
+
+# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
+!gradle-wrapper.jar
+
+*.iml
+
+*.log
+
+*.toDelete
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..1ee78cd
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,49 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+language: java
+
+jdk: oraclejdk8
+
+sudo: enabled
+
+branches:
+  only:
+    - develop
+
+
+cache:
+  directories:
+  - $HOME/.m2
+
+install:
+ - gradle install
+
+notifications:
+  email: true
+
+  deploy:
+    -
+      on:
+        branch: develop
+      provider: bintray
+      skip_cleanup: true
+      #file: target/bin/bintray.json
+      user: ebenezergraham
+      # key: $BINTRAY_API_KEY
\ No newline at end of file
diff --git a/HEADER b/HEADER
new file mode 100644
index 0000000..90705e0
--- /dev/null
+++ b/HEADER
@@ -0,0 +1,16 @@
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..8dada3e
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "{}"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright {yyyy} {name of copyright owner}
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/NOTICE.txt b/NOTICE.txt
new file mode 100644
index 0000000..41f69b8
--- /dev/null
+++ b/NOTICE.txt
@@ -0,0 +1,5 @@
+Apache Fineract CN Notification
+Copyright [2017-2018] The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
\ No newline at end of file
diff --git a/api/build.gradle b/api/build.gradle
new file mode 100644
index 0000000..5b9924a
--- /dev/null
+++ b/api/build.gradle
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+buildscript {
+    repositories {
+        jcenter()
+    }
+
+    dependencies {
+        classpath 'io.spring.gradle:dependency-management-plugin:0.6.0.RELEASE'
+    }
+}
+
+plugins {
+    id "com.github.hierynomus.license" version "0.13.1"
+    id("org.nosphere.apache.rat") version "0.3.1"
+}
+
+apply from: '../shared.gradle'
+
+dependencies {
+    compile(
+            [group: 'org.springframework.cloud', name: 'spring-cloud-starter-feign'],
+            [group: 'org.apache.fineract.cn', name: 'api', version: versions.frameworkapi],
+            [group: 'org.hibernate', name: 'hibernate-validator', version: versions.validator],
+            [group: 'org.hibernate', name: 'hibernate-validator-annotation-processor', version: versions.validator]
+    )
+
+    testCompile(
+            [group: 'org.apache.fineract.cn', name: 'test', version: versions.frameworktest],
+    )
+}
+
+publishing {
+    publications {
+        api(MavenPublication) {
+            from components.java
+            groupId project.group
+            artifactId project.name
+            version project.version
+        }
+    }
+}
diff --git a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/PermittableGroupIds.class b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/PermittableGroupIds.class
new file mode 100644
index 0000000..a1dee5e
Binary files /dev/null and b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/PermittableGroupIds.class differ
diff --git a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/client/IamATeapotException.class b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/client/IamATeapotException.class
new file mode 100644
index 0000000..a197a0a
Binary files /dev/null and b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/client/IamATeapotException.class differ
diff --git a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/client/NotificationManager.class b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/client/NotificationManager.class
new file mode 100644
index 0000000..741d5f5
Binary files /dev/null and b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/client/NotificationManager.class differ
diff --git a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/EmailConfiguration.class b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/EmailConfiguration.class
new file mode 100644
index 0000000..dd410b5
Binary files /dev/null and b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/EmailConfiguration.class differ
diff --git a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/Notification.class b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/Notification.class
new file mode 100644
index 0000000..afe7f46
Binary files /dev/null and b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/Notification.class differ
diff --git a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/SMSConfiguration.class b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/SMSConfiguration.class
new file mode 100644
index 0000000..f7e3f18
Binary files /dev/null and b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/SMSConfiguration.class differ
diff --git a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/Sample.class b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/Sample.class
new file mode 100644
index 0000000..818a105
Binary files /dev/null and b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/domain/Sample.class differ
diff --git a/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/events/NotificationEventConstants.class b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/events/NotificationEventConstants.class
new file mode 100644
index 0000000..6b2a09d
Binary files /dev/null and b/api/out/production/classes/org/apache/fineract/cn/notification/api/v1/events/NotificationEventConstants.class differ
diff --git a/api/settings.gradle b/api/settings.gradle
new file mode 100644
index 0000000..491f745
--- /dev/null
+++ b/api/settings.gradle
@@ -0,0 +1,18 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+rootProject.name = 'api'
\ No newline at end of file
diff --git a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/PermittableGroupIds.java b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/PermittableGroupIds.java
new file mode 100644
index 0000000..a854460
--- /dev/null
+++ b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/PermittableGroupIds.java
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.api.v1;
+
+@SuppressWarnings("unused")
+public interface PermittableGroupIds {
+  String SAMPLE_MANAGEMENT = "notification__v1__samples";
+  String SELF_MANAGEMENT = "notification__v1__self";
+}
diff --git a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/client/IamATeapotException.java b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/client/IamATeapotException.java
new file mode 100644
index 0000000..9265ed4
--- /dev/null
+++ b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/client/IamATeapotException.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.api.v1.client;
+
+@SuppressWarnings("WeakerAccess")
+public class IamATeapotException extends RuntimeException {
+}
diff --git a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/client/NotificationManager.java b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/client/NotificationManager.java
new file mode 100644
index 0000000..6d0a7b1
--- /dev/null
+++ b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/client/NotificationManager.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.api.v1.client;
+
+import org.apache.fineract.cn.notification.api.v1.domain.Sample;
+import java.util.List;
+import org.apache.fineract.cn.api.annotation.ThrowsException;
+import org.apache.fineract.cn.api.util.CustomFeignClientsConfiguration;
+import org.springframework.cloud.netflix.feign.FeignClient;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+@SuppressWarnings("unused")
+@FeignClient(value="notification-v1", path="/notification/v1", configuration = CustomFeignClientsConfiguration.class)
+public interface NotificationManager {
+
+  @RequestMapping(
+          value = "/notification",
+          method = RequestMethod.GET,
+          produces = MediaType.ALL_VALUE,
+          consumes = MediaType.APPLICATION_JSON_VALUE
+  )
+  List<Sample> findAllEntities();
+
+  @RequestMapping(
+          value = "/notification/{identifier}",
+          method = RequestMethod.GET,
+          produces = MediaType.ALL_VALUE,
+          consumes = MediaType.APPLICATION_JSON_VALUE)
+  Sample getEntity(@PathVariable("identifier") final String identifier);
+
+  @RequestMapping(
+      value = "/notification",
+      method = RequestMethod.POST,
+      produces = MediaType.APPLICATION_JSON_VALUE,
+      consumes = MediaType.APPLICATION_JSON_VALUE
+  )
+  @ThrowsException(status = HttpStatus.I_AM_A_TEAPOT, exception = IamATeapotException.class)
+  void createEntity(final Sample sample);
+}
diff --git a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/EmailConfiguration.java b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/EmailConfiguration.java
new file mode 100644
index 0000000..24aa0dc
--- /dev/null
+++ b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/EmailConfiguration.java
@@ -0,0 +1,162 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.api.v1.domain;
+
+import org.apache.fineract.cn.lang.validation.constraints.ValidIdentifier;
+import org.hibernate.validator.constraints.Length;
+
+import java.util.Objects;
+
+@SuppressWarnings({"WeakerAccess", "unused"})
+public class EmailConfiguration {
+  @ValidIdentifier
+  private String identifier;
+  @Length(max = 512)
+  private String payload;
+  @Length(max = 512)
+  private String host;
+  @Length(max = 512)
+  private String port;
+  @Length(max = 512)
+  private String username;
+  @Length(max = 512)
+  private String app_id;
+  @Length(max = 512)
+  private String smtp_auth;
+  @Length(max = 512)
+  private String start_tls;
+  @Length(max = 512)
+  private String option;
+
+  public EmailConfiguration(){
+    super();
+  }
+
+  public static EmailConfiguration create (String identifier, String payload,
+                            String host, String port,
+                            String username, String app_id,
+                            String smtp_auth, String start_tls,
+                            String option) {
+    EmailConfiguration emailConfiguration = new EmailConfiguration();
+    emailConfiguration.setIdentifier(identifier);
+    emailConfiguration.setPayload(payload);
+    emailConfiguration.setHost(host);
+    emailConfiguration.setPort(port);
+    emailConfiguration.setUsername(username);
+    emailConfiguration.setApp_id(app_id);
+    emailConfiguration.setSmtp_auth(smtp_auth);
+    emailConfiguration.setStart_tls(start_tls);
+    emailConfiguration.setOption(option);
+    return emailConfiguration;
+  }
+
+  public String getIdentifier() {
+    return identifier;
+  }
+
+  public void setIdentifier(String identifier) {
+    this.identifier = identifier;
+  }
+
+  public String getPayload() {
+    return payload;
+  }
+
+  public void setPayload(String payload) {
+    this.payload = payload;
+  }
+
+  public String getHost() {
+    return host;
+  }
+
+  public void setHost(String host) {
+    this.host = host;
+  }
+
+  public String getPort() {
+    return port;
+  }
+
+  public void setPort(String port) {
+    this.port = port;
+  }
+
+  public String getUsername() {
+    return username;
+  }
+
+  public void setUsername(String username) {
+    this.username = username;
+  }
+
+  public String getApp_id() {
+    return app_id;
+  }
+
+  public void setApp_id(String app_id) {
+    this.app_id = app_id;
+  }
+
+  public String getSmtp_auth() {
+    return smtp_auth;
+  }
+
+  public void setSmtp_auth(String smtp_auth) {
+    this.smtp_auth = smtp_auth;
+  }
+
+  public String getStart_tls() {
+    return start_tls;
+  }
+
+  public void setStart_tls(String start_tls) {
+    this.start_tls = start_tls;
+  }
+
+  public String getOption() {
+    return option;
+  }
+
+  public void setOption(String option) {
+    this.option = option;
+  }
+
+  @Override
+  public boolean equals(Object o) {
+    if (this == o) return true;
+    if (o == null || getClass() != o.getClass()) return false;
+    EmailConfiguration that = (EmailConfiguration) o;
+    return Objects.equals(identifier, that.identifier) &&
+            Objects.equals(payload, that.payload) &&
+            Objects.equals(host, that.host) &&
+            Objects.equals(port, that.port) &&
+            Objects.equals(username, that.username) &&
+            Objects.equals(app_id, that.app_id) &&
+            Objects.equals(smtp_auth, that.smtp_auth) &&
+            Objects.equals(start_tls, that.start_tls) &&
+            Objects.equals(option, that.option);
+  }
+
+  @Override
+  public int hashCode() {
+    return Objects.hash(identifier, payload, host, port, username,
+            app_id, smtp_auth, start_tls, option);
+  }
+}
diff --git a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/SMSConfiguration.java b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/SMSConfiguration.java
new file mode 100644
index 0000000..cef7f57
--- /dev/null
+++ b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/SMSConfiguration.java
@@ -0,0 +1,122 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.api.v1.domain;
+
+import org.apache.fineract.cn.lang.validation.constraints.ValidIdentifier;
+import org.hibernate.validator.constraints.Length;
+
+import java.util.Objects;
+
+@SuppressWarnings({"WeakerAccess", "unused"})
+public class SMSConfiguration {
+  @ValidIdentifier
+  private String identifier;
+  @Length(max = 512)
+  private String payload;
+  @Length(max = 512)
+  private String organisation;
+  @Length(max = 512)
+  private String auth_token;
+  @Length(max = 512)
+  private String accountid;
+  @Length(max = 256)
+  private String option;
+
+  public SMSConfiguration() {
+    super();
+  }
+
+  public static SMSConfiguration create(String identifier, String payload, String organisation, String auth_token, String accountid, String option) {
+    SMSConfiguration smsconfiguration = new SMSConfiguration();
+    smsconfiguration.setIdentifier(identifier);
+    smsconfiguration.setPayload(payload);
+    smsconfiguration.setOrganisation(organisation);
+    smsconfiguration.setAuth_token(auth_token);
+    smsconfiguration.setAccountid(accountid);
+    smsconfiguration.setOption(option);
+    return smsconfiguration;
+  }
+
+  public String getIdentifier() {
+    return identifier;
+  }
+
+  public void setIdentifier(String identifier) {
+    this.identifier = identifier;
+  }
+
+  public String getPayload() {
+    return payload;
+  }
+
+  public void setPayload(String payload) {
+    this.payload = payload;
+  }
+
+  public String getOrganisation() {
+    return organisation;
+  }
+
+  public void setOrganisation(String organisation) {
+    this.organisation = organisation;
+  }
+
+  public String getAuth_token() {
+    return auth_token;
+  }
+
+  public void setAuth_token(String auth_token) {
+    this.auth_token = auth_token;
+  }
+
+  public String getAccountid() {
+    return accountid;
+  }
+
+  public void setAccountid(String accountid) {
+    this.accountid = accountid;
+  }
+
+  public String getOption() {
+    return option;
+  }
+
+  public void setOption(String option) {
+    this.option = option;
+  }
+
+  @Override
+  public boolean equals(Object o) {
+    if (this == o) return true;
+    if (o == null || getClass() != o.getClass()) return false;
+    SMSConfiguration that = (SMSConfiguration) o;
+    return Objects.equals(identifier, that.identifier) &&
+            Objects.equals(payload, that.payload) &&
+            Objects.equals(organisation, that.organisation) &&
+            Objects.equals(auth_token, that.auth_token) &&
+            Objects.equals(accountid, that.accountid) &&
+            Objects.equals(option, that.option);
+  }
+
+  @Override
+  public int hashCode() {
+
+    return Objects.hash(identifier, payload, organisation, auth_token, accountid, option);
+  }
+}
diff --git a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/Sample.java b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/Sample.java
new file mode 100644
index 0000000..644dda9
--- /dev/null
+++ b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/domain/Sample.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.api.v1.domain;
+
+import java.util.Objects;
+import org.apache.fineract.cn.lang.validation.constraints.ValidIdentifier;
+import org.hibernate.validator.constraints.Length;
+
+@SuppressWarnings({"WeakerAccess", "unused"})
+public class Sample {
+  @ValidIdentifier
+  private String identifier;
+  @Length(max = 512)
+  private String payload;
+
+  public Sample() {
+    super();
+  }
+
+  public static Sample create(final String identifier, final String payload) {
+    final Sample sample = new Sample();
+    sample.setIdentifier(identifier);
+    sample.setPayload(payload);
+    return sample;
+  }
+
+  public String getIdentifier() {
+    return this.identifier;
+  }
+
+  public void setIdentifier(final String identifier) {
+    this.identifier = identifier;
+  }
+
+  public String getPayload() {
+    return payload;
+  }
+
+  public void setPayload(String payload) {
+    this.payload = payload;
+  }
+
+  @Override
+  public boolean equals(Object o) {
+    if (this == o) return true;
+    if (o == null || getClass() != o.getClass()) return false;
+    Sample sample = (Sample) o;
+    return Objects.equals(identifier, sample.identifier) &&
+            Objects.equals(payload, sample.payload);
+  }
+
+  @Override
+  public int hashCode() {
+    return Objects.hash(identifier, payload);
+  }
+}
diff --git a/api/src/main/java/org/apache/fineract/cn/notification/api/v1/events/NotificationEventConstants.java b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/events/NotificationEventConstants.java
new file mode 100644
index 0000000..39c6eb0
--- /dev/null
+++ b/api/src/main/java/org/apache/fineract/cn/notification/api/v1/events/NotificationEventConstants.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.api.v1.events;
+
+@SuppressWarnings("unused")
+public interface NotificationEventConstants {
+
+    String DESTINATION = "notification-v1";
+    String SELECTOR_NAME = "action";
+    String INITIALIZE = "initialize";
+    String POST_SAMPLE = "post-sample";
+    String SELECTOR_INITIALIZE = SELECTOR_NAME + " = '" + INITIALIZE + "'";
+    String SELECTOR_POST_SAMPLE = SELECTOR_NAME + " = '" + POST_SAMPLE + "'";
+
+}
diff --git a/api/src/test/java/org/apache/fineract/cn/notification/api/v1/domain/SampleTest.java b/api/src/test/java/org/apache/fineract/cn/notification/api/v1/domain/SampleTest.java
new file mode 100644
index 0000000..65cd1ac
--- /dev/null
+++ b/api/src/test/java/org/apache/fineract/cn/notification/api/v1/domain/SampleTest.java
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.api.v1.domain;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import org.apache.commons.lang.RandomStringUtils;
+import org.apache.fineract.cn.test.domain.ValidationTest;
+import org.apache.fineract.cn.test.domain.ValidationTestCase;
+import org.junit.runners.Parameterized;
+
+public class SampleTest extends ValidationTest<Sample> {
+
+  public SampleTest(ValidationTestCase<Sample> testCase) {
+    super(testCase);
+  }
+
+  @Override
+  protected Sample createValidTestSubject() {
+    return Sample.create("xxxx", "yyy");
+  }
+
+  @Parameterized.Parameters
+  public static Collection testCases() {
+    final Collection<ValidationTestCase> ret = new ArrayList<>();
+    ret.add(new ValidationTestCase<Sample>("basicCase")
+            .adjustment(x -> {})
+            .valid(true));
+    ret.add(new ValidationTestCase<Sample>("nullIdentifier")
+            .adjustment(x -> x.setIdentifier(null))
+            .valid(false));
+    ret.add(new ValidationTestCase<Sample>("tooShortIdentifier")
+            .adjustment(x -> x.setIdentifier("z"))
+            .valid(false));
+    ret.add(new ValidationTestCase<Sample>("tooLongPayload")
+            .adjustment(x -> x.setPayload(RandomStringUtils.randomAlphanumeric(513)))
+            .valid(false));
+    return ret;
+  }
+
+}
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 0000000..ca2370a
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+group 'org.apache.fineract.cn.notification'
+
+task publishApiToMavenLocal {
+    dependsOn gradle.includedBuild('api').task(':publishToMavenLocal')
+}
+
+task publishServiceToMavenLocal {
+    mustRunAfter publishApiToMavenLocal
+    dependsOn gradle.includedBuild('service').task(':publishToMavenLocal')
+}
+
+task publishComponentTestToMavenLocal {
+    mustRunAfter publishApiToMavenLocal
+    mustRunAfter publishServiceToMavenLocal
+    dependsOn gradle.includedBuild('component-test').task(':publishToMavenLocal')
+}
+
+task publishToMavenLocal {
+    group 'all'
+    dependsOn publishApiToMavenLocal
+    dependsOn publishServiceToMavenLocal
+    dependsOn publishComponentTestToMavenLocal
+}
+
+task prepareForTest {
+    group 'all'
+    dependsOn publishToMavenLocal
+    dependsOn gradle.includedBuild('component-test').task(':build')
+}
+
+task licenseFormat {
+    group 'all'
+    dependsOn gradle.includedBuild('api').task(':licenseFormat')
+    dependsOn gradle.includedBuild('service').task(':licenseFormat')
+    dependsOn gradle.includedBuild('component-test').task(':licenseFormat')
+}
+
+task rat {
+    group 'all'
+    dependsOn gradle.includedBuild('api').task(':rat')
+    dependsOn gradle.includedBuild('service').task(':rat')
+    dependsOn gradle.includedBuild('component-test').task(':rat')
+}
diff --git a/component-test/build.gradle b/component-test/build.gradle
new file mode 100644
index 0000000..0348f06
--- /dev/null
+++ b/component-test/build.gradle
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+buildscript {
+    ext {
+        springBootVersion = '1.4.1.RELEASE'
+    }
+
+    repositories {
+        jcenter()
+    }
+
+    dependencies {
+        classpath ("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
+    }
+}
+
+plugins {
+    id "com.github.hierynomus.license" version "0.13.1"
+    id("org.nosphere.apache.rat") version "0.3.1"
+}
+apply from: '../shared.gradle'
+
+dependencies {
+    compile(
+            [group: 'org.apache.fineract.cn.notification', name: 'api', version: project.version],
+            [group: 'org.apache.fineract.cn.notification', name: 'service', version: project.version],
+            [group: 'org.apache.fineract.cn.anubis', name: 'test', version: versions.frameworkanubis],
+            [group: 'org.apache.fineract.cn', name: 'api', version: versions.frameworkapi],
+            [group: 'org.apache.fineract.cn', name: 'test', version: versions.frameworktest],
+            [group: 'org.apache.fineract.cn', name: 'lang', version: versions.frameworklang],
+            [group: 'org.springframework.boot', name: 'spring-boot-starter-test']
+    )
+}
+
+publishing {
+    publications {
+        mavenJava(MavenPublication) {
+            from components.java
+        }
+    }
+}
diff --git a/component-test/settings.gradle b/component-test/settings.gradle
new file mode 100644
index 0000000..a07a3bc
--- /dev/null
+++ b/component-test/settings.gradle
@@ -0,0 +1,18 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+rootProject.name = 'component-test'
\ No newline at end of file
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/SuiteTestEnvironment.java b/component-test/src/main/java/org/apache/fineract/cn/notification/SuiteTestEnvironment.java
new file mode 100644
index 0000000..5f2b5f4
--- /dev/null
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/SuiteTestEnvironment.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification;
+
+import org.apache.fineract.cn.test.env.TestEnvironment;
+import org.apache.fineract.cn.test.fixture.cassandra.CassandraInitializer;
+import org.apache.fineract.cn.test.fixture.mariadb.MariaDBInitializer;
+import org.junit.ClassRule;
+import org.junit.rules.RuleChain;
+import org.junit.rules.RunExternalResourceOnce;
+import org.junit.rules.TestRule;
+
+/**
+ * This contains the database resources required by the test.  They are in a separate
+ * class so that the test suite can initialize them before the classes it calls. This
+ * makes test runs faster and prevents tests from "stepping on each other's toes" when
+ * initializing and de-initializing external resources.
+ */
+public class SuiteTestEnvironment {
+  static final String APP_VERSION = "1";
+  static final String APP_NAME = "notification-v" + APP_VERSION;
+
+  static final TestEnvironment testEnvironment = new TestEnvironment(APP_NAME);
+  static final CassandraInitializer cassandraInitializer = new CassandraInitializer();
+  static final MariaDBInitializer mariaDBInitializer = new MariaDBInitializer();
+
+  @ClassRule
+  public static TestRule orderClassRules = RuleChain
+      .outerRule(new RunExternalResourceOnce(testEnvironment))
+      .around(new RunExternalResourceOnce(cassandraInitializer))
+      .around(new RunExternalResourceOnce(mariaDBInitializer));
+}
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/TestSample.java b/component-test/src/main/java/org/apache/fineract/cn/notification/TestSample.java
new file mode 100644
index 0000000..3b2811e
--- /dev/null
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/TestSample.java
@@ -0,0 +1,137 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification;
+
+import org.apache.fineract.cn.notification.api.v1.client.NotificationManager;
+import org.apache.fineract.cn.notification.api.v1.domain.Sample;
+import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
+import java.util.List;
+import org.apache.commons.lang3.RandomStringUtils;
+import org.apache.fineract.cn.anubis.test.v1.TenantApplicationSecurityEnvironmentTestRule;
+import org.apache.fineract.cn.api.context.AutoUserContext;
+import org.apache.fineract.cn.notification.service.NotificationConfiguration;
+import org.apache.fineract.cn.test.fixture.TenantDataStoreContextTestRule;
+import org.apache.fineract.cn.test.listener.EnableEventRecording;
+import org.apache.fineract.cn.test.listener.EventRecorder;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.cloud.netflix.feign.EnableFeignClients;
+import org.springframework.cloud.netflix.ribbon.RibbonClient;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Import;
+import org.springframework.test.context.junit4.SpringRunner;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
+public class TestSample extends SuiteTestEnvironment {
+  private static final String LOGGER_NAME = "test-logger";
+  private static final String TEST_USER = "homer";
+
+
+  @Configuration
+  @EnableEventRecording
+  @EnableFeignClients(basePackages = {"org.apache.fineract.cn.notification.api.v1.client"})
+  @RibbonClient(name = APP_NAME)
+  @Import({NotificationConfiguration.class})
+  @ComponentScan("org.apache.fineract.cn.notification.listener")
+  public static class TestConfiguration {
+    public TestConfiguration() {
+      super();
+    }
+
+    @Bean(name = LOGGER_NAME)
+    public Logger logger() {
+      return LoggerFactory.getLogger(LOGGER_NAME);
+    }
+  }
+
+  @ClassRule
+  public final static TenantDataStoreContextTestRule tenantDataStoreContext = TenantDataStoreContextTestRule.forRandomTenantName(cassandraInitializer, mariaDBInitializer);
+
+  @Rule
+  public final TenantApplicationSecurityEnvironmentTestRule tenantApplicationSecurityEnvironment
+          = new TenantApplicationSecurityEnvironmentTestRule(testEnvironment, this::waitForInitialize);
+
+  private AutoUserContext userContext;
+
+  @Autowired
+  private NotificationManager testSubject;
+
+  @Autowired
+  private EventRecorder eventRecorder;
+
+  @SuppressWarnings("WeakerAccess")
+  @Autowired
+  @Qualifier(LOGGER_NAME)
+  Logger logger;
+
+  public TestSample() {
+    super();
+  }
+
+  @Before
+  public void prepTest() {
+    userContext = tenantApplicationSecurityEnvironment.createAutoUserContext(TestSample.TEST_USER);
+  }
+
+  @After
+  public void cleanTest() {
+    userContext.close();
+    eventRecorder.clear();
+  }
+
+  public boolean waitForInitialize() {
+    try {
+      return this.eventRecorder.wait(NotificationEventConstants.INITIALIZE, APP_VERSION);
+    } catch (final InterruptedException e) {
+      throw new IllegalStateException(e);
+    }
+  }
+
+  @Test
+  public void shouldCreateSample() throws InterruptedException {
+    logger.info("Running test shouldCreateSample.");
+    final Sample sample = Sample.create(RandomStringUtils.randomAlphanumeric(8), RandomStringUtils.randomAlphanumeric(512));
+    this.testSubject.createEntity(sample);
+
+    Assert.assertTrue(this.eventRecorder.wait(NotificationEventConstants.POST_SAMPLE, sample.getIdentifier()));
+
+    final Sample createdSample = this.testSubject.getEntity(sample.getIdentifier());
+    Assert.assertEquals(sample, createdSample);
+  }
+
+  @Test
+  public void shouldListSamples() {
+    logger.info("Running test shouldListSamples.");
+    final List<Sample> allEntities = this.testSubject.findAllEntities();
+    Assert.assertNotNull(allEntities);
+  }
+}
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/TestSuite.java b/component-test/src/main/java/org/apache/fineract/cn/notification/TestSuite.java
new file mode 100644
index 0000000..a4d42bf
--- /dev/null
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/TestSuite.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    TestSample.class,
+    //TODO: when you create a new component test, add it here so you can run it with the suite.
+})
+public class TestSuite extends SuiteTestEnvironment {
+}
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/listener/MigrationEventListener.java b/component-test/src/main/java/org/apache/fineract/cn/notification/listener/MigrationEventListener.java
new file mode 100644
index 0000000..c24b97c
--- /dev/null
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/listener/MigrationEventListener.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.listener;
+
+import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
+import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
+import org.apache.fineract.cn.test.listener.EventRecorder;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.jms.annotation.JmsListener;
+import org.springframework.messaging.handler.annotation.Header;
+import org.springframework.stereotype.Component;
+
+@SuppressWarnings("unused")
+@Component
+public class MigrationEventListener {
+
+  private final EventRecorder eventRecorder;
+
+  @Autowired
+  public MigrationEventListener(@SuppressWarnings("SpringJavaAutowiringInspection") final EventRecorder eventRecorder) {
+    super();
+    this.eventRecorder = eventRecorder;
+  }
+
+  @JmsListener(
+      subscription = NotificationEventConstants.DESTINATION,
+      destination = NotificationEventConstants.DESTINATION,
+      selector = NotificationEventConstants.SELECTOR_INITIALIZE
+  )
+  public void onInitialization(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                               final String payload) {
+    this.eventRecorder.event(tenant, NotificationEventConstants.INITIALIZE, payload, String.class);
+  }
+}
diff --git a/component-test/src/main/java/org/apache/fineract/cn/notification/listener/SampleEventListener.java b/component-test/src/main/java/org/apache/fineract/cn/notification/listener/SampleEventListener.java
new file mode 100644
index 0000000..85abe9e
--- /dev/null
+++ b/component-test/src/main/java/org/apache/fineract/cn/notification/listener/SampleEventListener.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.listener;
+
+import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
+import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
+import org.apache.fineract.cn.test.listener.EventRecorder;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.jms.annotation.JmsListener;
+import org.springframework.messaging.handler.annotation.Header;
+import org.springframework.stereotype.Component;
+
+@SuppressWarnings("unused")
+@Component
+public class SampleEventListener {
+
+  private final EventRecorder eventRecorder;
+
+  @Autowired
+  public SampleEventListener(@SuppressWarnings("SpringJavaAutowiringInspection") final EventRecorder eventRecorder) {
+    super();
+    this.eventRecorder = eventRecorder;
+  }
+
+  @JmsListener(
+      subscription = NotificationEventConstants.DESTINATION,
+      destination = NotificationEventConstants.DESTINATION,
+      selector = NotificationEventConstants.SELECTOR_POST_SAMPLE
+  )
+  public void onCreateSample(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                             final String payload) {
+    this.eventRecorder.event(tenant, NotificationEventConstants.POST_SAMPLE, payload, String.class);
+  }
+}
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..400f155
Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..c563c1a
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Fri May 18 16:18:58 MUT 2018
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-all.zip
diff --git a/gradlew b/gradlew
new file mode 100755
index 0000000..4453cce
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,172 @@
+#!/usr/bin/env sh
+
+##############################################################################
+##
+##  Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+        PRG="$link"
+    else
+        PRG=`dirname "$PRG"`"/$link"
+    fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+    echo "$*"
+}
+
+die ( ) {
+    echo
+    echo "$*"
+    echo
+    exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+  CYGWIN* )
+    cygwin=true
+    ;;
+  Darwin* )
+    darwin=true
+    ;;
+  MINGW* )
+    msys=true
+    ;;
+  NONSTOP* )
+    nonstop=true
+    ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+        # IBM's JDK on AIX uses strange locations for the executables
+        JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+        JAVACMD="$JAVA_HOME/bin/java"
+    fi
+    if [ ! -x "$JAVACMD" ] ; then
+        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+    fi
+else
+    JAVACMD="java"
+    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+    MAX_FD_LIMIT=`ulimit -H -n`
+    if [ $? -eq 0 ] ; then
+        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+            MAX_FD="$MAX_FD_LIMIT"
+        fi
+        ulimit -n $MAX_FD
+        if [ $? -ne 0 ] ; then
+            warn "Could not set maximum file descriptor limit: $MAX_FD"
+        fi
+    else
+        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+    fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+    JAVACMD=`cygpath --unix "$JAVACMD"`
+
+    # We build the pattern for arguments to be converted via cygpath
+    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+    SEP=""
+    for dir in $ROOTDIRSRAW ; do
+        ROOTDIRS="$ROOTDIRS$SEP$dir"
+        SEP="|"
+    done
+    OURCYGPATTERN="(^($ROOTDIRS))"
+    # Add a user-defined pattern to the cygpath arguments
+    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+    fi
+    # Now convert the arguments - kludge to limit ourselves to /bin/sh
+    i=0
+    for arg in "$@" ; do
+        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
+
+        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
+            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+        else
+            eval `echo args$i`="\"$arg\""
+        fi
+        i=$((i+1))
+    done
+    case $i in
+        (0) set -- ;;
+        (1) set -- "$args0" ;;
+        (2) set -- "$args0" "$args1" ;;
+        (3) set -- "$args0" "$args1" "$args2" ;;
+        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+    esac
+fi
+
+# Escape application args
+save ( ) {
+    for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+    echo " "
+}
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+  cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644
index 0000000..e95643d
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,84 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem  Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/service/build.gradle b/service/build.gradle
new file mode 100644
index 0000000..57f507d
--- /dev/null
+++ b/service/build.gradle
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+buildscript {
+    ext {
+        springBootVersion = '1.4.1.RELEASE'
+    }
+
+    repositories {
+        jcenter()
+    }
+
+    dependencies {
+        classpath ("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
+    }
+}
+
+plugins {
+    id "com.github.hierynomus.license" version "0.13.1"
+    id("org.nosphere.apache.rat") version "0.3.1"
+}
+
+apply from: '../shared.gradle'
+
+apply plugin: 'spring-boot'
+
+springBoot {
+    executable = true
+    classifier = 'boot'
+}
+
+dependencies {
+    compile(
+            [group: 'com.twilio.sdk', name: 'twilio', version: '7.17.+'],
+            [group: 'org.apache.fineract.cn.customer', name: 'api', version: versions.fineractcncustomer],
+            [group: 'org.springframework.cloud', name: 'spring-cloud-starter-config'],
+            [group: 'org.springframework.cloud', name: 'spring-cloud-starter-eureka'],
+            [group: 'org.springframework.boot', name: 'spring-boot-starter-jetty'],
+            //check this dependency
+            [group: 'org.springframework.boot', name: 'spring-boot-starter-mail', version: '1.4.3.RELEASE'],
+            [group: 'org.apache.fineract.cn.notification', name: 'api', version: project.version],
+            [group: 'org.apache.fineract.cn.anubis', name: 'library', version: versions.frameworkanubis],
+            [group: 'com.google.code.gson', name: 'gson'],
+            [group: 'org.apache.fineract.cn', name: 'lang', version: versions.frameworklang],
+            [group: 'org.apache.fineract.cn', name: 'async', version: versions.frameworkasync],
+            [group: 'org.apache.fineract.cn', name: 'cassandra', version: versions.frameworkcassandra],
+            [group: 'org.apache.fineract.cn', name: 'mariadb', version: versions.frameworkmariadb],
+            [group: 'org.apache.fineract.cn', name: 'command', version: versions.frameworkcommand],
+            [group: 'org.hibernate', name: 'hibernate-validator', version: versions.validator]
+    )
+}
+
+publishToMavenLocal.dependsOn bootRepackage
+
+publishing {
+    publications {
+        service(MavenPublication) {
+            from components.java
+            groupId project.group
+            artifactId project.name
+            version project.version
+        }
+        bootService(MavenPublication) {
+            // "boot" jar
+            artifact ("$buildDir/libs/$project.name-$version-boot.jar")
+            groupId project.group
+            artifactId ("$project.name-boot")
+            version project.version
+        }
+    }
+}
diff --git a/service/out/production/resources/application.yml b/service/out/production/resources/application.yml
new file mode 100644
index 0000000..37acaaf
--- /dev/null
+++ b/service/out/production/resources/application.yml
@@ -0,0 +1,78 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+spring:
+  cloud:
+    discovery:
+      enabled: false
+    config:
+      enabled: false
+
+eureka:
+  client:
+    serviceUrl:
+      defaultZone: http://localhost:8761/eureka/
+
+server:
+  port: 8081
+  contextPath: /notification/v1/*
+
+cassandra:
+  clusterName: staging_cluster
+  contactPoints: 127.0.0.1:9042,127.0.0.2:9042,127.0.0.3:9042
+  keyspace: seshat
+  cl:
+    read: LOCAL_QUORUM
+    write: LOCAL_QUORUM
+    delete: LOCAL_QUORUM
+
+mariadb:
+  driverClass: org.mariadb.jdbc.Driver
+  database: seshat
+  host: localhost
+  port: 3306
+  user: root
+  password: mysql
+
+bonecp:
+  idleMaxAgeInMinutes: 240
+  idleConnectionTestPeriodInMinutes: 60
+  maxConnectionsPerPartition: 10
+  minConnectionsPerPartition: 1
+  partitionCount: 2
+  acquireIncrement: 5
+  statementsCacheSize: 100
+
+async:
+  corePoolSize: 32
+  maxPoolSize: 16384
+  queueCapacity: 0
+  threadName: async-processor-
+
+flyway:
+  enabled: false
+
+fineract:
+  customer:
+    accountcreated:
+      message: Dear Valued Customer, Your account has been created.
+    accountclosed:
+      message: Dear Valued Customer, Your account has been successfully closed.
+
+
diff --git a/service/out/production/resources/bootstrap.yml b/service/out/production/resources/bootstrap.yml
new file mode 100644
index 0000000..76c2441
--- /dev/null
+++ b/service/out/production/resources/bootstrap.yml
@@ -0,0 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+spring:
+    application:
+        name: notification-v1
diff --git a/service/out/production/resources/db/migrations/mariadb/V1__initial_setup.sql b/service/out/production/resources/db/migrations/mariadb/V1__initial_setup.sql
new file mode 100644
index 0000000..ff9a61f
--- /dev/null
+++ b/service/out/production/resources/db/migrations/mariadb/V1__initial_setup.sql
@@ -0,0 +1,72 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--   http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing,
+-- software distributed under the License is distributed on an
+-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+-- KIND, either express or implied.  See the License for the
+-- specific language governing permissions and limitations
+-- under the License.
+--
+
+-- -----------------------------------------------------
+-- Table `fineract-cn-notification`.`email_gateway_configurations`
+-- -----------------------------------------------------
+CREATE TABLE IF NOT EXISTS `fineract-cn-notification`.`email_gateway_configurations` (
+  `id` INT(11) NOT NULL AUTO_INCREMENT,
+  `identifer` VARCHAR(45) NULL DEFAULT NULL,
+  `host` VARCHAR(45) NOT NULL,
+  `port` VARCHAR(45) NOT NULL,
+  `username` VARCHAR(45) NOT NULL,
+  `app_id` VARCHAR(45) NOT NULL,
+  PRIMARY KEY (`id`))
+ENGINE = InnoDB
+DEFAULT CHARACTER SET = latin1;
+
+
+-- -----------------------------------------------------
+-- Table `fineract-cn-notification`.`sms_gateway_configurations`
+-- -----------------------------------------------------
+CREATE TABLE IF NOT EXISTS `fineract-cn-notification`.`sms_gateway_configurations` (
+  `id` INT(11) NOT NULL AUTO_INCREMENT,
+  `identifier` VARCHAR(45) NULL DEFAULT NULL,
+  `accountsid` VARCHAR(255) NOT NULL,
+  `auth_token` VARCHAR(255) NOT NULL,
+  `option` VARCHAR(45) NULL DEFAULT NULL,
+  PRIMARY KEY (`id`))
+ENGINE = InnoDB
+DEFAULT CHARACTER SET = latin1;
+
+
+-- -----------------------------------------------------
+-- Table `fineract-cn-notification`.`templates`
+-- -----------------------------------------------------
+CREATE TABLE IF NOT EXISTS `fineract-cn-notification`.`templates` (
+  `id` INT(11) NOT NULL AUTO_INCREMENT,
+  PRIMARY KEY (`id`))
+ENGINE = InnoDB
+DEFAULT CHARACTER SET = latin1;
+
+-- ------------------------------------------------------
+
+CREATE TABLE sample (
+  id BIGINT NOT NULL AUTO_INCREMENT,
+  identifier VARCHAR(8) NOT NULL,
+  payload VARCHAR(512) NULL,
+  CONSTRAINT notification_pk PRIMARY KEY (id)
+);
+
+CREATE TABLE template_sample (
+  id BIGINT NOT NULL AUTO_INCREMENT,
+  identifier VARCHAR(8) NOT NULL,
+  payload VARCHAR(512) NULL,
+  CONSTRAINT template_sample_pk PRIMARY KEY (id)
+);
\ No newline at end of file
diff --git a/service/settings.gradle b/service/settings.gradle
new file mode 100644
index 0000000..1a4c2fd
--- /dev/null
+++ b/service/settings.gradle
@@ -0,0 +1,18 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+rootProject.name = 'service'
\ No newline at end of file
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/NotificationApplication.java b/service/src/main/java/org/apache/fineract/cn/notification/service/NotificationApplication.java
new file mode 100644
index 0000000..5968d0d
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/NotificationApplication.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service;
+
+import org.springframework.boot.SpringApplication;
+
+public class NotificationApplication {
+
+  public NotificationApplication() {
+    super();
+  }
+
+  public static void main(String[] args) {
+    SpringApplication.run(NotificationConfiguration.class, args);
+  }
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/NotificationConfiguration.java b/service/src/main/java/org/apache/fineract/cn/notification/service/NotificationConfiguration.java
new file mode 100644
index 0000000..c38d6bd
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/NotificationConfiguration.java
@@ -0,0 +1,103 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service;
+
+import org.apache.fineract.cn.anubis.config.EnableAnubis;
+import org.apache.fineract.cn.async.config.EnableAsync;
+import org.apache.fineract.cn.cassandra.config.EnableCassandra;
+import org.apache.fineract.cn.command.config.EnableCommandProcessing;
+import org.apache.fineract.cn.lang.config.EnableServiceException;
+import org.apache.fineract.cn.lang.config.EnableTenantContext;
+import org.apache.fineract.cn.mariadb.config.EnableMariaDB;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
+import org.springframework.mail.javamail.JavaMailSender;
+import org.springframework.mail.javamail.JavaMailSenderImpl;
+import org.springframework.web.servlet.config.annotation.PathMatchConfigurer;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
+
+import java.util.Properties;
+
+@SuppressWarnings("WeakerAccess")
+@Configuration
+@EnableAutoConfiguration
+@EnableDiscoveryClient
+@EnableAsync
+@EnableTenantContext
+@EnableCassandra
+@EnableMariaDB
+@EnableCommandProcessing
+@EnableAnubis
+@EnableServiceException
+@ConfigurationProperties(locations = {"details"})
+@ComponentScan({
+    "org.apache.fineract.cn.notification.service.rest",
+    "org.apache.fineract.cn.notification.service.internal.service",
+    "org.apache.fineract.cn.notification.service.internal.repository",
+    "org.apache.fineract.cn.notification.service.internal.command.handler"
+})
+@EnableJpaRepositories({
+    "org.apache.fineract.cn.notification.service.internal.repository"
+})
+public class NotificationConfiguration extends WebMvcConfigurerAdapter {
+
+  public NotificationConfiguration() {
+    super();
+  }
+
+  @Bean(name = ServiceConstants.LOGGER_NAME)
+  public Logger logger() {
+    return LoggerFactory.getLogger(ServiceConstants.LOGGER_NAME);
+  }
+
+  @Override
+  public void configurePathMatch(final PathMatchConfigurer configurer) {
+    configurer.setUseSuffixPatternMatch(Boolean.FALSE);
+  }
+
+
+
+  @Bean
+  @Qualifier("gmail")
+  public JavaMailSender getJavaMailSender() {
+
+    JavaMailSenderImpl mailSender = new JavaMailSenderImpl();
+    mailSender.setHost("smtp.gmail.com");
+    mailSender.setPort(587);
+
+    mailSender.setUsername("ebenezergraham69@gmail.com");
+    mailSender.setPassword("fdzmzbhbmtkafzvq");
+
+    Properties props = mailSender.getJavaMailProperties();
+    props.put("mail.transport.protocol", "smtp");
+    props.put("mail.smtp.auth", "true");
+    props.put("mail.smtp.starttls.enable", "true");
+    props.put("mail.debug", "true");
+
+    return mailSender;
+  }
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/ServiceConstants.java b/service/src/main/java/org/apache/fineract/cn/notification/service/ServiceConstants.java
new file mode 100644
index 0000000..cb4e902
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/ServiceConstants.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service;
+
+public interface ServiceConstants {
+  String LOGGER_NAME = "rest-logger";
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/InitializeServiceCommand.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/InitializeServiceCommand.java
new file mode 100644
index 0000000..21335ac
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/InitializeServiceCommand.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.command;
+
+public class InitializeServiceCommand {
+
+  public InitializeServiceCommand() {
+    super();
+  }
+
+  @Override
+  public String toString() {
+    return "InitializeServiceCommand{}";
+  }
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/SampleCommand.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/SampleCommand.java
new file mode 100644
index 0000000..3fa3aac
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/SampleCommand.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.command;
+
+import org.apache.fineract.cn.notification.api.v1.domain.Sample;
+
+public class SampleCommand {
+
+  private final Sample sample;
+
+  public SampleCommand(final Sample sample) {
+    super();
+    this.sample = sample;
+  }
+
+  public Sample sample() {
+    return this.sample;
+  }
+
+  @Override
+  public String toString() {
+    return "SampleCommand{" +
+        "sample=" + sample.getIdentifier() +
+        '}';
+  }
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/MigrationAggregate.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/MigrationAggregate.java
new file mode 100644
index 0000000..da7cc6e
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/MigrationAggregate.java
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.command.handler;
+
+import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
+import org.apache.fineract.cn.notification.service.ServiceConstants;
+import org.apache.fineract.cn.notification.service.internal.command.InitializeServiceCommand;
+import javax.sql.DataSource;
+import org.apache.fineract.cn.command.annotation.Aggregate;
+import org.apache.fineract.cn.command.annotation.CommandHandler;
+import org.apache.fineract.cn.command.annotation.CommandLogLevel;
+import org.apache.fineract.cn.command.annotation.EventEmitter;
+import org.apache.fineract.cn.lang.ApplicationName;
+import org.apache.fineract.cn.mariadb.domain.FlywayFactoryBean;
+import org.slf4j.Logger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.transaction.annotation.Transactional;
+
+@SuppressWarnings({
+    "unused"
+})
+@Aggregate
+public class MigrationAggregate {
+
+  private final Logger logger;
+  private final DataSource dataSource;
+  private final FlywayFactoryBean flywayFactoryBean;
+  private final ApplicationName applicationName;
+
+  @Autowired
+  public MigrationAggregate(@Qualifier(ServiceConstants.LOGGER_NAME) final Logger logger,
+                            final DataSource dataSource,
+                            final FlywayFactoryBean flywayFactoryBean,
+                            final ApplicationName applicationName) {
+    super();
+    this.logger = logger;
+    this.dataSource = dataSource;
+    this.flywayFactoryBean = flywayFactoryBean;
+    this.applicationName = applicationName;
+  }
+
+  @CommandHandler(logStart = CommandLogLevel.INFO, logFinish = CommandLogLevel.INFO)
+  @Transactional
+  @EventEmitter(selectorName = NotificationEventConstants.SELECTOR_NAME, selectorValue = NotificationEventConstants.INITIALIZE)
+  public String initialize(final InitializeServiceCommand initializeServiceCommand) {
+    this.logger.debug("Start service migration.");
+    this.flywayFactoryBean.create(this.dataSource).migrate();
+    return this.applicationName.getVersionString();
+  }
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/SampleAggregate.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/SampleAggregate.java
new file mode 100644
index 0000000..a21589d
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/command/handler/SampleAggregate.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.command.handler;
+
+import org.apache.fineract.cn.notification.api.v1.events.NotificationEventConstants;
+import org.apache.fineract.cn.notification.service.internal.command.SampleCommand;
+import org.apache.fineract.cn.command.annotation.Aggregate;
+import org.apache.fineract.cn.command.annotation.CommandHandler;
+import org.apache.fineract.cn.command.annotation.CommandLogLevel;
+import org.apache.fineract.cn.command.annotation.EventEmitter;
+import org.apache.fineract.cn.notification.service.internal.repository.SampleJpaEntity;
+import org.apache.fineract.cn.notification.service.internal.repository.SampleJpaEntityRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+
+@SuppressWarnings("unused")
+@Aggregate
+public class SampleAggregate {
+
+  private final SampleJpaEntityRepository sampleJpaEntityRepository;
+
+  @Autowired
+  public SampleAggregate(final SampleJpaEntityRepository sampleJpaEntityRepository) {
+    super();
+    this.sampleJpaEntityRepository = sampleJpaEntityRepository;
+  }
+
+  //TODO: Think about your command handler logging, then delete this comment.
+  // The log levels provided in the command handler cause log messages to be emitted each time this
+  // command handler is called before and after the call. Before the call, the command is logged
+  // using its toString() method, and after the call, the emitted event is logged via its toString()
+  // method.
+  //
+  // If you wish to adjust the information in the log messages, do so via the toString() methods.
+  // Financial transactions, passwords, and customer address data are examples of information which
+  // should not be placed in the logs.
+  //
+  // If a command handler should not emit a log message, change logStart and logFinish to:
+  // CommandLogLevel.NONE.
+  @CommandHandler(logStart = CommandLogLevel.INFO, logFinish = CommandLogLevel.INFO)
+  @Transactional
+  @EventEmitter(selectorName = NotificationEventConstants.SELECTOR_NAME, selectorValue = NotificationEventConstants.POST_SAMPLE)
+  public String sample(final SampleCommand sampleCommand) {
+
+    final SampleJpaEntity entity = new SampleJpaEntity();
+    entity.setIdentifier(sampleCommand.sample().getIdentifier());
+    entity.setPayload(sampleCommand.sample().getPayload());
+    this.sampleJpaEntityRepository.save(entity);
+
+    return sampleCommand.sample().getIdentifier();
+  }
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/mapper/EmailConfigurationMapper.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/mapper/EmailConfigurationMapper.java
new file mode 100644
index 0000000..10e4a86
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/mapper/EmailConfigurationMapper.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.mapper;
+
+import org.apache.fineract.cn.notification.api.v1.domain.EmailConfiguration;
+import org.apache.fineract.cn.notification.service.internal.repository.EmailGatewayConfiguration;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class EmailConfigurationMapper {
+
+  private EmailConfigurationMapper() {
+    super();
+  }
+
+  public static EmailConfiguration map(final EmailGatewayConfiguration emailGatewayConfiguration) {
+    final EmailConfiguration emailConfiguration = new EmailConfiguration();
+    emailConfiguration.setIdentifier(emailGatewayConfiguration.getIdentifier());
+    emailConfiguration.setHost(emailGatewayConfiguration.getHost());
+    emailConfiguration.setPort(emailGatewayConfiguration.getPort());
+    emailConfiguration.setUsername(emailGatewayConfiguration.getUsername());
+    emailConfiguration.setApp_id(emailGatewayConfiguration.getApp_id());
+    return emailConfiguration;
+  }
+
+//  public static List<EmailGatewayConfiguration> map(final List<EmailGatewayConfiguration> emailGatewayConfiguration) {
+//    final ArrayList<EmailGatewayConfiguration> entities = new ArrayList<>(emailGatewayConfiguration.size());
+//    entities.addAll(emailGatewayConfiguration.stream().map(EmailGatewayConfiguration::map).collect(Collectors.toList()));
+//    return entities;
+//  }
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/mapper/SMSConfigurationMapper.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/mapper/SMSConfigurationMapper.java
new file mode 100644
index 0000000..43e6c1c
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/mapper/SMSConfigurationMapper.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.mapper;
+
+import org.apache.fineract.cn.notification.api.v1.domain.SMSConfiguration;
+import org.apache.fineract.cn.notification.service.internal.repository.SMSGatewayConfiguration;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class SMSConfigurationMapper {
+
+  private SMSConfigurationMapper() {
+    super();
+  }
+
+  public static SMSConfiguration map(final SMSGatewayConfiguration smsGatewayConfiguration) {
+    final SMSConfiguration smsConfiguration = new SMSConfiguration();
+    smsConfiguration.setIdentifier(smsGatewayConfiguration.getIdentifier());
+    smsConfiguration.setAccountid(smsGatewayConfiguration.getAccountid());
+    smsConfiguration.setAuth_token(smsGatewayConfiguration.getAuth_token());
+    return smsConfiguration;
+  }
+
+//  public static List<SMSGatewayConfiguration> map(final List<SMSGatewayConfiguration> smsGatewayConfiguration) {
+//    final ArrayList<SMSGatewayConfiguration> entities = new ArrayList<>(smsGatewayConfiguration.size());
+//    entities.addAll(smsGatewayConfiguration.stream().map(SMSConfigurationMapper::map).collect(Collectors.toList()));
+//    return entities;
+//  }
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/mapper/SampleMapper.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/mapper/SampleMapper.java
new file mode 100644
index 0000000..a56b7aa
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/mapper/SampleMapper.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.mapper;
+
+import org.apache.fineract.cn.notification.api.v1.domain.Sample;
+import org.apache.fineract.cn.notification.service.internal.repository.SampleJpaEntity;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class SampleMapper {
+
+  private SampleMapper() {
+    super();
+  }
+
+  public static Sample map(final SampleJpaEntity sampleJpaEntity) {
+    final Sample sample = new Sample();
+    sample.setIdentifier(sampleJpaEntity.getIdentifier());
+    sample.setPayload(sampleJpaEntity.getPayload());
+    return sample;
+  }
+
+  public static List<Sample> map(final List<SampleJpaEntity> sampleJpaEntities) {
+    final ArrayList<Sample> samples = new ArrayList<>(sampleJpaEntities.size());
+    samples.addAll(sampleJpaEntities.stream().map(SampleMapper::map).collect(Collectors.toList()));
+    return samples;
+  }
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/EmailGatewayConfiguration.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/EmailGatewayConfiguration.java
new file mode 100644
index 0000000..c344708
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/EmailGatewayConfiguration.java
@@ -0,0 +1,124 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.repository;
+
+import javax.persistence.*;
+
+@SuppressWarnings("unused")
+@Entity
+@Table(name = "email_gateway_configuration")
+public class EmailGatewayConfiguration {
+
+  @Id
+  @GeneratedValue(strategy = GenerationType.IDENTITY)
+  @Column(name = "id")
+  private Long id;
+  @Column(name = "identifier")
+  private String identifier;
+  @Column(name = "host")
+  private String host;
+  @Column(name = "port")
+  private String port;
+  @Column(name = "username")
+  private String username;
+  @Column(name = "app_id")
+  private String app_id;
+  @Column(name = "smtp_auth")
+  private String smtp_auth;
+  @Column(name = "start_tls")
+  private String start_tls;
+  @Column(name = "option")
+  private String option;
+
+  public EmailGatewayConfiguration() {
+    super();
+  }
+
+  public Long getId() {
+    return id;
+  }
+
+  public void setId(Long id) {
+    this.id = id;
+  }
+
+  public String getIdentifier() {
+    return this.identifier;
+  }
+
+  public void setIdentifier(final String identifier) {
+    this.identifier = identifier;
+  }
+
+  public String getHost() {
+    return host;
+  }
+
+  public void setHost(String host) {
+    this.host = host;
+  }
+
+  public String getPort() {
+    return port;
+  }
+
+  public void setPort(String port) {
+    this.port = port;
+  }
+
+  public String getUsername() {
+    return username;
+  }
+
+  public void setUsername(String username) {
+    this.username = username;
+  }
+
+  public String getApp_id() {
+    return app_id;
+  }
+
+  public void setApp_id(String app_id) {
+    this.app_id = app_id;
+  }
+
+  public String getSmtp_auth() {
+    return smtp_auth;
+  }
+
+  public void setSmtp_auth(String smtp_auth) {
+    this.smtp_auth = smtp_auth;
+  }
+
+  public String getStart_tls() {
+    return start_tls;
+  }
+
+  public void setStart_tls(String start_tls) {
+    this.start_tls = start_tls;
+  }
+
+  public String getOption() {
+    return option;
+  }
+
+  public void setOption(String option) {
+    this.option = option;
+  }
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/EmailGatewayConfigurationRepository.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/EmailGatewayConfigurationRepository.java
new file mode 100644
index 0000000..b380def
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/EmailGatewayConfigurationRepository.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.repository;
+
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.stereotype.Repository;
+
+import java.util.Optional;
+
+@Repository
+public interface EmailGatewayConfigurationRepository extends JpaRepository<EmailGatewayConfiguration, Long> {
+  Optional<EmailGatewayConfiguration> findByIdentifier(String identifier);
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SMSGatewayConfiguration.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SMSGatewayConfiguration.java
new file mode 100644
index 0000000..770db6a
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SMSGatewayConfiguration.java
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.repository;
+
+import javax.persistence.*;
+
+@SuppressWarnings("unused")
+@Entity
+@Table(name = "sms_gateway_configuration")
+public class SMSGatewayConfiguration {
+
+  @Id
+  @GeneratedValue(strategy = GenerationType.IDENTITY)
+  @Column(name = "id")
+  private Long id;
+  @Column(name = "identifier")
+  private String identifier;
+  @Column(name = "organisation")
+  private String organisation;
+  @Column(name = "auth_token")
+  private String auth_token;
+  @Column(name = "accountid")
+  private String accountid;
+  @Column(name = "option")
+  private String option;
+
+  public SMSGatewayConfiguration() {
+    super();
+  }
+
+  public Long getId() {
+    return id;
+  }
+
+  public void setId(Long id) {
+    this.id = id;
+  }
+
+  public String getIdentifier() {
+    return this.identifier;
+  }
+
+  public void setIdentifier(final String identifier) {
+    this.identifier = identifier;
+  }
+
+  public String getOrganisation() {
+    return organisation;
+  }
+
+  public void setOrganisation(String organisation) {
+    this.organisation = organisation;
+  }
+
+  public String getAuth_token() {
+    return auth_token;
+  }
+
+  public void setAuth_token(String auth_token) {
+    this.auth_token = auth_token;
+  }
+
+  public String getAccountid() {
+    return accountid;
+  }
+
+  public void setAccountid(String accountid) {
+    this.accountid = accountid;
+  }
+
+  public String getOption() {
+    return option;
+  }
+
+  public void setOption(String option) {
+    this.option = option;
+  }
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SMSGatewayConfigurationRepository.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SMSGatewayConfigurationRepository.java
new file mode 100644
index 0000000..7daae78
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SMSGatewayConfigurationRepository.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.repository;
+
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.stereotype.Repository;
+
+import java.util.Optional;
+
+@Repository
+public interface SMSGatewayConfigurationRepository extends JpaRepository<SMSGatewayConfiguration, Long> {
+  Optional<SMSGatewayConfiguration> findByIdentifier(String identifier);
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SampleJpaEntity.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SampleJpaEntity.java
new file mode 100644
index 0000000..f740d85
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SampleJpaEntity.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.repository;
+
+import javax.persistence.*;
+
+@SuppressWarnings("unused")
+@Entity
+@Table(name = "template_samples")
+public class SampleJpaEntity {
+
+  @Id
+  @GeneratedValue(strategy = GenerationType.IDENTITY)
+  @Column(name = "id")
+  private Long id;
+  @Column(name = "identifier")
+  private String identifier;
+  @Column(name = "payload")
+  private String payload;
+
+  public SampleJpaEntity() {
+    super();
+  }
+
+  public Long getId() {
+    return id;
+  }
+
+  public void setId(Long id) {
+    this.id = id;
+  }
+
+  public String getIdentifier() {
+    return this.identifier;
+  }
+
+  public void setIdentifier(final String identifier) {
+    this.identifier = identifier;
+  }
+
+  public String getPayload() {
+    return payload;
+  }
+
+  public void setPayload(String payload) {
+    this.payload = payload;
+  }
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SampleJpaEntityRepository.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SampleJpaEntityRepository.java
new file mode 100644
index 0000000..b4d8abd
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/repository/SampleJpaEntityRepository.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.repository;
+
+import java.util.Optional;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface SampleJpaEntityRepository extends JpaRepository<SampleJpaEntity, Long> {
+  Optional<SampleJpaEntity> findByIdentifier(String identifier);
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/EmailSender.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/EmailSender.java
new file mode 100644
index 0000000..bebb3c9
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/EmailSender.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.service;
+
+
+import org.apache.fineract.cn.notification.service.internal.mapper.EmailConfigurationMapper;
+import org.apache.fineract.cn.notification.service.internal.repository.EmailGatewayConfiguration;
+import org.apache.fineract.cn.notification.service.internal.repository.EmailGatewayConfigurationRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.mail.SimpleMailMessage;
+import org.springframework.mail.javamail.JavaMailSender;
+import org.springframework.stereotype.Service;
+
+import java.util.Optional;
+
+@Service
+public class EmailSender {
+
+    @Autowired
+    @Qualifier("gmail")
+    private JavaMailSender sender;
+
+    private final EmailGatewayConfigurationRepository emailGatewayConfigurationRepository;
+
+    @Autowired
+    public EmailSender(final EmailGatewayConfigurationRepository emailGatewayConfigurationRepository) {
+        super();
+        this.emailGatewayConfigurationRepository = emailGatewayConfigurationRepository;
+    }
+
+//    public Optional<EmailGatewayConfiguration> findByIdentifier(final String identifier) {
+//        return this.emailGatewayConfigurationRepository.findByIdentifier(identifier).map(EmailGatewayConfiguration::map);
+//    }
+
+    public void sendEmail(String to, String subject, String message) {
+        SimpleMailMessage mail = new SimpleMailMessage();
+        mail.setTo(to);
+        mail.setSubject(subject);
+        mail.setText(message);
+        sender.send(mail);
+    }
+
+}
\ No newline at end of file
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SMSSender.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SMSSender.java
new file mode 100644
index 0000000..d626b22
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SMSSender.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.service;
+
+
+import com.twilio.Twilio;
+import com.twilio.rest.api.v2010.account.Message;
+import com.twilio.type.PhoneNumber;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Configuration;
+import com.twilio.rest.api.v2010.account.MessageCreator;
+import org.springframework.stereotype.Service;
+
+@Service
+@ConfigurationProperties(prefix ="smssender")
+public class SMSSender {
+
+    //@Value(value = "${smssender.accountSID}")
+    public String ACCOUNT_SID = "AC1fde2c6f26f367b93231c5fdb944c908";
+
+    //@Value("${smssender.authToken}")
+    public String AUTH_TOKEN = "bc9a53e41745b8471e0ecafc859d86aa";
+
+    //@Value("${smssender.senderNumber}")
+    public String sender = "+1 510-944-1898";
+
+    //@Value("${fineract.customer.accountcreated}")
+
+    public String template = "Test from the demo-server";
+
+    public void sendSMS(String receiver, String template) {
+
+        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
+
+        MessageCreator messageCreator = Message.creator(ACCOUNT_SID,new PhoneNumber(receiver), new PhoneNumber(sender), template);
+        Message message = messageCreator.create();
+        System.out.println(message.getSid());
+        System.out.println(message.getStatus());
+    }
+
+    }
\ No newline at end of file
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SampleService.java b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SampleService.java
new file mode 100644
index 0000000..a0e4f71
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/internal/service/SampleService.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.internal.service;
+
+import org.apache.fineract.cn.notification.api.v1.domain.Sample;
+import org.apache.fineract.cn.notification.service.internal.mapper.SampleMapper;
+import org.apache.fineract.cn.notification.service.internal.repository.SampleJpaEntityRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Optional;
+
+@Service
+public class SampleService {
+
+  private final SampleJpaEntityRepository sampleJpaEntityRepository;
+
+  @Autowired
+  public SampleService(final SampleJpaEntityRepository sampleJpaEntityRepository) {
+    super();
+    this.sampleJpaEntityRepository = sampleJpaEntityRepository;
+  }
+
+  public List<Sample> findAllEntities() {
+    return SampleMapper.map(this.sampleJpaEntityRepository.findAll());
+  }
+
+  public Optional<Sample> findByIdentifier(final String identifier) {
+    return this.sampleJpaEntityRepository.findByIdentifier(identifier).map(SampleMapper::map);
+  }
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/AccountingEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/AccountingEventListener.java
new file mode 100644
index 0000000..9266b89
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/AccountingEventListener.java
@@ -0,0 +1,124 @@
+ /*
+         * Licensed to the Apache Software Foundation (ASF) under one
+         * or more contributor license agreements.  See the NOTICE file
+         * distributed with this work for additional information
+         * regarding copyright ownership.  The ASF licenses this file
+         * to you under the Apache License, Version 2.0 (the
+         * "License"); you may not use this file except in compliance
+         * with the License.  You may obtain a copy of the License at
+         *
+         *   http://www.apache.org/licenses/LICENSE-2.0
+         *
+         * Unless required by applicable law or agreed to in writing,
+         * software distributed under the License is distributed on an
+         * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+         * KIND, either express or implied.  See the License for the
+         * specific language governing permissions and limitations
+         * under the License.
+         */
+/*
+        package org.apache.fineract.cn.notification.service.listener;
+
+        import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
+        import org.apache.fineract.cn.accounting.service.internal.service.AccountService;
+        import org.apache.fineract.cn.notification.service.internal.service.EmailSender;
+        import org.apache.fineract.cn.notification.service.internal.service.SMSSender;
+        import org.springframework.beans.factory.annotation.Autowired;
+        import org.springframework.jms.annotation.JmsListener;
+        import org.springframework.messaging.handler.annotation.Header;
+        import org.springframework.stereotype.Component;
+        import org.apache.fineract.cn.accounting.api.v1.EventConstants;
+
+
+@SuppressWarnings("unused")
+@Component
+public class AccountingEventListener {
+
+
+    @Autowired
+    public AccountingEventListener( final AccountService accountingManager) {
+        this.accountService = accountingManager;
+    }
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_POST_ACCOUNT,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onCreateAccount(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant, final String payload) {
+        accountService.findAccount(tenant);
+        String receiver = "";
+        String template = "";
+        smsSender.sendSMS(receiver,template);
+        emailSender.sendEmail(receiver,"Hello", "You account has been created");
+    }
+
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_PUT_ACCOUNT,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onChangeAccount(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                final String payload) {
+        this.logger.debug("Account modified.");
+        this.eventRecorder.event(tenant, EventConstants.PUT_ACCOUNT, payload, String.class);
+    }
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_CLOSE_ACCOUNT,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onCloseAccount(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                               final String payload) {
+        this.logger.debug("Account closed.");
+        this.eventRecorder.event(tenant, EventConstants.CLOSE_ACCOUNT, payload, String.class);
+    }
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_LOCK_ACCOUNT,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onLockAccount(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                              final String payload) {
+        this.logger.debug("Account locked.");
+        this.eventRecorder.event(tenant, EventConstants.LOCK_ACCOUNT, payload, String.class);
+    }
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_UNLOCK_ACCOUNT,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onUnlockAccount(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                final String payload) {
+        this.logger.debug("Account unlocked.");
+        this.eventRecorder.event(tenant, EventConstants.UNLOCK_ACCOUNT, payload, String.class);
+    }
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_REOPEN_ACCOUNT,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onReopenAccount(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                final String payload) {
+        this.logger.debug("Account reopened.");
+        this.eventRecorder.event(tenant, EventConstants.REOPEN_ACCOUNT, payload, String.class);
+    }
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_DELETE_ACCOUNT,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onDeleteAccount(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                final String payload) {
+        this.logger.debug("Account deleted.");
+        this.eventRecorder.event(tenant, EventConstants.DELETE_ACCOUNT, payload, String.class);
+    }
+
+}
+ */
\ No newline at end of file
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/ChequeEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/ChequeEventListener.java
new file mode 100644
index 0000000..97dd5e2
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/ChequeEventListener.java
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+package org.apache.fineract.cn.notification.service.listener;
+
+import org.apache.fineract.cn.cheque.AbstractChequeTest;
+import org.apache.fineract.cn.cheque.api.v1.EventConstants;
+import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
+import org.slf4j.Logger;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.jms.annotation.JmsListener;
+import org.springframework.messaging.handler.annotation.Header;
+import org.springframework.stereotype.Component;
+
+@Component
+public class ChequeEventListener {
+
+    private final Logger logger;
+
+    public ChequeEventListener(@Qualifier(AbstractChequeTest.TEST_LOGGER) final Logger logger) {
+        super();
+        this.logger = logger;
+    }
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_ISSUE_CHEQUES,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onIssueCheques(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                               final String payload) {
+        this.logger.debug("Cheques issued.");
+    }
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_CHEQUE_TRANSACTION,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onChequeTransaction(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                    final String payload) {
+        this.logger.debug("Cheque transaction processed.");
+        this.eventRecorder.event(tenant, EventConstants.CHEQUE_TRANSACTION, payload, String.class);
+    }
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_CHEQUE_TRANSACTION_APPROVED,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onChequeApproved(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                 final String payload) {
+        this.logger.debug("Cheque transaction approved.");
+        this.eventRecorder.event(tenant, EventConstants.CHEQUE_TRANSACTION_APPROVED, payload, String.class);
+    }
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_CHEQUE_TRANSACTION_CANCELED,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onChequeCanceled(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                 final String payload) {
+        this.logger.debug("Cheque transaction canceled.");
+        this.eventRecorder.event(tenant, EventConstants.CHEQUE_TRANSACTION_CANCELED, payload, String.class);
+    }
+
+}
+*/
\ No newline at end of file
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/CustomerEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/CustomerEventListener.java
new file mode 100644
index 0000000..73d3d1d
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/CustomerEventListener.java
@@ -0,0 +1,200 @@
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one
+     * or more contributor license agreements.  See the NOTICE file
+     * distributed with this work for additional information
+     * regarding copyright ownership.  The ASF licenses this file
+     * to you under the Apache License, Version 2.0 (the
+     * "License"); you may not use this file except in compliance
+     * with the License.  You may obtain a copy of the License at
+     *
+     *   http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing,
+     * software distributed under the License is distributed on an
+     * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+     * KIND, either express or implied.  See the License for the
+     * specific language governing permissions and limitations
+     * under the License.
+     */
+
+package org.apache.fineract.cn.notification.service.listener;
+
+import org.apache.fineract.cn.customer.api.v1.CustomerEventConstants;
+import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
+import org.apache.fineract.cn.customer.api.v1.client.CustomerManager;
+import org.apache.fineract.cn.customer.api.v1.domain.ContactDetail;
+import org.apache.fineract.cn.customer.api.v1.domain.Customer;
+import org.apache.fineract.cn.notification.service.internal.service.EmailSender;
+import org.apache.fineract.cn.notification.service.internal.service.SMSSender;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.jms.annotation.JmsListener;
+import org.springframework.messaging.handler.annotation.Header;
+import org.springframework.stereotype.Component;
+
+
+@Component
+public class CustomerEventListener {
+
+        private CustomerManager customerManager;
+        private SMSSender smsSender;
+        private EmailSender emailSender;
+
+        @Autowired
+        public CustomerEventListener( final CustomerManager customerManager, SMSSender smsSender,
+                                 final EmailSender emailSender ) {
+            this.customerManager = customerManager;
+            this.smsSender = smsSender;
+            this.emailSender = emailSender;
+        }
+
+        @JmsListener(
+                destination = CustomerEventConstants.DESTINATION,
+                selector = CustomerEventConstants.SELECTOR_POST_CUSTOMER
+        )
+        public void customerCreatedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                         final String payload) {
+
+            Customer customer = customerManager.findCustomer(payload);
+            if (customer.getContactDetails().size() > 0) {
+                customer.getContactDetails().forEach(contactDetail -> {
+                    if (contactDetail.getType().equals(ContactDetail.Type.PHONE)) {
+                        String receiverNumber = customer.getContactDetails().get(0).getValue();
+                        // TODO: pass receiver number for templating and localization.
+                        smsSender.sendSMS(receiverNumber, "Dear Valued Customer, Your account has been created");
+                    } else if (contactDetail.getType().equals(ContactDetail.Type.EMAIL)) {
+                        String emailAddress = customer.getContactDetails().get(0).getValue();
+                        // TODO: pass email address for templating and localization.
+                        emailSender.sendEmail(emailAddress, "Account created", "Dear Valued Customer, Your account has been created");
+                    }
+                });
+            }
+        }
+
+    @JmsListener(
+            destination = CustomerEventConstants.DESTINATION,
+            selector = CustomerEventConstants.SELECTOR_ACTIVATE_CUSTOMER
+    )
+    public void customerActivatedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                       final String payload) {
+        Customer customer = customerManager.findCustomer(payload);
+        if(customer.getCurrentState().equalsIgnoreCase("ACTIVE")){
+            customer.getContactDetails().forEach(contact-> {
+                if (contact.getType().equals(ContactDetail.Type.PHONE)) {
+                String receiverNumber = customer.getContactDetails().get(0).getValue();
+                smsSender.sendSMS(receiverNumber, "Dear Valued Customer, Your account has been Activated");
+            } else if (contact.getType().equals(ContactDetail.Type.EMAIL)) {
+                String emailAddress = customer.getContactDetails().get(0).getValue();
+                // TODO: pass email address for templating and localization.
+                emailSender.sendEmail(emailAddress, "Account created", "Dear Valued Customer, Your account has been Activated");
+            }
+            });
+        }
+    }
+
+    @JmsListener(
+            destination = CustomerEventConstants.DESTINATION,
+            selector = CustomerEventConstants.SELECTOR_LOCK_CUSTOMER
+    )
+    public void customerLockedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                    final String payload) {
+        Customer customer = customerManager.findCustomer(payload);
+        if(customer.getCurrentState().equalsIgnoreCase("LOCKED")){
+            customer.getContactDetails().forEach(contact-> {
+                if (contact.getType().equals(ContactDetail.Type.PHONE)) {
+                    String receiverNumber = customer.getContactDetails().get(0).getValue();
+                    smsSender.sendSMS(receiverNumber, "Dear Valued Customer, Your account has been Locked");
+                } else if (contact.getType().equals(ContactDetail.Type.EMAIL)) {
+                    String emailAddress = customer.getContactDetails().get(0).getValue();
+                    // TODO: pass email address for templating and localization.
+                    emailSender.sendEmail(emailAddress, "Account created", "Dear Valued Customer, Your account has been Locked");
+                }
+            });
+        }
+    }
+
+    @JmsListener(
+            destination = CustomerEventConstants.DESTINATION,
+            selector = CustomerEventConstants.SELECTOR_UNLOCK_CUSTOMER
+    )
+    public void customerUnlockedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                      final String payload) {
+        Customer customer = customerManager.findCustomer(payload);
+        if(customer.getCurrentState().equalsIgnoreCase("LOCKED")){
+            customer.getContactDetails().forEach(contact-> {
+                if (contact.getType().equals(ContactDetail.Type.PHONE)) {
+                    String receiverNumber = customer.getContactDetails().get(0).getValue();
+                    smsSender.sendSMS(receiverNumber, "Dear Valued Customer, Your account has been Unlocked");
+                } else if (contact.getType().equals(ContactDetail.Type.EMAIL)) {
+                    String emailAddress = customer.getContactDetails().get(0).getValue();
+                    // TODO: pass email address for templating and localization.
+                    emailSender.sendEmail(emailAddress, "Account created", "Dear Valued Customer, Your account has been Unlocked");
+                }
+            });
+        }
+    }
+
+    @JmsListener(
+            destination = CustomerEventConstants.DESTINATION,
+            selector = CustomerEventConstants.SELECTOR_CLOSE_CUSTOMER
+    )
+    public void customerClosedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                    final String payload) {
+        Customer customer = customerManager.findCustomer(payload);
+        if(customer.getCurrentState().equalsIgnoreCase("CLOSED")){
+            customer.getContactDetails().forEach(contact-> {
+                if (contact.getType().equals(ContactDetail.Type.PHONE)) {
+                    String receiverNumber = customer.getContactDetails().get(0).getValue();
+                    smsSender.sendSMS(receiverNumber, "Dear Valued Customer, Your account has been Closed");
+                } else if (contact.getType().equals(ContactDetail.Type.EMAIL)) {
+                    String emailAddress = customer.getContactDetails().get(0).getValue();
+                    // TODO: pass email address for templating and localization.
+                    emailSender.sendEmail(emailAddress, "Account created", "Dear Valued Customer, Your account has been Closed");
+                }
+            });
+        }
+    }
+
+    @JmsListener(
+            destination = CustomerEventConstants.DESTINATION,
+            selector = CustomerEventConstants.SELECTOR_REOPEN_CUSTOMER
+    )
+    public void customerReopenedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                      final String payload) {
+        Customer customer = customerManager.findCustomer(payload);
+        if(customer.getCurrentState().equalsIgnoreCase("LOCKED")){
+            customer.getContactDetails().forEach(contact-> {
+                if (contact.getType().equals(ContactDetail.Type.PHONE)) {
+                    String receiverNumber = customer.getContactDetails().get(0).getValue();
+                    smsSender.sendSMS(receiverNumber, "Dear Valued Customer, Your account has been reopened");
+                } else if (contact.getType().equals(ContactDetail.Type.EMAIL)) {
+                    String emailAddress = customer.getContactDetails().get(0).getValue();
+                    // TODO: pass email address for templating and localization.
+                    emailSender.sendEmail(emailAddress, "Account Reopened", "Dear Valued Customer, Your account has been reopened");
+                }
+            });
+        }
+    }
+    
+/*
+
+    @JmsListener(
+            destination = CustomerEventConstants.DESTINATION,
+            selector = CustomerEventConstants.SELECTOR_PUT_ADDRESS
+    )
+    public void addressChangedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                    final String payload) {
+        this.eventRecorder.event(tenant, CustomerEventConstants.PUT_ADDRESS, payload, String.class);
+    }
+
+    @JmsListener(
+            destination = CustomerEventConstants.DESTINATION,
+            selector = CustomerEventConstants.SELECTOR_PUT_IDENTIFICATION_CARD
+    )
+    public void identificationCardChangedEvent(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                               final String payload) {
+        this.eventRecorder.event(tenant, CustomerEventConstants.PUT_IDENTIFICATION_CARD, payload, String.class);
+    }
+
+
+*/
+}
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/DepositEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/DepositEventListener.java
new file mode 100644
index 0000000..fa66ace
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/DepositEventListener.java
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+package org.apache.fineract.cn.deposit.listener;
+
+import org.apache.fineract.cn.deposit.api.v1.EventConstants;
+import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
+import org.slf4j.Logger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.jms.annotation.JmsListener;
+import org.springframework.messaging.handler.annotation.Header;
+import org.springframework.stereotype.Component;
+
+@Component
+public class DepositEventListener {
+
+
+    @Autowired
+    public DepositEventListener() {
+        super();
+    }
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_INTEREST_ACCRUED,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onAccrual(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                          final String payload) {
+    }
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_DIVIDEND_DISTRIBUTION,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onDividendDistribution(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                       final String payload) {
+        this.logger.debug("Dividend distributed for product {}.", payload);
+        this.eventRecorder.event(tenant, EventConstants.DIVIDEND_DISTRIBUTION, payload, String.class);
+    }
+
+}
+*/
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/IdentityEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/IdentityEventListener.java
new file mode 100644
index 0000000..142f138
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/IdentityEventListener.java
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+package org.apache.fineract.cn.notification.service.listener;
+
+import org.apache.fineract.cn.identity.api.v1.events.EventConstants;
+import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
+import org.apache.fineract.cn.test.listener.EventRecorder;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.jms.annotation.JmsListener;
+import org.springframework.messaging.handler.annotation.Header;
+import org.springframework.stereotype.Component;
+
+@Component
+public class IdentityEventListener {
+
+    private IdentityManager identityManager;
+
+    @Autowired
+    public IdentityEventListener( final IdentityManager identityManager) {
+        this.identityManager = identityManager;
+    }
+
+
+    @JmsListener(
+            subscription = EventConstants.DESTINATION,
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_POST_USER
+    )
+    public void onCreateUser(
+            @Header(TenantHeaderFilter.TENANT_HEADER)final String tenant,
+            final String payload) throws Exception {
+        eventRecorder.event(tenant, EventConstants.OPERATION_POST_USER, payload, String.class);
+    }
+
+    @JmsListener(
+            subscription = EventConstants.DESTINATION,
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_PUT_USER_ROLEIDENTIFIER
+    )
+    public void onChangeUserRole(
+            @Header(TenantHeaderFilter.TENANT_HEADER)final String tenant,
+            final String payload) throws Exception {
+        eventRecorder.event(tenant, EventConstants.OPERATION_PUT_USER_ROLEIDENTIFIER, payload, String.class);
+    }
+
+    @JmsListener(
+            subscription = EventConstants.DESTINATION,
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_PUT_USER_PASSWORD
+    )
+    public void onChangeUserPassword(
+            @Header(TenantHeaderFilter.TENANT_HEADER)final String tenant,
+            final String payload) throws Exception {
+        eventRecorder.event(tenant, EventConstants.OPERATION_PUT_USER_PASSWORD, payload, String.class);
+    }
+
+    @JmsListener(
+            subscription = EventConstants.DESTINATION,
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_AUTHENTICATE
+    )
+    public void onAuthentication(
+            @Header(TenantHeaderFilter.TENANT_HEADER)final String tenant,
+            final String payload) throws Exception {
+        eventRecorder.event(tenant, EventConstants.OPERATION_AUTHENTICATE, payload, String.class);
+    }
+
+
+}
+*/
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/OfficeEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/OfficeEventListener.java
new file mode 100644
index 0000000..9f083c5
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/OfficeEventListener.java
@@ -0,0 +1,136 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.fineract.cn.notification.service.listener;
+
+import org.apache.fineract.cn.notification.service.internal.service.EmailSender;
+import org.apache.fineract.cn.notification.service.internal.service.SMSSender;
+import org.apache.fineract.cn.office.api.v1.EventConstants;
+import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
+import org.apache.fineract.cn.office.api.v1.client.OrganizationManager;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.jms.annotation.JmsListener;
+import org.springframework.messaging.handler.annotation.Header;
+import org.springframework.stereotype.Component;
+
+@Component
+public class OfficeEventListener {
+
+	private OrganizationManager organizationManager;
+	private SMSSender smsSender;
+	private EmailSender emailSender;
+
+	@Autowired
+	public OfficeEventListener(final OrganizationManager organizationManager, SMSSender smsSender,
+	                           final EmailSender emailSender) {
+		this.organizationManager = organizationManager;
+		this.smsSender = smsSender;
+		this.emailSender = emailSender;
+	}
+
+	@JmsListener(
+			subscription = EventConstants.DESTINATION,
+			destination = EventConstants.DESTINATION,
+			selector = EventConstants.SELECTOR_POST_OFFICE
+	)
+	public void onCreateOffice(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+	                           final String payload) {
+		//for testing purposes
+		String office = this.organizationManager.findOfficeByIdentifier(payload).getName();
+		if (office.equalsIgnoreCase("Head Office")) {
+			smsSender.sendSMS("+23058409206", "Test From Demo");
+		}
+	}
+}
+
+/*
+	@JmsListener(
+            subscription = EventConstants.DESTINATION,
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_POST_EMPLOYEE
+    )
+    public void onCreateEmployee(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                 final String eventPayload) throws Exception {
+        this.eventRecorder.event(tenant, EventConstants.OPERATION_POST_EMPLOYEE, eventPayload, String.class);
+    }
+
+    @JmsListener(
+            subscription = EventConstants.DESTINATION,
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_PUT_EMPLOYEE
+    )
+    public void onUpdateEmployee(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                 final String eventPayload) throws Exception {
+        this.eventRecorder.event(tenant, EventConstants.OPERATION_PUT_EMPLOYEE, eventPayload, String.class);
+    }
+
+    @JmsListener(
+            subscription = EventConstants.DESTINATION,
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_DELETE_EMPLOYEE
+    )
+    public void onDeleteEmployee(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                 final String eventPayload) throws Exception {
+        this.eventRecorder.event(tenant, EventConstants.OPERATION_DELETE_EMPLOYEE, eventPayload, String.class);
+    }
+
+    @JmsListener(
+            subscription = EventConstants.DESTINATION,
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_PUT_CONTACT_DETAIL
+    )
+    public void onSetContactDetail(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                   final String eventPayload) throws Exception {
+        this.eventRecorder.event(tenant, EventConstants.OPERATION_PUT_CONTACT_DETAIL, eventPayload, String.class);
+    }
+
+    @JmsListener(
+            subscription = EventConstants.DESTINATION,
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_DELETE_CONTACT_DETAIL
+    )
+    public void onDeleteContactDetail(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                      final String eventPayload) throws Exception {
+        this.eventRecorder.event(tenant, EventConstants.OPERATION_DELETE_CONTACT_DETAIL, eventPayload, String.class);
+    }
+
+    @JmsListener(
+            subscription = EventConstants.DESTINATION,
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_DELETE_OFFICE
+    )
+    public void onDeleteOffice(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                               final String payload)
+            throws Exception {
+        this.eventRecorder.event(tenant, EventConstants.OPERATION_DELETE_OFFICE, payload, String.class);
+    }
+
+    @JmsListener(
+            subscription = EventConstants.DESTINATION,
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_PUT_OFFICE
+    )
+    public void onUpdateOffice(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                               final String payload)
+            throws Exception {
+        this.eventRecorder.event(tenant, EventConstants.OPERATION_PUT_OFFICE, payload, String.class);
+    }
+
+}
+*/
\ No newline at end of file
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PayrollEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PayrollEventListener.java
new file mode 100644
index 0000000..ce4cc70
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PayrollEventListener.java
@@ -0,0 +1,61 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+    /*
+package org.apache.fineract.cn.payroll.listener;
+
+import org.apache.fineract.cn.payroll.api.v1.EventConstants;
+import org.apache.fineract.cn.payroll.service.ServiceConstants;
+import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
+import org.apache.fineract.cn.test.listener.EventRecorder;
+import org.slf4j.Logger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.jms.annotation.JmsListener;
+import org.springframework.messaging.handler.annotation.Header;
+import org.springframework.stereotype.Component;
+
+@Component
+public class PayrollEventListener {
+
+    private final Logger logger;
+    private final EventRecorder eventRecorder;
+
+    @Autowired
+    public PayrollEventListener(@Qualifier(ServiceConstants.LOGGER_NAME) final Logger logger,
+                                       final EventRecorder eventRecorder) {
+        super();
+        this.logger = logger;
+        this.eventRecorder = eventRecorder;
+    }
+
+
+    @JmsListener(
+            subscription = EventConstants.DESTINATION,
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_POST_DISTRIBUTION
+    )
+    public void onPostCollection(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                 final String payload) {
+        this.logger.info("Payment distribution with source account {0} processed.", payload);
+        this.eventRecorder.event(tenant, EventConstants.POST_DISTRIBUTION, payload, String.class);
+    }
+
+}
+*/
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PortfolioEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PortfolioEventListener.java
new file mode 100644
index 0000000..758e7f0
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/PortfolioEventListener.java
@@ -0,0 +1,149 @@
+package org.apache.fineract.cn.notification.service.listener;/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+    /*
+import org.apache.fineract.cn.individuallending.api.v1.events.IndividualLoanEventConstants;
+import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.jms.annotation.JmsListener;
+import org.springframework.stereotype.Component;
+import org.apache.fineract.cn.portfolio.api.v1.client.PortfolioManager;
+
+@SuppressWarnings("unused")
+@Component
+public class PortfolioEventListener {
+
+    @Autowired
+    public PortfolioEventListener() {
+        super();
+        //PortfolioManager portfolioManager = new PortfolioManager();
+    }
+
+    @JmsListener(
+            subscription = IndividualLoanEventConstants.DESTINATION,
+            destination = IndividualLoanEventConstants.DESTINATION,
+            selector = IndividualLoanEventConstants.SELECTOR_DENY_INDIVIDUALLOAN_CASE
+    )
+    public void onDeny(//@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                       final String payload) {
+
+    }
+
+    @JmsListener(
+            subscription = IndividualLoanEventConstants.DESTINATION,
+            destination = IndividualLoanEventConstants.DESTINATION,
+            selector = IndividualLoanEventConstants.SELECTOR_APPROVE_INDIVIDUALLOAN_CASE
+    )
+    public void onApprove(//@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                          final String payload) {
+
+    }
+
+    @JmsListener(
+            subscription = IndividualLoanEventConstants.DESTINATION,
+            destination = IndividualLoanEventConstants.DESTINATION,
+            selector = IndividualLoanEventConstants.SELECTOR_ACCEPT_PAYMENT_INDIVIDUALLOAN_CASE
+    )
+    public void onAcceptPayment(//@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                final String payload) {
+    }
+
+
+    @JmsListener(
+            subscription = IndividualLoanEventConstants.DESTINATION,
+            destination = IndividualLoanEventConstants.DESTINATION,
+            selector = IndividualLoanEventConstants.SELECTOR_DISBURSE_INDIVIDUALLOAN_CASE
+    )
+    public void onDisburse(//@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                           final String payload) {
+
+    }
+
+    @JmsListener(
+            subscription = IndividualLoanEventConstants.DESTINATION,
+            destination = IndividualLoanEventConstants.DESTINATION,
+            selector = IndividualLoanEventConstants.SELECTOR_CHECK_LATE_INDIVIDUALLOAN_CASE
+    )
+    public void onCheckLate(//@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                            final String payload) {
+
+    }
+
+    @JmsListener(
+            subscription = IndividualLoanEventConstants.DESTINATION,
+            destination = IndividualLoanEventConstants.DESTINATION,
+            selector = IndividualLoanEventConstants.SELECTOR_OPEN_INDIVIDUALLOAN_CASE
+    )
+    public void onOpen(//@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                       final String payload) {
+
+    }
+
+    @JmsListener(
+            subscription = IndividualLoanEventConstants.DESTINATION,
+            destination = IndividualLoanEventConstants.DESTINATION,
+            selector = IndividualLoanEventConstants.SELECTOR_MARK_LATE_INDIVIDUALLOAN_CASE
+    )
+    public void onMarkLate(//@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                           final String payload) {
+
+    }
+
+    @JmsListener(
+            subscription = IndividualLoanEventConstants.DESTINATION,
+            destination = IndividualLoanEventConstants.DESTINATION,
+            selector = IndividualLoanEventConstants.SELECTOR_CLOSE_INDIVIDUALLOAN_CASE
+    )
+    public void onClose(//@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                        final String payload) {
+    }
+
+
+
+        @JmsListener(
+                subscription = EventConstants.DESTINATION,
+                destination = EventConstants.DESTINATION,
+                selector = EventConstants.SELECTOR_POST_GROUP
+        )
+        public void onGroupCreated(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                   final String payload) {
+            this.eventRecorder.event(tenant, EventConstants.POST_GROUP, payload, String.class);
+        }
+
+        @JmsListener(
+                subscription = EventConstants.DESTINATION,
+                destination = EventConstants.DESTINATION,
+                selector = EventConstants.SELECTOR_ACTIVATE_GROUP
+        )
+        public void onGroupActivated(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                     final String payload) {
+            this.eventRecorder.event(tenant, EventConstants.ACTIVATE_GROUP, payload, String.class);
+        }
+
+        @JmsListener(
+                subscription = EventConstants.DESTINATION,
+                destination = EventConstants.DESTINATION,
+                selector = EventConstants.SELECTOR_PUT_GROUP
+        )
+        public void onGroupUpdated(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                   final String payload) {
+            this.eventRecorder.event(tenant, EventConstants.PUT_GROUP, payload, String.class);
+        }
+
+    }
+ */
\ No newline at end of file
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/listener/TellerEventListener.java b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/TellerEventListener.java
new file mode 100644
index 0000000..5b461be
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/listener/TellerEventListener.java
@@ -0,0 +1,146 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+    /*
+package org.apache.fineract.cn.teller.listener;
+
+import org.apache.fineract.cn.teller.AbstractTellerTest;
+import org.apache.fineract.cn.teller.api.v1.EventConstants;
+import org.apache.fineract.cn.lang.config.TenantHeaderFilter;
+import org.apache.fineract.cn.test.listener.EventRecorder;
+import org.slf4j.Logger;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.jms.annotation.JmsListener;
+import org.springframework.messaging.handler.annotation.Header;
+import org.springframework.stereotype.Component;
+
+@Component
+public class TellerEventListener {
+
+    private final Logger logger;
+    private final EventRecorder eventRecorder;
+
+    public TellerEventListener(@Qualifier(AbstractTellerTest.LOGGER_NAME) final Logger logger,
+                               final EventRecorder eventRecorder) {
+        super();
+        this.logger = logger;
+        this.eventRecorder = eventRecorder;
+    }
+
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_POST_TELLER,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onCreate(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                         final String payload) {
+        this.logger.debug("Teller {} created.", payload);
+        this.eventRecorder.event(tenant, EventConstants.POST_TELLER, payload, String.class);
+    }
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_PUT_TELLER,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onChange(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                         final String payload) {
+        this.logger.debug("Teller {} created.", payload);
+        this.eventRecorder.event(tenant, EventConstants.PUT_TELLER, payload, String.class);
+    }
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_OPEN_TELLER,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onOpen(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                       final String payload) {
+        this.logger.debug("Teller {} created.", payload);
+        this.eventRecorder.event(tenant, EventConstants.OPEN_TELLER, payload, String.class);
+    }
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_CLOSE_TELLER,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onClose(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                        final String payload) {
+        this.logger.debug("Teller {} created.", payload);
+        this.eventRecorder.event(tenant, EventConstants.CLOSE_TELLER, payload, String.class);
+    }
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_AUTHENTICATE_TELLER,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onAuthenticate(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                               final String payload) {
+        this.logger.debug("Teller {} created.", payload);
+        this.eventRecorder.event(tenant, EventConstants.AUTHENTICATE_TELLER, payload, String.class);
+    }
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_PAUSE_TELLER,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onPause(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                        final String payload) {
+        this.logger.debug("Teller {} created.", payload);
+        this.eventRecorder.event(tenant, EventConstants.PAUSE_TELLER, payload, String.class);
+    }
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_CONFIRM_TRANSACTION,
+            subscription = EventConstants.DESTINATION
+    )
+    public void confirmTransaction(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                   final String payload) {
+        this.logger.debug("Teller {} created.", payload);
+        this.eventRecorder.event(tenant, EventConstants.CONFIRM_TRANSACTION, payload, String.class);
+    }
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_DELETE_TELLER,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onDeleteTeller(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                               final String payload) {
+        this.logger.debug("Teller {} created.", payload);
+        this.eventRecorder.event(tenant, EventConstants.DELETE_TELLER, payload, String.class);
+    }
+
+    @JmsListener(
+            destination = EventConstants.DESTINATION,
+            selector = EventConstants.SELECTOR_SAVE_DENOMINATION,
+            subscription = EventConstants.DESTINATION
+    )
+    public void onSaveDenomination(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
+                                   final String payload) {
+        this.logger.debug("Teller {} created.", payload);
+        this.eventRecorder.event(tenant, EventConstants.SAVE_DENOMINATION, payload, String.class);
+    }
+
+}
+*/
diff --git a/service/src/main/java/org/apache/fineract/cn/notification/service/rest/NotificationRestController.java b/service/src/main/java/org/apache/fineract/cn/notification/service/rest/NotificationRestController.java
new file mode 100644
index 0000000..983b43e
--- /dev/null
+++ b/service/src/main/java/org/apache/fineract/cn/notification/service/rest/NotificationRestController.java
@@ -0,0 +1,119 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.cn.notification.service.rest;
+
+import org.apache.fineract.cn.notification.api.v1.PermittableGroupIds;
+import org.apache.fineract.cn.notification.api.v1.domain.Sample;
+import org.apache.fineract.cn.notification.service.ServiceConstants;
+import org.apache.fineract.cn.notification.service.internal.command.InitializeServiceCommand;
+import org.apache.fineract.cn.notification.service.internal.command.SampleCommand;
+import org.apache.fineract.cn.notification.service.internal.service.SampleService;
+import java.util.List;
+import javax.validation.Valid;
+import org.apache.fineract.cn.anubis.annotation.AcceptedTokenType;
+import org.apache.fineract.cn.anubis.annotation.Permittable;
+import org.apache.fineract.cn.command.gateway.CommandGateway;
+import org.apache.fineract.cn.lang.ServiceException;
+import org.slf4j.Logger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.RestController;
+
+@SuppressWarnings("unused")
+@RestController
+@RequestMapping("/")
+public class NotificationRestController {
+
+  private final Logger logger;
+  private final CommandGateway commandGateway;
+  private final SampleService sampleService;
+
+  @Autowired
+  public NotificationRestController(@Qualifier(ServiceConstants.LOGGER_NAME) final Logger logger,
+                              final CommandGateway commandGateway,
+                              final SampleService sampleService) {
+    super();
+    this.logger = logger;
+    this.commandGateway = commandGateway;
+    this.sampleService = sampleService;
+  }
+
+  @Permittable(value = AcceptedTokenType.SYSTEM)
+  @RequestMapping(
+      value = "/initialize",
+      method = RequestMethod.POST,
+      consumes = MediaType.ALL_VALUE,
+      produces = MediaType.APPLICATION_JSON_VALUE
+  )
+  public
+  @ResponseBody
+  ResponseEntity<Void> initialize() throws InterruptedException {
+      this.commandGateway.process(new InitializeServiceCommand());
+      return ResponseEntity.accepted().build();
+  }
+
+  @Permittable(value = AcceptedTokenType.TENANT, groupId = PermittableGroupIds.SAMPLE_MANAGEMENT)
+  @RequestMapping(
+          value = "/sample",
+          method = RequestMethod.GET,
+          consumes = MediaType.ALL_VALUE,
+          produces = MediaType.APPLICATION_JSON_VALUE
+  )
+  public
+  @ResponseBody
+  List<Sample> findAllEntities() {
+    return this.sampleService.findAllEntities();
+  }
+
+  @Permittable(value = AcceptedTokenType.TENANT, groupId = PermittableGroupIds.SAMPLE_MANAGEMENT)
+  @RequestMapping(
+          value = "/sample/{identifier}",
+          method = RequestMethod.GET,
+          consumes = MediaType.ALL_VALUE,
+          produces = MediaType.APPLICATION_JSON_VALUE
+  )
+  public
+  @ResponseBody
+  ResponseEntity<Sample> getEntity(@PathVariable("identifier") final String identifier) {
+    return this.sampleService.findByIdentifier(identifier)
+            .map(ResponseEntity::ok)
+            .orElseThrow(() -> ServiceException.notFound("Instance with identifier " + identifier + " doesn't exist."));
+  }
+
+  @Permittable(value = AcceptedTokenType.TENANT, groupId = PermittableGroupIds.SAMPLE_MANAGEMENT)
+  @RequestMapping(
+      value = "/sample",
+      method = RequestMethod.POST,
+      consumes = MediaType.APPLICATION_JSON_VALUE,
+      produces = MediaType.APPLICATION_JSON_VALUE
+  )
+  public
+  @ResponseBody
+  ResponseEntity<Void> createEntity(@RequestBody @Valid final Sample instance) throws InterruptedException {
+    this.commandGateway.process(new SampleCommand(instance));
+    return ResponseEntity.accepted().build();
+  }
+}
diff --git a/service/src/main/resources/application.yml b/service/src/main/resources/application.yml
new file mode 100644
index 0000000..ec163fc
--- /dev/null
+++ b/service/src/main/resources/application.yml
@@ -0,0 +1,81 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+spring:
+  cloud:
+    discovery:
+      enabled: false
+    config:
+      enabled: false
+
+eureka:
+  client:
+    serviceUrl:
+      defaultZone: http://localhost:8761/eureka/
+
+server:
+  port: 8081
+  contextPath: /notification/v1/*
+
+cassandra:
+  clusterName: staging_cluster
+  contactPoints: 127.0.0.1:9042,127.0.0.2:9042,127.0.0.3:9042
+  keyspace: seshat
+  cl:
+    read: LOCAL_QUORUM
+    write: LOCAL_QUORUM
+    delete: LOCAL_QUORUM
+
+mariadb:
+  driverClass: org.mariadb.jdbc.Driver
+  database: seshat
+  host: localhost
+  port: 3306
+  user: root
+  password: mysql
+
+bonecp:
+  idleMaxAgeInMinutes: 240
+  idleConnectionTestPeriodInMinutes: 60
+  maxConnectionsPerPartition: 10
+  minConnectionsPerPartition: 1
+  partitionCount: 2
+  acquireIncrement: 5
+  statementsCacheSize: 100
+
+async:
+  corePoolSize: 32
+  maxPoolSize: 16384
+  queueCapacity: 0
+  threadName: async-processor-
+
+flyway:
+  enabled: false
+
+fineract:
+  customer:
+    accountcreated:
+      message: Dear Valued Customer, Your account has been created.
+    accountclosed:
+      message: Dear Valued Customer, Your account has been successfully closed.
+
+smssender:
+  accountSID: AC1fde2c6f26f367b93231c5fdb944c908
+  authtoken: bc9a53e41745b8471e0ecafc859d86aa
+  senderNumber: +1 510-944-1898
diff --git a/service/src/main/resources/bootstrap.yml b/service/src/main/resources/bootstrap.yml
new file mode 100644
index 0000000..76c2441
--- /dev/null
+++ b/service/src/main/resources/bootstrap.yml
@@ -0,0 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+spring:
+    application:
+        name: notification-v1
diff --git a/service/src/main/resources/db/migrations/mariadb/V1__initial_setup.sql b/service/src/main/resources/db/migrations/mariadb/V1__initial_setup.sql
new file mode 100644
index 0000000..ff9a61f
--- /dev/null
+++ b/service/src/main/resources/db/migrations/mariadb/V1__initial_setup.sql
@@ -0,0 +1,72 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--   http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing,
+-- software distributed under the License is distributed on an
+-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+-- KIND, either express or implied.  See the License for the
+-- specific language governing permissions and limitations
+-- under the License.
+--
+
+-- -----------------------------------------------------
+-- Table `fineract-cn-notification`.`email_gateway_configurations`
+-- -----------------------------------------------------
+CREATE TABLE IF NOT EXISTS `fineract-cn-notification`.`email_gateway_configurations` (
+  `id` INT(11) NOT NULL AUTO_INCREMENT,
+  `identifer` VARCHAR(45) NULL DEFAULT NULL,
+  `host` VARCHAR(45) NOT NULL,
+  `port` VARCHAR(45) NOT NULL,
+  `username` VARCHAR(45) NOT NULL,
+  `app_id` VARCHAR(45) NOT NULL,
+  PRIMARY KEY (`id`))
+ENGINE = InnoDB
+DEFAULT CHARACTER SET = latin1;
+
+
+-- -----------------------------------------------------
+-- Table `fineract-cn-notification`.`sms_gateway_configurations`
+-- -----------------------------------------------------
+CREATE TABLE IF NOT EXISTS `fineract-cn-notification`.`sms_gateway_configurations` (
+  `id` INT(11) NOT NULL AUTO_INCREMENT,
+  `identifier` VARCHAR(45) NULL DEFAULT NULL,
+  `accountsid` VARCHAR(255) NOT NULL,
+  `auth_token` VARCHAR(255) NOT NULL,
+  `option` VARCHAR(45) NULL DEFAULT NULL,
+  PRIMARY KEY (`id`))
+ENGINE = InnoDB
+DEFAULT CHARACTER SET = latin1;
+
+
+-- -----------------------------------------------------
+-- Table `fineract-cn-notification`.`templates`
+-- -----------------------------------------------------
+CREATE TABLE IF NOT EXISTS `fineract-cn-notification`.`templates` (
+  `id` INT(11) NOT NULL AUTO_INCREMENT,
+  PRIMARY KEY (`id`))
+ENGINE = InnoDB
+DEFAULT CHARACTER SET = latin1;
+
+-- ------------------------------------------------------
+
+CREATE TABLE sample (
+  id BIGINT NOT NULL AUTO_INCREMENT,
+  identifier VARCHAR(8) NOT NULL,
+  payload VARCHAR(512) NULL,
+  CONSTRAINT notification_pk PRIMARY KEY (id)
+);
+
+CREATE TABLE template_sample (
+  id BIGINT NOT NULL AUTO_INCREMENT,
+  identifier VARCHAR(8) NOT NULL,
+  payload VARCHAR(512) NULL,
+  CONSTRAINT template_sample_pk PRIMARY KEY (id)
+);
\ No newline at end of file
diff --git a/settings.gradle b/settings.gradle
new file mode 100644
index 0000000..868411f
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+rootProject.name = 'notification'
+
+includeBuild 'api'
+includeBuild 'service'
+includeBuild 'component-test'
+
diff --git a/shared.gradle b/shared.gradle
new file mode 100644
index 0000000..4a65927
--- /dev/null
+++ b/shared.gradle
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+group 'org.apache.fineract.cn.notification'
+version '0.1.0-BUILD-SNAPSHOT'
+
+ext.versions = [
+        fineractcnidentity      : '0.1.0-BUILD-SNAPSHOT',
+        fineractcnprovisioner   : '0.1.0-BUILD-SNAPSHOT',
+        fineractcnrhythm        : '0.1.0-BUILD-SNAPSHOT',
+        fineractcnoffice        : '0.1.0-BUILD-SNAPSHOT',
+        fineractcncustomer      : '0.1.0-BUILD-SNAPSHOT',
+        fineractcnaccounting    : '0.1.0-BUILD-SNAPSHOT',
+        fineractcnportfolio     : '0.1.0-BUILD-SNAPSHOT',
+        fineractcndeposit       : '0.1.0-BUILD-SNAPSHOT',
+        fineractcnteller        : '0.1.0-BUILD-SNAPSHOT',
+        kuelapcheques           : '0.1.0-BUILD-SNAPSHOT',
+        fineractcnpayroll       : '0.1.0-BUILD-SNAPSHOT',
+        fineractcngroup         : '0.1.0-BUILD-SNAPSHOT',
+        frameworkapi            : '0.1.0-BUILD-SNAPSHOT',
+        frameworklang           : '0.1.0-BUILD-SNAPSHOT',
+        frameworkasync          : '0.1.0-BUILD-SNAPSHOT',
+        frameworkcassandra      : '0.1.0-BUILD-SNAPSHOT',
+        frameworkmariadb        : '0.1.0-BUILD-SNAPSHOT',
+        frameworkcommand        : '0.1.0-BUILD-SNAPSHOT',
+        frameworktest           : '0.1.0-BUILD-SNAPSHOT',
+        frameworkanubis         : '0.1.0-BUILD-SNAPSHOT',
+        validator : '5.3.0.Final'
+]
+
+apply plugin: 'java'
+apply plugin: 'idea'
+apply plugin: 'maven-publish'
+apply plugin: 'io.spring.dependency-management'
+
+tasks.withType(JavaCompile) {
+    sourceCompatibility = JavaVersion.VERSION_1_8
+    targetCompatibility = JavaVersion.VERSION_1_8
+}
+
+repositories {
+    jcenter()
+    mavenLocal()
+}
+
+dependencyManagement {
+    imports {
+        mavenBom 'io.spring.platform:platform-bom:Athens-RELEASE'
+        mavenBom 'org.springframework.cloud:spring-cloud-dependencies:Camden.SR1'
+    }
+}
+
+// override certain dependency provided by Spring platform using newer releases
+ext['cassandra.version'] = '3.6'
+ext['cassandra-driver.version'] = '3.1.2'
+ext['activemq.version'] = '5.13.2'
+ext['spring-data-releasetrain.version'] = 'Gosling-SR2A'
+
+dependencies {
+    compile(
+            [group: 'com.google.code.findbugs', name: 'jsr305']
+    )
+
+    testCompile(
+            [group: 'org.springframework.boot', name: 'spring-boot-starter-test']
+    )
+}
+
+jar {
+    from sourceSets.main.allSource
+    duplicatesStrategy = DuplicatesStrategy.EXCLUDE
+}
+
+license {
+    header rootProject.file('../HEADER')
+    strictCheck true
+    mapping {
+        java = 'SLASHSTAR_STYLE'
+        xml = 'XML_STYLE'
+        yml = 'SCRIPT_STYLE'
+        yaml = 'SCRIPT_STYLE'
+    }
+}
+
+rat {
+    // List of exclude directives, defaults to ['**/.gradle/**']
+    excludes = [
+            "**/.idea/**",
+            "**/.gradle/**",
+            "**/gradle/**",
+            "**/build/**",
+            "gradlew",
+            "gradlew.bat",
+            "README.md"
+    ]
+}
+
diff --git a/system-analysis.mdj b/system-analysis.mdj
new file mode 100644
index 0000000..4c7f1af
--- /dev/null
+++ b/system-analysis.mdj
@@ -0,0 +1,4104 @@
+{
+	"_type": "Project",
+	"_id": "AAAAAAFF+h6SjaM2Hec=",
+	"name": "Untitled",
+	"ownedElements": [
+		{
+			"_type": "UMLModel",
+			"_id": "AAAAAAFF+qBWK6M3Z8Y=",
+			"_parent": {
+				"$ref": "AAAAAAFF+h6SjaM2Hec="
+			},
+			"name": "Model",
+			"ownedElements": [
+				{
+					"_type": "UMLClassDiagram",
+					"_id": "AAAAAAFF+qBtyKM79qY=",
+					"_parent": {
+						"$ref": "AAAAAAFF+qBWK6M3Z8Y="
+					},
+					"name": "Main",
+					"visible": true,
+					"defaultDiagram": true
+				},
+				{
+					"_type": "UMLActivity",
+					"_id": "AAAAAAFjqASLHqqfH1M=",
+					"_parent": {
+						"$ref": "AAAAAAFF+qBWK6M3Z8Y="
+					},
+					"name": "Activity1",
+					"ownedElements": [
+						{
+							"_type": "UMLActivityDiagram",
+							"_id": "AAAAAAFjqASLIKqg3FE=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"name": "Notification Activity",
+							"visible": true,
+							"defaultDiagram": false,
+							"ownedViews": [
+								{
+									"_type": "UMLControlNodeView",
+									"_id": "AAAAAAFjqASvhqqmFR0=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqASvhaqkmH0="
+									},
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Arial;13;0",
+									"showShadow": true,
+									"containerChangeable": true,
+									"containerExtending": false,
+									"left": 178,
+									"top": 32,
+									"width": 20,
+									"height": 20,
+									"autoResize": false
+								},
+								{
+									"_type": "UMLActionView",
+									"_id": "AAAAAAFjqATelaqrA88=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqATelKqpPIs="
+									},
+									"subViews": [
+										{
+											"_type": "UMLNameCompartmentView",
+											"_id": "AAAAAAFjqATelqqsQwY=",
+											"_parent": {
+												"$ref": "AAAAAAFjqATelaqrA88="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqATelKqpPIs="
+											},
+											"subViews": [
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqATelqqtdxw=",
+													"_parent": {
+														"$ref": "AAAAAAFjqATelqqsQwY="
+													},
+													"visible": false,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": 32,
+													"top": 0,
+													"width": 0,
+													"height": 13,
+													"autoResize": false,
+													"underline": false,
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												},
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqATel6qupnU=",
+													"_parent": {
+														"$ref": "AAAAAAFjqATelqqsQwY="
+													},
+													"visible": true,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;1",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": 144,
+													"top": 95,
+													"width": 87,
+													"height": 26,
+													"autoResize": false,
+													"underline": false,
+													"text": "JMSListener injects event",
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": true
+												},
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqATemKqvl8w=",
+													"_parent": {
+														"$ref": "AAAAAAFjqATelqqsQwY="
+													},
+													"visible": false,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": 32,
+													"top": 0,
+													"width": 86,
+													"height": 13,
+													"autoResize": false,
+													"underline": false,
+													"text": "(from Activity1)",
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												},
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqATemKqwuws=",
+													"_parent": {
+														"$ref": "AAAAAAFjqATelqqsQwY="
+													},
+													"visible": false,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": 32,
+													"top": 0,
+													"width": 0,
+													"height": 13,
+													"autoResize": false,
+													"underline": false,
+													"horizontalAlignment": 1,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												}
+											],
+											"visible": true,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Arial;13;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 139,
+											"top": 88,
+											"width": 97,
+											"height": 38,
+											"autoResize": false,
+											"stereotypeLabel": {
+												"$ref": "AAAAAAFjqATelqqtdxw="
+											},
+											"nameLabel": {
+												"$ref": "AAAAAAFjqATel6qupnU="
+											},
+											"namespaceLabel": {
+												"$ref": "AAAAAAFjqATemKqvl8w="
+											},
+											"propertyLabel": {
+												"$ref": "AAAAAAFjqATemKqwuws="
+											}
+										}
+									],
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Arial;13;0",
+									"showShadow": true,
+									"containerChangeable": true,
+									"containerExtending": false,
+									"left": 139,
+									"top": 88,
+									"width": 97,
+									"height": 54,
+									"autoResize": false,
+									"stereotypeDisplay": "label",
+									"showVisibility": true,
+									"showNamespace": false,
+									"showProperty": true,
+									"showType": true,
+									"nameCompartment": {
+										"$ref": "AAAAAAFjqATelqqsQwY="
+									},
+									"wordWrap": true
+								},
+								{
+									"_type": "UMLActionView",
+									"_id": "AAAAAAFjqAWrCqrNuOs=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqAWrCarLlr0="
+									},
+									"subViews": [
+										{
+											"_type": "UMLNameCompartmentView",
+											"_id": "AAAAAAFjqAWrCqrOxcc=",
+											"_parent": {
+												"$ref": "AAAAAAFjqAWrCqrNuOs="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqAWrCarLlr0="
+											},
+											"subViews": [
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqAWrC6rPvtY=",
+													"_parent": {
+														"$ref": "AAAAAAFjqAWrCqrOxcc="
+													},
+													"visible": false,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": -366,
+													"top": 304,
+													"width": 0,
+													"height": 13,
+													"autoResize": false,
+													"underline": false,
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												},
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqAWrC6rQZmc=",
+													"_parent": {
+														"$ref": "AAAAAAFjqAWrCqrOxcc="
+													},
+													"visible": true,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;1",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": 45,
+													"top": 351,
+													"width": 95,
+													"height": 52,
+													"autoResize": false,
+													"underline": false,
+													"text": "retrieve receipt SMS and email contact",
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": true
+												},
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqAWrC6rRHbU=",
+													"_parent": {
+														"$ref": "AAAAAAFjqAWrCqrOxcc="
+													},
+													"visible": false,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": -366,
+													"top": 304,
+													"width": 86,
+													"height": 13,
+													"autoResize": false,
+													"underline": false,
+													"text": "(from Activity1)",
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												},
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqAWrC6rS8Ik=",
+													"_parent": {
+														"$ref": "AAAAAAFjqAWrCqrOxcc="
+													},
+													"visible": false,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": -366,
+													"top": 304,
+													"width": 0,
+													"height": 13,
+													"autoResize": false,
+													"underline": false,
+													"horizontalAlignment": 1,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												}
+											],
+											"visible": true,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Arial;13;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 40,
+											"top": 344,
+											"width": 105,
+											"height": 64,
+											"autoResize": false,
+											"stereotypeLabel": {
+												"$ref": "AAAAAAFjqAWrC6rPvtY="
+											},
+											"nameLabel": {
+												"$ref": "AAAAAAFjqAWrC6rQZmc="
+											},
+											"namespaceLabel": {
+												"$ref": "AAAAAAFjqAWrC6rRHbU="
+											},
+											"propertyLabel": {
+												"$ref": "AAAAAAFjqAWrC6rS8Ik="
+											}
+										}
+									],
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Arial;13;0",
+									"showShadow": true,
+									"containerChangeable": true,
+									"containerExtending": false,
+									"left": 40,
+									"top": 344,
+									"width": 105,
+									"height": 80,
+									"autoResize": false,
+									"stereotypeDisplay": "label",
+									"showVisibility": true,
+									"showNamespace": false,
+									"showProperty": true,
+									"showType": true,
+									"nameCompartment": {
+										"$ref": "AAAAAAFjqAWrCqrOxcc="
+									},
+									"wordWrap": true
+								},
+								{
+									"_type": "UMLActionView",
+									"_id": "AAAAAAFjqAYmKaro5lo=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqAYmKKrmL6s="
+									},
+									"subViews": [
+										{
+											"_type": "UMLNameCompartmentView",
+											"_id": "AAAAAAFjqAYmKarpUFk=",
+											"_parent": {
+												"$ref": "AAAAAAFjqAYmKaro5lo="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqAYmKKrmL6s="
+											},
+											"subViews": [
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqAYmKqrq62s=",
+													"_parent": {
+														"$ref": "AAAAAAFjqAYmKarpUFk="
+													},
+													"visible": false,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": 322,
+													"top": 224,
+													"width": 0,
+													"height": 13,
+													"autoResize": false,
+													"underline": false,
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												},
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqAYmKqrr75M=",
+													"_parent": {
+														"$ref": "AAAAAAFjqAYmKarpUFk="
+													},
+													"visible": true,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;1",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": 213,
+													"top": 351,
+													"width": 111,
+													"height": 39,
+													"autoResize": false,
+													"underline": false,
+													"text": "Prepare Message with template created",
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": true
+												},
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqAYmK6rsSQ0=",
+													"_parent": {
+														"$ref": "AAAAAAFjqAYmKarpUFk="
+													},
+													"visible": false,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": 322,
+													"top": 224,
+													"width": 86,
+													"height": 13,
+													"autoResize": false,
+													"underline": false,
+													"text": "(from Activity1)",
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												},
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqAYmK6rtvPo=",
+													"_parent": {
+														"$ref": "AAAAAAFjqAYmKarpUFk="
+													},
+													"visible": false,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": 322,
+													"top": 224,
+													"width": 0,
+													"height": 13,
+													"autoResize": false,
+													"underline": false,
+													"horizontalAlignment": 1,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												}
+											],
+											"visible": true,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Arial;13;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 208,
+											"top": 344,
+											"width": 121,
+											"height": 51,
+											"autoResize": false,
+											"stereotypeLabel": {
+												"$ref": "AAAAAAFjqAYmKqrq62s="
+											},
+											"nameLabel": {
+												"$ref": "AAAAAAFjqAYmKqrr75M="
+											},
+											"namespaceLabel": {
+												"$ref": "AAAAAAFjqAYmK6rsSQ0="
+											},
+											"propertyLabel": {
+												"$ref": "AAAAAAFjqAYmK6rtvPo="
+											}
+										}
+									],
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Arial;13;0",
+									"showShadow": true,
+									"containerChangeable": true,
+									"containerExtending": false,
+									"left": 208,
+									"top": 344,
+									"width": 121,
+									"height": 67,
+									"autoResize": false,
+									"stereotypeDisplay": "label",
+									"showVisibility": true,
+									"showNamespace": false,
+									"showProperty": true,
+									"showType": true,
+									"nameCompartment": {
+										"$ref": "AAAAAAFjqAYmKarpUFk="
+									},
+									"wordWrap": true
+								},
+								{
+									"_type": "UMLActionView",
+									"_id": "AAAAAAFjqAZdgqsCYJQ=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqAZdgasAyFA="
+									},
+									"subViews": [
+										{
+											"_type": "UMLNameCompartmentView",
+											"_id": "AAAAAAFjqAZdgqsDDao=",
+											"_parent": {
+												"$ref": "AAAAAAFjqAZdgqsCYJQ="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqAZdgasAyFA="
+											},
+											"subViews": [
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqAZdgqsEhl4=",
+													"_parent": {
+														"$ref": "AAAAAAFjqAZdgqsDDao="
+													},
+													"visible": false,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": -240,
+													"top": 528,
+													"width": 0,
+													"height": 13,
+													"autoResize": false,
+													"underline": false,
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												},
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqAZdgqsF8Ko=",
+													"_parent": {
+														"$ref": "AAAAAAFjqAZdgqsDDao="
+													},
+													"visible": true,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;1",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": 136,
+													"top": 591,
+													"width": 103,
+													"height": 39,
+													"autoResize": false,
+													"underline": false,
+													"text": "Senders Objects transmit the data",
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": true
+												},
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqAZdgqsGu+E=",
+													"_parent": {
+														"$ref": "AAAAAAFjqAZdgqsDDao="
+													},
+													"visible": false,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": -240,
+													"top": 528,
+													"width": 86,
+													"height": 13,
+													"autoResize": false,
+													"underline": false,
+													"text": "(from Activity1)",
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												},
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqAZdgqsH70w=",
+													"_parent": {
+														"$ref": "AAAAAAFjqAZdgqsDDao="
+													},
+													"visible": false,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": -240,
+													"top": 528,
+													"width": 0,
+													"height": 13,
+													"autoResize": false,
+													"underline": false,
+													"horizontalAlignment": 1,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												}
+											],
+											"visible": true,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Arial;13;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 131,
+											"top": 584,
+											"width": 113,
+											"height": 51,
+											"autoResize": false,
+											"stereotypeLabel": {
+												"$ref": "AAAAAAFjqAZdgqsEhl4="
+											},
+											"nameLabel": {
+												"$ref": "AAAAAAFjqAZdgqsF8Ko="
+											},
+											"namespaceLabel": {
+												"$ref": "AAAAAAFjqAZdgqsGu+E="
+											},
+											"propertyLabel": {
+												"$ref": "AAAAAAFjqAZdgqsH70w="
+											}
+										}
+									],
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Arial;13;0",
+									"showShadow": true,
+									"containerChangeable": true,
+									"containerExtending": false,
+									"left": 131,
+									"top": 584,
+									"width": 113,
+									"height": 67,
+									"autoResize": false,
+									"stereotypeDisplay": "label",
+									"showVisibility": true,
+									"showNamespace": false,
+									"showProperty": true,
+									"showType": true,
+									"nameCompartment": {
+										"$ref": "AAAAAAFjqAZdgqsDDao="
+									},
+									"wordWrap": true
+								},
+								{
+									"_type": "UMLControlNodeView",
+									"_id": "AAAAAAFjqAbQ96sfooI=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqAbQ7asd+Ww="
+									},
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Arial;13;0",
+									"showShadow": true,
+									"containerChangeable": true,
+									"containerExtending": false,
+									"left": 175,
+									"top": 680,
+									"width": 26,
+									"height": 26,
+									"autoResize": false
+								},
+								{
+									"_type": "UMLActionView",
+									"_id": "AAAAAAFjqA2/Cata4OI=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqA2/A6tYai0="
+									},
+									"subViews": [
+										{
+											"_type": "UMLNameCompartmentView",
+											"_id": "AAAAAAFjqA2/C6tbg3o=",
+											"_parent": {
+												"$ref": "AAAAAAFjqA2/Cata4OI="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqA2/A6tYai0="
+											},
+											"subViews": [
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqA2/C6tcNpM=",
+													"_parent": {
+														"$ref": "AAAAAAFjqA2/C6tbg3o="
+													},
+													"visible": false,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": 178,
+													"top": 336,
+													"width": 0,
+													"height": 13,
+													"autoResize": false,
+													"underline": false,
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												},
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqA2/DKtd5Og=",
+													"_parent": {
+														"$ref": "AAAAAAFjqA2/C6tbg3o="
+													},
+													"visible": true,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;1",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": 229,
+													"top": 463,
+													"width": 79,
+													"height": 26,
+													"autoResize": false,
+													"underline": false,
+													"text": "Locatize Template",
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": true
+												},
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqA2/DateYyA=",
+													"_parent": {
+														"$ref": "AAAAAAFjqA2/C6tbg3o="
+													},
+													"visible": false,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": 178,
+													"top": 336,
+													"width": 86,
+													"height": 13,
+													"autoResize": false,
+													"underline": false,
+													"text": "(from Activity1)",
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												},
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqA2/Datf4DQ=",
+													"_parent": {
+														"$ref": "AAAAAAFjqA2/C6tbg3o="
+													},
+													"visible": false,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Arial;13;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": 178,
+													"top": 336,
+													"width": 0,
+													"height": 13,
+													"autoResize": false,
+													"underline": false,
+													"horizontalAlignment": 1,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												}
+											],
+											"visible": true,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Arial;13;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 224,
+											"top": 456,
+											"width": 89,
+											"height": 38,
+											"autoResize": false,
+											"stereotypeLabel": {
+												"$ref": "AAAAAAFjqA2/C6tcNpM="
+											},
+											"nameLabel": {
+												"$ref": "AAAAAAFjqA2/DKtd5Og="
+											},
+											"namespaceLabel": {
+												"$ref": "AAAAAAFjqA2/DateYyA="
+											},
+											"propertyLabel": {
+												"$ref": "AAAAAAFjqA2/Datf4DQ="
+											}
+										}
+									],
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Arial;13;0",
+									"showShadow": true,
+									"containerChangeable": true,
+									"containerExtending": false,
+									"left": 224,
+									"top": 456,
+									"width": 89,
+									"height": 54,
+									"autoResize": false,
+									"stereotypeDisplay": "label",
+									"showVisibility": true,
+									"showNamespace": false,
+									"showProperty": true,
+									"showType": true,
+									"nameCompartment": {
+										"$ref": "AAAAAAFjqA2/C6tbg3o="
+									},
+									"wordWrap": true
+								},
+								{
+									"_type": "UMLControlNodeView",
+									"_id": "AAAAAAFjqBIJL6ubZ3I=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqBIJLquZsRo="
+									},
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": true,
+									"containerExtending": false,
+									"left": 131,
+									"top": 288,
+									"width": 113,
+									"height": 6,
+									"autoResize": false
+								},
+								{
+									"_type": "UMLControlFlowView",
+									"_id": "AAAAAAFjqBIoa6ugHqY=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqBIoaquel/4="
+									},
+									"subViews": [
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqBIoa6uhY6U=",
+											"_parent": {
+												"$ref": "AAAAAAFjqBIoa6ugHqY="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqBIoaquel/4="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 201,
+											"top": 151,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqBIoa6ugHqY="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqBIoa6uivk8=",
+											"_parent": {
+												"$ref": "AAAAAAFjqBIoa6ugHqY="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqBIoaquel/4="
+											},
+											"visible": null,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 216,
+											"top": 151,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 30,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqBIoa6ugHqY="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqBIobKujWVc=",
+											"_parent": {
+												"$ref": "AAAAAAFjqBIoa6ugHqY="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqBIoaquel/4="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 172,
+											"top": 152,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": -1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqBIoa6ugHqY="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										}
+									],
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"head": {
+										"$ref": "AAAAAAFjqCEih6yTO40="
+									},
+									"tail": {
+										"$ref": "AAAAAAFjqATelaqrA88="
+									},
+									"lineStyle": 1,
+									"points": "187:142;187:175",
+									"stereotypeDisplay": "label",
+									"showVisibility": true,
+									"showProperty": true,
+									"nameLabel": {
+										"$ref": "AAAAAAFjqBIoa6uhY6U="
+									},
+									"stereotypeLabel": {
+										"$ref": "AAAAAAFjqBIoa6uivk8="
+									},
+									"propertyLabel": {
+										"$ref": "AAAAAAFjqBIobKujWVc="
+									}
+								},
+								{
+									"_type": "UMLControlFlowView",
+									"_id": "AAAAAAFjqBKjHquxAW0=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqBKjHquv5CM="
+									},
+									"subViews": [
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqBKjHquyqKs=",
+											"_parent": {
+												"$ref": "AAAAAAFjqBKjHquxAW0="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqBKjHquv5CM="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 201,
+											"top": 62,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqBKjHquxAW0="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqBKjHquzayI=",
+											"_parent": {
+												"$ref": "AAAAAAFjqBKjHquxAW0="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqBKjHquv5CM="
+											},
+											"visible": null,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 216,
+											"top": 62,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 30,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqBKjHquxAW0="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqBKjHqu0+xU=",
+											"_parent": {
+												"$ref": "AAAAAAFjqBKjHquxAW0="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqBKjHquv5CM="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 172,
+											"top": 63,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": -1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqBKjHquxAW0="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										}
+									],
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"head": {
+										"$ref": "AAAAAAFjqATelaqrA88="
+									},
+									"tail": {
+										"$ref": "AAAAAAFjqASvhqqmFR0="
+									},
+									"lineStyle": 1,
+									"points": "187:52;187:87",
+									"stereotypeDisplay": "label",
+									"showVisibility": true,
+									"showProperty": true,
+									"nameLabel": {
+										"$ref": "AAAAAAFjqBKjHquyqKs="
+									},
+									"stereotypeLabel": {
+										"$ref": "AAAAAAFjqBKjHquzayI="
+									},
+									"propertyLabel": {
+										"$ref": "AAAAAAFjqBKjHqu0+xU="
+									}
+								},
+								{
+									"_type": "UMLControlFlowView",
+									"_id": "AAAAAAFjqBLYAqvEqog=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqBLYAqvCSQk="
+									},
+									"subViews": [
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqBLYAqvFiZM=",
+											"_parent": {
+												"$ref": "AAAAAAFjqBLYAqvEqog="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqBLYAqvCSQk="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 282,
+											"top": 426,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqBLYAqvEqog="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqBLYAqvGPAg=",
+											"_parent": {
+												"$ref": "AAAAAAFjqBLYAqvEqog="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqBLYAqvCSQk="
+											},
+											"visible": null,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 297,
+											"top": 426,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 30,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqBLYAqvEqog="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqBLYAqvHWRk=",
+											"_parent": {
+												"$ref": "AAAAAAFjqBLYAqvEqog="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqBLYAqvCSQk="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 253,
+											"top": 427,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": -1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqBLYAqvEqog="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										}
+									],
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"head": {
+										"$ref": "AAAAAAFjqA2/Cata4OI="
+									},
+									"tail": {
+										"$ref": "AAAAAAFjqAYmKaro5lo="
+									},
+									"lineStyle": 1,
+									"points": "268:411;268:455",
+									"stereotypeDisplay": "label",
+									"showVisibility": true,
+									"showProperty": true,
+									"nameLabel": {
+										"$ref": "AAAAAAFjqBLYAqvFiZM="
+									},
+									"stereotypeLabel": {
+										"$ref": "AAAAAAFjqBLYAqvGPAg="
+									},
+									"propertyLabel": {
+										"$ref": "AAAAAAFjqBLYAqvHWRk="
+									}
+								},
+								{
+									"_type": "UMLControlFlowView",
+									"_id": "AAAAAAFjqBLqN6vVVDc=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqBLqNqvTow0="
+									},
+									"subViews": [
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqBLqOKvWpw0=",
+											"_parent": {
+												"$ref": "AAAAAAFjqBLqN6vVVDc="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqBLqNqvTow0="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 201,
+											"top": 658,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqBLqN6vVVDc="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqBLqOKvX76Y=",
+											"_parent": {
+												"$ref": "AAAAAAFjqBLqN6vVVDc="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqBLqNqvTow0="
+											},
+											"visible": null,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 216,
+											"top": 658,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 30,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqBLqN6vVVDc="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqBLqOavYEPE=",
+											"_parent": {
+												"$ref": "AAAAAAFjqBLqN6vVVDc="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqBLqNqvTow0="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 172,
+											"top": 659,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": -1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqBLqN6vVVDc="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										}
+									],
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"head": {
+										"$ref": "AAAAAAFjqAbQ96sfooI="
+									},
+									"tail": {
+										"$ref": "AAAAAAFjqAZdgqsCYJQ="
+									},
+									"lineStyle": 1,
+									"points": "187:651;187:679",
+									"stereotypeDisplay": "label",
+									"showVisibility": true,
+									"showProperty": true,
+									"nameLabel": {
+										"$ref": "AAAAAAFjqBLqOKvWpw0="
+									},
+									"stereotypeLabel": {
+										"$ref": "AAAAAAFjqBLqOKvX76Y="
+									},
+									"propertyLabel": {
+										"$ref": "AAAAAAFjqBLqOavYEPE="
+									}
+								},
+								{
+									"_type": "UMLControlFlowView",
+									"_id": "AAAAAAFjqB0vKqwHDoM=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqB0vKawF6iM="
+									},
+									"subViews": [
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqB0vKqwIlNc=",
+											"_parent": {
+												"$ref": "AAAAAAFjqB0vKqwHDoM="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqB0vKawF6iM="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 168,
+											"top": 322,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqB0vKqwHDoM="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqB0vK6wJ+8E=",
+											"_parent": {
+												"$ref": "AAAAAAFjqB0vKqwHDoM="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqB0vKawF6iM="
+											},
+											"visible": null,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 179,
+											"top": 333,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 30,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqB0vKqwHDoM="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqB0vK6wKDT8=",
+											"_parent": {
+												"$ref": "AAAAAAFjqB0vKqwHDoM="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqB0vKawF6iM="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 147,
+											"top": 301,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": -1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqB0vKqwHDoM="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										}
+									],
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"head": {
+										"$ref": "AAAAAAFjqAWrCqrNuOs="
+									},
+									"tail": {
+										"$ref": "AAAAAAFjqBIJL6ubZ3I="
+									},
+									"lineStyle": 1,
+									"points": "183:294;133:343",
+									"stereotypeDisplay": "label",
+									"showVisibility": true,
+									"showProperty": true,
+									"nameLabel": {
+										"$ref": "AAAAAAFjqB0vKqwIlNc="
+									},
+									"stereotypeLabel": {
+										"$ref": "AAAAAAFjqB0vK6wJ+8E="
+									},
+									"propertyLabel": {
+										"$ref": "AAAAAAFjqB0vK6wKDT8="
+									}
+								},
+								{
+									"_type": "UMLControlFlowView",
+									"_id": "AAAAAAFjqB14tKwY2QY=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqB14s6wWTtM="
+									},
+									"subViews": [
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqB14tKwZWVs=",
+											"_parent": {
+												"$ref": "AAAAAAFjqB14tKwY2QY="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqB14s6wWTtM="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 224,
+											"top": 301,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqB14tKwY2QY="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqB14tKwaFP8=",
+											"_parent": {
+												"$ref": "AAAAAAFjqB14tKwY2QY="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqB14s6wWTtM="
+											},
+											"visible": null,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 235,
+											"top": 291,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 30,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqB14tKwY2QY="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqB14tKwbJe8=",
+											"_parent": {
+												"$ref": "AAAAAAFjqB14tKwY2QY="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqB14s6wWTtM="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 201,
+											"top": 322,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": -1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqB14tKwY2QY="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										}
+									],
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"head": {
+										"$ref": "AAAAAAFjqAYmKaro5lo="
+									},
+									"tail": {
+										"$ref": "AAAAAAFjqBIJL6ubZ3I="
+									},
+									"lineStyle": 1,
+									"points": "191:294;236:343",
+									"stereotypeDisplay": "label",
+									"showVisibility": true,
+									"showProperty": true,
+									"nameLabel": {
+										"$ref": "AAAAAAFjqB14tKwZWVs="
+									},
+									"stereotypeLabel": {
+										"$ref": "AAAAAAFjqB14tKwaFP8="
+									},
+									"propertyLabel": {
+										"$ref": "AAAAAAFjqB14tKwbJe8="
+									}
+								},
+								{
+									"_type": "UMLControlNodeView",
+									"_id": "AAAAAAFjqB9/Taw5bl4=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqB9/S6w3TKM="
+									},
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": true,
+									"containerExtending": false,
+									"left": 136,
+									"top": 544,
+									"width": 104,
+									"height": 6,
+									"autoResize": false
+								},
+								{
+									"_type": "UMLControlFlowView",
+									"_id": "AAAAAAFjqB+W4qw+0nc=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqB+W4qw8vc8="
+									},
+									"subViews": [
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqB+W46w/H0c=",
+											"_parent": {
+												"$ref": "AAAAAAFjqB+W4qw+0nc="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqB+W4qw8vc8="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 201,
+											"top": 559,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqB+W4qw+0nc="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqB+W46xAJPs=",
+											"_parent": {
+												"$ref": "AAAAAAFjqB+W4qw+0nc="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqB+W4qw8vc8="
+											},
+											"visible": null,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 216,
+											"top": 559,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 30,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqB+W4qw+0nc="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqB+W46xBhSQ=",
+											"_parent": {
+												"$ref": "AAAAAAFjqB+W4qw+0nc="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqB+W4qw8vc8="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 172,
+											"top": 560,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": -1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqB+W4qw+0nc="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										}
+									],
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"head": {
+										"$ref": "AAAAAAFjqAZdgqsCYJQ="
+									},
+									"tail": {
+										"$ref": "AAAAAAFjqB9/Taw5bl4="
+									},
+									"lineStyle": 1,
+									"points": "187:550;187:583",
+									"stereotypeDisplay": "label",
+									"showVisibility": true,
+									"showProperty": true,
+									"nameLabel": {
+										"$ref": "AAAAAAFjqB+W46w/H0c="
+									},
+									"stereotypeLabel": {
+										"$ref": "AAAAAAFjqB+W46xAJPs="
+									},
+									"propertyLabel": {
+										"$ref": "AAAAAAFjqB+W46xBhSQ="
+									}
+								},
+								{
+									"_type": "UMLControlFlowView",
+									"_id": "AAAAAAFjqB+mdKxPr44=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqB+mc6xNTWc="
+									},
+									"subViews": [
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqB+mdKxQpVA=",
+											"_parent": {
+												"$ref": "AAAAAAFjqB+mdKxPr44="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqB+mc6xNTWc="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 221,
+											"top": 531,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqB+mdKxPr44="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqB+mdKxRB1o=",
+											"_parent": {
+												"$ref": "AAAAAAFjqB+mdKxPr44="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqB+mc6xNTWc="
+											},
+											"visible": null,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 230,
+											"top": 543,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 30,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqB+mdKxPr44="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqB+mdKxSTJo=",
+											"_parent": {
+												"$ref": "AAAAAAFjqB+mdKxPr44="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqB+mc6xNTWc="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 202,
+											"top": 508,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": -1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqB+mdKxPr44="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										}
+									],
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"head": {
+										"$ref": "AAAAAAFjqB9/Taw5bl4="
+									},
+									"tail": {
+										"$ref": "AAAAAAFjqA2/Cata4OI="
+									},
+									"lineStyle": 1,
+									"points": "233:510;191:543",
+									"stereotypeDisplay": "label",
+									"showVisibility": true,
+									"showProperty": true,
+									"nameLabel": {
+										"$ref": "AAAAAAFjqB+mdKxQpVA="
+									},
+									"stereotypeLabel": {
+										"$ref": "AAAAAAFjqB+mdKxRB1o="
+									},
+									"propertyLabel": {
+										"$ref": "AAAAAAFjqB+mdKxSTJo="
+									}
+								},
+								{
+									"_type": "UMLControlFlowView",
+									"_id": "AAAAAAFjqCBd1Kx5mCs=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqCBd06x3DWs="
+									},
+									"subViews": [
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqCBd1Kx6qnM=",
+											"_parent": {
+												"$ref": "AAAAAAFjqCBd1Kx5mCs="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqCBd06x3DWs="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 162,
+											"top": 469,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqCBd1Kx5mCs="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqCBd1ax7Ky4=",
+											"_parent": {
+												"$ref": "AAAAAAFjqCBd1Kx5mCs="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqCBd06x3DWs="
+											},
+											"visible": null,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 175,
+											"top": 461,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 30,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqCBd1Kx5mCs="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqCBd1ax8vzU=",
+											"_parent": {
+												"$ref": "AAAAAAFjqCBd1Kx5mCs="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqCBd06x3DWs="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 137,
+											"top": 484,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": -1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqCBd1Kx5mCs="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										}
+									],
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"head": {
+										"$ref": "AAAAAAFjqB9/Taw5bl4="
+									},
+									"tail": {
+										"$ref": "AAAAAAFjqAWrCqrNuOs="
+									},
+									"lineStyle": 1,
+									"points": "116:424;185:543",
+									"stereotypeDisplay": "label",
+									"showVisibility": true,
+									"showProperty": true,
+									"nameLabel": {
+										"$ref": "AAAAAAFjqCBd1Kx6qnM="
+									},
+									"stereotypeLabel": {
+										"$ref": "AAAAAAFjqCBd1ax7Ky4="
+									},
+									"propertyLabel": {
+										"$ref": "AAAAAAFjqCBd1ax8vzU="
+									}
+								},
+								{
+									"_type": "UMLActionView",
+									"_id": "AAAAAAFjqCEih6yTO40=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqCEig6yRtTs="
+									},
+									"subViews": [
+										{
+											"_type": "UMLNameCompartmentView",
+											"_id": "AAAAAAFjqCEiiayUplA=",
+											"_parent": {
+												"$ref": "AAAAAAFjqCEih6yTO40="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqCEig6yRtTs="
+											},
+											"subViews": [
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqCEiiqyV3PI=",
+													"_parent": {
+														"$ref": "AAAAAAFjqCEiiayUplA="
+													},
+													"visible": false,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Helvetica;12;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": -144,
+													"top": -128,
+													"width": 0,
+													"height": 12,
+													"autoResize": false,
+													"underline": false,
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												},
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqCEii6yWXBY=",
+													"_parent": {
+														"$ref": "AAAAAAFjqCEiiayUplA="
+													},
+													"visible": true,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Helvetica;12;1",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": 132,
+													"top": 183,
+													"width": 111,
+													"height": 36,
+													"autoResize": false,
+													"underline": false,
+													"text": "Check if Event has been enabled by MFI",
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": true
+												},
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqCEii6yXfwg=",
+													"_parent": {
+														"$ref": "AAAAAAFjqCEiiayUplA="
+													},
+													"visible": false,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Helvetica;12;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": -144,
+													"top": -128,
+													"width": 80,
+													"height": 12,
+													"autoResize": false,
+													"underline": false,
+													"text": "(from Activity1)",
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												},
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqCEii6yYpPQ=",
+													"_parent": {
+														"$ref": "AAAAAAFjqCEiiayUplA="
+													},
+													"visible": false,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Helvetica;12;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": -144,
+													"top": -128,
+													"width": 0,
+													"height": 12,
+													"autoResize": false,
+													"underline": false,
+													"horizontalAlignment": 1,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												}
+											],
+											"visible": true,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 127,
+											"top": 176,
+											"width": 121,
+											"height": 48,
+											"autoResize": false,
+											"stereotypeLabel": {
+												"$ref": "AAAAAAFjqCEiiqyV3PI="
+											},
+											"nameLabel": {
+												"$ref": "AAAAAAFjqCEii6yWXBY="
+											},
+											"namespaceLabel": {
+												"$ref": "AAAAAAFjqCEii6yXfwg="
+											},
+											"propertyLabel": {
+												"$ref": "AAAAAAFjqCEii6yYpPQ="
+											}
+										}
+									],
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": true,
+									"containerExtending": false,
+									"left": 127,
+									"top": 176,
+									"width": 121,
+									"height": 64,
+									"autoResize": false,
+									"stereotypeDisplay": "label",
+									"showVisibility": true,
+									"showNamespace": false,
+									"showProperty": true,
+									"showType": true,
+									"nameCompartment": {
+										"$ref": "AAAAAAFjqCEiiayUplA="
+									},
+									"wordWrap": true
+								},
+								{
+									"_type": "UMLControlFlowView",
+									"_id": "AAAAAAFjqCJ5HqyxiME=",
+									"_parent": {
+										"$ref": "AAAAAAFjqASLIKqg3FE="
+									},
+									"model": {
+										"$ref": "AAAAAAFjqCJ5HayvTsA="
+									},
+									"subViews": [
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqCJ5H6yynz8=",
+											"_parent": {
+												"$ref": "AAAAAAFjqCJ5HqyxiME="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqCJ5HayvTsA="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 201,
+											"top": 256,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqCJ5HqyxiME="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqCJ5IKyzLqE=",
+											"_parent": {
+												"$ref": "AAAAAAFjqCJ5HqyxiME="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqCJ5HayvTsA="
+											},
+											"visible": null,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 216,
+											"top": 256,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": 1.5707963267948966,
+											"distance": 30,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqCJ5HqyxiME="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "EdgeLabelView",
+											"_id": "AAAAAAFjqCJ5IKy0y/c=",
+											"_parent": {
+												"$ref": "AAAAAAFjqCJ5HqyxiME="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqCJ5HayvTsA="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 172,
+											"top": 257,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"alpha": -1.5707963267948966,
+											"distance": 15,
+											"hostEdge": {
+												"$ref": "AAAAAAFjqCJ5HqyxiME="
+											},
+											"edgePosition": 1,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										}
+									],
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"head": {
+										"$ref": "AAAAAAFjqBIJL6ubZ3I="
+									},
+									"tail": {
+										"$ref": "AAAAAAFjqCEih6yTO40="
+									},
+									"lineStyle": 1,
+									"points": "187:240;187:287",
+									"stereotypeDisplay": "label",
+									"showVisibility": true,
+									"showProperty": true,
+									"nameLabel": {
+										"$ref": "AAAAAAFjqCJ5H6yynz8="
+									},
+									"stereotypeLabel": {
+										"$ref": "AAAAAAFjqCJ5IKyzLqE="
+									},
+									"propertyLabel": {
+										"$ref": "AAAAAAFjqCJ5IKy0y/c="
+									}
+								}
+							]
+						}
+					],
+					"visibility": "public",
+					"isReentrant": true,
+					"isReadOnly": false,
+					"isSingleExecution": false,
+					"nodes": [
+						{
+							"_type": "UMLInitialNode",
+							"_id": "AAAAAAFjqASvhaqkmH0=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"name": "InitialNode1",
+							"visibility": "public"
+						},
+						{
+							"_type": "UMLAction",
+							"_id": "AAAAAAFjqATelKqpPIs=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"name": "JMSListener injects event",
+							"visibility": "public",
+							"kind": "opaque",
+							"isLocallyReentrant": false,
+							"isSynchronous": true
+						},
+						{
+							"_type": "UMLAction",
+							"_id": "AAAAAAFjqAWrCarLlr0=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"name": "retrieve receipt SMS and email contact",
+							"visibility": "public",
+							"kind": "opaque",
+							"isLocallyReentrant": false,
+							"isSynchronous": true
+						},
+						{
+							"_type": "UMLAction",
+							"_id": "AAAAAAFjqAYmKKrmL6s=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"name": "Prepare Message with template created",
+							"visibility": "public",
+							"kind": "opaque",
+							"isLocallyReentrant": false,
+							"isSynchronous": true
+						},
+						{
+							"_type": "UMLAction",
+							"_id": "AAAAAAFjqAZdgasAyFA=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"name": "Senders Objects transmit the data",
+							"visibility": "public",
+							"kind": "opaque",
+							"isLocallyReentrant": false,
+							"isSynchronous": true
+						},
+						{
+							"_type": "UMLActivityFinalNode",
+							"_id": "AAAAAAFjqAbQ7asd+Ww=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"name": "ActivityFinalNode1",
+							"visibility": "public"
+						},
+						{
+							"_type": "UMLAction",
+							"_id": "AAAAAAFjqA2/A6tYai0=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"name": "Locatize Template",
+							"visibility": "public",
+							"kind": "opaque",
+							"isLocallyReentrant": false,
+							"isSynchronous": true
+						},
+						{
+							"_type": "UMLForkNode",
+							"_id": "AAAAAAFjqBHP9auQV5g=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"name": "ForkNode1",
+							"visibility": "public"
+						},
+						{
+							"_type": "UMLForkNode",
+							"_id": "AAAAAAFjqBIJLquZsRo=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"name": "ForkNode2",
+							"visibility": "public"
+						},
+						{
+							"_type": "UMLJoinNode",
+							"_id": "AAAAAAFjqB9/S6w3TKM=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"name": "JoinNode1",
+							"visibility": "public"
+						},
+						{
+							"_type": "UMLAction",
+							"_id": "AAAAAAFjqCEig6yRtTs=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"name": "Check if Event has been enabled by MFI",
+							"visibility": "public",
+							"kind": "opaque",
+							"isLocallyReentrant": false,
+							"isSynchronous": true
+						}
+					],
+					"edges": [
+						{
+							"_type": "UMLControlFlow",
+							"_id": "AAAAAAFjqBEKGKt1+H8=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"source": {
+								"$ref": "AAAAAAFjqATelKqpPIs="
+							},
+							"target": {
+								"$ref": "AAAAAAFjqAWrCarLlr0="
+							},
+							"visibility": "public"
+						},
+						{
+							"_type": "UMLControlFlow",
+							"_id": "AAAAAAFjqBIoaquel/4=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"source": {
+								"$ref": "AAAAAAFjqATelKqpPIs="
+							},
+							"target": {
+								"$ref": "AAAAAAFjqCEig6yRtTs="
+							},
+							"visibility": "public"
+						},
+						{
+							"_type": "UMLControlFlow",
+							"_id": "AAAAAAFjqBKjHquv5CM=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"source": {
+								"$ref": "AAAAAAFjqASvhaqkmH0="
+							},
+							"target": {
+								"$ref": "AAAAAAFjqATelKqpPIs="
+							},
+							"visibility": "public"
+						},
+						{
+							"_type": "UMLControlFlow",
+							"_id": "AAAAAAFjqBLYAqvCSQk=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"source": {
+								"$ref": "AAAAAAFjqAYmKKrmL6s="
+							},
+							"target": {
+								"$ref": "AAAAAAFjqA2/A6tYai0="
+							},
+							"visibility": "public"
+						},
+						{
+							"_type": "UMLControlFlow",
+							"_id": "AAAAAAFjqBLqNqvTow0=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"source": {
+								"$ref": "AAAAAAFjqAZdgasAyFA="
+							},
+							"target": {
+								"$ref": "AAAAAAFjqAbQ7asd+Ww="
+							},
+							"visibility": "public"
+						},
+						{
+							"_type": "UMLControlFlow",
+							"_id": "AAAAAAFjqByuGavpb+Q=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"source": {
+								"$ref": "AAAAAAFjqATelKqpPIs="
+							},
+							"target": {
+								"$ref": "AAAAAAFjqAWrCarLlr0="
+							},
+							"visibility": "public"
+						},
+						{
+							"_type": "UMLControlFlow",
+							"_id": "AAAAAAFjqB0vKawF6iM=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"source": {
+								"$ref": "AAAAAAFjqBIJLquZsRo="
+							},
+							"target": {
+								"$ref": "AAAAAAFjqAWrCarLlr0="
+							},
+							"visibility": "public"
+						},
+						{
+							"_type": "UMLControlFlow",
+							"_id": "AAAAAAFjqB14s6wWTtM=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"source": {
+								"$ref": "AAAAAAFjqBIJLquZsRo="
+							},
+							"target": {
+								"$ref": "AAAAAAFjqAYmKKrmL6s="
+							},
+							"visibility": "public"
+						},
+						{
+							"_type": "UMLControlFlow",
+							"_id": "AAAAAAFjqB+W4qw8vc8=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"source": {
+								"$ref": "AAAAAAFjqB9/S6w3TKM="
+							},
+							"target": {
+								"$ref": "AAAAAAFjqAZdgasAyFA="
+							},
+							"visibility": "public"
+						},
+						{
+							"_type": "UMLControlFlow",
+							"_id": "AAAAAAFjqB+mc6xNTWc=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"source": {
+								"$ref": "AAAAAAFjqA2/A6tYai0="
+							},
+							"target": {
+								"$ref": "AAAAAAFjqB9/S6w3TKM="
+							},
+							"visibility": "public"
+						},
+						{
+							"_type": "UMLControlFlow",
+							"_id": "AAAAAAFjqCBd06x3DWs=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"source": {
+								"$ref": "AAAAAAFjqAWrCarLlr0="
+							},
+							"target": {
+								"$ref": "AAAAAAFjqB9/S6w3TKM="
+							},
+							"visibility": "public"
+						},
+						{
+							"_type": "UMLControlFlow",
+							"_id": "AAAAAAFjqCJ5HayvTsA=",
+							"_parent": {
+								"$ref": "AAAAAAFjqASLHqqfH1M="
+							},
+							"source": {
+								"$ref": "AAAAAAFjqCEig6yRtTs="
+							},
+							"target": {
+								"$ref": "AAAAAAFjqBIJLquZsRo="
+							},
+							"visibility": "public"
+						}
+					]
+				},
+				{
+					"_type": "UMLCollaboration",
+					"_id": "AAAAAAFjqCY2j5u3ys8=",
+					"_parent": {
+						"$ref": "AAAAAAFF+qBWK6M3Z8Y="
+					},
+					"name": "Collaboration1",
+					"ownedElements": [
+						{
+							"_type": "UMLInteraction",
+							"_id": "AAAAAAFjqCY2kpu4n0I=",
+							"_parent": {
+								"$ref": "AAAAAAFjqCY2j5u3ys8="
+							},
+							"name": "Interaction1",
+							"ownedElements": [
+								{
+									"_type": "UMLSequenceDiagram",
+									"_id": "AAAAAAFjqCY2kpu5KQk=",
+									"_parent": {
+										"$ref": "AAAAAAFjqCY2kpu4n0I="
+									},
+									"name": "SequenceDiagram1",
+									"visible": true,
+									"defaultDiagram": false,
+									"ownedViews": [
+										{
+											"_type": "UMLFrameView",
+											"_id": "AAAAAAFjqCY2k5u6GlA=",
+											"_parent": {
+												"$ref": "AAAAAAFjqCY2kpu5KQk="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqCY2kpu5KQk="
+											},
+											"subViews": [
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqCY2lJu7Oe8=",
+													"_parent": {
+														"$ref": "AAAAAAFjqCY2k5u6GlA="
+													},
+													"visible": true,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Helvetica;12;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": 73,
+													"top": 10,
+													"width": 111,
+													"height": 12,
+													"autoResize": false,
+													"underline": false,
+													"text": "SequenceDiagram1",
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												},
+												{
+													"_type": "LabelView",
+													"_id": "AAAAAAFjqCY2lZu8kXQ=",
+													"_parent": {
+														"$ref": "AAAAAAFjqCY2k5u6GlA="
+													},
+													"visible": true,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Helvetica;12;1",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": 10,
+													"top": 10,
+													"width": 58,
+													"height": 12,
+													"autoResize": false,
+													"underline": false,
+													"text": "interaction",
+													"horizontalAlignment": 2,
+													"verticalAlignment": 5,
+													"wordWrap": false
+												}
+											],
+											"visible": true,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 5,
+											"top": 5,
+											"width": 695,
+											"height": 595,
+											"autoResize": false,
+											"nameLabel": {
+												"$ref": "AAAAAAFjqCY2lJu7Oe8="
+											},
+											"frameTypeLabel": {
+												"$ref": "AAAAAAFjqCY2lZu8kXQ="
+											}
+										},
+										{
+											"_type": "UMLSeqLifelineView",
+											"_id": "AAAAAAFjqCbCSJvIsEM=",
+											"_parent": {
+												"$ref": "AAAAAAFjqCY2kpu5KQk="
+											},
+											"model": {
+												"$ref": "AAAAAAFjqCbCSJvHDpo="
+											},
+											"subViews": [
+												{
+													"_type": "UMLNameCompartmentView",
+													"_id": "AAAAAAFjqCbCSZvJ4ng=",
+													"_parent": {
+														"$ref": "AAAAAAFjqCbCSJvIsEM="
+													},
+													"model": {
+														"$ref": "AAAAAAFjqCbCSJvHDpo="
+													},
+													"subViews": [
+														{
+															"_type": "LabelView",
+															"_id": "AAAAAAFjqCbCSpvKaxs=",
+															"_parent": {
+																"$ref": "AAAAAAFjqCbCSZvJ4ng="
+															},
+															"visible": false,
+															"enabled": true,
+															"lineColor": "#000000",
+															"fillColor": "#ffffff",
+															"fontColor": "#000000",
+															"font": "Helvetica;12;0",
+															"showShadow": true,
+															"containerChangeable": false,
+															"containerExtending": false,
+															"left": 0,
+															"top": 0,
+															"width": 0,
+															"height": 12,
+															"autoResize": false,
+															"underline": false,
+															"horizontalAlignment": 2,
+															"verticalAlignment": 5,
+															"wordWrap": false
+														},
+														{
+															"_type": "LabelView",
+															"_id": "AAAAAAFjqCbCSpvLXu8=",
+															"_parent": {
+																"$ref": "AAAAAAFjqCbCSZvJ4ng="
+															},
+															"visible": true,
+															"enabled": true,
+															"lineColor": "#000000",
+															"fillColor": "#ffffff",
+															"fontColor": "#000000",
+															"font": "Helvetica;12;1",
+															"showShadow": true,
+															"containerChangeable": false,
+															"containerExtending": false,
+															"left": 37,
+															"top": 47,
+															"width": 90,
+															"height": 12,
+															"autoResize": false,
+															"underline": false,
+															"text": "EventListener",
+															"horizontalAlignment": 2,
+															"verticalAlignment": 5,
+															"wordWrap": false
+														},
+														{
+															"_type": "LabelView",
+															"_id": "AAAAAAFjqCbCSpvMWyQ=",
+															"_parent": {
+																"$ref": "AAAAAAFjqCbCSZvJ4ng="
+															},
+															"visible": false,
+															"enabled": true,
+															"lineColor": "#000000",
+															"fillColor": "#ffffff",
+															"fontColor": "#000000",
+															"font": "Helvetica;12;0",
+															"showShadow": true,
+															"containerChangeable": false,
+															"containerExtending": false,
+															"left": 0,
+															"top": 0,
+															"width": 99,
+															"height": 12,
+															"autoResize": false,
+															"underline": false,
+															"text": "(from Interaction1)",
+															"horizontalAlignment": 2,
+															"verticalAlignment": 5,
+															"wordWrap": false
+														},
+														{
+															"_type": "LabelView",
+															"_id": "AAAAAAFjqCbCS5vNZUs=",
+															"_parent": {
+																"$ref": "AAAAAAFjqCbCSZvJ4ng="
+															},
+															"visible": false,
+															"enabled": true,
+															"lineColor": "#000000",
+															"fillColor": "#ffffff",
+															"fontColor": "#000000",
+															"font": "Helvetica;12;0",
+															"showShadow": true,
+															"containerChangeable": false,
+															"containerExtending": false,
+															"left": 0,
+															"top": 0,
+															"width": 0,
+															"height": 12,
+															"autoResize": false,
+															"underline": false,
+															"horizontalAlignment": 1,
+															"verticalAlignment": 5,
+															"wordWrap": false
+														}
+													],
+													"visible": true,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Helvetica;12;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": 32,
+													"top": 40,
+													"width": 100,
+													"height": 40,
+													"autoResize": false,
+													"stereotypeLabel": {
+														"$ref": "AAAAAAFjqCbCSpvKaxs="
+													},
+													"nameLabel": {
+														"$ref": "AAAAAAFjqCbCSpvLXu8="
+													},
+													"namespaceLabel": {
+														"$ref": "AAAAAAFjqCbCSpvMWyQ="
+													},
+													"propertyLabel": {
+														"$ref": "AAAAAAFjqCbCS5vNZUs="
+													}
+												},
+												{
+													"_type": "UMLLinePartView",
+													"_id": "AAAAAAFjqCbCS5vOH9k=",
+													"_parent": {
+														"$ref": "AAAAAAFjqCbCSJvIsEM="
+													},
+													"model": {
+														"$ref": "AAAAAAFjqCbCSJvHDpo="
+													},
+													"visible": true,
+													"enabled": true,
+													"lineColor": "#000000",
+													"fillColor": "#ffffff",
+													"fontColor": "#000000",
+													"font": "Helvetica;12;0",
+													"showShadow": true,
+													"containerChangeable": false,
+													"containerExtending": false,
+													"left": 82,
+													"top": 80,
+													"width": 1,
+													"height": 160,
+													"autoResize": false
+												}
+											],
+											"visible": true,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 32,
+											"top": 40,
+											"width": 100,
+											"height": 200,
+											"autoResize": false,
+											"stereotypeDisplay": "label",
+											"showVisibility": true,
+											"showNamespace": false,
+											"showProperty": true,
+											"showType": true,
+											"nameCompartment": {
+												"$ref": "AAAAAAFjqCbCSZvJ4ng="
+											},
+											"wordWrap": false,
+											"linePart": {
+												"$ref": "AAAAAAFjqCbCS5vOH9k="
+											}
+										}
+									],
+									"showSequenceNumber": true,
+									"showSignature": true,
+									"showActivation": true
+								}
+							],
+							"visibility": "public",
+							"isReentrant": true,
+							"participants": [
+								{
+									"_type": "UMLLifeline",
+									"_id": "AAAAAAFjqCbCSJvHDpo=",
+									"_parent": {
+										"$ref": "AAAAAAFjqCY2kpu4n0I="
+									},
+									"name": "EventListener",
+									"visibility": "public",
+									"represent": {
+										"$ref": "AAAAAAFjqCbCR5vGwmU="
+									},
+									"isMultiInstance": false
+								}
+							]
+						}
+					],
+					"visibility": "public",
+					"attributes": [
+						{
+							"_type": "UMLAttribute",
+							"_id": "AAAAAAFjqCbCR5vGwmU=",
+							"_parent": {
+								"$ref": "AAAAAAFjqCY2j5u3ys8="
+							},
+							"name": "Role1",
+							"visibility": "public",
+							"isStatic": false,
+							"isLeaf": false,
+							"type": "",
+							"isReadOnly": false,
+							"isOrdered": false,
+							"isUnique": false,
+							"isDerived": false,
+							"aggregation": "none",
+							"isID": false
+						}
+					],
+					"isAbstract": false,
+					"isFinalSpecialization": false,
+					"isLeaf": false
+				},
+				{
+					"_type": "UMLUseCaseDiagram",
+					"_id": "AAAAAAFjuvxSC6RUg4A=",
+					"_parent": {
+						"$ref": "AAAAAAFF+qBWK6M3Z8Y="
+					},
+					"name": "CustomerUseCase",
+					"visible": true,
+					"defaultDiagram": false,
+					"ownedViews": [
+						{
+							"_type": "UMLUseCaseSubjectView",
+							"_id": "AAAAAAFjuv4gOKRa+jQ=",
+							"_parent": {
+								"$ref": "AAAAAAFjuvxSC6RUg4A="
+							},
+							"model": {
+								"$ref": "AAAAAAFjuv4gOKRYAw8="
+							},
+							"subViews": [
+								{
+									"_type": "UMLNameCompartmentView",
+									"_id": "AAAAAAFjuv4gOaRbEkE=",
+									"_parent": {
+										"$ref": "AAAAAAFjuv4gOKRa+jQ="
+									},
+									"model": {
+										"$ref": "AAAAAAFjuv4gOKRYAw8="
+									},
+									"subViews": [
+										{
+											"_type": "LabelView",
+											"_id": "AAAAAAFjuv4gOaRczFQ=",
+											"_parent": {
+												"$ref": "AAAAAAFjuv4gOaRbEkE="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 0,
+											"top": 0,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "LabelView",
+											"_id": "AAAAAAFjuv4gOaRdgAQ=",
+											"_parent": {
+												"$ref": "AAAAAAFjuv4gOaRbEkE="
+											},
+											"visible": true,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;1",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 213,
+											"top": 39,
+											"width": 478,
+											"height": 12,
+											"autoResize": false,
+											"underline": false,
+											"text": "Notification Microservice",
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "LabelView",
+											"_id": "AAAAAAFjuv4gOaReStM=",
+											"_parent": {
+												"$ref": "AAAAAAFjuv4gOaRbEkE="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 0,
+											"top": 0,
+											"width": 69,
+											"height": 12,
+											"autoResize": false,
+											"underline": false,
+											"text": "(from Model)",
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "LabelView",
+											"_id": "AAAAAAFjuv4gOaRf7IE=",
+											"_parent": {
+												"$ref": "AAAAAAFjuv4gOaRbEkE="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 0,
+											"top": 0,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"underline": false,
+											"horizontalAlignment": 1,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										}
+									],
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"left": 208,
+									"top": 32,
+									"width": 488,
+									"height": 24,
+									"autoResize": false,
+									"stereotypeLabel": {
+										"$ref": "AAAAAAFjuv4gOaRczFQ="
+									},
+									"nameLabel": {
+										"$ref": "AAAAAAFjuv4gOaRdgAQ="
+									},
+									"namespaceLabel": {
+										"$ref": "AAAAAAFjuv4gOaReStM="
+									},
+									"propertyLabel": {
+										"$ref": "AAAAAAFjuv4gOaRf7IE="
+									}
+								}
+							],
+							"visible": true,
+							"enabled": true,
+							"lineColor": "#000000",
+							"fillColor": "#ffffff",
+							"fontColor": "#000000",
+							"font": "Helvetica;12;0",
+							"showShadow": true,
+							"containerChangeable": false,
+							"containerExtending": false,
+							"left": 208,
+							"top": 32,
+							"width": 488,
+							"height": 608,
+							"autoResize": false,
+							"stereotypeDisplay": "label",
+							"showVisibility": true,
+							"showNamespace": false,
+							"showProperty": true,
+							"showType": true,
+							"nameCompartment": {
+								"$ref": "AAAAAAFjuv4gOaRbEkE="
+							},
+							"wordWrap": false
+						},
+						{
+							"_type": "UMLActorView",
+							"_id": "AAAAAAFjuv6kb6R0A6g=",
+							"_parent": {
+								"$ref": "AAAAAAFjuvxSC6RUg4A="
+							},
+							"model": {
+								"$ref": "AAAAAAFjuv6kbaRyZy0="
+							},
+							"subViews": [
+								{
+									"_type": "UMLNameCompartmentView",
+									"_id": "AAAAAAFjuv6kcKR1JNo=",
+									"_parent": {
+										"$ref": "AAAAAAFjuv6kb6R0A6g="
+									},
+									"model": {
+										"$ref": "AAAAAAFjuv6kbaRyZy0="
+									},
+									"subViews": [
+										{
+											"_type": "LabelView",
+											"_id": "AAAAAAFjuv6kcKR2baE=",
+											"_parent": {
+												"$ref": "AAAAAAFjuv6kcKR1JNo="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": -112,
+											"top": 352,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "LabelView",
+											"_id": "AAAAAAFjuv6kcaR3JSY=",
+											"_parent": {
+												"$ref": "AAAAAAFjuv6kcKR1JNo="
+											},
+											"visible": true,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;1",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 61,
+											"top": 341,
+											"width": 134,
+											"height": 12,
+											"autoResize": false,
+											"underline": false,
+											"text": "customer microservice",
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "LabelView",
+											"_id": "AAAAAAFjuv6kcaR4LTc=",
+											"_parent": {
+												"$ref": "AAAAAAFjuv6kcKR1JNo="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": -112,
+											"top": 352,
+											"width": 69,
+											"height": 12,
+											"autoResize": false,
+											"underline": false,
+											"text": "(from Model)",
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "LabelView",
+											"_id": "AAAAAAFjuv6kcaR5qOc=",
+											"_parent": {
+												"$ref": "AAAAAAFjuv6kcKR1JNo="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": -112,
+											"top": 352,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"underline": false,
+											"horizontalAlignment": 1,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										}
+									],
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"left": 56,
+									"top": 334,
+									"width": 144,
+									"height": 24,
+									"autoResize": false,
+									"stereotypeLabel": {
+										"$ref": "AAAAAAFjuv6kcKR2baE="
+									},
+									"nameLabel": {
+										"$ref": "AAAAAAFjuv6kcaR3JSY="
+									},
+									"namespaceLabel": {
+										"$ref": "AAAAAAFjuv6kcaR4LTc="
+									},
+									"propertyLabel": {
+										"$ref": "AAAAAAFjuv6kcaR5qOc="
+									}
+								},
+								{
+									"_type": "UMLAttributeCompartmentView",
+									"_id": "AAAAAAFjuv6kcqR6rvs=",
+									"_parent": {
+										"$ref": "AAAAAAFjuv6kb6R0A6g="
+									},
+									"model": {
+										"$ref": "AAAAAAFjuv6kbaRyZy0="
+									},
+									"visible": false,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"left": -56,
+									"top": 176,
+									"width": 10,
+									"height": 10,
+									"autoResize": false
+								},
+								{
+									"_type": "UMLOperationCompartmentView",
+									"_id": "AAAAAAFjuv6kcqR7HEk=",
+									"_parent": {
+										"$ref": "AAAAAAFjuv6kb6R0A6g="
+									},
+									"model": {
+										"$ref": "AAAAAAFjuv6kbaRyZy0="
+									},
+									"visible": false,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"left": -56,
+									"top": 176,
+									"width": 10,
+									"height": 10,
+									"autoResize": false
+								},
+								{
+									"_type": "UMLReceptionCompartmentView",
+									"_id": "AAAAAAFjuv6kc6R8FZ0=",
+									"_parent": {
+										"$ref": "AAAAAAFjuv6kb6R0A6g="
+									},
+									"model": {
+										"$ref": "AAAAAAFjuv6kbaRyZy0="
+									},
+									"visible": false,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"left": -56,
+									"top": 176,
+									"width": 10,
+									"height": 10,
+									"autoResize": false
+								},
+								{
+									"_type": "UMLTemplateParameterCompartmentView",
+									"_id": "AAAAAAFjuv6kdKR9/xc=",
+									"_parent": {
+										"$ref": "AAAAAAFjuv6kb6R0A6g="
+									},
+									"model": {
+										"$ref": "AAAAAAFjuv6kbaRyZy0="
+									},
+									"visible": false,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"left": -56,
+									"top": 176,
+									"width": 10,
+									"height": 10,
+									"autoResize": false
+								}
+							],
+							"visible": true,
+							"enabled": true,
+							"lineColor": "#000000",
+							"fillColor": "#ffffff",
+							"fontColor": "#000000",
+							"font": "Helvetica;12;0",
+							"showShadow": true,
+							"containerChangeable": true,
+							"containerExtending": false,
+							"left": 56,
+							"top": 280,
+							"width": 144,
+							"height": 79,
+							"autoResize": false,
+							"stereotypeDisplay": "label",
+							"showVisibility": true,
+							"showNamespace": false,
+							"showProperty": true,
+							"showType": true,
+							"nameCompartment": {
+								"$ref": "AAAAAAFjuv6kcKR1JNo="
+							},
+							"wordWrap": false,
+							"suppressAttributes": true,
+							"suppressOperations": true,
+							"suppressReceptions": true,
+							"showMultiplicity": true,
+							"showOperationSignature": true,
+							"attributeCompartment": {
+								"$ref": "AAAAAAFjuv6kcqR6rvs="
+							},
+							"operationCompartment": {
+								"$ref": "AAAAAAFjuv6kcqR7HEk="
+							},
+							"receptionCompartment": {
+								"$ref": "AAAAAAFjuv6kc6R8FZ0="
+							},
+							"templateParameterCompartment": {
+								"$ref": "AAAAAAFjuv6kdKR9/xc="
+							}
+						},
+						{
+							"_type": "UMLUseCaseView",
+							"_id": "AAAAAAFjuv/XzaSib0Y=",
+							"_parent": {
+								"$ref": "AAAAAAFjuvxSC6RUg4A="
+							},
+							"model": {
+								"$ref": "AAAAAAFjuv/XzKSgDcQ="
+							},
+							"subViews": [
+								{
+									"_type": "UMLNameCompartmentView",
+									"_id": "AAAAAAFjuv/XzqSjIc4=",
+									"_parent": {
+										"$ref": "AAAAAAFjuv/XzaSib0Y="
+									},
+									"model": {
+										"$ref": "AAAAAAFjuv/XzKSgDcQ="
+									},
+									"subViews": [
+										{
+											"_type": "LabelView",
+											"_id": "AAAAAAFjuv/Xz6SkS8o=",
+											"_parent": {
+												"$ref": "AAAAAAFjuv/XzqSjIc4="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": -80,
+											"top": -96,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"underline": false,
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "LabelView",
+											"_id": "AAAAAAFjuv/X0KSlY0g=",
+											"_parent": {
+												"$ref": "AAAAAAFjuv/XzqSjIc4="
+											},
+											"visible": true,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;1",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": 330.5,
+											"top": 104,
+											"width": 92,
+											"height": 36,
+											"autoResize": false,
+											"underline": false,
+											"text": "Account Created Notification",
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": true
+										},
+										{
+											"_type": "LabelView",
+											"_id": "AAAAAAFjuv/X0KSmuPo=",
+											"_parent": {
+												"$ref": "AAAAAAFjuv/XzqSjIc4="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": -80,
+											"top": -96,
+											"width": 69,
+											"height": 12,
+											"autoResize": false,
+											"underline": false,
+											"text": "(from Model)",
+											"horizontalAlignment": 2,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										},
+										{
+											"_type": "LabelView",
+											"_id": "AAAAAAFjuv/X0KSnIG4=",
+											"_parent": {
+												"$ref": "AAAAAAFjuv/XzqSjIc4="
+											},
+											"visible": false,
+											"enabled": true,
+											"lineColor": "#000000",
+											"fillColor": "#ffffff",
+											"fontColor": "#000000",
+											"font": "Helvetica;12;0",
+											"showShadow": true,
+											"containerChangeable": false,
+											"containerExtending": false,
+											"left": -80,
+											"top": -96,
+											"width": 0,
+											"height": 12,
+											"autoResize": false,
+											"underline": false,
+											"horizontalAlignment": 1,
+											"verticalAlignment": 5,
+											"wordWrap": false
+										}
+									],
+									"visible": true,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"left": 325.5,
+									"top": 97,
+									"width": 102,
+									"height": 48,
+									"autoResize": false,
+									"stereotypeLabel": {
+										"$ref": "AAAAAAFjuv/Xz6SkS8o="
+									},
+									"nameLabel": {
+										"$ref": "AAAAAAFjuv/X0KSlY0g="
+									},
+									"namespaceLabel": {
+										"$ref": "AAAAAAFjuv/X0KSmuPo="
+									},
+									"propertyLabel": {
+										"$ref": "AAAAAAFjuv/X0KSnIG4="
+									}
+								},
+								{
+									"_type": "UMLAttributeCompartmentView",
+									"_id": "AAAAAAFjuv/X0aSocII=",
+									"_parent": {
+										"$ref": "AAAAAAFjuv/XzaSib0Y="
+									},
+									"model": {
+										"$ref": "AAAAAAFjuv/XzKSgDcQ="
+									},
+									"visible": false,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"left": -40,
+									"top": -48,
+									"width": 10,
+									"height": 10,
+									"autoResize": false
+								},
+								{
+									"_type": "UMLOperationCompartmentView",
+									"_id": "AAAAAAFjuv/X0qSpfns=",
+									"_parent": {
+										"$ref": "AAAAAAFjuv/XzaSib0Y="
+									},
+									"model": {
+										"$ref": "AAAAAAFjuv/XzKSgDcQ="
+									},
+									"visible": false,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"left": -40,
+									"top": -48,
+									"width": 10,
+									"height": 10,
+									"autoResize": false
+								},
+								{
+									"_type": "UMLReceptionCompartmentView",
+									"_id": "AAAAAAFjuv/X0qSqNoc=",
+									"_parent": {
+										"$ref": "AAAAAAFjuv/XzaSib0Y="
+									},
+									"model": {
+										"$ref": "AAAAAAFjuv/XzKSgDcQ="
+									},
+									"visible": false,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"left": -40,
+									"top": -48,
+									"width": 10,
+									"height": 10,
+									"autoResize": false
+								},
+								{
+									"_type": "UMLTemplateParameterCompartmentView",
+									"_id": "AAAAAAFjuv/X06Sr5DM=",
+									"_parent": {
+										"$ref": "AAAAAAFjuv/XzaSib0Y="
+									},
+									"model": {
+										"$ref": "AAAAAAFjuv/XzKSgDcQ="
+									},
+									"visible": false,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"left": -40,
+									"top": -48,
+									"width": 10,
+									"height": 10,
+									"autoResize": false
+								},
+								{
+									"_type": "UMLExtensionPointCompartmentView",
+									"_id": "AAAAAAFjuv/X1KSsXMU=",
+									"_parent": {
+										"$ref": "AAAAAAFjuv/XzaSib0Y="
+									},
+									"model": {
+										"$ref": "AAAAAAFjuv/XzKSgDcQ="
+									},
+									"visible": false,
+									"enabled": true,
+									"lineColor": "#000000",
+									"fillColor": "#ffffff",
+									"fontColor": "#000000",
+									"font": "Helvetica;12;0",
+									"showShadow": true,
+									"containerChangeable": false,
+									"containerExtending": false,
+									"left": -40,
+									"top": -48,
+									"width": 10,
+									"height": 10,
+									"autoResize": false
+								}
+							],
+							"visible": true,
+							"enabled": true,
+							"lineColor": "#000000",
+							"fillColor": "#ffffff",
+							"fontColor": "#000000",
+							"font": "Helvetica;12;0",
+							"showShadow": true,
+							"containerChangeable": true,
+							"containerExtending": false,
+							"left": 304,
+							"top": 88,
+							"width": 145,
+							"height": 67,
+							"autoResize": false,
+							"stereotypeDisplay": "label",
+							"showVisibility": true,
+							"showNamespace": false,
+							"showProperty": true,
+							"showType": true,
+							"nameCompartment": {
+								"$ref": "AAAAAAFjuv/XzqSjIc4="
+							},
+							"wordWrap": true,
+							"suppressAttributes": true,
+							"suppressOperations": true,
+							"suppressReceptions": true,
+							"showMultiplicity": true,
+							"showOperationSignature": true,
+							"attributeCompartment": {
+								"$ref": "AAAAAAFjuv/X0aSocII="
+							},
+							"operationCompartment": {
+								"$ref": "AAAAAAFjuv/X0qSpfns="
+							},
+							"receptionCompartment": {
+								"$ref": "AAAAAAFjuv/X0qSqNoc="
+							},
+							"templateParameterCompartment": {
+								"$ref": "AAAAAAFjuv/X06Sr5DM="
+							},
+							"extensionPointCompartment": {
+								"$ref": "AAAAAAFjuv/X1KSsXMU="
+							}
+						}
+					]
+				},
+				{
+					"_type": "UMLUseCaseSubject",
+					"_id": "AAAAAAFjuv4gOKRYAw8=",
+					"_parent": {
+						"$ref": "AAAAAAFF+qBWK6M3Z8Y="
+					},
+					"name": "Notification Microservice",
+					"visibility": "public"
+				},
+				{
+					"_type": "UMLActor",
+					"_id": "AAAAAAFjuv6kbaRyZy0=",
+					"_parent": {
+						"$ref": "AAAAAAFF+qBWK6M3Z8Y="
+					},
+					"name": "customer microservice",
+					"visibility": "public",
+					"isAbstract": false,
+					"isFinalSpecialization": false,
+					"isLeaf": false
+				},
+				{
+					"_type": "UMLUseCase",
+					"_id": "AAAAAAFjuv/XzKSgDcQ=",
+					"_parent": {
+						"$ref": "AAAAAAFF+qBWK6M3Z8Y="
+					},
+					"name": "Account Created Notification",
+					"visibility": "public",
+					"isAbstract": false,
+					"isFinalSpecialization": false,
+					"isLeaf": false
+				}
+			],
+			"visibility": "public"
+		}
+	]
+}
\ No newline at end of file


[fineract-cn-notifications] 30/36: Merge branch 'develop' into permitted-feign-client-auth

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

awasum pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-notifications.git

commit 76605f390124d5a250323eb27ad1ef39b608d8eb
Merge: 76e9930 044d72f
Author: Ebenezer Graham <eg...@alustudent.com>
AuthorDate: Sat Jun 1 19:57:04 2019 +0400

    Merge branch 'develop' into permitted-feign-client-auth

 Dockerfile    | 4 ++--
 shared.gradle | 3 +--
 2 files changed, 3 insertions(+), 4 deletions(-)



[fineract-cn-notifications] 26/36: Merge branch 'develop' into permitted-feign-client-auth

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

awasum pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-notifications.git

commit 76e9930a5aab6f8fb1712f674c13d94d5c67a3b8
Merge: f3deeaa a202f47
Author: Ebenezer Graham <eb...@gmail.com>
AuthorDate: Fri May 24 16:31:35 2019 +0400

    Merge branch 'develop' into permitted-feign-client-auth

 .travis.yml          | 2 +-
 README.md            | 5 +++--
 service/build.gradle | 1 -
 shared.gradle        | 1 -
 4 files changed, 4 insertions(+), 5 deletions(-)

diff --cc .travis.yml
index 06d4b4d,b70bfc3..bffe9d0
--- a/.travis.yml
+++ b/.travis.yml
@@@ -27,4 -27,4 +27,4 @@@ env
      - BUILD_SNAPSHOTS_BRANCH=develop
      - ARTIFACTORY_URL=https://mifos.jfrog.io/mifos
      - ARTIFACTORY_USER=travis-ci
-     - secure: "E5IyImya7x5cHLB1vGLGIJUC1M+7RxKZivb5iUM+RR/xW39/7b4Qd3JeX4yBUeiPjf9lNMMxcGVyqI/4htT95++WCNc0u6OoxwGgxQEB9JHE8OWecaYgK4uLO7+651XF4DNbSiH3NVmc2b8Q0c0jBlu3MHAeEUIQ6BOiTXSsqnewtWAW0XETBooNmo2nTqZyKvzez0698oJuuYfZeFbqm8wJ9rIwtptyJluRzqcTlzw1cH/CvcIskLDmITVqbuZxAW59j1BqUnZNQpuOFZ692iqntdxq78CxliCG1MEYy4zWY8xcIWNVp28OKkMULXdi+V80oZXY4TyTwZfH6e2oZFz6/X9GpNNR6EwaHV0tT3wZi2NrkoBokD8bEBxQubIgxDCaDAFG9VMByC+++nwm0GJzerKBV4CpNSy/93XLrFAQ8+lOVauVtkVHuzFBWleLLQYcBGAXRz/C/UF4/m0m014jvD7v [...]
 -    - secure: "NHjl/OM08+Q8zRXH1GRowPmFTCarpZVgpfzvW23DnHI9kwPcAuvXHUs0liBD1FgUr3oFNlIQ8QknlWSAb2yI9CTs/+v6f7wl4t4Xx4t5gV0wFuffb3W7a41bE+m1OSUunleSGLKr4qGffjPQ63EUyAb4wrywg23iY12OHbQ3a988UvqoDg6IjK7NXKeLhkAXg6qLDRh9aHdM6NknFNUUIbYyX25PMTQj/SShDQ3xptOhrj1wOvKbBEBc2t2X4+0/3pKt36W0VwJt68HPL4YKwFNiErqSXDAmKFwcf/aZxlXAGreCYN9rNuGuP5RMpblY1bNi6sW2COG0IgTjNSvQgULfIb42GI68O9w0supKZ8OKQLnDJDIQ5q1A1rE54bqs1ey8WD9bmwc24NTUkmjKTqDMTMqCLE+gXLM7xnS2JNisOETfEfRughUFBvmHVPgnQ6fCDJ0brPWBO9Se/elPP/XWlWAk [...]
++    - secure: "NHjl/OM08+Q8zRXH1GRowPmFTCarpZVgpfzvW23DnHI9kwPcAuvXHUs0liBD1FgUr3oFNlIQ8QknlWSAb2yI9CTs/+v6f7wl4t4Xx4t5gV0wFuffb3W7a41bE+m1OSUunleSGLKr4qGffjPQ63EUyAb4wrywg23iY12OHbQ3a988UvqoDg6IjK7NXKeLhkAXg6qLDRh9aHdM6NknFNUUIbYyX25PMTQj/SShDQ3xptOhrj1wOvKbBEBc2t2X4+0/3pKt36W0VwJt68HPL4YKwFNiErqSXDAmKFwcf/aZxlXAGreCYN9rNuGuP5RMpblY1bNi6sW2COG0IgTjNSvQgULfIb42GI68O9w0supKZ8OKQLnDJDIQ5q1A1rE54bqs1ey8WD9bmwc24NTUkmjKTqDMTMqCLE+gXLM7xnS2JNisOETfEfRughUFBvmHVPgnQ6fCDJ0brPWBO9Se/elPP/XWlWAk [...]
diff --cc README.md
index 7528145,c993eee..7a6daff
--- a/README.md
+++ b/README.md
@@@ -1,6 -1,6 +1,7 @@@
- # Apache Fineract CN Notification [![Build Status](https://api.travis-ci.com/apache/fineract-cn-notification.svg?branch=develop)](https://travis-ci.com/apache/fineract-cn-notification) 
 +
- This mircroservice contains all the functionalities for SMS and Email Notification
+ # Apache Fineract CN Notification [![Build Status](https://api.travis-ci.com/apache/fineract-cn-notifications.svg?branch=develop)](https://travis-ci.com/apache/fineract-cn-notifications)
+ 
 -This mircroservice contains all the functionalities for SMS and Email Notification
++This mircroservice implements SMS and Email Notification functionalities
  
  ## Abstract
  Apache Fineract CN is an application framework for digital financial services, a system to support nationwide and cross-national financial transactions and help to level and speed the creation of an inclusive, interconnected digital economy for every nation in the world.


[fineract-cn-notifications] 36/36: Merge pull request #10 from ebenezergraham/permitted-feign-client-auth

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

awasum pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-notifications.git

commit 6250a32c8da38b43e8373154092a6d60ea1ff1ff
Merge: 857f39c 7c85f01
Author: Awasum Yannick <aw...@apache.org>
AuthorDate: Thu Jun 6 08:09:47 2019 +0100

    Merge pull request #10 from ebenezergraham/permitted-feign-client-auth
    
    Changing Notification Admin to OrgAdmin

 .gitignore                                         |  16 +--
 .travis.yml                                        |   3 +-
 NOTICE.txt                                         |   4 +-
 README.md                                          |   3 +-
 api/build.gradle                                   |   3 +-
 .../notification/api/v1/PermittableGroupIds.class  | Bin 261 -> 0 bytes
 .../api/v1/client/NotificationManager.class        | Bin 1940 -> 0 bytes
 .../api/v1/domain/EmailConfiguration.class         | Bin 4391 -> 0 bytes
 .../api/v1/domain/SMSConfiguration.class           | Bin 3305 -> 0 bytes
 .../api/v1/events/NotificationEventConstants.class | Bin 1609 -> 0 bytes
 .../notification/api/v1/PermittableGroupIds.java   |   5 +
 .../v1/client/ConfigurationNotFoundException.java  |   8 +-
 .../api/v1/client/NotificationManager.java         |  51 ++++++--
 .../api/v1/domain/EmailConfiguration.java          |   4 +-
 .../api/v1/domain/SMSConfiguration.java            |   2 +-
 .../api/v1/events/NotificationEventConstants.java  |  22 +++-
 component-test/build.gradle                        |  16 ++-
 .../cn/notification/AbstractNotificationTest.java  |  18 ++-
 .../cn/notification/EmailApiDocumentation.java     |  81 ++++++++++--
 .../cn/notification/SmsApiDocumentation.java       |  94 ++++++++++----
 .../cn/notification/SuiteTestEnvironment.java      |   2 +
 .../fineract/cn/notification/TestEmailService.java |  64 +++++-----
 .../fineract/cn/notification/TestSMSService.java   |  68 +++++-----
 .../apache/fineract/cn/notification/TestSuite.java |   2 +
 .../cn/notification/listener/EventListener.java    | 103 +++++++++++++++
 .../listener/NotificationEventListener.java        |  60 ---------
 .../notification/util/DomainObjectGenerator.java   |  18 +--
 gradle/wrapper/gradle-wrapper.jar                  | Bin 54212 -> 54212 bytes
 gradle/wrapper/gradle-wrapper.properties           |   2 +-
 service/build.gradle                               |   1 +
 service/out/production/resources/application.yml   |  88 -------------
 service/out/production/resources/bootstrap.yml     |  22 ----
 .../db/migrations/mariadb/V1__initial_setup.sql    |  56 ---------
 .../service/NotificationApplication.java           |   1 +
 .../cn/notification/service/ServiceConstants.java  |  11 ++
 ...SCommand.java => DeleteApplicationCommand.java} |  45 ++++---
 ...d.java => DeleteEmailConfigurationCommand.java} |  10 +-
 ...and.java => DeleteSMSConfigurationCommand.java} |  10 +-
 ...SMSCommand.java => SaveApplicationCommand.java} |  45 ++++---
 ...d.java => UpdateEmailConfigurationCommand.java} |  18 +--
 ...and.java => UpdateSMSConfigurationCommand.java} |  18 +--
 ...gregate.java => ApplicationCommandHandler.java} |  42 ++++---
 ....java => EmailConfigurationCommandHandler.java} |  30 ++++-
 ...Aggregate.java => MigrationCommandHandler.java} |  10 +-
 ...te.java => SMSConfigurationCommandHandler.java} |  26 +++-
 .../config}/NotificationConfiguration.java         |  18 ++-
 .../internal/config/NotificationProperties.java    |  69 +++++++++++
 .../internal/identity/CustomerPermittedClient.java |  46 +++++++
 .../identity/NotificationAuthentication.java       |  89 +++++++++++++
 .../internal/mapper/EmailConfigurationMapper.java  |   2 +-
 .../internal/repository/ApplicationEntity.java     | 106 ++++++++++++++++
 ...nRepository.java => ApplicationRepository.java} |  14 +--
 .../EmailGatewayConfigurationRepository.java       |   5 +
 .../SMSGatewayConfigurationRepository.java         |   5 +
 .../service/internal/service/EmailService.java     | 138 +++++++++++++++++----
 .../service/internal/service/EventHelper.java      |  55 ++++++++
 .../internal/service/NotificationService.java      |  83 ++++---------
 .../service/internal/service/SMSService.java       |  91 ++++++++++----
 .../CustomerService.java}                          |   6 +-
 .../helperservice/NotificationAuthentication.java  |  60 ---------
 .../service/listener/CustomerEventListener.java    |  26 ++--
 .../service/listener/PortfolioEventListener.java   |  76 +++++++-----
 ...roller.java => EmailServiceRestController.java} |  97 +++++----------
 .../service/rest/NotificationRestController.java   |  94 --------------
 ...ntroller.java => SMSServiceRestController.java} | 107 ++++++----------
 service/src/main/resources/application.yml         |   7 +-
 .../db/migrations/mariadb/V1__initial_setup.sql    |  20 ++-
 .../mariadb/V2__sms_gateway_configurations.sql     |  20 ---
 .../mariadb/V3__email_gateway_configurations.sql   |  20 ---
 shared.gradle                                      |  40 +++---
 70 files changed, 1383 insertions(+), 993 deletions(-)


[fineract-cn-notifications] 21/36: FINCN-148 build with travis-ci.com and upload artifacts to Artifactory

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

awasum pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-notifications.git

commit 9efb0b13df3e5e3022b37596d9daedf45cc9a05b
Author: Juhan Aasaru <Ju...@nortal.com>
AuthorDate: Thu Apr 25 13:45:45 2019 +0300

    FINCN-148 build with travis-ci.com and upload artifacts to Artifactory
---
 .travis.yml                 | 30 +++++++++++++++++++
 README.md                   |  2 +-
 api/build.gradle            |  3 +-
 build.gradle                |  8 +++++
 component-test/build.gradle |  4 ++-
 service/build.gradle        |  5 ++--
 shared.gradle               | 17 +++++++++++
 travis.sh                   | 71 +++++++++++++++++++++++++++++++++++++++++++++
 8 files changed, 135 insertions(+), 5 deletions(-)

diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..b70bfc3
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,30 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+language: java
+sudo: false
+jdk:
+- openjdk8
+install: true
+script: "./travis.sh"
+env:
+  global:
+    - BUILD_SNAPSHOTS_BRANCH=develop
+    - ARTIFACTORY_URL=https://mifos.jfrog.io/mifos
+    - ARTIFACTORY_USER=travis-ci
+    - secure: "NHjl/OM08+Q8zRXH1GRowPmFTCarpZVgpfzvW23DnHI9kwPcAuvXHUs0liBD1FgUr3oFNlIQ8QknlWSAb2yI9CTs/+v6f7wl4t4Xx4t5gV0wFuffb3W7a41bE+m1OSUunleSGLKr4qGffjPQ63EUyAb4wrywg23iY12OHbQ3a988UvqoDg6IjK7NXKeLhkAXg6qLDRh9aHdM6NknFNUUIbYyX25PMTQj/SShDQ3xptOhrj1wOvKbBEBc2t2X4+0/3pKt36W0VwJt68HPL4YKwFNiErqSXDAmKFwcf/aZxlXAGreCYN9rNuGuP5RMpblY1bNi6sW2COG0IgTjNSvQgULfIb42GI68O9w0supKZ8OKQLnDJDIQ5q1A1rE54bqs1ey8WD9bmwc24NTUkmjKTqDMTMqCLE+gXLM7xnS2JNisOETfEfRughUFBvmHVPgnQ6fCDJ0brPWBO9Se/elPP/XWlWAkd [...]
diff --git a/README.md b/README.md
index e94a392..c993eee 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# Apache Fineract CN Notification
+# Apache Fineract CN Notification [![Build Status](https://api.travis-ci.com/apache/fineract-cn-notifications.svg?branch=develop)](https://travis-ci.com/apache/fineract-cn-notifications)
 
 This mircroservice contains all the functionalities for SMS and Email Notification
 
diff --git a/api/build.gradle b/api/build.gradle
index 5b9924a..a11f487 100644
--- a/api/build.gradle
+++ b/api/build.gradle
@@ -28,6 +28,7 @@ buildscript {
 plugins {
     id "com.github.hierynomus.license" version "0.13.1"
     id("org.nosphere.apache.rat") version "0.3.1"
+    id "com.jfrog.artifactory" version "4.9.5"
 }
 
 apply from: '../shared.gradle'
@@ -51,7 +52,7 @@ publishing {
             from components.java
             groupId project.group
             artifactId project.name
-            version project.version
+            version project.findProperty('externalVersion') ?: project.version
         }
     }
 }
diff --git a/build.gradle b/build.gradle
index ca2370a..aa35679 100644
--- a/build.gradle
+++ b/build.gradle
@@ -39,6 +39,14 @@ task publishToMavenLocal {
     dependsOn publishComponentTestToMavenLocal
 }
 
+task artifactoryPublish {
+    group 'all'
+    dependsOn publishToMavenLocal
+    dependsOn gradle.includedBuild('api').task(':artifactoryPublish')
+    dependsOn gradle.includedBuild('service').task(':artifactoryPublish')
+    dependsOn gradle.includedBuild('component-test').task(':artifactoryPublish')
+}
+
 task prepareForTest {
     group 'all'
     dependsOn publishToMavenLocal
diff --git a/component-test/build.gradle b/component-test/build.gradle
index 55f1d42..6a9afdb 100644
--- a/component-test/build.gradle
+++ b/component-test/build.gradle
@@ -33,6 +33,7 @@ buildscript {
 plugins {
     id "com.github.hierynomus.license" version "0.13.1"
     id("org.nosphere.apache.rat") version "0.3.1"
+    id "com.jfrog.artifactory" version "4.9.5"
 }
 apply from: '../shared.gradle'
 apply plugin: 'org.asciidoctor.convert'
@@ -60,8 +61,9 @@ asciidoctor {
 
 publishing {
     publications {
-        mavenJava(MavenPublication) {
+        componentTest(MavenPublication) {
             from components.java
+            version project.findProperty('externalVersion') ?: project.version
         }
     }
 }
diff --git a/service/build.gradle b/service/build.gradle
index cb2d88c..e2aea38 100644
--- a/service/build.gradle
+++ b/service/build.gradle
@@ -32,6 +32,7 @@ buildscript {
 plugins {
     id "com.github.hierynomus.license" version "0.13.1"
     id("org.nosphere.apache.rat") version "0.3.1"
+    id "com.jfrog.artifactory" version "4.9.5"
 }
 
 apply from: '../shared.gradle'
@@ -76,14 +77,14 @@ publishing {
             from components.java
             groupId project.group
             artifactId project.name
-            version project.version
+            version project.findProperty('externalVersion') ?: project.version
         }
         bootService(MavenPublication) {
             // "boot" jar
             artifact ("$buildDir/libs/$project.name-$version-boot.jar")
             groupId project.group
             artifactId ("$project.name-boot")
-            version project.version
+            version project.findProperty('externalVersion') ?: project.version
         }
     }
 }
diff --git a/shared.gradle b/shared.gradle
index 6b000b7..3cdcce8 100644
--- a/shared.gradle
+++ b/shared.gradle
@@ -53,6 +53,7 @@ tasks.withType(JavaCompile) {
 repositories {
     jcenter()
     mavenLocal()
+    maven { url 'https://mifos.jfrog.io/mifos/libs-snapshot/' }
 }
 
 dependencyManagement {
@@ -83,6 +84,22 @@ jar {
     duplicatesStrategy = DuplicatesStrategy.EXCLUDE
 }
 
+artifactory {
+    contextUrl = System.getenv("ARTIFACTORY_URL")
+    publish {
+        repository {
+            repoKey = project.findProperty('artifactoryRepoKey')
+            username = System.getenv("ARTIFACTORY_USER")
+            password = System.getenv("ARTIFACTORY_PASSWORD")
+        }
+
+        defaults {
+            publications ('api', 'componentTest', 'service', 'bootService')
+        }
+    }
+}
+artifactoryPublish.dependsOn('clean','publishToMavenLocal')
+
 license {
     header rootProject.file('../HEADER')
     strictCheck true
diff --git a/travis.sh b/travis.sh
new file mode 100755
index 0000000..03a75ee
--- /dev/null
+++ b/travis.sh
@@ -0,0 +1,71 @@
+#!/usr/bin/env bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# Documentation: https://cwiki.apache.org/confluence/display/FINERACT/Fineract-CN+Artifactory
+
+#Exit immediately if a command exits with a non-zero status.
+set -e
+EXIT_STATUS=0
+
+# Builds and Publishes a SNAPSHOT
+function build_snapshot() {
+  echo -e "Building and publishing a snapshot out of branch [$TRAVIS_BRANCH]"
+  ./gradlew -PartifactoryRepoKey=libs-snapshot-local -DbuildInfo.build.number=${TRAVIS_COMMIT::7} artifactoryPublish --stacktrace || EXIT_STATUS=$?
+}
+
+# Builds a Pull Request
+function build_pullrequest() {
+  echo -e "Building pull request #$TRAVIS_PULL_REQUEST of branch [$TRAVIS_BRANCH]. Won't publish anything to Artifactory."
+  ./gradlew publishToMavenLocal rat || EXIT_STATUS=$?
+}
+
+# For other branches we need to add branch name as prefix
+function build_otherbranch() {
+  echo -e "Building a snapshot out of branch [$TRAVIS_BRANCH] and publishing it with prefix '${TRAVIS_BRANCH}-SNAPSHOT'"
+  ./gradlew -PartifactoryRepoKey=libs-snapshot-local -DbuildInfo.build.number=${TRAVIS_COMMIT::7} -PexternalVersion=${TRAVIS_BRANCH}-SNAPSHOT artifactoryPublish --stacktrace || EXIT_STATUS=$?
+}
+
+# Builds and Publishes a Tag
+function build_tag() {
+  echo -e "Building tag [$TRAVIS_TAG] and publishing it as a release"
+  ./gradlew -PartifactoryRepoKey=libs-release-local -PexternalVersion=$TRAVIS_TAG artifactoryPublish --stacktrace || EXIT_STATUS=$?
+
+}
+
+echo -e "TRAVIS_BRANCH=$TRAVIS_BRANCH"
+echo -e "TRAVIS_TAG=$TRAVIS_TAG"
+echo -e "TRAVIS_COMMIT=${TRAVIS_COMMIT::7}"
+echo -e "TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST"
+
+# Build Logic
+if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
+  build_pullrequest
+elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" != "$BUILD_SNAPSHOTS_BRANCH" ] && [ "$TRAVIS_TAG" == "" ]  ; then
+  build_otherbranch
+elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "$BUILD_SNAPSHOTS_BRANCH" ] && [ "$TRAVIS_TAG" == "" ] ; then
+  build_snapshot
+elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then
+  build_tag
+else
+  echo -e "WARN: Unexpected env variable values => Branch [$TRAVIS_BRANCH], Tag [$TRAVIS_TAG], Pull Request [#$TRAVIS_PULL_REQUEST]"
+  ./gradlew clean build
+fi
+
+exit ${EXIT_STATUS}