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

import java.io.File;

import javax.xml.transform.TransformerException;

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 = updateTaskVerEmbeddedTask(xml, "0.3.0");
			xml = updateTaskVerJavaTask    (xml, "0.3.0");
			
			//
			//
			//
			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.6.0";
	}
}

@@ -74,16 +74,45 @@
 io.File;
+%0Aimport java.util.Collection;
 %0A%0Aimport
@@ -151,24 +151,183 @@
 Exception;%0A%0A
+import org.apache.commons.io.FileUtils;%0Aimport org.apache.commons.io.filefilter.DirectoryFileFilter;%0Aimport org.apache.commons.io.filefilter.RegexFileFilter;%0A%0A
 import com.s
@@ -827,23 +827,16 @@
 ot) %7B%0A%09%09
-return 
 super.ex
@@ -854,16 +854,295 @@
 (root);%0A
+%09%09Collection%3CFile%3E files = FileUtils.listFiles(new File(root), new RegexFileFilter(%22%5E(.*?(%5C%5C.sict))%22), DirectoryFileFilter.DIRECTORY);%0A%09%09for(File f : files) %7B%0A%09%09%09String p = f.getAbsolutePath();%0A%09%09%09f.renameTo(new File(p.substring(0, p.length() - 6) + %22.sic%22));%0A%09%09%7D%0A%09%09return true;%0A
 %09%7D%0A%0A%09@Ov

change extensions form sict to sic