buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/taskdefs/SignalTask.java
equal
deleted
inserted
replaced
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 package com.nokia.helium.signal.ant.taskdefs; |
18 package com.nokia.helium.signal.ant.taskdefs; |
19 |
19 |
|
20 import java.util.Vector; |
|
21 |
20 import org.apache.tools.ant.BuildException; |
22 import org.apache.tools.ant.BuildException; |
|
23 import org.apache.tools.ant.Target; |
21 import org.apache.tools.ant.Task; |
24 import org.apache.tools.ant.Task; |
22 import org.apache.tools.ant.Target; |
25 |
23 import java.util.Vector; |
|
24 import com.nokia.helium.signal.ant.SignalList; |
26 import com.nokia.helium.signal.ant.SignalList; |
25 import com.nokia.helium.signal.ant.types.SignalNotifierInput; |
27 import com.nokia.helium.signal.ant.types.SignalNotifierInput; |
26 |
28 |
27 /** |
29 /** |
28 * This task provide a way to raise a signal. |
30 * This task provide a way to raise a signal. |
113 this.result = new Integer(result); |
115 this.result = new Integer(result); |
114 } |
116 } |
115 |
117 |
116 @Override |
118 @Override |
117 public void execute() { |
119 public void execute() { |
118 if (name == null) |
120 if (name == null) { |
119 throw new BuildException("'name' attribute is not defined."); |
121 throw new BuildException("'name' attribute is not defined."); |
|
122 } |
120 if (result == null) { |
123 if (result == null) { |
121 result = new Integer(0); |
124 result = new Integer(0); |
122 } |
125 } |
123 |
126 |
124 SignalList signalList = new SignalList(getProject()); |
127 SignalList signalList = new SignalList(getProject()); |
146 if (signalNotifierInputs.isEmpty()) { |
149 if (signalNotifierInputs.isEmpty()) { |
147 Object config = getProject().getReference(name); |
150 Object config = getProject().getReference(name); |
148 if (config == null) { |
151 if (config == null) { |
149 throw new BuildException("Could not find signal config for signal name: " + name); |
152 throw new BuildException("Could not find signal config for signal name: " + name); |
150 } |
153 } |
151 signalList.sendSignal(getName(), result.intValue() != 0); |
154 signalList.processForSignal(getProject(), this.getSignalNotifierInput(), this.name, |
|
155 this.getOwningTarget().getName(), message, result.intValue() != 0); |
|
156 |
152 if (result.intValue() != 0) { |
157 if (result.intValue() != 0) { |
153 // keep same message as earlier. |
158 // keep same message as earlier. |
154 log(name |
159 log(name |
155 + ": " |
160 + ": " |
156 + name |
161 + name |