PendingDeviceImpl.java
1.91 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
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* javax.annotation.Nonnull
* javax.annotation.Nullable
* org.apache.sling.commons.json.JSONObject
*/
package com.adobe.cq.screens.device.registration.impl;
import com.adobe.cq.screens.device.registration.PendingDevice;
import com.adobe.cq.screens.device.registration.RegistrationResult;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.apache.sling.commons.json.JSONObject;
public class PendingDeviceImpl
implements PendingDevice {
private final String token;
private String code;
private JSONObject metadata;
private RegistrationResult result;
private PendingDevice.State state = PendingDevice.State.UNREGISTERED;
public PendingDeviceImpl(String token) {
this.token = token;
this.metadata = new JSONObject();
}
@Nonnull
@Override
public String getToken() {
return this.token;
}
@Nullable
@Override
public String getRegistrationCode() {
return this.code;
}
@Nonnull
public PendingDeviceImpl setRegistrationCode(String code) {
this.code = code;
return this;
}
@Nonnull
@Override
public JSONObject getMetadata() {
return this.metadata;
}
@Nonnull
public PendingDeviceImpl setMetadata(@Nonnull JSONObject metadata) {
this.metadata = metadata;
return this;
}
@Override
public RegistrationResult getRegistrationResult() {
return this.result;
}
@Nonnull
public PendingDeviceImpl setRegistrationResult(@Nonnull RegistrationResult result) {
this.result = result;
return this;
}
@Nonnull
@Override
public PendingDevice.State getState() {
return this.state;
}
@Nonnull
public PendingDeviceImpl setState(PendingDevice.State state) {
this.state = state;
return this;
}
}