1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package de.kaiserpfalzedv.commons.core.user;
19
20 import org.eclipse.microprofile.openapi.annotations.media.Schema;
21
22 import com.fasterxml.jackson.annotation.JsonIgnore;
23 import com.fasterxml.jackson.annotation.JsonInclude;
24
25 import de.kaiserpfalzedv.commons.api.user.UserData;
26 import de.kaiserpfalzedv.commons.core.resources.DefaultResourceSpecImpl;
27 import de.kaiserpfalzedv.commons.core.resources.PointerImpl;
28 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
29 import lombok.AllArgsConstructor;
30 import lombok.Builder;
31 import lombok.EqualsAndHashCode;
32 import lombok.Getter;
33 import lombok.NoArgsConstructor;
34 import lombok.ToString;
35 import lombok.experimental.SuperBuilder;
36 import lombok.extern.jackson.Jacksonized;
37
38
39
40
41
42
43
44 @Jacksonized
45 @SuperBuilder(toBuilder = true)
46 @AllArgsConstructor
47 @NoArgsConstructor
48 @Getter
49 @ToString
50 @EqualsAndHashCode(callSuper = true)
51 @JsonInclude(JsonInclude.Include.NON_ABSENT)
52 @Schema(name = "userData", description = "Registered User.")
53 public class UserDataImpl extends DefaultResourceSpecImpl implements UserData {
54 private static final long serialVersionUID = 0L;
55
56 private static final String[] STRUCTURED_PROPERTIES = {
57 ISSUER,
58 SUBJECT
59 };
60
61 @Builder.Default
62 private String name = null;
63
64 @Builder.Default
65 private String description = null;
66 @Builder.Default
67 private PointerImpl picture = null;
68
69 @SuppressFBWarnings(value = "EI_EXPOSE_REF", justification = "It's the API design.")
70 @JsonIgnore
71 @Override
72 public String[] getDefaultProperties() {
73 return STRUCTURED_PROPERTIES;
74 }
75
76 }