-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathGetVoidedStatementRequest.java
More file actions
69 lines (58 loc) · 1.86 KB
/
Copy pathGetVoidedStatementRequest.java
File metadata and controls
69 lines (58 loc) · 1.86 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
/*
* Copyright 2016-2025 Berry Cloud Ltd. All rights reserved.
*/
package dev.learning.xapi.client;
import static dev.learning.xapi.client.XapiClientConstants.ATTACHMENTS_PARAM;
import static dev.learning.xapi.client.XapiClientConstants.STATEMENTS_PATH;
import java.util.Map;
import java.util.Optional;
import java.util.UUID;
import lombok.Getter;
import lombok.experimental.SuperBuilder;
import org.springframework.web.util.UriBuilder;
/**
* Request for getting a voided Statement.
*
* @see <a href=
* "https://github.com/adlnet/xAPI-Spec/blob/master/xAPI-Communication.md#214-voided-statements">Voided
* Statements</a>
* @author Thomas Turrell-Croft
* @author István Rátkai (Selindek)
*/
@SuperBuilder
@Getter
public class GetVoidedStatementRequest extends GetStatementRequest {
@Override
public UriBuilder url(UriBuilder uriBuilder, Map<String, Object> queryParams) {
return uriBuilder
.path(STATEMENTS_PATH)
.queryParam("voidedStatementId", id)
.queryParamIfPresent("format", Optional.ofNullable(format))
.queryParamIfPresent(ATTACHMENTS_PARAM, Optional.ofNullable(attachments));
}
/** Builder for GetVoidedStatementRequest. */
public abstract static class Builder<C extends GetVoidedStatementRequest, B extends Builder<C, B>>
extends GetStatementRequest.Builder<C, B> {
/**
* Sets the voidedId.
*
* @param voidedId The voidedId of the GetVoidedStatementRequest.
* @return This builder
*/
public Builder<C, B> voidedId(UUID voidedId) {
id(voidedId);
return self();
}
/**
* Sets the voidedId.
*
* @param voidedId The voidedId of the GetVoidedStatementRequest.
* @return This builder
*/
public Builder<C, B> voidedId(String voidedId) {
id(voidedId);
return self();
}
// This static class extends the lombok builder.
}
}