Giter VIP home page Giter VIP logo

distsys_hotelroomreservation's Introduction

DistSys_HotelRoomReservation_Server

Server for the Hotel Room Reservation program.

Setup everything for REST: https://www.jetbrains.com/help/idea/creating-and-running-your-first-restful-web-service.html

If the glassfish server is setup correctly, the service should be available under http://localhost:8080/DistSys_HotelRoomReservation_war_exploded/

API Docu:

GET /hotelrooms - list of all hotelrooms

GET /hotelrooms/{id} - hotelroom with ID

GET /roomtypes - list of all roomtypes

GET /roomtypes/{id} - roomtype with ID

POST /roomtypes - creates a roomtype and returns the new ID from the db uses communication.AdminRequest (password is currently "admin"), eg:

{
    "password": "admin",
    "typeId": 2,
    "numberOfRooms": 2,
    "price": 5.7,
    "name": "presidential"
}

DELETE /roomtypes/{id} - delete a roomtype with ID uses the AdminRequest only to check the credentials

PUT /roomtypes/{id} - update a roomtype with ID uses the AdminRequest

POST /roomtypes/booking - (try to) book a roomtype uses communication.BookingRequest, eg:

{
    "typeId": 2,
    "startDate": "2018-06-05T13:27",
    "endDate": "2018-06-05T13:27",
    "firstName": "peter",
    "lastName": "Bauer"
}

POST /roomtypes/checkavailability - checks if a room of the given type is available uses communication.AvailabilityRequest and communication.AvailabilityResponse

Appendix: Tomcat 8.0 Setup and deployment of Project

Download Tomcat from here, then install it: https://tomcat.apache.org/download-80.cgi

Consult this guide for adding users to Tomcat: https://tomcat.apache.org/tomcat-8.0-doc/manager-howto.html#Configuring_Manager_Application_Access

How to deploy a .WAR-File (Generation in IntelliJ: Build>Build Artifacts): Open the Manager in the Tomcat web interface, then Select WAR file to upload and press deploy.

distsys_hotelroomreservation's People

Contributors

alexx882 avatar anress avatar stubingerm avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.