类 SyncRemote

java.lang.Object
com.gdxsoft.easyweb.define.SyncRemote

public class SyncRemote extends Object
  • 构造器详细资料

    • SyncRemote

      public SyncRemote()
  • 方法详细资料

    • getCurCfg

      public org.json.JSONObject getCurCfg()
    • getCfgs

      public org.json.JSONObject getCfgs()
    • decode

      public String decode(String encodeString) throws Exception
      解密内容
      参数:
      encodeString -
      返回:
      抛出:
      Exception
    • encode

      public String encode(String str) throws Exception
      加密内容
      参数:
      str -
      返回:
      抛出:
      Exception
    • initById

      public void initById(String id) throws ParserConfigurationException, SAXException, IOException, org.json.JSONException
      根据配置文件ID获取配置项
      参数:
      id -
      抛出:
      ParserConfigurationException
      SAXException
      IOException
      org.json.JSONException
    • init

      public void init(String filters, String root)
      初始化,根据过滤条件和根目录
      参数:
      filters - 过滤条件(js or js,html)
      root - 根目录
    • getDir

      public void getDir(String path) throws org.json.JSONException
      本地和远程执行,根据filter获取目录下的文件的JSON
      参数:
      path -
      抛出:
      org.json.JSONException
    • compareFiles

      public org.json.JSONObject compareFiles(String fromJson) throws org.json.JSONException
      remote执行,检查本地文件json和远程文件json的差异
      参数:
      fromJson -
      返回:
      抛出:
      org.json.JSONException
    • saveJson

      public void saveJson() throws IOException
      保存扫描结果
      抛出:
      IOException
    • getJson

      public org.json.JSONObject getJson()
    • postToRemote

      public String postToRemote() throws Exception
      将本地的JSON提交到远程
      抛出:
      Exception
    • sendFile

      public String sendFile(String id, String name) throws Exception
      local执行,提交文件到远程
      参数:
      id -
      name -
      返回:
      抛出:
      Exception
    • encodeFile

      public String encodeFile(String id, String name) throws Exception
      抛出:
      Exception
    • decodeFile

      public byte[] decodeFile(String base64Str) throws IOException
      抛出:
      IOException
    • recvFile

      public String recvFile(String root, String name, String cnt) throws org.json.JSONException
      remote 执行,获取文件BASE64并保存
      参数:
      root -
      name -
      cnt -
      返回:
      抛出:
      org.json.JSONException
    • removeSendFile

      public String removeSendFile(String id, String root, String name) throws org.json.JSONException
      远程发送文件
      参数:
      id - 本地配置索引
      root - 远程根目录
      name - 远程文件名称
      返回:
      抛出:
      org.json.JSONException
    • localRequstRemoveFile

      public String localRequstRemoveFile(String id, String name) throws Exception
      本地请求远程文件
      参数:
      id -
      name -
      返回:
      抛出:
      Exception
    • loadCfgs

      public org.json.JSONObject loadCfgs(Element syncs)
    • getCfgKey

      public String getCfgKey()
      获取本配置的Key
      返回:
      the _CfgKey
    • setCfgKey

      public void setCfgKey(String _CfgKey)
      本配置的Key
      参数:
      _CfgKey - the _CfgKey to set