Skip to content
Permalink
Browse files
Merge pull request #4 from myrle-krantz/develop
Updating package names.
  • Loading branch information
myrle-krantz committed Apr 16, 2018
2 parents 51da6b6 + a2705c5 commit aec5dba2ca3e5d5952eebea81fb5fca5e7dec967
Showing 79 changed files with 462 additions and 448 deletions.
@@ -2,6 +2,7 @@
.idea
**/build/
**/target/
**/out/

# Ignore Gradle GUI config
gradle-app.setting
@@ -1,8 +1,6 @@
# Apache Fineract CN Provisioner

[![Join the chat at https://gitter.im/mifos-initiative/mifos.io](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mifos-initiative/mifos.io?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

This project provides functionality for provisioning services for tenants.
This service provisions services for tenants of an Apache Fineract CN installation.

## 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.
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.provisioner.api.v1.client;
package org.apache.fineract.cn.provisioner.api.v1.client;

/**
* @author Myrle Krantz
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.provisioner.api.v1.client;
package org.apache.fineract.cn.provisioner.api.v1.client;

/**
* @author Myrle Krantz
@@ -16,10 +16,19 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.provisioner.api.v1.client;

import io.mifos.core.api.util.CustomFeignClientsConfiguration;
import io.mifos.provisioner.api.v1.domain.*;
package org.apache.fineract.cn.provisioner.api.v1.client;

import org.apache.fineract.cn.provisioner.api.v1.domain.Application;
import org.apache.fineract.cn.provisioner.api.v1.domain.AssignedApplication;
import org.apache.fineract.cn.provisioner.api.v1.domain.AuthenticationResponse;
import org.apache.fineract.cn.provisioner.api.v1.domain.Client;
import org.apache.fineract.cn.provisioner.api.v1.domain.IdentityManagerInitialization;
import org.apache.fineract.cn.provisioner.api.v1.domain.PasswordPolicy;
import org.apache.fineract.cn.provisioner.api.v1.domain.Tenant;
import java.util.List;
import javax.validation.Valid;
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;
@@ -29,12 +38,6 @@
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

import javax.validation.Valid;

import io.mifos.core.api.annotation.ThrowsException;

/**
* @author Myrle Krantz
*/
@@ -16,9 +16,10 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.provisioner.api.v1.domain;
package org.apache.fineract.cn.provisioner.api.v1.domain;

import io.mifos.core.lang.validation.constraints.ValidApplicationName;

import org.apache.fineract.cn.lang.validation.constraints.ValidApplicationName;

@SuppressWarnings({"unused", "WeakerAccess"})
public class Application {
@@ -16,9 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.provisioner.api.v1.domain;
package org.apache.fineract.cn.provisioner.api.v1.domain;

import io.mifos.core.lang.validation.constraints.ValidApplicationName;
import org.apache.fineract.cn.lang.validation.constraints.ValidApplicationName;

@SuppressWarnings({"unused", "WeakerAccess"})
public class AssignedApplication {
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.provisioner.api.v1.domain;
package org.apache.fineract.cn.provisioner.api.v1.domain;

@SuppressWarnings("unused")
public class AuthenticationResponse {
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.provisioner.api.v1.domain;
package org.apache.fineract.cn.provisioner.api.v1.domain;

import javax.annotation.Nonnull;
import javax.validation.constraints.NotNull;
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.provisioner.api.v1.domain;
package org.apache.fineract.cn.provisioner.api.v1.domain;

import org.springframework.util.Assert;

@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.provisioner.api.v1.domain;
package org.apache.fineract.cn.provisioner.api.v1.domain;

@SuppressWarnings("unused")
public final class ClientCredentials {
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.provisioner.api.v1.domain;
package org.apache.fineract.cn.provisioner.api.v1.domain;

import javax.annotation.Nonnull;
import javax.validation.constraints.NotNull;
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.provisioner.api.v1.domain;
package org.apache.fineract.cn.provisioner.api.v1.domain;

/**
* @author Myrle Krantz
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.provisioner.api.v1.domain;
package org.apache.fineract.cn.provisioner.api.v1.domain;

@SuppressWarnings("unused")
public class PasswordPolicy {
@@ -16,12 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.provisioner.api.v1.domain;

import io.mifos.core.lang.validation.constraints.ValidIdentifier;
package org.apache.fineract.cn.provisioner.api.v1.domain;

import javax.validation.constraints.NotNull;
import java.util.Objects;
import org.apache.fineract.cn.lang.validation.constraints.ValidIdentifier;

@SuppressWarnings({"unused", "WeakerAccess"})
public final class Tenant {
@@ -16,14 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.provisioner.api.v1.domain;

import io.mifos.core.test.domain.ValidationTest;
import io.mifos.core.test.domain.ValidationTestCase;
import org.junit.runners.Parameterized;
package org.apache.fineract.cn.provisioner.api.v1.domain;

import java.util.ArrayList;
import java.util.Collection;
import org.apache.fineract.cn.test.domain.ValidationTest;
import org.apache.fineract.cn.test.domain.ValidationTestCase;
import org.junit.runners.Parameterized;

/**
* @author Myrle Krantz
@@ -16,14 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.provisioner.api.v1.domain;

import io.mifos.core.test.domain.ValidationTest;
import io.mifos.core.test.domain.ValidationTestCase;
import org.junit.runners.Parameterized;
package org.apache.fineract.cn.provisioner.api.v1.domain;

import java.util.ArrayList;
import java.util.Collection;
import org.apache.fineract.cn.test.domain.ValidationTest;
import org.apache.fineract.cn.test.domain.ValidationTestCase;
import org.junit.runners.Parameterized;

/**
* @author Myrle Krantz
@@ -16,15 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.provisioner.api.v1.domain;

import io.mifos.core.test.domain.ValidationTest;
import io.mifos.core.test.domain.ValidationTestCase;
import org.apache.commons.lang.RandomStringUtils;
import org.junit.runners.Parameterized;
package org.apache.fineract.cn.provisioner.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;

/**
* @author Myrle Krantz
@@ -42,7 +42,7 @@ dependencies {
[group: 'org.apache.fineract.cn.provisioner', name: 'service', version: project.version],
[group: 'org.apache.fineract.cn.anubis', name: 'test', version: versions.frameworkanubis],
[group: 'org.apache.fineract.cn.anubis', name: 'api', version: versions.frameworkanubis],
[group: 'org.apache.fineract.cn.identity', name: 'api', version: versions.mifosidentityservice],
[group: 'org.apache.fineract.cn.identity', name: 'api', version: versions.fineractidentityservice],
[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],
@@ -16,11 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.provisioner;
package org.apache.fineract.cn.provisioner;

import io.mifos.core.test.env.TestEnvironment;
import io.mifos.provisioner.api.v1.client.Provisioner;
import io.mifos.provisioner.config.ProvisionerServiceConfig;
import org.apache.fineract.cn.provisioner.api.v1.client.Provisioner;
import org.apache.fineract.cn.provisioner.config.ProvisionerServiceConfig;
import org.apache.fineract.cn.test.env.TestEnvironment;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.rules.RuleChain;
@@ -45,7 +45,7 @@ public class AbstractServiceTest {
private static final String CLIENT_ID = "sillyRabbit";

@Configuration
@EnableFeignClients(basePackages = {"io.mifos.provisioner.api.v1.client"})
@EnableFeignClients(basePackages = {"org.apache.fineract.cn.provisioner.api.v1.client"})
@RibbonClient(name = APP_NAME)
@Import({ProvisionerServiceConfig.class})
public static class TestConfiguration {
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.provisioner;
package org.apache.fineract.cn.provisioner;

import org.apache.thrift.transport.TTransportException;
import org.cassandraunit.utils.EmbeddedCassandraServerHelper;
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.provisioner;
package org.apache.fineract.cn.provisioner;

import ch.vorburger.exec.ManagedProcessException;
import ch.vorburger.mariadb4j.DB;
@@ -16,9 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.provisioner.application;
package org.apache.fineract.cn.provisioner.application;

import io.mifos.provisioner.api.v1.domain.Application;
import org.apache.fineract.cn.provisioner.api.v1.domain.Application;

class Fixture {

@@ -16,17 +16,17 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.provisioner.application;
package org.apache.fineract.cn.provisioner.application;


import io.mifos.core.api.context.AutoSeshat;
import io.mifos.core.api.util.ApiConstants;
import io.mifos.core.api.util.NotFoundException;
import io.mifos.provisioner.AbstractServiceTest;
import io.mifos.provisioner.api.v1.client.DuplicateIdentifierException;
import io.mifos.provisioner.api.v1.domain.Application;
import io.mifos.provisioner.api.v1.domain.AuthenticationResponse;
import io.mifos.provisioner.config.ProvisionerConstants;
import org.apache.fineract.cn.provisioner.AbstractServiceTest;
import org.apache.fineract.cn.provisioner.api.v1.client.DuplicateIdentifierException;
import org.apache.fineract.cn.provisioner.api.v1.domain.Application;
import org.apache.fineract.cn.provisioner.api.v1.domain.AuthenticationResponse;
import org.apache.fineract.cn.provisioner.config.ProvisionerConstants;
import org.apache.fineract.cn.api.context.AutoSeshat;
import org.apache.fineract.cn.api.util.ApiConstants;
import org.apache.fineract.cn.api.util.NotFoundException;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
@@ -16,9 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.provisioner.client;
package org.apache.fineract.cn.provisioner.client;

import io.mifos.provisioner.api.v1.domain.Client;
import org.apache.fineract.cn.provisioner.api.v1.domain.Client;

class Fixture {

@@ -16,16 +16,16 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.provisioner.client;

import io.mifos.core.api.context.AutoSeshat;
import io.mifos.core.api.util.ApiConstants;
import io.mifos.core.api.util.NotFoundException;
import io.mifos.provisioner.AbstractServiceTest;
import io.mifos.provisioner.api.v1.client.DuplicateIdentifierException;
import io.mifos.provisioner.api.v1.domain.AuthenticationResponse;
import io.mifos.provisioner.api.v1.domain.Client;
import io.mifos.provisioner.config.ProvisionerConstants;
package org.apache.fineract.cn.provisioner.client;

import org.apache.fineract.cn.provisioner.AbstractServiceTest;
import org.apache.fineract.cn.provisioner.api.v1.client.DuplicateIdentifierException;
import org.apache.fineract.cn.provisioner.api.v1.domain.AuthenticationResponse;
import org.apache.fineract.cn.provisioner.api.v1.domain.Client;
import org.apache.fineract.cn.provisioner.config.ProvisionerConstants;
import org.apache.fineract.cn.api.context.AutoSeshat;
import org.apache.fineract.cn.api.util.ApiConstants;
import org.apache.fineract.cn.api.util.NotFoundException;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
@@ -16,15 +16,15 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.provisioner.internal;
package org.apache.fineract.cn.provisioner.internal;

import com.datastax.driver.core.KeyspaceMetadata;
import com.datastax.driver.core.ResultSet;
import com.datastax.driver.core.Session;

import io.mifos.core.cassandra.core.CassandraSessionProvider;
import io.mifos.core.cassandra.util.CassandraConnectorConstants;
import io.mifos.provisioner.AbstractServiceTest;
import org.apache.fineract.cn.provisioner.AbstractServiceTest;
import org.apache.fineract.cn.cassandra.core.CassandraSessionProvider;
import org.apache.fineract.cn.cassandra.util.CassandraConnectorConstants;
import org.junit.Assert;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
@@ -53,7 +53,7 @@ public void dataModelExists() throws Exception {

session.execute("USE " + CassandraConnectorConstants.KEYSPACE_PROP_DEFAULT);

final ResultSet configResultSet = session.execute("SELECT * FROM config WHERE name = 'io.mifos.provisioner.internal'");
final ResultSet configResultSet = session.execute("SELECT * FROM config WHERE name = 'org.apache.fineract.cn.provisioner.internal'");
Assert.assertNotNull(configResultSet.one());

final ResultSet userResultSet = session.execute("SELECT * FROM users WHERE name = 'wepemnefret'");

0 comments on commit aec5dba

Please sign in to comment.