package com.systemincloud.modeler.upgrade.v0_5_2.to.v0_5_3;

import java.io.File;

import javax.xml.transform.TransformerException;

import com.systemincloud.ext.vip.modeler.upgrade.v0_3_3.to.v0_3_4.VipExecute;
import com.systemincloud.modeler.upgrade.common.AbstractExecute;

public class Execute extends AbstractExecute {

	@Override
	public boolean execute(File file) {
		String xml;
		try {
			xml = readFile(file);
			xml = super.executeOnSic(xml);

			xml = updateTaskVerConsole(xml, "0.1.4");
			
			xml = new VipExecute().executeOnFile(xml);
			//
			//
			//
			super.writeFile(file, xml);
		} catch (Exception e) { return false; }
		return true;
	}

	@Override
	public boolean execute(String root) {
		return super.executeOnRoot(root);
	}

	@Override
	protected String executeOnPom(String pom) throws TransformerException {
		return pom;
	}

	@Override
	protected String getVersion() {
		return "0.5.3";
	}
}

@@ -447,17 +447,16 @@
 c(xml);%0A
-%0A
 %09%09%09xml =
@@ -476,16 +476,24 @@
 rConsole
+        
 (xml, %220
@@ -500,16 +500,599 @@
 .1.4%22);%0A
+%09%09%09xml = updateTaskVerConstant       (xml, %220.2.3%22);%0A%09%09%09xml = updateTaskVerDemux          (xml, %220.1.2%22);%0A%09%09%09xml = updateTaskVerEmbeddedTask   (xml, %220.2.3%22);%0A%09%09%09xml = updateTaskVerAnd            (xml, %220.1.2%22);%0A%09%09%09xml = updateTaskVerOr             (xml, %220.1.2%22);%0A%09%09%09xml = updateTaskVerXor            (xml, %220.1.2%22);%0A%09%09%09xml = updateTaskVerNot            (xml, %220.1.2%22);%0A%09%09%09xml = updateTaskVerJavaTask       (xml, %220.2.6%22);%0A%09%09%09xml = updateTaskVerMux            (xml, %220.1.2%22);%0A%09%09%09xml = updateTaskVerRandomGenerator(xml, %220.2.3%22);%0A%09%09%09xml = updateTaskVerSipo           (xml, %220.1.2%22);%0A
 %09%09%09%0A%09%09%09x

update tasks