Skip to content

Commit

Permalink
Merge pull request #8 from openwms/bugs/#7-dateformat
Browse files Browse the repository at this point in the history
#7 cleanup dependencies, not related to the issue
  • Loading branch information
openwms authored Mar 5, 2024
2 parents 1cb1697 + 4e3b0bc commit 511f21f
Show file tree
Hide file tree
Showing 91 changed files with 415 additions and 183 deletions.
33 changes: 6 additions & 27 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,8 @@
<properties>
<common.version>2.1.0-SNAPSHOT</common.version>
<core.version>2.1.0-SNAPSHOT</core.version>
<guava.version>30.0-jre</guava.version>
<guava.version>32.0.0-jre</guava.version>
<lombok.version>1.18.30</lombok.version>
<objenesis.version>3.2</objenesis.version>
<servo-core.version>0.12.21</servo-core.version>
<spring-cloud-dependencies.version>2021.0.8</spring-cloud-dependencies.version>
<hibernate-jpamodelgen.version>5.6.14.Final</hibernate-jpamodelgen.version>
Expand Down Expand Up @@ -177,12 +176,6 @@
<artifactId>hibernate-jpamodelgen</artifactId>
<version>${hibernate-jpamodelgen.version}</version>
</dependency>
<dependency>
<!-- Clash between spring-boot-starter-test and dozer -->
<groupId>org.objenesis</groupId>
<artifactId>objenesis</artifactId>
<version>${objenesis.version}</version>
</dependency>
<dependency>
<groupId>org.openwms</groupId>
<artifactId>org.openwms.core.util</artifactId>
Expand Down Expand Up @@ -269,6 +262,11 @@
<artifactId>spring-cloud-starter-bootstrap</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bus-amqp</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
Expand All @@ -283,12 +281,6 @@
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
Expand Down Expand Up @@ -349,13 +341,6 @@
<artifactId>dozer-core</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<!-- Need to upgrade Guava from version 11 because of CVE -->
<!-- Required by eureka-client -->
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
Expand All @@ -378,12 +363,6 @@
<artifactId>ameba-lib</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>net.logstash.logback</groupId>
<artifactId>logstash-logback-encoder</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
Expand Down
40 changes: 23 additions & 17 deletions src/main/asciidoc/2-movements.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,46 +11,52 @@ up or dropped off but has no assignment to the human user. The operator/user may
[[movement-index]]
=== Movement Index
The index with all possible operations on `Movements` can be retrieved with a GET request:

include::{generated}/move-index/http-request.adoc[]

The response lists all the operations possible on `Movements` with a name and the corresponding href link:

include::{generated}/move-index/http-response.adoc[]

[[movement-create]]
=== Create a Movement
To create a new `Movement` a client needs to send a `POST` request to `Movements` sub resource of the primary
`TransportUnits` resource with the required data in the request body. The required data must contain the source where to
pick up the `TransportUnit` and the target where to drop it. The `TransportUnit` that shall be moved is directly
`TransportUnits` resource with the data in the request body. The required data must contain the source where to
pick up the `TransportUnit` and the target where to drop it off. The `TransportUnit` that shall be moved is directly
referenced as the primary resource in the URI.

include::{generated}/move-create/http-request.adoc[]
include::{generated}/move-create/request-fields.adoc[]

If the `Movement` has been created successfully, the server returns the URI to the created resource:

include::{generated}/move-create/http-response.adoc[]
include::{generated}/move-create/response-fields.adoc[]

[[movement-findForStateAndTypesAndSource]]
[[movement-findAll]]
=== Find all Movements
A HTTP `GET` request to the primary resource without any query parameters returns an array of all existing `Movements`.

An HTTP `GET` request to the primary resource without any query parameters returns an array of all existing `Movements`.
include::{generated}/move-find-all/http-request.adoc[]

Returns in this example an array of three `Movements` or an empty array if none exist:

include::{generated}/move-find-all/http-response.adoc[]

[[movement-findForStateAndTypesAndSource]]
=== Find Movements
A HTTP `GET` request to the primary resource with additional query parameters is required to find `Movements` in a
particular `state`, `type` and `source`.

include::{generated}/order-find-all/http-request.adoc[]
=== Find Movements for a TransportUnit in States and of Types
An HTTP `GET` request to the primary resource with additional query parameters is required to find `Movements` in particular `states` of
particular `types` for a `TransportUnit` identified by its `barcode`.
include::{generated}/move-find-tuTypesStates/http-request.adoc[]
include::{generated}/move-find-tuTypesStates/request-parameters.adoc[]

Returns an array of `Movements` or an empty array:
include::{generated}/move-find-tuTypesStates/http-response.adoc[]
include::{generated}/move-find-tuTypesStates/response-fields.adoc[]

include::{generated}/order-find-all/http-response.adoc[]
[[movement-findForStateAndTypesAndSource]]
=== Find Movements in State of Types and at Source
An HTTP `GET` request to the primary resource with additional query parameters is required to find `Movements` in a particular `state`, of
particular `types` and at a given `source`.
include::{generated}/move-find-stateTypesSource/http-request.adoc[]
include::{generated}/move-find-stateTypesSource/request-parameters.adoc[]

Returns an array of `Movements` or an empty array:
include::{generated}/move-find-stateTypesSource/http-response.adoc[]

[[movement-move]]
=== Move a Movement
Expand Down Expand Up @@ -84,7 +90,7 @@ include::{generated}/move-cancel/http-response.adoc[]
=== Complete a Movement
To complete a `Movement` a client needs to explicitly send the `COMPLETE` action along a `POST` request to the
`Movement` resource. This completes the `Movement` and sets the target to the required `target` that is passed from the
caller in the response body.
caller in the response body. If the `Movement` has already been completed no changes are done.

A valid request looks like:
include::{generated}/move-complete/http-request.adoc[]
Expand Down
2 changes: 1 addition & 1 deletion src/main/asciidoc/api.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Heiko Scherrer;
:operation-curl-request-title: Example request
:operation-http-response-title: Example response

Copyright © 2005-2023
Copyright © 2005-2024

Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies
and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/openwms/common/location/LocationPK.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2005-2023 the original author or authors.
* Copyright 2005-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2005-2023 the original author or authors.
* Copyright 2005-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/openwms/common/package-info.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2005-2023 the original author or authors.
* Copyright 2005-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/openwms/common/transport/Barcode.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2005-2023 the original author or authors.
* Copyright 2005-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2005-2023 the original author or authors.
* Copyright 2005-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2005-2023 the original author or authors.
* Copyright 2005-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2005-2023 the original author or authors.
* Copyright 2005-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2005-2023 the original author or authors.
* Copyright 2005-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2005-2023 the original author or authors.
* Copyright 2005-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2005-2023 the original author or authors.
* Copyright 2005-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2005-2023 the original author or authors.
* Copyright 2005-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2005-2023 the original author or authors.
* Copyright 2005-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2005-2023 the original author or authors.
* Copyright 2005-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2005-2023 the original author or authors.
* Copyright 2005-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/openwms/wms/movements/Message.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2005-2023 the original author or authors.
* Copyright 2005-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2005-2023 the original author or authors.
* Copyright 2005-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2005-2023 the original author or authors.
* Copyright 2005-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -36,6 +36,7 @@
import javax.validation.Valid;
import java.util.List;

import static java.util.Arrays.asList;
import static org.openwms.wms.movements.api.MovementApi.API_MOVEMENTS;
import static org.springframework.hateoas.server.mvc.WebMvcLinkBuilder.linkTo;
import static org.springframework.hateoas.server.mvc.WebMvcLinkBuilder.methodOn;
Expand All @@ -61,6 +62,7 @@ public ResponseEntity<Index> index() {
new Index(
linkTo(methodOn(MovementController.class).create("transportUnitBK", new MovementVO(), null)).withRel("movement-create"),
linkTo(methodOn(MovementController.class).findAll()).withRel("movement-findAll"),
linkTo(methodOn(MovementController.class).findForTuAndTypesAndStates("transportUnitBK", asList(MovementType.INBOUND), asList("state"))).withRel("movement-findForTuAndTypesAndStates"),
linkTo(methodOn(MovementController.class).findForStateAndTypesAndSource("state", "source", MovementType.INBOUND)).withRel("movement-findForStateAndTypesAndSource"),
linkTo(methodOn(MovementController.class).move("pKey", new MovementVO())).withRel("movement-move"),
linkTo(methodOn(MovementController.class).cancel("pKey")).withRel("movement-cancel"),
Expand Down Expand Up @@ -113,7 +115,7 @@ public ResponseEntity<List<MovementVO>> findAll(){
@GetMapping(value = API_MOVEMENTS, params = {"barcode", "types", "states"})
public ResponseEntity<List<MovementVO>> findForTuAndTypesAndStates(
@RequestParam("barcode") String barcode,
@RequestParam("types") List<String> types,
@RequestParam("types") List<MovementType> types,
@RequestParam("states") List<String> states) {

return ResponseEntity.ok(service.findForTuAndTypesAndStates(barcode, types, states));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2005-2023 the original author or authors.
* Copyright 2005-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/openwms/wms/movements/MovementService.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2005-2023 the original author or authors.
* Copyright 2005-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -102,5 +102,5 @@ public interface MovementService {
* @param states A list of states to consider
* @return A list of Movements, never {@literal null}
*/
@NotNull List<MovementVO> findForTuAndTypesAndStates(@NotBlank String barcode, @NotEmpty List<String> types, @NotEmpty List<String> states);
@NotNull List<MovementVO> findForTuAndTypesAndStates(@NotBlank String barcode, @NotEmpty List<MovementType> types, @NotEmpty List<String> states);
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2005-2023 the original author or authors.
* Copyright 2005-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2005-2023 the original author or authors.
* Copyright 2005-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2005-2023 the original author or authors.
* Copyright 2005-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2005-2023 the original author or authors.
* Copyright 2005-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2005-2023 the original author or authors.
* Copyright 2005-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit 511f21f

Please sign in to comment.