Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gjbianco/jboss-elock
This is a simple test project using JAX-RS and Hibernate 4.
https://github.com/gjbianco/jboss-elock
Last synced: about 1 month ago
JSON representation
This is a simple test project using JAX-RS and Hibernate 4.
- Host: GitHub
- URL: https://github.com/gjbianco/jboss-elock
- Owner: gjbianco
- Created: 2014-01-20T20:58:42.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-02-11T18:55:24.000Z (almost 11 years ago)
- Last Synced: 2024-12-09T12:57:38.926Z (about 1 month ago)
- Language: Java
- Homepage:
- Size: 630 KB
- Stars: 0
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
jboss-elock: Web Service Permission-based Door Locking
========================
Author: Guy Bianco
Technologies: CDI, JPA, EJB, JAX-RS, Arquillian, Hibernate
Target Product: EAPWhat is it?
-----------This is a simple test project using JAX-RS and Hibernate 4.
The goal of this project is to provide a RESTful web service that checks door lock permissions on a user against required door access permissions stored on a database. The user must be entered into the system as well (unless requisite door permission == 0; see below).
In order for the user to be given access to the door, they must have a (non-expired) card registered for the proper permission (or higher) of that door. E.g. to open a door with required permission of 2, the user must own a card whose expiration is no earlier than the current date and the card must have a permission >= 2.
Users can own multiple cards. This allows for temporary priveleged access without having to issue 2 new cards. E.g. the user has card X with permission level 2, which expires in a year; the user is issued card Y with permission level 3, which expires in six months. The user can access level 3 doors for that time without needing a new card in six months (the level 3 card just expires).
Permissions:
0 - anyone (no user or card required)
1 - any user (must have user and card registered)
2 - employee
3 - maintenance
4 - adminTesting the Application
------------------------------------Tests are implemented in Arquillian.
You can run the tests using Eclipse or by calling Maven directly. Suggested command:
`mvn test -Parquillian-jbossas-remote -Dtest=[test-name]`
Current potential test names:
* UserDaoTest
* CardDaoTest
* DoorDaoTest