1
2
3 package com.pnpconsult.zeiterfassung.actions.user;
4
5 import org.apache.commons.logging.Log;
6 import org.apache.commons.logging.LogFactory;
7 import org.apache.struts.action.ActionForm;
8
9 import com.pnpconsult.zeiterfassung.helper.EntryManager;
10 import com.pnpconsult.zeiterfassung.model.UserEntry;
11
12 /***
13 * @author <a href="mailto:powerpete@users.sf.net">M. Petersen</a>
14 * @version $Id: DeleteForm.java,v 1.4 2004/06/24 20:54:20 powerpete Exp $
15 *
16 * @struts.form name="deleteForm"
17 */
18 public class DeleteForm extends ActionForm
19 {
20 private static final Log LOG = LogFactory.getLog(DeleteForm.class);
21 private long entryId;
22 private String description;
23 private String submit;
24
25 public String getDescription()
26 {
27 return description;
28 }
29
30 public long getEntryId()
31 {
32 return entryId;
33 }
34
35 public void setEntryId(long entryId)
36 {
37 this.entryId = entryId;
38 try
39 {
40 UserEntry entry = new EntryManager().load(entryId);
41 description =
42 entry.getProject()
43 + " "
44 + entry.getActivity()
45 + " "
46 + entry.getHours()
47 + " Stunden";
48 }
49 catch (Exception e)
50 {
51 LOG.fatal("Error while building description.", e);
52 }
53 }
54
55 public String getSubmit()
56 {
57 return submit;
58 }
59
60 public void setSubmit(String submit)
61 {
62 this.submit = submit;
63 }
64 }