Skip to content

Add support for AlpineBits HotelData 2022-10 #127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
22be82a
Version bump to 3.0.0-SNAPSHOT
gappc May 24, 2024
8e3967f
Bump tomcat embed version to 9.0.89 (latest for java 8)
gappc May 24, 2024
cc0353d
Bump jackson version to 2.17.1 (latest for java 8)
gappc May 24, 2024
decc299
Bump hibernate version to 5.6.15.Final
gappc May 24, 2024
65b3d9a
Bump H2 database version to 2.2.224 (latest)
gappc May 25, 2024
a34fb83
Bump commons-fileupload version to commons-fileupload2 2.0.0-M1 (late…
gappc May 25, 2024
8bc2e84
Update libraries and dependencies for RNG parsing
gappc May 25, 2024
9495359
Bump testng version to 7.5.1 (latest for java 8)
gappc May 25, 2024
88394b5
Bump maven-failsafe-plugin version to 3.2.5 (latest)
gappc May 25, 2024
7f5fedb
Bump rest-assured version to 5.4.0 (latest)
gappc May 25, 2024
c418228
Bump org.slf4j version to 2.0.13 (latest)
gappc May 25, 2024
9763b10
Bump nexus-staging-maven-plugin version to 1.7.0 (latest)
gappc May 25, 2024
a61fa5b
Bump maven-gpg-plugin version to 3.2.4 (latest)
gappc May 25, 2024
5d1d1d0
Bump dependency-check-maven version to 9.2.0 (latest)
gappc May 25, 2024
ee21667
Add base support for AlpineBits HotelData 2022-10
gappc May 26, 2024
a9dd94d
Add validation for AlpineBits HotelData 2022-10 FreeRooms and Inventory
gappc May 27, 2024
cd54452
Move SPDX header to top of files
gappc May 28, 2024
67f7324
Delegate AlpineBits 2022-10 validation to 2020-10 implementation
gappc May 30, 2024
6d030ac
Remove TODOs as there is nothing to do for them
gappc May 30, 2024
935c33d
Add FreeRooms CompleteSet capability
gappc Jun 7, 2024
9f7fbde
Bump version to 3.0.0
gappc Jun 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions alpinebits-common/api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ SPDX-License-Identifier: CC0-1.0
<parent>
<groupId>it.bz.opendatahub.alpinebits</groupId>
<artifactId>alpinebits-common</artifactId>
<version>2.1.1</version>
<version>3.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>alpinebits-common-api</artifactId>
<version>2.1.1</version>
<version>3.0.0</version>

<name>AlpineBits common API</name>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
package it.bz.opendatahub.alpinebits.common.constants;

/**
* This class provides constants for all known AlpineBits actions for version 2020-10.
* This class provides constants for all known AlpineBits actions for version 2022-10.
*
* In the context of this class, "action" means the value of the request parameter called "action".
*/
Expand Down Expand Up @@ -75,6 +75,13 @@ public final class AlpineBitsAction {
*/
public static final String GUEST_REQUESTS_NOTIF_REPORT_GUEST_REQUESTS = "OTA_NotifReport:GuestRequests";

/**
* Value for "GuestRequests -&gt; write status update for GuestRequests" action request parameter.
*
* A a client sends status updates for a quote or booking requests to the server.
*/
public static final String GUEST_REQUESTS_WRITE_STATUS_UPDATE = "OTA_HotelResNotif:GuestRequests_StatusUpdate";

// Inventory

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
package it.bz.opendatahub.alpinebits.common.constants;

/**
* This class provides constants for all known AlpineBits capabilities for version 2020-10.
* This class provides constants for all known AlpineBits capabilities for version 2022-10.
*
* In the context of this class, "capability" means the values exchanged as capabilities during
* the Housekeeping -&gt; getCapabilities and Handshaking requests. They express, what the
Expand Down Expand Up @@ -118,6 +118,12 @@ public final class AlpineBitsCapability {
*/
public static final String FREE_ROOMS_HOTEL_INV_COUNT_NOTIF_ACCEPT_CLOSING_SEASONS = "OTA_HotelInvCountNotif_accept_closing_seasons";

/**
* For room availability notifications (FreeRooms), the actor handles complete set
* (FreeRooms from AlpineBits 2020-10 going on).
*/
public static final String FREE_ROOMS_HOTEL_INV_COUNT_NOTIF_ACCEPT_COMPLETE_SET = "OTA_HotelInvCountNotif_accept_complete_set";

// GuestRequests

/**
Expand All @@ -140,6 +146,11 @@ public final class AlpineBitsCapability {
/**
* For pushing GuestRequests, the actor accepts daily rates via RoomRates.
*/
public static final String GUEST_REQUESTS_WRITE_STATUS_UPDATE = "action_OTA_HotelResNotif_GuestRequests";

/**
* The actor implements the status update for quote requests (GuestRequests Push status update).
*/
public static final String GUEST_REQUESTS_WRITE_ACCEPT_ROOM_RATES = "OTA_HotelResNotif_GuestRequests_accept_RoomRates";

// Inventory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@

/**
* This class provides constants for all known
* AlpineBits versions (as of 2020-10).
* AlpineBits versions (as of 2022-10).
*/
public final class AlpineBitsVersion {

public static final String V_2022_10 = "2022-10";
public static final String V_2020_10 = "2020-10";
public static final String V_2018_10 = "2018-10";
public static final String V_2017_10 = "2017-10";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ public void testIsLegacyVersion_ShouldReturnFalseForAlpineBitsV_2020_10() {
assertFalse(AlpineBitsVersionChecker.isLegacyVersion(AlpineBitsVersion.V_2020_10));
}

@Test
public void testIsLegacyVersion_ShouldReturnFalseForAlpineBitsV_2022_10() {
assertFalse(AlpineBitsVersionChecker.isLegacyVersion(AlpineBitsVersion.V_2022_10));
}

@Test
public void testIsLegacyVersion_ShouldReturnFalseForUnknownVersion() {
assertFalse(AlpineBitsVersionChecker.isLegacyVersion("some version"));
Expand Down
4 changes: 2 additions & 2 deletions alpinebits-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ SPDX-License-Identifier: CC0-1.0
<parent>
<groupId>it.bz.opendatahub.alpinebits</groupId>
<artifactId>alpinebits-root</artifactId>
<version>2.1.1</version>
<version>3.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>alpinebits-common</artifactId>
<version>2.1.1</version>
<version>3.0.0</version>

<packaging>pom</packaging>
<name>AlpineBits common</name>
Expand Down
4 changes: 2 additions & 2 deletions alpinebits-common/utils/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ SPDX-License-Identifier: CC0-1.0
<parent>
<groupId>it.bz.opendatahub.alpinebits</groupId>
<artifactId>alpinebits-common</artifactId>
<version>2.1.1</version>
<version>3.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>alpinebits-common-utils</artifactId>
<version>2.1.1</version>
<version>3.0.0</version>

<name>AlpineBits common utils</name>

Expand Down
4 changes: 2 additions & 2 deletions alpinebits-db/api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ SPDX-License-Identifier: CC0-1.0
<parent>
<groupId>it.bz.opendatahub.alpinebits</groupId>
<artifactId>alpinebits-db</artifactId>
<version>2.1.1</version>
<version>3.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>alpinebits-db-api</artifactId>
<version>2.1.1</version>
<version>3.0.0</version>

<name>AlpineBits DB API</name>

Expand Down
8 changes: 4 additions & 4 deletions alpinebits-db/impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ SPDX-License-Identifier: CC0-1.0
<parent>
<groupId>it.bz.opendatahub.alpinebits</groupId>
<artifactId>alpinebits-db</artifactId>
<version>2.1.1</version>
<version>3.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>alpinebits-db-impl</artifactId>
<version>2.1.1</version>
<version>3.0.0</version>

<name>AlpineBits DB impl</name>

Expand All @@ -37,7 +37,7 @@ SPDX-License-Identifier: CC0-1.0
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.3.7.Final</version>
<version>5.6.15.Final</version>
</dependency>

<!-- testing -->
Expand Down Expand Up @@ -74,7 +74,7 @@ SPDX-License-Identifier: CC0-1.0
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.197</version>
<version>2.2.224</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ SPDX-License-Identifier: CC0-1.0
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>

<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>
<property name="javax.persistence.jdbc.driver" value="org.h2.Driver"/>
<property name="javax.persistence.jdbc.url" value="jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;MVCC=TRUE"/>
<property name="javax.persistence.jdbc.url" value="jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1"/>
<property name="javax.persistence.jdbc.user" value="sa"/>
<property name="javax.persistence.jdbc.password" value=""/>
<property name="hibernate.show_sql" value="true"/>
Expand Down
4 changes: 2 additions & 2 deletions alpinebits-db/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ SPDX-License-Identifier: CC0-1.0
<parent>
<groupId>it.bz.opendatahub.alpinebits</groupId>
<artifactId>alpinebits-root</artifactId>
<version>2.1.1</version>
<version>3.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>alpinebits-db</artifactId>
<version>2.1.1</version>
<version>3.0.0</version>

<packaging>pom</packaging>
<name>AlpineBits DB</name>
Expand Down
4 changes: 2 additions & 2 deletions alpinebits-handshaking/api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ SPDX-License-Identifier: CC0-1.0
<parent>
<groupId>it.bz.opendatahub.alpinebits</groupId>
<artifactId>alpinebits-handshaking</artifactId>
<version>2.1.1</version>
<version>3.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>alpinebits-handshaking-api</artifactId>
<version>2.1.1</version>
<version>3.0.0</version>

<name>AlpineBits handshaking API</name>

Expand Down
13 changes: 4 additions & 9 deletions alpinebits-handshaking/impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,15 @@ SPDX-License-Identifier: CC0-1.0
<parent>
<groupId>it.bz.opendatahub.alpinebits</groupId>
<artifactId>alpinebits-handshaking</artifactId>
<version>2.1.1</version>
<version>3.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>alpinebits-handshaking-impl</artifactId>
<version>2.1.1</version>
<version>3.0.0</version>

<name>AlpineBits handshaking impl</name>

<properties>
<jing.version>20091111</jing.version>
<xmlunit.version>2.6.2</xmlunit.version>
</properties>

<dependencies>
<dependency>
<groupId>it.bz.opendatahub.alpinebits</groupId>
Expand All @@ -44,15 +39,15 @@ SPDX-License-Identifier: CC0-1.0
<artifactId>alpinebits-xml-impl</artifactId>
<exclusions>
<exclusion>
<groupId>com.thaiopensource</groupId>
<groupId>org.relaxng</groupId>
<artifactId>jing</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson-databind.version}</version>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public void testHandleContext_InvokeHandshakingWithNoMatchingVersion() {
.post(this.base + "AlpineBits")
.then()
.statusCode(HttpServletResponse.SC_BAD_REQUEST)
.content(containsString("ERROR:unknown or missing action"));
.body(containsString("ERROR:unknown or missing action"));
}

@Test
Expand Down
4 changes: 2 additions & 2 deletions alpinebits-handshaking/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ SPDX-License-Identifier: CC0-1.0
<parent>
<groupId>it.bz.opendatahub.alpinebits</groupId>
<artifactId>alpinebits-root</artifactId>
<version>2.1.1</version>
<version>3.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>alpinebits-handshaking</artifactId>
<version>2.1.1</version>
<version>3.0.0</version>

<packaging>pom</packaging>
<name>AlpineBits handshaking</name>
Expand Down
4 changes: 2 additions & 2 deletions alpinebits-housekeeping/api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ SPDX-License-Identifier: CC0-1.0
<parent>
<groupId>it.bz.opendatahub.alpinebits</groupId>
<artifactId>alpinebits-housekeeping</artifactId>
<version>2.1.1</version>
<version>3.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>alpinebits-housekeeping-api</artifactId>
<version>2.1.1</version>
<version>3.0.0</version>

<name>AlpineBits housekeeping API</name>

Expand Down
4 changes: 2 additions & 2 deletions alpinebits-housekeeping/impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ SPDX-License-Identifier: CC0-1.0
<parent>
<groupId>it.bz.opendatahub.alpinebits</groupId>
<artifactId>alpinebits-housekeeping</artifactId>
<version>2.1.1</version>
<version>3.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>alpinebits-housekeeping-impl</artifactId>
<version>2.1.1</version>
<version>3.0.0</version>

<name>AlpineBits housekeeping impl</name>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public void testHandleContext_InvokeGetCapabilititesWithNotMatchingVersion() {
.then()
.statusCode(HttpServletResponse.SC_BAD_REQUEST)
.header(ContentTypeHintMiddleware.RESPONSE_CONTENT_TYPE_HEADER, HttpContentTypeHeaderValues.TEXT_PLAIN)
.content(containsString("ERROR"));
.body(containsString("ERROR"));
}

@Test
Expand All @@ -87,7 +87,7 @@ public void testHandleContext_InvokeGetCapabilititesWithVersionMatch() {
.then()
.statusCode(HttpServletResponse.SC_OK)
.header(ContentTypeHintMiddleware.RESPONSE_CONTENT_TYPE_HEADER, HttpContentTypeHeaderValues.TEXT_PLAIN)
.content(
.body(
containsString(AlpineBitsCapability.GET_VERSION),
containsString(AlpineBitsCapability.GET_CAPABILITIES));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public void testHandleContext_InvokeGetVersionWithNotMatchingVersion() {
.then()
.statusCode(HttpServletResponse.SC_BAD_REQUEST)
.header(ContentTypeHintMiddleware.RESPONSE_CONTENT_TYPE_HEADER, HttpContentTypeHeaderValues.TEXT_PLAIN)
.content(containsString("ERROR:unknown or missing action"));
.body(containsString("ERROR:unknown or missing action"));
}


Expand All @@ -90,7 +90,7 @@ public void testHandleContext_InvokeGetVersionWithVersionMatch() {
.then()
.statusCode(HttpServletResponse.SC_OK)
.header(ContentTypeHintMiddleware.RESPONSE_CONTENT_TYPE_HEADER, HttpContentTypeHeaderValues.TEXT_PLAIN)
.content(containsString(RouterMiddlewareBuilder.DEFAULT_VERSION));
.body(containsString(RouterMiddlewareBuilder.DEFAULT_VERSION));
}

}
4 changes: 2 additions & 2 deletions alpinebits-housekeeping/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ SPDX-License-Identifier: CC0-1.0
<parent>
<groupId>it.bz.opendatahub.alpinebits</groupId>
<artifactId>alpinebits-root</artifactId>
<version>2.1.1</version>
<version>3.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>alpinebits-housekeeping</artifactId>
<version>2.1.1</version>
<version>3.0.0</version>
<packaging>pom</packaging>
<name>AlpineBits housekeeping</name>

Expand Down
4 changes: 2 additions & 2 deletions alpinebits-middleware/api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ SPDX-License-Identifier: CC0-1.0
<parent>
<groupId>it.bz.opendatahub.alpinebits</groupId>
<artifactId>alpinebits-middleware</artifactId>
<version>2.1.1</version>
<version>3.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>alpinebits-middleware-api</artifactId>
<version>2.1.1</version>
<version>3.0.0</version>

<name>AlpineBits middleware API</name>

Expand Down
4 changes: 2 additions & 2 deletions alpinebits-middleware/impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ SPDX-License-Identifier: CC0-1.0
<parent>
<groupId>it.bz.opendatahub.alpinebits</groupId>
<artifactId>alpinebits-middleware</artifactId>
<version>2.1.1</version>
<version>3.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>alpinebits-middleware-impl</artifactId>
<version>2.1.1</version>
<version>3.0.0</version>

<name>AlpineBits middleware impl</name>

Expand Down
Loading