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 171084b + 008fa0e commit ce101184a4ef48760a95352ef08ec750e0e73491
Showing 61 changed files with 301 additions and 313 deletions.
@@ -1,8 +1,6 @@
# Apache Fineract CN Office Management

[![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 module manages an organization and its employees.
This service manages an organization and its employees.

## 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.office.api.v1;
package org.apache.fineract.cn.office.api.v1;

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

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

public class AlreadyExistsException extends RuntimeException {
}
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.office.api.v1.client;
package org.apache.fineract.cn.office.api.v1.client;

public class BadRequestException extends RuntimeException {
}
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.office.api.v1.client;
package org.apache.fineract.cn.office.api.v1.client;

public class ChildrenExistException extends RuntimeException {
}
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.office.api.v1.client;
package org.apache.fineract.cn.office.api.v1.client;

public class NotFoundException extends RuntimeException {
}
@@ -16,18 +16,20 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.office.api.v1.client;

import io.mifos.core.api.annotation.ThrowsException;
import io.mifos.core.api.annotation.ThrowsExceptions;
import io.mifos.core.api.util.CustomFeignClientsConfiguration;
import io.mifos.office.api.v1.domain.Address;
import io.mifos.office.api.v1.domain.ContactDetail;
import io.mifos.office.api.v1.domain.Employee;
import io.mifos.office.api.v1.domain.EmployeePage;
import io.mifos.office.api.v1.domain.ExternalReference;
import io.mifos.office.api.v1.domain.Office;
import io.mifos.office.api.v1.domain.OfficePage;
package org.apache.fineract.cn.office.api.v1.client;

import org.apache.fineract.cn.office.api.v1.domain.Address;
import org.apache.fineract.cn.office.api.v1.domain.ContactDetail;
import org.apache.fineract.cn.office.api.v1.domain.Employee;
import org.apache.fineract.cn.office.api.v1.domain.EmployeePage;
import org.apache.fineract.cn.office.api.v1.domain.ExternalReference;
import org.apache.fineract.cn.office.api.v1.domain.Office;
import org.apache.fineract.cn.office.api.v1.domain.OfficePage;
import java.util.List;
import javax.validation.Valid;
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.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
@@ -37,9 +39,6 @@
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import javax.validation.Valid;
import java.util.List;

@SuppressWarnings("unused")
@FeignClient(name="office-v1", path="/office/v1", configuration=CustomFeignClientsConfiguration.class)
public interface OrganizationManager {
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.office.api.v1.domain;
package org.apache.fineract.cn.office.api.v1.domain;

import org.hibernate.validator.constraints.NotBlank;

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

import org.hibernate.validator.constraints.NotBlank;

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

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

import javax.validation.Valid;
import java.util.List;
import javax.validation.Valid;
import org.apache.fineract.cn.lang.validation.constraints.ValidIdentifier;

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

import javax.validation.Valid;
import java.util.List;
@@ -16,11 +16,10 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.office.api.v1.domain;

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

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

public class ExternalReference {

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

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

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

import javax.validation.Valid;
import java.util.List;
@@ -16,29 +16,32 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.office;

import io.mifos.anubis.test.v1.TenantApplicationSecurityEnvironmentTestRule;
import io.mifos.core.api.context.AutoUserContext;
import io.mifos.core.test.env.TestEnvironment;
import io.mifos.core.test.fixture.TenantDataStoreContextTestRule;
import io.mifos.core.test.fixture.cassandra.CassandraInitializer;
import io.mifos.core.test.fixture.mariadb.MariaDBInitializer;
import io.mifos.core.test.listener.EnableEventRecording;
import io.mifos.core.test.listener.EventRecorder;
import io.mifos.office.api.v1.EventConstants;
import io.mifos.office.api.v1.client.AlreadyExistsException;
import io.mifos.office.api.v1.client.BadRequestException;
import io.mifos.office.api.v1.client.NotFoundException;
import io.mifos.office.api.v1.client.OrganizationManager;
import io.mifos.office.api.v1.domain.ContactDetail;
import io.mifos.office.api.v1.domain.Employee;
import io.mifos.office.api.v1.domain.EmployeePage;
import io.mifos.office.api.v1.domain.Office;
import io.mifos.office.rest.config.OfficeRestConfiguration;
import io.mifos.office.util.EmployeeFactory;
import io.mifos.office.util.OfficeFactory;
package org.apache.fineract.cn.office;

import org.apache.fineract.cn.office.api.v1.EventConstants;
import org.apache.fineract.cn.office.api.v1.client.AlreadyExistsException;
import org.apache.fineract.cn.office.api.v1.client.BadRequestException;
import org.apache.fineract.cn.office.api.v1.client.NotFoundException;
import org.apache.fineract.cn.office.api.v1.client.OrganizationManager;
import org.apache.fineract.cn.office.api.v1.domain.ContactDetail;
import org.apache.fineract.cn.office.api.v1.domain.Employee;
import org.apache.fineract.cn.office.api.v1.domain.EmployeePage;
import org.apache.fineract.cn.office.api.v1.domain.Office;
import java.util.Arrays;
import java.util.Collections;
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.office.rest.config.OfficeRestConfiguration;
import org.apache.fineract.cn.office.util.EmployeeFactory;
import org.apache.fineract.cn.office.util.OfficeFactory;
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.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;
@@ -60,10 +63,6 @@
import org.springframework.context.annotation.Import;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
public class TestEmployee {
@@ -390,9 +389,9 @@ public void shouldDeleteContactDetailOfEmployee() throws Exception {

@Configuration
@ComponentScan(
basePackages = "io.mifos.office.listener"
basePackages = "org.apache.fineract.cn.office.listener"
)
@EnableFeignClients(basePackages = {"io.mifos.office.api.v1.client"})
@EnableFeignClients(basePackages = {"org.apache.fineract.cn.office.api.v1.client"})
@RibbonClient(name = APP_NAME)
@EnableEventRecording(maxWait = 5000L)
@Import({OfficeRestConfiguration.class})
@@ -16,32 +16,32 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.office;

import io.mifos.anubis.test.v1.TenantApplicationSecurityEnvironmentTestRule;
import io.mifos.core.api.context.AutoUserContext;
import io.mifos.core.test.env.TestEnvironment;
import io.mifos.core.test.fixture.TenantDataStoreContextTestRule;
import io.mifos.core.test.fixture.cassandra.CassandraInitializer;
import io.mifos.core.test.fixture.mariadb.MariaDBInitializer;
import io.mifos.core.test.listener.EnableEventRecording;
import io.mifos.core.test.listener.EventRecorder;
import io.mifos.office.api.v1.EventConstants;
import io.mifos.office.api.v1.client.AlreadyExistsException;
import io.mifos.office.api.v1.client.BadRequestException;
import io.mifos.office.api.v1.client.ChildrenExistException;
import io.mifos.office.api.v1.client.NotFoundException;
import io.mifos.office.api.v1.client.OrganizationManager;
import io.mifos.office.api.v1.domain.Address;
import io.mifos.office.api.v1.domain.Employee;
import io.mifos.office.api.v1.domain.ExternalReference;
import io.mifos.office.api.v1.domain.Office;
import io.mifos.office.api.v1.domain.OfficePage;
import io.mifos.office.rest.config.OfficeRestConfiguration;
import io.mifos.office.util.AddressFactory;
import io.mifos.office.util.EmployeeFactory;
import io.mifos.office.util.OfficeFactory;
package org.apache.fineract.cn.office;

import org.apache.fineract.cn.office.api.v1.EventConstants;
import org.apache.fineract.cn.office.api.v1.client.AlreadyExistsException;
import org.apache.fineract.cn.office.api.v1.client.BadRequestException;
import org.apache.fineract.cn.office.api.v1.client.ChildrenExistException;
import org.apache.fineract.cn.office.api.v1.client.NotFoundException;
import org.apache.fineract.cn.office.api.v1.client.OrganizationManager;
import org.apache.fineract.cn.office.api.v1.domain.Address;
import org.apache.fineract.cn.office.api.v1.domain.Employee;
import org.apache.fineract.cn.office.api.v1.domain.ExternalReference;
import org.apache.fineract.cn.office.api.v1.domain.Office;
import org.apache.fineract.cn.office.api.v1.domain.OfficePage;
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.office.rest.config.OfficeRestConfiguration;
import org.apache.fineract.cn.office.util.AddressFactory;
import org.apache.fineract.cn.office.util.EmployeeFactory;
import org.apache.fineract.cn.office.util.OfficeFactory;
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.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;
@@ -410,9 +410,9 @@ public void shouldIndicateOfficeHasExternalReferences() throws Exception {

@Configuration
@ComponentScan(
basePackages = "io.mifos.office.listener"
basePackages = "org.apache.fineract.cn.office.listener"
)
@EnableFeignClients(basePackages = {"io.mifos.office.api.v1.client"})
@EnableFeignClients(basePackages = {"org.apache.fineract.cn.office.api.v1.client"})
@RibbonClient(name = APP_NAME)
@EnableEventRecording(maxWait = 5000L)
@Import({OfficeRestConfiguration.class})
@@ -16,11 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.office.listener;
package org.apache.fineract.cn.office.listener;

import io.mifos.core.lang.config.TenantHeaderFilter;
import io.mifos.core.test.listener.EventRecorder;
import io.mifos.office.api.v1.EventConstants;
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.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.annotation.JmsListener;
import org.springframework.messaging.handler.annotation.Header;
@@ -16,11 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.office.listener;
package org.apache.fineract.cn.office.listener;

import io.mifos.core.lang.config.TenantHeaderFilter;
import io.mifos.core.test.listener.EventRecorder;
import io.mifos.office.api.v1.EventConstants;
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.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.annotation.JmsListener;
import org.springframework.messaging.handler.annotation.Header;
@@ -16,13 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.office.listener;
package org.apache.fineract.cn.office.listener;

import com.google.gson.Gson;
import io.mifos.core.command.util.CommandConstants;
import io.mifos.core.lang.config.TenantHeaderFilter;
import io.mifos.core.test.listener.EventRecorder;
import io.mifos.office.api.v1.EventConstants;
import org.apache.fineract.cn.office.api.v1.EventConstants;
import org.apache.fineract.cn.command.util.CommandConstants;
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.beans.factory.annotation.Qualifier;
import org.springframework.jms.annotation.JmsListener;
@@ -16,9 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.office.util;
package org.apache.fineract.cn.office.util;

import io.mifos.office.api.v1.domain.Address;
import org.apache.fineract.cn.office.api.v1.domain.Address;
import org.apache.commons.lang3.RandomStringUtils;

public class AddressFactory {

0 comments on commit ce10118

Please sign in to comment.