package CoreFS.SB04;

import CoreFS.SA01.CoreException;
import CoreFS.SA01.CoreExceptionHandler;
import CoreFS.SA01.CoreGlobalConstants;
import CoreFS.SA05.CoreFileOperation;
import CoreFS.SA06.CoreReturnObject;

public class DesignMainManager {
//保存客户端文件
	/**
	 * @Desc 保存工程设置文件
	 * @modify 091214
	 */
	
	public CoreReturnObject SaveDesignMainXml(String xmlfilename, String strXML){
		CoreReturnObject cro = new CoreReturnObject();
		CoreFileOperation cfo = new CoreFileOperation();
		try{
			cfo.SaveDesignMainXml(xmlfilename, strXML);
		}catch(CoreException ce){
			cro = CoreExceptionHandler.coreExceptionHandler(ce);
		}catch(Exception e){
			cro = CoreExceptionHandler.exceptionHandler(e);
		}
		return cro;
	}

	public CoreReturnObject XmlToString() {
		CoreReturnObject cro = new CoreReturnObject();
		CoreFileOperation cfo = new CoreFileOperation();
	    String strXml = "";
		try{
			strXml = cfo.ReadText(CoreGlobalConstants.DESIGNMAIN_REMOTEXMLCONFIGPATH);
			cro.setResult(strXml);
		}catch(CoreException ce){
			cro = CoreExceptionHandler.coreExceptionHandler(ce);
		}catch(Exception e){
			cro = CoreExceptionHandler.exceptionHandler(e);
		}
		return cro;	
	}

//将服务端文件以字符串传送给客户端
}
