1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.devacfr.maven.skins.reflow.model;
20
21 import javax.annotation.Nonnull;
22
23 import java.util.Collections;
24 import java.util.List;
25
26 import org.apache.commons.lang3.builder.ToStringBuilder;
27
28
29
30
31
32 public class SideNavMenuItem {
33
34
35 private String name;
36
37
38 private String href;
39
40
41 private String icon;
42
43
44 private String slugName;
45
46
47 private List<SideNavMenuItem> items;
48
49
50 private String parent;
51
52
53
54
55 public SideNavMenuItem() {
56 }
57
58
59
60
61 public String getName() {
62 return name;
63 }
64
65
66
67
68
69
70 public SideNavMenuItem withName(final String name) {
71 this.name = name;
72 return this;
73 }
74
75
76
77
78 public String getParent() {
79 return parent;
80 }
81
82
83
84
85
86
87 public SideNavMenuItem withParent(final String parent) {
88 this.parent = parent;
89 return this;
90 }
91
92
93
94
95 public String getHref() {
96 return href;
97 }
98
99
100
101
102
103
104 public SideNavMenuItem withHref(final String href) {
105 this.href = href;
106 return this;
107 }
108
109
110
111
112 public String getSlugName() {
113 return slugName;
114 }
115
116
117
118
119
120
121 public SideNavMenuItem withSlugName(final String slugName) {
122 this.slugName = slugName;
123 return this;
124 }
125
126
127
128
129 public String getIcon() {
130 return icon;
131 }
132
133
134
135
136
137
138
139
140 public SideNavMenuItem withIcon(final String icon) {
141 this.icon = icon;
142 return this;
143 }
144
145
146
147
148
149
150 public boolean isHasItems() {
151 return items != null && !items.isEmpty();
152 }
153
154
155
156
157
158
159 @Nonnull
160 public List<SideNavMenuItem> getItems() {
161 if (items == null) {
162 return Collections.emptyList();
163 }
164 return items;
165 }
166
167
168
169
170
171
172
173
174 public SideNavMenuItem withItems(final List<SideNavMenuItem> items) {
175 this.items = items;
176 return this;
177 }
178
179
180
181
182 @Override
183 public String toString() {
184 return ToStringBuilder.reflectionToString(this);
185 }
186 }