01: /**
02: * This file is part of the WfMOpen project.
03: * Copyright (C) 2001-2005 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: InternalTransitionDefinition.java,v 1.4 2007/05/03 21:58:15 mlipp Exp $
21: *
22: * $Log: InternalTransitionDefinition.java,v $
23: * Revision 1.4 2007/05/03 21:58:15 mlipp
24: * Internal refactoring for making better use of local EJBs.
25: *
26: * Revision 1.3 2006/09/29 12:32:10 drmlipp
27: * Consistently using WfMOpen as projct name now.
28: *
29: * Revision 1.2 2005/10/10 20:02:12 mlipp
30: * Synchronized with 1.3.3.
31: *
32: * Revision 1.1.2.2 2005/10/07 14:32:03 drmlipp
33: * Added persistence for InternalTransitionDefinition.
34: *
35: * Revision 1.1.2.1 2005/10/06 14:56:59 drmlipp
36: * Started improved transition evaluation.
37: *
38: */package de.danet.an.workflow.ejbs.core;
39:
40: import de.danet.an.workflow.domain.TransitionDefinitionLocal;
41: import de.danet.an.workflow.internalapi.ExtTransitionLocal;
42: import de.danet.an.workflow.localapi.ActivityLocal;
43:
44: /**
45: * The internal representation of the transition adds some methods.
46: */
47: public class InternalTransitionDefinition extends
48: TransitionDefinitionLocal implements ExtTransitionLocal {
49:
50: private WfProcessEJB container;
51: private boolean pendingToken;
52:
53: /*
54: * Default constructor.
55: * @param container the containing process
56: * @param pid id of the process
57: * @param tid id of the transition
58: * @param group id of the transition group
59: * @param order the transition's order
60: * @param from source activity
61: * @param to destination activity
62: * @param condType type of condition
63: * @param condition condition of this transition
64: * @param indicated that the transition has a pending token
65: */
66: public InternalTransitionDefinition(WfProcessEJB container,
67: String pid, String tid, String group, int order,
68: ActivityLocal from, ActivityLocal to, int condType,
69: String condition, boolean pendingToken) {
70: super (pid, tid, group, order, from, to, condType, condition);
71: this .container = container;
72: this .pendingToken = pendingToken;
73: }
74:
75: /* (non-Javadoc)
76: * @see de.danet.an.workflow.apix.ExtTransition#hasPendingToken()
77: */
78: public boolean hasPendingToken() {
79: return pendingToken;
80: }
81:
82: /* (non-Javadoc)
83: * @see de.danet.an.workflow.apix.ExtTransition#setPendingToken(boolean)
84: */
85: public void setPendingToken(boolean value) {
86: if (pendingToken != value) {
87: pendingToken = value;
88: container.transitionUpdated(this );
89: }
90: }
91:
92: /**
93: * @return string represantation of the transition
94: */
95: public String toString() {
96: return "InternalTransition[" + super .toString()
97: + ",pendingToken=" + pendingToken + "]";
98: }
99: }
|