Skip to content

Commit

Permalink
Merge pull request #127 from gappc/feature-127-implement-2022-10
Browse files Browse the repository at this point in the history
Add support for AlpineBits HotelData 2022-10
  • Loading branch information
RudiThoeni authored Jun 10, 2024
2 parents 0aedbf1 + 9f7fbde commit fbbaddc
Show file tree
Hide file tree
Showing 230 changed files with 27,069 additions and 215 deletions.
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

0 comments on commit fbbaddc

Please sign in to comment.