Skip to content

Commit

Permalink
Move Requestor Impl to service-domain project
Browse files Browse the repository at this point in the history
  Requestor is independent of Delivery Layer
  • Loading branch information
unknown authored and unknown committed Dec 6, 2014
1 parent fb9096e commit da9a17b
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
package org.reparationservice.rest.requestor;

import org.springframework.stereotype.Component;
package reparationservice.requestor.impl;

import reparationservice.entities.worker.WorkerGateway;
import reparationservice.requestor.InteractorFactory;
Expand All @@ -10,7 +8,6 @@
import reparationservice.usecases.worker.GetAllWorkerInteractor;
import reparationservice.usecases.worker.GetAllWorkersResponder;

@Component
public class InteractorFactoryImpl implements InteractorFactory {
@Override
public UseCaseActivator makeAddWorkerInteractor(WorkerGateway workers, UseCaseRequest request) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
package org.reparationservice.rest.requestor;

import org.springframework.stereotype.Component;
package reparationservice.requestor.impl;

import reparationservice.requestor.RequestBuilder;
import reparationservice.requestor.UseCaseRequest;
import reparationservice.usecases.worker.AddWorkerRequest;

@Component
public class RequestBuilderImpl implements RequestBuilder {
@Override
public UseCaseRequest buildAddWorkerRequest(String username) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.reparationservice.rest.requestor;
package reparationservice.requestor;

import static org.assertj.core.api.Assertions.assertThat;

Expand All @@ -10,6 +10,7 @@
import reparationservice.requestor.InteractorFactory;
import reparationservice.requestor.UseCaseActivator;
import reparationservice.requestor.UseCaseRequest;
import reparationservice.requestor.impl.InteractorFactoryImpl;
import reparationservice.usecases.worker.AddWorkerInteractor;
import reparationservice.usecases.worker.GetAllWorkerInteractor;
import reparationservice.usecases.worker.GetAllWorkersResponderSpy;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package org.reparationservice.rest.requestor;
package reparationservice.requestor;

import static org.assertj.core.api.Assertions.assertThat;

import org.junit.Test;

import reparationservice.requestor.UseCaseRequest;
import reparationservice.requestor.impl.RequestBuilderImpl;
import reparationservice.usecases.worker.AddWorkerRequest;
import reparationservice.usecases.worker.AddWorkerRequestBuilder;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@

import reparationservice.entities.worker.WorkerGateway;
import reparationservice.persistenceimpls.inmemory.InMemoryConfigurator;
import reparationservice.requestor.InteractorFactory;
import reparationservice.requestor.RequestBuilder;
import reparationservice.requestor.impl.InteractorFactoryImpl;
import reparationservice.requestor.impl.RequestBuilderImpl;

@Configuration
@ComponentScan
Expand All @@ -24,6 +28,16 @@ WorkerGateway getWorkerGW() {
return InMemoryConfigurator.getWorkerGateway();
}

@Bean
InteractorFactory getInteractorFactory() {
return new InteractorFactoryImpl();
}

@Bean
RequestBuilder getRequestBuilder() {
return new RequestBuilderImpl();
}

@Configuration
public static class DisableStaticResourceConfiguration extends WebMvcAutoConfigurationAdapter {
@Override
Expand Down

0 comments on commit da9a17b

Please sign in to comment.