KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jbpm > graph > log > TransitionLog


1 package org.jbpm.graph.log;
2
3 import org.jbpm.graph.def.*;
4 import org.jbpm.logging.log.*;
5
6 public class TransitionLog extends CompositeLog {
7
8   private static final long serialVersionUID = 1L;
9   
10   protected Transition transition = null;
11   protected Node sourceNode = null;
12   protected Node destinationNode = null;
13
14   public TransitionLog() {
15   }
16
17   public TransitionLog(Transition transition, Node source) {
18     this.transition = transition;
19     this.sourceNode = source;
20   }
21
22   public Node getDestinationNode() {
23     return destinationNode;
24   }
25   public void setDestinationNode(Node destination) {
26     this.destinationNode = destination;
27   }
28   public Node getSourceNode() {
29     return sourceNode;
30   }
31   public Transition getTransition() {
32     return transition;
33   }
34
35   public String JavaDoc toString() {
36     String JavaDoc from = (sourceNode!=null ? sourceNode.getName() : "unnamed-node");
37     String JavaDoc to = (destinationNode!=null ? destinationNode.getName() : "unnamed-node");
38     return "transition["+from+"-->"+to+"]";
39   }
40 }
41
Popular Tags