@@ -8,7 +8,7 @@ The code conventions are valid for all BootstrAPI modules.
8
8
9
9
=== Quick Reference
10
10
11
- * Model Class: `EntityBean `
11
+ * Model Class: `EntityModel `
12
12
* Model JSON Name: `entity` (`@XmlRootElement(name = BootstrAPI.ENTITY)`)
13
13
* REST Endpoint Class: `EntitiesResource`
14
14
* REST Endpoint Name: `entities` (`@Path(BootstrAPI.ENTITIES)`)
@@ -33,7 +33,7 @@ Example:
33
33
@Data
34
34
@NoArgsConstructor
35
35
@XmlRootElement(name = BootstrAPI.ENTITY)
36
- public class EntityBean {
36
+ public class EntityModel {
37
37
38
38
@XmlElement
39
39
@NotNull
@@ -117,7 +117,7 @@ public interface EntitiesResource {
117
117
summary = "Get the list of entities",
118
118
responses = {
119
119
@ApiResponse(
120
- responseCode = "200", content = @Content(array = @ArraySchema(schema = @Schema(implementation = EntitiyBean .class))),
120
+ responseCode = "200", content = @Content(array = @ArraySchema(schema = @Schema(implementation = EntitiyModel .class))),
121
121
description = ""
122
122
),
123
123
@ApiResponse(responseCode = "400", content = @Content(schema = @Schema(implementation = ErrorCollection.class)))
@@ -134,15 +134,15 @@ public interface EntitiesResource {
134
134
description = "A new entity can be added here if no other entity with the same name already exists",
135
135
responses = {
136
136
@ApiResponse(
137
- responseCode = "200", content = @Content(schema = @Schema(implementation = EntityBean .class)),
137
+ responseCode = "200", content = @Content(schema = @Schema(implementation = EntityModel .class)),
138
138
description = ""
139
139
),
140
140
@ApiResponse(responseCode = "400", content = @Content(schema = @Schema(implementation = ErrorCollection.class)))
141
141
}
142
142
)
143
143
Response addEntity(
144
144
@QueryParam("doSomethingAfterAdding") @DefaultValue("false") final boolean doSomethingAfterAdding,
145
- @NotNull final EntityBean entity);
145
+ @NotNull final EntityModel entity);
146
146
147
147
}
148
148
----
@@ -173,8 +173,8 @@ public class EntitiesResourceImpl implements EntitiesResource {
173
173
public Response getEntities() {
174
174
final ErrorCollection errorCollection = new ErrorCollection();
175
175
try {
176
- final List<EntitiesBean> entitieBeans = entitiesService.getEntities();
177
- return Response.ok(entitiesBeanBeans ).build();
176
+ final List<EntitiesModel> entitieModels = entitiesService.getEntities();
177
+ return Response.ok(entitiesModelModels ).build();
178
178
} catch (Exception e) {
179
179
log.error(e.getMessage(), e);
180
180
errorCollection.addErrorMessage(e.getMessage());
@@ -185,11 +185,11 @@ public class EntitiesResourceImpl implements EntitiesResource {
185
185
@Override
186
186
public Response addEntity(
187
187
final boolean doSomethingAfterAdding,
188
- @NotNull final EntityBean entity) {
188
+ @NotNull final EntityModel entity) {
189
189
190
190
final ErrorCollection errorCollection = new ErrorCollection();
191
191
try {
192
- EntityBean addedEntity = entitiesService.addEntity(entity, doSomethingAfterAdding);
192
+ EntityModel addedEntity = entitiesService.addEntity(entity, doSomethingAfterAdding);
193
193
return Response.ok(addedEntity).build();
194
194
} catch (Exception e) {
195
195
log.error(e.getMessage(), e);
0 commit comments