38
38
/**
39
39
* Primary API to construct {@link Affordance} instances.
40
40
*
41
- * @author Oliver Drotbohm
41
+ * @author Oliver Drotbohm, Jongha Park
42
42
* @see #afford(HttpMethod)
43
43
*/
44
44
public class Affordances implements AffordanceOperations {
@@ -100,19 +100,19 @@ private static class AffordanceBuilder implements ConfigurableAffordance, Config
100
100
private final Affordances context ;
101
101
private final HttpMethod method ;
102
102
private final Link target ;
103
- private final InputPayloadMetadata inputMetdata ;
103
+ private final InputPayloadMetadata inputMetadata ;
104
104
private final PayloadMetadata outputMetadata ;
105
105
106
106
private List <QueryParameter > parameters = Collections .emptyList ();
107
107
private @ Nullable String name ;
108
108
109
- private AffordanceBuilder (Affordances context , HttpMethod method , Link target , InputPayloadMetadata inputMetdata ,
109
+ private AffordanceBuilder (Affordances context , HttpMethod method , Link target , InputPayloadMetadata inputMetadata ,
110
110
PayloadMetadata outputMetadata , List <QueryParameter > parameters , @ Nullable String name ) {
111
111
112
112
this .context = context ;
113
113
this .method = method ;
114
114
this .target = target ;
115
- this .inputMetdata = inputMetdata ;
115
+ this .inputMetadata = inputMetadata ;
116
116
this .outputMetadata = outputMetadata ;
117
117
this .parameters = parameters ;
118
118
this .name = name ;
@@ -205,7 +205,7 @@ public ConfigurableAffordance withOutput(ResolvableType type) {
205
205
*/
206
206
@ Override
207
207
public ConfigurableAffordance withOutput (PayloadMetadata metadata ) {
208
- return new AffordanceBuilder (context , method , target , inputMetdata , metadata , parameters , name );
208
+ return new AffordanceBuilder (context , method , target , inputMetadata , metadata , parameters , name );
209
209
}
210
210
211
211
/*
@@ -223,7 +223,7 @@ public ConfigurableAffordance withInputMediaType(MediaType inputMediaType) {
223
223
*/
224
224
@ Override
225
225
public ConfigurableAffordance withInputMediaTypes (List <MediaType > inputMediaTypes ) {
226
- return withInput (inputMetdata .withMediaTypes (inputMediaTypes ));
226
+ return withInput (inputMetadata .withMediaTypes (inputMediaTypes ));
227
227
}
228
228
229
229
/*
@@ -241,7 +241,7 @@ public ConfigurableAffordance withParameters(QueryParameter... parameters) {
241
241
*/
242
242
@ Override
243
243
public ConfigurableAffordance withParameters (List <QueryParameter > parameters ) {
244
- return new AffordanceBuilder (context , method , target , inputMetdata , outputMetadata , parameters , name );
244
+ return new AffordanceBuilder (context , method , target , inputMetadata , outputMetadata , parameters , name );
245
245
}
246
246
247
247
/*
@@ -255,7 +255,7 @@ public ConfigurableAffordance addParameters(QueryParameter... parameters) {
255
255
newParameters .addAll (this .parameters );
256
256
newParameters .addAll (Arrays .asList (parameters ));
257
257
258
- return new AffordanceBuilder (context , method , target , inputMetdata , outputMetadata , newParameters , name );
258
+ return new AffordanceBuilder (context , method , target , inputMetadata , outputMetadata , newParameters , name );
259
259
}
260
260
261
261
/*
@@ -268,7 +268,7 @@ public ConfigurableAffordance withTarget(Link target) {
268
268
Assert .notNull (target , "Target must not be null!" );
269
269
270
270
return this .target == target ? this
271
- : new AffordanceBuilder (this .context , this .method , target , this .inputMetdata , this .outputMetadata ,
271
+ : new AffordanceBuilder (this .context , this .method , target , this .inputMetadata , this .outputMetadata ,
272
272
this .parameters , this .name );
273
273
}
274
274
@@ -280,7 +280,7 @@ public ConfigurableAffordance withTarget(Link target) {
280
280
public ConfigurableAffordance withName (@ Nullable String name ) {
281
281
282
282
return this .name == name ? this
283
- : new AffordanceBuilder (this .context , this .method , this .target , this .inputMetdata , this .outputMetadata ,
283
+ : new AffordanceBuilder (this .context , this .method , this .target , this .inputMetadata , this .outputMetadata ,
284
284
this .parameters , name );
285
285
}
286
286
@@ -323,8 +323,8 @@ public String getNameOrDefault() {
323
323
324
324
String name = method .toString ().toLowerCase ();
325
325
326
- Class <?> type = TypeBasedPayloadMetadata .class .isInstance (inputMetdata ) //
327
- ? TypeBasedPayloadMetadata .class .cast (inputMetdata ).getType () //
326
+ Class <?> type = TypeBasedPayloadMetadata .class .isInstance (inputMetadata ) //
327
+ ? TypeBasedPayloadMetadata .class .cast (inputMetadata ).getType () //
328
328
: null ;
329
329
330
330
return type == null ? name : name .concat (type .getSimpleName ());
@@ -345,7 +345,7 @@ public HttpMethod getMethod() {
345
345
*/
346
346
@ Override
347
347
public InputPayloadMetadata getInputMetadata () {
348
- return inputMetdata ;
348
+ return inputMetadata ;
349
349
}
350
350
351
351
/*
0 commit comments