- From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
- Date: Mon, 21 Sep 2009 13:16:56 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn
In directory hutz:/tmp/cvs-serv10002/src/org/w3c/unicorn
Modified Files:
UnicornCall.java
Log Message:
refactored the checkCond(TLTIF) function. TLTIf implements a check(UnicornCall) method
Index: UnicornCall.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/UnicornCall.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- UnicornCall.java 21 Sep 2009 12:21:56 -0000 1.20
+++ UnicornCall.java 21 Sep 2009 13:16:54 -0000 1.21
@@ -82,7 +82,7 @@
*
* @throws Exception
*/
- public void doTask() throws UnicornException, Exception {
+ public void doTask() throws UnicornException {
logger.trace("doTask.");
logger.debug("String task id : " + aTask.getID() + ".");
logger.debug("EnumInputMethod : " + inputParameter.getInputMethod() + ".");
@@ -109,14 +109,14 @@
* @throws Exception
* raised from generateRequestList and doRequest
*/
- private void doNode(InputParameter inputParameter, TLTNode node) throws UnicornException, Exception {
+ private void doNode(InputParameter inputParameter, TLTNode node) throws UnicornException {
if (node != null) {
RequestList aRequestList = generateRequestList(inputParameter, mapOfStringParameter, node);
// send requests to observer
doRequests(aRequestList);
// browse the conditions to do the connection
for (TLTIf iF : node.getIfList()) {
- if (checkCond(iF)) {
+ if (iF.check(this)) {// checkCond(iF)) {
doNode(inputParameter, iF.getIfOk());
} else {
doNode(inputParameter, iF.getIfNotOk());
@@ -124,29 +124,6 @@
}
}
}
-
- /**
- * Check the conditions of the if branch it makes a OR between all
- * conditions
- *
- * @param ifs
- * the if branch to check
- * @return whether or not the conditions are true
- * @throws Exception
- */
- private boolean checkCond(TLTIf ifs) throws Exception {
- logger.trace("checkCond.");
- logger.debug("If node : " + ifs + ".");
-
- boolean conditionOK = false;
- for (TLTCond cond : ifs.getCondArray()) {
- if (cond.check(this)) {
- conditionOK = true;
- }
- }
- return conditionOK;
- }
-
/**
* Generate the list of the request for the call
Received on Monday, 21 September 2009 13:17:05 UTC