1 package de.tivsource.page.user.actions.sitemap;
2
3 import java.util.List;
4
5 import org.apache.logging.log4j.LogManager;
6 import org.apache.logging.log4j.Logger;
7 import org.apache.struts2.convention.annotation.Action;
8 import org.apache.struts2.convention.annotation.Actions;
9 import org.apache.struts2.convention.annotation.Result;
10
11 import de.tivsource.ejb3plugin.InjectEJB;
12 import de.tivsource.page.dao.appointment.AppointmentDaoLocal;
13 import de.tivsource.page.entity.appointment.Appointment;
14 import de.tivsource.page.user.actions.EmptyAction;
15
16
17
18
19
20
21 public class AppointmentArchiveAction extends EmptyAction {
22
23
24
25
26 private static final long serialVersionUID = 1210938078282517352L;
27
28
29
30
31 private static final Logger LOGGER = LogManager.getLogger(AppointmentArchiveAction.class);
32
33 @InjectEJB(name="AppointmentDao")
34 private AppointmentDaoLocal appointmentDaoLocal;
35
36 @Override
37 @Actions({
38 @Action(value = "appointmentArchive", results = {
39 @Result(name = "success", type = "tiles", location = "sitemapAppointmentArchive")
40 })
41 })
42 public String execute() throws Exception {
43 LOGGER.info("execute() aufgerufen.");
44
45
46 this.getLanguageFromActionContext();
47
48 return SUCCESS;
49 }
50
51 public List<Appointment> getAppointments() {
52 return appointmentDaoLocal.findAllArchiveVisible(0, appointmentDaoLocal.countAllArchiveVisible());
53 }
54
55 }