01: /*
02: *
03: * (c) Copyright 2004 - 2007 osbl development team.
04: *
05: * This file is part of the osbl (http://osbl.wilken.de).
06: *
07: * the osbl is free software; you can redistribute it and/or modify
08: * it under the terms of the GNU General Public License
09: * as published by the Free Software Foundation; either version 2.1
10: * of the License, or (at your option) any later version.
11: *
12: * Please see COPYING for the complete licence.
13: */
14: package org.osbl.demo.urlaub.process;
15:
16: import org.osbl.demo.urlaub.model.UrlaubsAntrag;
17: import org.osbl.demo.urlaub.service.GroupWare;
18: import org.concern.controller.AbstractSynchronousActivity;
19: import org.concern.controller.ActivityExecutionException;
20:
21: import java.sql.Timestamp;
22:
23: public class Eintragen extends
24: AbstractSynchronousActivity<UrlaubsAntrag> {
25: GroupWare groupWare;
26:
27: public void setGroupWare(GroupWare groupWare) {
28: this .groupWare = groupWare;
29: }
30:
31: public void execute(UrlaubsAntrag subject)
32: throws ActivityExecutionException {
33: /*PROTECTED REGION ID(org.osbl.demo.urlaub.process.Eintragen.execute) ENABLED START*/
34: groupWare.addEvent(0, subject.getCreatedBy(), subject
35: .getVonDatum(), subject.getBisDatum());
36: subject
37: .setEingetragen(new Timestamp(System
38: .currentTimeMillis()));
39: /*PROTECTED REGION END*/
40: }
41: }
|