A
- the aggregate root type.I
- the aggregate root identifier type.D
- the representation type.public interface UpdateResource<A extends AggregateRoot<I>,I,D> extends Resource<A,I,D>
Resource
for updating aggregates (the U of CRUD).CreateResource
,
ReadResource
,
UpdateResource
,
DeleteResource
,
Resource
Modifier and Type | Method and Description |
---|---|
default D |
update(I id,
D representation)
The method that implements REST aggregate updating.
|
buildAggregateName, getAggregateRootClass, getFluentAssembler, getIdentifierClass, getPaginator, getRepository, getRepresentationClass
@PUT @Produces(value="application/json") @Consumes(value="application/json") @Path(value="/{id}") default D update(@PathParam(value="id") I id, D representation)
id
- the identifier of the aggregate to update, passed as /{id}
path parameter. If
the identifier type is a complex object, it must have a constructor taking a single
String
parameter.representation
- the updated representation of the aggregate as JSON request body.Copyright © 2013-2018–2019 SeedStack. All rights reserved.