W3C home > Mailing lists > Public > www-validator-cvs@w3.org > August 2008

2006/unicorn/org/w3c/unicorn/tasklisttree TLTNode.java,1.3,1.4 TLTExec.java,1.2,1.3 TLTCond.java,1.2,1.3

From: Florent Batard via cvs-syncmail <cvsmail@w3.org>
Date: Thu, 21 Aug 2008 08:38:30 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1KW5gc-0004G2-Gs@lionel-hutz.w3.org>

Update of /sources/public/2006/unicorn/org/w3c/unicorn/tasklisttree
In directory hutz:/tmp/cvs-serv16330/org/w3c/unicorn/tasklisttree

Modified Files:
	TLTNode.java TLTExec.java TLTCond.java 
Log Message:
Update the tasklistTree to fill it withthe instance of the Observer instead of a String for its name

Index: TLTNode.java
===================================================================
RCS file: /sources/public/2006/unicorn/org/w3c/unicorn/tasklisttree/TLTNode.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- TLTNode.java	31 Jul 2008 08:44:25 -0000	1.3
+++ TLTNode.java	21 Aug 2008 08:38:28 -0000	1.4
@@ -106,7 +106,7 @@
 	}
 
 	public String toString(){
-		String res=new String("TLTNode ");
+		String res=new String("TLTNode level"+this.level+" ");
 			for(TLTIf conds : this.ifList)
 				res+=conds.toString();
 			for(TLTExec exec : this.executionList)

Index: TLTCond.java
===================================================================
RCS file: /sources/public/2006/unicorn/org/w3c/unicorn/tasklisttree/TLTCond.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- TLTCond.java	22 Jul 2008 12:21:24 -0000	1.2
+++ TLTCond.java	21 Aug 2008 08:38:28 -0000	1.3
@@ -3,6 +3,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.w3.unicorn.tasklist.TUi.Enum;
+import org.w3c.unicorn.contract.Observer;
 
 /**
  * Class made to manage the XML type condType of the tasklist.
@@ -15,7 +16,7 @@
 public class TLTCond {
 	
 	private String id;
-	private String observer;
+	private Observer observer;
 	private EnumCondType type; 
 	private boolean result;
 	private String value;
@@ -28,7 +29,7 @@
 	 * @param observer The name of the observer corresponding to the condition
 	 * @param type The type of the condition
 	 */
-	public TLTCond(String id, String observer, EnumCondType type, String value) {
+	public TLTCond(String id, Observer observer, EnumCondType type, String value) {
 		TLTCond.logger.trace("Constructor");
 		TLTCond.logger.trace("Id : " + id);
 		TLTCond.logger.trace("Observer : " + observer);
@@ -59,7 +60,7 @@
 	 * 
 	 * @param observer The observer the condition depends on
 	 */
-	public void setObserver(String observer) {
+	public void setObserver(Observer observer) {
 		TLTCond.logger.trace("setObserver : " + observer);
 		this.observer = observer;
 	}
@@ -114,7 +115,7 @@
 	 * 
 	 * @return The observer the condition depends on
 	 */
-	public String getObserver() {
+	public Observer getObserver() {
 		TLTCond.logger.trace("getObserver");
 		return observer;
 	}

Index: TLTExec.java
===================================================================
RCS file: /sources/public/2006/unicorn/org/w3c/unicorn/tasklisttree/TLTExec.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- TLTExec.java	22 Jul 2008 12:21:24 -0000	1.2
+++ TLTExec.java	21 Aug 2008 08:38:28 -0000	1.3
@@ -5,6 +5,7 @@
 
 import org.w3.unicorn.tasklist.ParamType;
 import org.w3.unicorn.tasklist.ValueType;
+import org.w3c.unicorn.contract.Observer;
 
 /**
  * Class made to manage the XML type execType of the tasklist.
@@ -20,6 +21,7 @@
 	private String value;
 	private String type;
 	private ParamType param;
+	private Observer observer;
 	private static final Log logger = LogFactory.getLog("org.w3c.unicorn.tasklisttree");
 	
 	/**
@@ -28,18 +30,38 @@
 	 * @param value The observer to run
 	 * @param param The parameter of the exec
 	 */
-	public TLTExec(String id, String value,String type, ParamType param) {
+	public TLTExec(String id,Observer obs, String value,String type, ParamType param) {
 		TLTExec.logger.trace("Constructor");
 		TLTExec.logger.trace("Id : " + id);
 		TLTExec.logger.trace("Type : " + type);
 		TLTExec.logger.trace("Value : " + value);
 		TLTExec.logger.trace("Param : " + param);
+		TLTExec.logger.trace("Observer : " + observer.getID());
 		this.id = id;
 		this.value = value;
 		this.type=type;
 		this.param = param;
+		this.observer=obs;
+	}
+	
+	/**
+	 * 
+	 * @param id The id of the exec
+	 */
+	public void setObserver(Observer obs) {
+		TLTExec.logger.trace("setObserver : " + obs.getID());
+		this.observer = obs;
+	}
+	
+	/**
+	 * 
+	 */
+	public Observer getObserver() {
+		TLTExec.logger.trace("getObserver");
+		return this.observer;
 	}
 	
+	
 	/**
 	 * 
 	 * @param id The id of the exec
Received on Thursday, 21 August 2008 08:39:05 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:17:33 UTC