-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathEbicsParams.java
More file actions
126 lines (104 loc) · 3.69 KB
/
EbicsParams.java
File metadata and controls
126 lines (104 loc) · 3.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
/*
public record EbicsParams(String orderId, OrderParams orderParams) {
public record OrderParams(String serviceName, String scope, String option, String messageName,
String messageVersion, boolean signatureFlag) {
}
}
*/
package org.kopi.ebics.client;
import java.util.Objects;
public class EbicsParams {
private final String orderId;
private final OrderParams orderParams;
public EbicsParams(String orderId, OrderParams orderParams) {
this.orderId = orderId;
this.orderParams = orderParams;
}
public String getOrderId() {
return orderId;
}
public OrderParams getOrderParams() {
return orderParams;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof EbicsParams)) return false;
EbicsParams that = (EbicsParams) o;
return Objects.equals(orderId, that.orderId) &&
Objects.equals(orderParams, that.orderParams);
}
@Override
public int hashCode() {
return Objects.hash(orderId, orderParams);
}
@Override
public String toString() {
return "EbicsParams{" +
"orderId='" + orderId + '\'' +
", orderParams=" + orderParams +
'}';
}
public static class OrderParams {
private final String serviceName;
private final String scope;
private final String option;
private final String messageName;
private final String messageVersion;
private final boolean signatureFlag;
public OrderParams(String serviceName, String scope, String option,
String messageName, String messageVersion, boolean signatureFlag) {
this.serviceName = serviceName;
this.scope = scope;
this.option = option;
this.messageName = messageName;
this.messageVersion = messageVersion;
this.signatureFlag = signatureFlag;
}
public String getServiceName() {
return serviceName;
}
public String getScope() {
return scope;
}
public String getOption() {
return option;
}
public String getMessageName() {
return messageName;
}
public String getMessageVersion() {
return messageVersion;
}
public boolean isSignatureFlag() {
return signatureFlag;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof OrderParams)) return false;
OrderParams that = (OrderParams) o;
return signatureFlag == that.signatureFlag &&
Objects.equals(serviceName, that.serviceName) &&
Objects.equals(scope, that.scope) &&
Objects.equals(option, that.option) &&
Objects.equals(messageName, that.messageName) &&
Objects.equals(messageVersion, that.messageVersion);
}
@Override
public int hashCode() {
return Objects.hash(serviceName, scope, option, messageName, messageVersion, signatureFlag);
}
@Override
public String toString() {
return "OrderParams{" +
"serviceName='" + serviceName + '\'' +
", scope='" + scope + '\'' +
", option='" + option + '\'' +
", messageName='" + messageName + '\'' +
", messageVersion='" + messageVersion + '\'' +
", signatureFlag=" + signatureFlag +
'}';
}
}
}