Browse Source

远程控制

master
Fangjie Hu 8 years ago
parent
commit
bac818b566
  1. 3
      designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java
  2. 2
      designer_base/src/com/fr/design/utils/DesignUtils.java
  3. 20
      designer_base/src/com/fr/env/RemoteEnv.java

3
designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java

@ -206,9 +206,6 @@ public class DownLoadDependenceUI implements ActionListener {
//如果是服务器环境,则只会安装一份
private void installPluginDependenceFile(String filePath){
IOUtils.unzip(new File(filePath), FRContext.getCurrentEnv().getPath() + dependenceDir);
if (dependenceType == PluginDependenceType.SERVICE) {
IOUtils.unzip(new File(filePath), StableUtils.getInstallHome() + dependenceDir);
}
}
public void actionPerformed(ActionEvent e) {

2
designer_base/src/com/fr/design/utils/DesignUtils.java

@ -52,7 +52,7 @@ public class DesignUtils {
public static boolean isStarted() {
try {
new Socket("localhost", port);
return true;
/*return true;*/
} catch (Exception exp) {
}

20
designer_base/src/com/fr/env/RemoteEnv.java vendored

@ -31,6 +31,7 @@ import com.fr.plugin.Plugin;
import com.fr.plugin.PluginLicense;
import com.fr.plugin.PluginLicenseManager;
import com.fr.plugin.PluginLoader;
import com.fr.plugin.dependence.PluginServiceCreator;
import com.fr.stable.*;
import com.fr.stable.file.XMLFileManagerProvider;
import com.fr.stable.project.ProjectConstants;
@ -2079,7 +2080,26 @@ public class RemoteEnv implements Env {
}
}
@Override
public String pluginServiceAction(PluginServiceCreator service, String req) throws Exception {
return service.remoteServiceAction(req);
}
@Override
public void checkAndRegisterLic(FileNode node, Plugin plugin) throws Exception {
}
/**
* 提供一个可以再插件自定义请求数据的方法
* 返回的数据可自行处理
* @param para
* @return
* @throws Exception
*/
public InputStream getDataFormRemote(HashMap<String, String> para) throws Exception {
HttpClient client = createHttpMethod(para); //jim :加上user,远程设计点击预览时传递用户角色信息
return execute4InputStream(client);
}
}
Loading…
Cancel
Save