-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from elhajuojy/AIR-1-etq-client-je-veux-accede…
…r-a-la-page-daccueil Air 1 etq client je veux acceder a la page daccueil
- Loading branch information
Showing
37 changed files
with
1,361 additions
and
235 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
119 changes: 0 additions & 119 deletions
119
src/main/java/ma/yc/airafraik/CustomPresistenceUnitInfo.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package ma.yc.airafraik; | ||
|
||
public class LibertyConfiguration { | ||
//something todo here | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package ma.yc.airafraik.entities; | ||
|
||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.Id; | ||
|
||
@Entity | ||
public class AvionEntity { | ||
@Id | ||
private int idAvion; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/main/java/ma/yc/airafraik/service/SearchVolsService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package ma.yc.airafraik.service; | ||
|
||
import ma.yc.airafraik.entities.ReservationEntity; | ||
import ma.yc.airafraik.entities.VolEntity; | ||
|
||
import java.util.Collection; | ||
|
||
public interface SearchVolsService { | ||
|
||
|
||
public Collection<VolEntity> searchVols(String villeDepart, String villeArrivee, String dateDepart, String dateArrivee, String nombrePassagers); | ||
|
||
VolEntity searchVolParId(String id); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
src/main/java/ma/yc/airafraik/service/impl/SearchVolsServiceImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package ma.yc.airafraik.service.impl; | ||
|
||
import ma.yc.airafraik.dao.Impl.VolDaoImpl; | ||
import ma.yc.airafraik.dao.VolDao; | ||
import ma.yc.airafraik.entities.ReservationEntity; | ||
import ma.yc.airafraik.entities.VolEntity; | ||
|
||
import java.util.ArrayList; | ||
import java.util.Collection; | ||
import java.util.HashMap; | ||
|
||
public class SearchVolsServiceImpl implements ma.yc.airafraik.service.SearchVolsService{ | ||
|
||
private VolDao volDao ; | ||
|
||
public SearchVolsServiceImpl() { | ||
this.volDao = new VolDaoImpl(); | ||
} | ||
|
||
@Override | ||
public Collection<VolEntity> searchVols(String villeDepart, String villeArrivee, String dateDepart, String dateArrivee, String nombrePassagers) { | ||
//TODO : implement searchVols BY FILTERING THE DATA FROM THE CONTROLLER AND RETURNING THE RESULT FROM THE DAO | ||
HashMap<String,String> conditions = new HashMap<>(); | ||
conditions.put("villeDepart",villeDepart); | ||
// conditions.put("villeArrivee",villeArrivee); | ||
// conditions.put("dateDepart",dateDepart); | ||
// conditions.put("dateArrive",dateArrivee); | ||
// conditions.put("nombrePassagers",nombrePassagers); | ||
|
||
return this.volDao.consulterVols(conditions); | ||
} | ||
|
||
@Override | ||
public VolEntity searchVolParId(String id) { | ||
if (id == null) return null; | ||
VolEntity vol = this.volDao.consulterVol(id); | ||
|
||
|
||
return vol; | ||
|
||
|
||
} | ||
} |
59 changes: 59 additions & 0 deletions
59
src/main/java/ma/yc/airafraik/web/Admin/DashboardController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
package ma.yc.airafraik.web.Admin; | ||
|
||
import jakarta.servlet.ServletException; | ||
import jakarta.servlet.annotation.WebServlet; | ||
import jakarta.servlet.http.HttpServlet; | ||
import jakarta.servlet.http.HttpServletRequest; | ||
import jakarta.servlet.http.HttpServletResponse; | ||
import ma.yc.airafraik.dto.Account; | ||
import ma.yc.airafraik.service.AccountService; | ||
import ma.yc.airafraik.service.impl.AccountAdminServiceImpl; | ||
|
||
import java.io.IOException; | ||
|
||
@WebServlet(name = "DashboardController", value = "/admin-dashboard") | ||
public class DashboardController extends HttpServlet { | ||
|
||
private AccountService accountService ; | ||
|
||
@Override | ||
public void init() throws ServletException { | ||
this.accountService = new AccountAdminServiceImpl(); | ||
} | ||
|
||
@Override | ||
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { | ||
req.getRequestDispatcher("views/admin/dashboard.jsp").forward(req,resp); | ||
|
||
} | ||
|
||
@Override | ||
protected void doHead(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { | ||
super.doHead(req, resp); | ||
} | ||
|
||
@Override | ||
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { | ||
super.doPost(req, resp); | ||
} | ||
|
||
@Override | ||
protected void doPut(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { | ||
super.doPut(req, resp); | ||
} | ||
|
||
@Override | ||
protected void doDelete(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { | ||
super.doDelete(req, resp); | ||
} | ||
|
||
@Override | ||
protected void doOptions(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { | ||
super.doOptions(req, resp); | ||
} | ||
|
||
@Override | ||
public void destroy() { | ||
super.destroy(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.