Skip to content
Permalink
Browse files
Merge pull request #20 from myrle-krantz/develop
Fixing demo-server with latest changes to portfolio.  Adding chart of accounts.
  • Loading branch information
myrle-krantz committed Jun 14, 2017
2 parents ef6dd4f + 41d5aa0 commit 262b87e0d972b484d6a8db6b96fe2e116395fa5f
Show file tree
Hide file tree
Showing 13 changed files with 681 additions and 172 deletions.
@@ -24,6 +24,7 @@ ext.versions = [
frameworkservicestarter : '0.1.0-BUILD-SNAPSHOT',
mifosidentity : '0.1.0-BUILD-SNAPSHOT',
mifosprovisioner : '0.1.0-BUILD-SNAPSHOT',
mifosrhythm : '0.1.0-BUILD-SNAPSHOT',
mifosoffice : '0.1.0-BUILD-SNAPSHOT',
mifoscustomer : '0.1.0-BUILD-SNAPSHOT',
mifosaccounting : '0.1.0-BUILD-SNAPSHOT',
@@ -72,9 +73,12 @@ dependencies {
[group: 'io.mifos.office', name: 'api', version: versions.mifosoffice],
[group: 'io.mifos.provisioner', name: 'api', version: versions.mifosprovisioner],
[group: 'io.mifos.identity', name: 'api', version: versions.mifosidentity],
[group: 'io.mifos.rhythm', name: 'api', version: versions.mifosrhythm],
[group: 'io.mifos.rhythm', name: 'spi', version: versions.mifosrhythm],

[group: 'io.mifos.customer', name: 'api', version: versions.mifoscustomer],
[group: 'io.mifos.accounting', name: 'api', version: versions.mifosaccounting],
[group: 'io.mifos.accounting', name: 'importer', version: versions.mifosaccounting],
[group: 'io.mifos.portfolio', name: 'api', version: versions.mifosportfolio],
[group: 'io.mifos.deposit-account-management', name: 'api', version: versions.mifosdeposit],

@@ -1,6 +1,6 @@
#Sat Apr 08 09:53:20 CEST 2017
#Mon Jun 12 22:30:04 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-all.zip

This file was deleted.

@@ -1,3 +1,18 @@
/*
* Copyright 2017 The Mifos Initiative.
*
* 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.
*/
package io.mifos.dev;

import io.mifos.provisioner.api.v1.domain.Application;

Large diffs are not rendered by default.

@@ -1,3 +1,18 @@
/*
* Copyright 2017 The Mifos Initiative.
*
* 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.
*/
package io.mifos.dev;

import io.mifos.core.cassandra.util.CassandraConnectorConstants;
@@ -23,6 +23,10 @@
import org.springframework.messaging.handler.annotation.Header;
import org.springframework.stereotype.Component;

/**
* @author Myrle Krantz
*/
@SuppressWarnings("unused")
@Component
public class AccountingListener {

@@ -34,12 +38,32 @@ public AccountingListener(final EventRecorder eventRecorder) {
}

@JmsListener(
subscription = EventConstants.DESTINATION,
destination = EventConstants.DESTINATION,
selector = EventConstants.SELECTOR_INITIALIZE
destination = EventConstants.DESTINATION,
selector = EventConstants.SELECTOR_INITIALIZE,
subscription = EventConstants.DESTINATION
)
public void onInitialized(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
final String payload) {
public void onInitialization(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
final String payload) {
this.eventRecorder.event(tenant, EventConstants.INITIALIZE, payload, String.class);
}

@JmsListener(
destination = EventConstants.DESTINATION,
selector = EventConstants.SELECTOR_POST_LEDGER,
subscription = EventConstants.DESTINATION
)
public void onPostLedger(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
final String payload) {
this.eventRecorder.event(tenant, EventConstants.POST_LEDGER, payload, String.class);
}

@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) {
this.eventRecorder.event(tenant, EventConstants.POST_ACCOUNT, payload, String.class);
}
}
@@ -23,6 +23,7 @@
import org.springframework.messaging.handler.annotation.Header;
import org.springframework.stereotype.Component;

@SuppressWarnings("unused")
@Component
public class CustomerListener {

@@ -17,6 +17,9 @@

import io.mifos.core.lang.config.TenantHeaderFilter;
import io.mifos.core.test.listener.EventRecorder;
import io.mifos.identity.api.v1.events.ApplicationPermissionEvent;
import io.mifos.identity.api.v1.events.ApplicationPermissionUserEvent;
import io.mifos.identity.api.v1.events.ApplicationSignatureEvent;
import io.mifos.identity.api.v1.events.EventConstants;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.annotation.JmsListener;
@@ -37,17 +40,6 @@ public IdentityListener(final EventRecorder eventRecorder) {
this.eventRecorder = eventRecorder;
}

@JmsListener(
subscription = EventConstants.DESTINATION,
destination = EventConstants.DESTINATION,
selector = EventConstants.SELECTOR_POST_ROLE
)
public void onCreateRole(
@Header(TenantHeaderFilter.TENANT_HEADER)final String tenant,
final String payload) throws Exception {
eventRecorder.event(tenant, EventConstants.OPERATION_POST_ROLE, payload, String.class);
}

@JmsListener(
subscription = EventConstants.DESTINATION,
destination = EventConstants.DESTINATION,
@@ -69,4 +61,59 @@ public void onChangeUserPassword(
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_POST_PERMITTABLE_GROUP
)
public void onCreatePermittableGroup(
@Header(TenantHeaderFilter.TENANT_HEADER)final String tenant,
final String payload) throws Exception {
eventRecorder.event(tenant, EventConstants.OPERATION_POST_PERMITTABLE_GROUP, payload, String.class);
}

@JmsListener(
subscription = EventConstants.DESTINATION,
destination = EventConstants.DESTINATION,
selector = EventConstants.SELECTOR_POST_APPLICATION_PERMISSION
)
public void onCreateApplicationPermission(
@Header(TenantHeaderFilter.TENANT_HEADER)final String tenant,
final String payload) throws Exception {
eventRecorder.event(tenant, EventConstants.OPERATION_POST_APPLICATION_PERMISSION, payload, ApplicationPermissionEvent.class);
}

@JmsListener(
subscription = EventConstants.DESTINATION,
destination = EventConstants.DESTINATION,
selector = EventConstants.SELECTOR_PUT_APPLICATION_SIGNATURE
)
public void onSetApplicationSignature(
@Header(TenantHeaderFilter.TENANT_HEADER)final String tenant,
final String payload) throws Exception {
eventRecorder.event(tenant, EventConstants.OPERATION_PUT_APPLICATION_SIGNATURE, payload, ApplicationSignatureEvent.class);
}

@JmsListener(
subscription = EventConstants.DESTINATION,
destination = EventConstants.DESTINATION,
selector = EventConstants.SELECTOR_PUT_APPLICATION_PERMISSION_USER_ENABLED
)
public void onPutApplicationPermissionEnabledForUser(
@Header(TenantHeaderFilter.TENANT_HEADER)final String tenant,
final String payload) throws Exception {
eventRecorder.event(tenant, EventConstants.OPERATION_PUT_APPLICATION_PERMISSION_USER_ENABLED, payload, ApplicationPermissionUserEvent.class);
}

@JmsListener(
subscription = EventConstants.DESTINATION,
destination = EventConstants.DESTINATION,
selector = EventConstants.SELECTOR_POST_ROLE
)
public void onCreateRole(
@Header(TenantHeaderFilter.TENANT_HEADER)final String tenant,
final String payload) throws Exception {
eventRecorder.event(tenant, EventConstants.OPERATION_POST_ROLE, payload, String.class);
}
}
@@ -23,6 +23,10 @@
import org.springframework.messaging.handler.annotation.Header;
import org.springframework.stereotype.Component;

/**
* @author Myrle Krantz
*/
@SuppressWarnings("unused")
@Component
public class PortfolioListener {

@@ -34,12 +38,42 @@ public PortfolioListener(final EventRecorder eventRecorder) {
}

@JmsListener(
subscription = EventConstants.DESTINATION,
destination = EventConstants.DESTINATION,
selector = EventConstants.SELECTOR_INITIALIZE
subscription = EventConstants.DESTINATION,
destination = EventConstants.DESTINATION,
selector = EventConstants.SELECTOR_INITIALIZE
)
public void onInitialized(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
final String payload) {
public void onInitialization(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
final String payload) {
this.eventRecorder.event(tenant, EventConstants.INITIALIZE, payload, String.class);
}
}

@JmsListener(
subscription = EventConstants.DESTINATION,
destination = EventConstants.DESTINATION,
selector = EventConstants.SELECTOR_POST_PRODUCT
)
public void onCreateProduct(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
final String payload) {
this.eventRecorder.event(tenant, EventConstants.POST_PRODUCT, payload, String.class);
}

@JmsListener(
subscription = EventConstants.DESTINATION,
destination = EventConstants.DESTINATION,
selector = EventConstants.SELECTOR_PUT_PRODUCT
)
public void onChangeProduct(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
final String payload) {
this.eventRecorder.event(tenant, EventConstants.PUT_PRODUCT, payload, String.class);
}

@JmsListener(
subscription = EventConstants.DESTINATION,
destination = EventConstants.DESTINATION,
selector = EventConstants.SELECTOR_PUT_PRODUCT_ENABLE
)
public void onEnableProduct(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
final String payload) {
this.eventRecorder.event(tenant, EventConstants.PUT_PRODUCT_ENABLE, payload, String.class);
}
}
@@ -0,0 +1,60 @@
/*
* Copyright 2017 The Mifos Initiative.
*
* 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.
*/
package io.mifos.dev.listener;

import io.mifos.core.lang.config.TenantHeaderFilter;
import io.mifos.core.test.listener.EventRecorder;
import io.mifos.rhythm.api.v1.events.BeatEvent;
import io.mifos.rhythm.api.v1.events.EventConstants;
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;

/**
* @author Myrle Krantz
*/
@SuppressWarnings("unused")
@Component
public class RhythmListener {

private final EventRecorder eventRecorder;

@Autowired
public RhythmListener(final EventRecorder eventRecorder) {
this.eventRecorder = eventRecorder;
}

@JmsListener(
subscription = EventConstants.DESTINATION,
destination = EventConstants.DESTINATION,
selector = EventConstants.SELECTOR_INITIALIZE
)
public void onInitialization(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
final String payload) {
this.eventRecorder.event(tenant, EventConstants.INITIALIZE, payload, String.class);
}

@JmsListener(
subscription = EventConstants.DESTINATION,
destination = EventConstants.DESTINATION,
selector = EventConstants.SELECTOR_POST_BEAT
)
public void onCreateBeat(@Header(TenantHeaderFilter.TENANT_HEADER) final String tenant,
final String payload) {
this.eventRecorder.event(tenant, EventConstants.POST_BEAT, payload, BeatEvent.class);
}
}

0 comments on commit 262b87e

Please sign in to comment.