01: /*
02: * This file is part of the WfMOpen project.
03: * Copyright (C) 2001-2006 Danet GmbH (www.danet.de), BU BTS.
04: * All rights reserved.
05: *
06: * This program is free software; you can redistribute it and/or modify
07: * it under the terms of the GNU General Public License as published by
08: * the Free Software Foundation; either version 2 of the License, or
09: * (at your option) any later version.
10: *
11: * This program is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14: * GNU General Public License for more details.
15: *
16: * You should have received a copy of the GNU General Public License
17: * along with this program; if not, write to the Free Software
18: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19: *
20: * $Id: DefaultProcessClosedAuditEvent.java,v 1.1 2007/01/26 14:38:11 drmlipp Exp $
21: *
22: * $Log: DefaultProcessClosedAuditEvent.java,v $
23: * Revision 1.1 2007/01/26 14:38:11 drmlipp
24: * Minor updated to process close event delivery.
25: *
26: * Revision 1.1 2007/01/25 16:04:35 drmlipp
27: * Added.
28: *
29: */
30: package de.danet.an.workflow.domain;
31:
32: import de.danet.an.workflow.api.ProcessClosedAuditEvent;
33: import de.danet.an.workflow.omgcore.ProcessData;
34: import de.danet.an.workflow.omgcore.WfAuditEvent;
35:
36: /**
37: * This class provides a specific state audit event for closing a
38: * process.
39: *
40: * @author Michael Lipp
41: *
42: */
43: public class DefaultProcessClosedAuditEvent extends
44: DefaultStateAuditEvent implements ProcessClosedAuditEvent {
45:
46: private ProcessData result = null;
47:
48: /**
49: * Create a new instance with all attributes initialized
50: * to defaults or the given values.
51: *
52: * @param baseInfo
53: * @param oldState
54: * @param newState
55: * @throws IllegalArgumentException
56: */
57: public DefaultProcessClosedAuditEvent(WfAuditEvent baseInfo,
58: String oldState, String newState, ProcessData result)
59: throws IllegalArgumentException {
60: super (baseInfo, oldState, newState);
61: this .result = result;
62: }
63:
64: /**
65: * Creates a new <code>ProcessClosedAuditEvent</code> with the
66: * given source and all other attributes copied from the given
67: * event.
68: * @param source the value for the source attribute.
69: * @param baseInfo a <code>DefaultProcessClosedAuditEvent</code>
70: * containing further information for the event.
71: */
72: private DefaultProcessClosedAuditEvent(Object source,
73: DefaultProcessClosedAuditEvent baseInfo) {
74: super (source, baseInfo);
75: // specialized attributes
76: result = baseInfo.result;
77: }
78:
79: /**
80: * Return a new audit event object with the source attribute
81: * replaced with the given object.
82: * @param source the new source attribute.
83: * @return the new audit event.
84: */
85: public DefaultAuditEvent replaceSource(Object source) {
86: return new DefaultProcessClosedAuditEvent(source, this );
87: }
88:
89: /* (non-Javadoc)
90: * @see de.danet.an.workflow.domain.PCA#getResult()
91: */
92: public ProcessData result() {
93: return result;
94: }
95: }
|