1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.forgerock.api.transform;
18
19 import io.swagger.models.properties.Property;
20 import io.swagger.models.properties.RefProperty;
21 import org.forgerock.util.i18n.LocalizableString;
22
23
24 public class LocalizableRefProperty extends RefProperty implements LocalizableProperty<Property> {
25 private LocalizableString title;
26 private LocalizableString description;
27
28
29
30
31 public LocalizableRefProperty() {
32 super();
33 }
34
35
36
37
38
39
40 public LocalizableRefProperty(String ref) {
41 super(ref);
42 }
43
44 @Override
45 public LocalizableRefProperty title(String title) {
46 setTitle(title);
47 return this;
48 }
49
50 @Override
51 public LocalizableRefProperty title(LocalizableString title) {
52 this.title = title;
53 return this;
54 }
55
56 @Override
57 public LocalizableRefProperty description(LocalizableString description) {
58 this.description = description;
59 return this;
60 }
61
62 @Override
63 public void setTitle(String title) {
64 super.setTitle(title);
65 this.title = new LocalizableString(title);
66 }
67
68 @Override
69 public LocalizableRefProperty description(String description) {
70 setDescription(description);
71 return this;
72 }
73
74 @Override
75 public void setDescription(String description) {
76 super.setDescription(description);
77 this.description = new LocalizableString(description);
78 }
79
80 @Override
81 public LocalizableString getLocalizableTitle() {
82 return title;
83 }
84
85 @Override
86 public LocalizableString getLocalizableDescription() {
87 return description;
88 }
89 }