Skip to content
Permalink
Browse files
Adjusting to package name changes in upstream repositories.
  • Loading branch information
myrle-krantz committed Apr 13, 2018
1 parent 171084b commit c34592e31c9c6b25baa19e826e85103ffce0bfe8
Showing 17 changed files with 78 additions and 88 deletions.
@@ -18,16 +18,18 @@
*/
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;
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 {
@@ -18,10 +18,9 @@
*/
package io.mifos.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 {
@@ -18,9 +18,8 @@
*/
package io.mifos.office.api.v1.domain;

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

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

public class ExternalReference {

@@ -18,7 +18,7 @@
*/
package io.mifos.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 {
@@ -18,14 +18,6 @@
*/
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;
@@ -38,7 +30,18 @@
import io.mifos.office.rest.config.OfficeRestConfiguration;
import io.mifos.office.util.EmployeeFactory;
import io.mifos.office.util.OfficeFactory;
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.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 {
@@ -18,14 +18,6 @@
*/
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;
@@ -42,6 +34,14 @@
import io.mifos.office.util.EmployeeFactory;
import io.mifos.office.util.OfficeFactory;
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.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;
@@ -18,9 +18,9 @@
*/
package io.mifos.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.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;
@@ -18,9 +18,9 @@
*/
package io.mifos.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.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;
@@ -19,10 +19,10 @@
package io.mifos.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.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;
@@ -18,11 +18,6 @@
*/
package io.mifos.office.internal.command.handler;

import io.mifos.core.api.util.UserContextHolder;
import io.mifos.core.command.annotation.Aggregate;
import io.mifos.core.command.annotation.CommandHandler;
import io.mifos.core.command.annotation.EventEmitter;
import io.mifos.core.lang.ServiceException;
import io.mifos.office.api.v1.EventConstants;
import io.mifos.office.api.v1.domain.ContactDetail;
import io.mifos.office.api.v1.domain.Employee;
@@ -39,12 +34,16 @@
import io.mifos.office.internal.repository.EmployeeRepository;
import io.mifos.office.internal.repository.OfficeEntity;
import io.mifos.office.internal.repository.OfficeRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Objects;
import java.util.Optional;
import org.apache.fineract.cn.api.util.UserContextHolder;
import org.apache.fineract.cn.command.annotation.Aggregate;
import org.apache.fineract.cn.command.annotation.CommandHandler;
import org.apache.fineract.cn.command.annotation.EventEmitter;
import org.apache.fineract.cn.lang.ServiceException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

@SuppressWarnings({
"unused"
@@ -18,19 +18,18 @@
*/
package io.mifos.office.internal.command.handler;

import io.mifos.core.command.annotation.Aggregate;
import io.mifos.core.command.annotation.CommandHandler;
import io.mifos.core.command.annotation.EventEmitter;
import io.mifos.core.mariadb.domain.FlywayFactoryBean;
import io.mifos.office.ServiceConstants;
import io.mifos.office.api.v1.EventConstants;
import io.mifos.office.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.EventEmitter;
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 javax.sql.DataSource;

@SuppressWarnings({
"unused"
})
@@ -18,11 +18,6 @@
*/
package io.mifos.office.internal.command.handler;

import io.mifos.core.api.util.UserContextHolder;
import io.mifos.core.command.annotation.Aggregate;
import io.mifos.core.command.annotation.CommandHandler;
import io.mifos.core.command.annotation.EventEmitter;
import io.mifos.core.lang.ServiceException;
import io.mifos.office.ServiceConstants;
import io.mifos.office.api.v1.EventConstants;
import io.mifos.office.api.v1.domain.ExternalReference;
@@ -42,14 +37,18 @@
import io.mifos.office.internal.repository.ExternalReferenceRepository;
import io.mifos.office.internal.repository.OfficeEntity;
import io.mifos.office.internal.repository.OfficeRepository;
import java.util.Date;
import java.util.Optional;
import org.apache.fineract.cn.api.util.UserContextHolder;
import org.apache.fineract.cn.command.annotation.Aggregate;
import org.apache.fineract.cn.command.annotation.CommandHandler;
import org.apache.fineract.cn.command.annotation.EventEmitter;
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.transaction.annotation.Transactional;

import java.util.Date;
import java.util.Optional;

@SuppressWarnings({
"unused"
})
@@ -20,8 +20,8 @@

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import io.mifos.core.mariadb.config.EnableMariaDB;
import io.mifos.office.ServiceConstants;
import org.apache.fineract.cn.mariadb.config.EnableMariaDB;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean;
@@ -18,7 +18,6 @@
*/
package io.mifos.office.internal.service;

import io.mifos.core.lang.ServiceException;
import io.mifos.office.ServiceConstants;
import io.mifos.office.api.v1.domain.ContactDetail;
import io.mifos.office.api.v1.domain.Employee;
@@ -31,19 +30,19 @@
import io.mifos.office.internal.repository.EmployeeRepository;
import io.mifos.office.internal.repository.OfficeEntity;
import io.mifos.office.internal.repository.OfficeRepository;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
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.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;

@Service
public class EmployeeService {

@@ -18,7 +18,6 @@
*/
package io.mifos.office.internal.service;

import io.mifos.core.lang.ServiceException;
import io.mifos.office.ServiceConstants;
import io.mifos.office.api.v1.domain.Address;
import io.mifos.office.api.v1.domain.ExternalReference;
@@ -32,6 +31,10 @@
import io.mifos.office.internal.repository.ExternalReferenceRepository;
import io.mifos.office.internal.repository.OfficeEntity;
import io.mifos.office.internal.repository.OfficeRepository;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
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;
@@ -40,10 +43,6 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.ArrayList;
import java.util.List;
import java.util.Optional;

@Service
public class OfficeService {

@@ -18,14 +18,14 @@
*/
package io.mifos.office.rest.config;

import io.mifos.anubis.config.EnableAnubis;
import io.mifos.core.async.config.EnableAsync;
import io.mifos.core.cassandra.config.EnableCassandra;
import io.mifos.core.command.config.EnableCommandProcessing;
import io.mifos.core.lang.config.EnableServiceException;
import io.mifos.core.lang.config.EnableTenantContext;
import io.mifos.office.ServiceConstants;
import io.mifos.office.internal.config.OfficeServiceConfiguration;
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.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
@@ -18,10 +18,6 @@
*/
package io.mifos.office.rest.controller;

import io.mifos.anubis.annotation.AcceptedTokenType;
import io.mifos.anubis.annotation.Permittable;
import io.mifos.core.command.gateway.CommandGateway;
import io.mifos.core.lang.ServiceException;
import io.mifos.office.api.v1.PermittableGroupIds;
import io.mifos.office.api.v1.domain.Address;
import io.mifos.office.api.v1.domain.ContactDetail;
@@ -45,6 +41,13 @@
import io.mifos.office.internal.command.UpdateOfficeCommand;
import io.mifos.office.internal.service.EmployeeService;
import io.mifos.office.internal.service.OfficeService;
import java.util.List;
import java.util.Optional;
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.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
@@ -59,10 +62,6 @@
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

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

@RestController
@RequestMapping("/")
public class OfficeRestController {

0 comments on commit c34592e

Please sign in to comment.