Skip to content
This repository was archived by the owner on Jul 13, 2022. It is now read-only.

Commit 781cee1

Browse files
committed
Corrections and polishing
1 parent 0d4086f commit 781cee1

File tree

3 files changed

+23
-35
lines changed

3 files changed

+23
-35
lines changed
Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,16 @@
11
package siia.booking.domain.payment;
22

3-
/**
4-
* @author Marius Bogoevici
5-
*/
6-
public class PaymentManager
7-
{
8-
public void processPayment(Invoice invoice)
9-
{
10-
//...
11-
}
3+
public class PaymentManager {
124

13-
public void processPayment(CreditCardPayment creditCardPayment)
14-
{
15-
//...
16-
}
5+
public void processPayment(Invoice invoice) {
6+
// process payment for Invoice
7+
}
178

18-
public void processPayment(PaypalPayment payment)
19-
{
20-
//...
21-
}
9+
public void processPayment(CreditCardPayment creditCardPayment) {
10+
// process payment for CreditCardPayment
11+
}
12+
13+
public void processPayment(PaypalPayment payment) {
14+
// process payment for PaypalPayment
15+
}
2216
}

siia-examples-parent/flight-booking/integration/src/main/java/siia/booking/integration/notifications/NotificationsRouter.java

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,19 @@
66
import java.util.ArrayList;
77
import java.util.List;
88

9-
/**
10-
* @author Marius Bogoevici
11-
*/
129
public class NotificationsRouter {
13-
public String[] routeNotification(FlightNotification notification) {
10+
public String[] routeNotification(FlightNotification notification) {
1411

15-
List<String> notificationTypes = new ArrayList<String>();
16-
if (Priority.HIGH == (notification.getPriority())) {
17-
notificationTypes.add("phone");
18-
}
19-
if (Priority.MEDIUM == (notification.getPriority())) {
20-
notificationTypes.add("sms");
21-
}
22-
if (Priority.LOW == (notification.getPriority())) {
23-
notificationTypes.add("email");
24-
}
25-
return notificationTypes.toArray(new String[0]);
12+
List<String> notificationTypes = new ArrayList<String>();
13+
if (Priority.HIGH == (notification.getPriority())) {
14+
notificationTypes.add("phone");
2615
}
16+
if (Priority.MEDIUM == (notification.getPriority())) {
17+
notificationTypes.add("sms");
18+
}
19+
if (Priority.LOW == (notification.getPriority())) {
20+
notificationTypes.add("email");
21+
}
22+
return notificationTypes.toArray(new String[0]);
23+
}
2724
}

siia-examples-parent/flight-booking/integration/src/main/java/siia/booking/integration/routing/PaymentSettlementRouter.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
import siia.booking.domain.payment.PaymentSettlement;
66
import siia.booking.domain.payment.PaypalPayment;
77

8-
/**
9-
* @author Marius Bogoevici
10-
*/
118
public class PaymentSettlementRouter {
129

1310
public String routePaymentSettlement(PaymentSettlement paymentSettlement) {

0 commit comments

Comments
 (0)