Browse Source

REPORT-133186 【fr-fbp回归】【数据集】fbp设计器远程设计,新建mysql数据连接,开启SSL通道后读不到CA证书

fbp/release
Destiny.Lin 3 months ago
parent
commit
84668af345
  1. 2
      designer-base/src/main/java/com/fr/file/FILEChooserPane.java
  2. 6
      designer-base/src/main/java/com/fr/file/FILEFactory.java
  3. 18
      designer-base/src/main/java/com/fr/file/FileCAFILE.java

2
designer-base/src/main/java/com/fr/file/FILEChooserPane.java

@ -1410,7 +1410,7 @@ public class FILEChooserPane extends BasicPane {
private class FileCAPlaceListModel extends AbstractPlaceListModel { private class FileCAPlaceListModel extends AbstractPlaceListModel {
private FileCAFILE envFILE; private FileCAFILE envFILE;
FileCAPlaceListModel() { FileCAPlaceListModel() {
envFILE = new FileCAFILE(new FileNode(StableUtils.pathJoin(ProjectConstants.RESOURCES_NAME, ProjectConstants.CERTIFICATES_DIRECTORY), true), false, StableUtils.pathJoin(ProjectConstants.ASSETS_NAME, FileDataFILE.FILE_DATASET_NAME)) { envFILE = new FileCAFILE(new FileNode(StableUtils.pathJoin(ProjectConstants.RESOURCES_NAME, ProjectConstants.CERTIFICATES_DIRECTORY), true), false, StableUtils.pathJoin(ProjectConstants.RESOURCES_NAME, ProjectConstants.CERTIFICATES_DIRECTORY)) {
@Override @Override
public String getName() { public String getName() {
return getEnvProjectName(); return getEnvProjectName();

6
designer-base/src/main/java/com/fr/file/FILEFactory.java

@ -9,6 +9,7 @@ public class FILEFactory {
public static final String FILE_PREFIX = "file://"; public static final String FILE_PREFIX = "file://";
public static final String ENV_PREFIX = "env://"; public static final String ENV_PREFIX = "env://";
public static final String FILE_DATA_PREFIX = "filedata://"; public static final String FILE_DATA_PREFIX = "filedata://";
public static final String FILE_CA_PREFIX = "ca://";
public static final String WEBREPORT_PREFIX = "webreport://"; public static final String WEBREPORT_PREFIX = "webreport://";
public static final String SEPARATOR = "/"; public static final String SEPARATOR = "/";
@ -58,7 +59,10 @@ public class FILEFactory {
return new FileFILE(new java.io.File(path.substring(FILE_PREFIX.length()))); return new FileFILE(new java.io.File(path.substring(FILE_PREFIX.length())));
} else if (path.startsWith(FILE_DATA_PREFIX)) { } else if (path.startsWith(FILE_DATA_PREFIX)) {
return new FileDataFILE(new FileNode(path.substring(FILE_DATA_PREFIX.length()), true), false, path.substring(FILE_DATA_PREFIX.length())); return new FileDataFILE(new FileNode(path.substring(FILE_DATA_PREFIX.length()), true), false, path.substring(FILE_DATA_PREFIX.length()));
} else { } else if (path.startsWith(FILE_CA_PREFIX)) {
return new FileCAFILE(new FileNode(path.substring(FILE_CA_PREFIX.length()), true), false, path.substring(FILE_CA_PREFIX.length()));
}
else {
return new FileNodeFILE(new FileNode(path, WorkContext.getWorkResource().isDirectory(path))); return new FileNodeFILE(new FileNode(path, WorkContext.getWorkResource().isDirectory(path)));
} }
} }

18
designer-base/src/main/java/com/fr/file/FileCAFILE.java

@ -7,6 +7,7 @@ import com.fr.log.FineLoggerFactory;
import com.fr.stable.CoreConstants; import com.fr.stable.CoreConstants;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.stable.project.ProjectConstants;
import com.fr.workspace.server.repository.tabledata.TableDataRepository; import com.fr.workspace.server.repository.tabledata.TableDataRepository;
import java.util.ArrayList; import java.util.ArrayList;
@ -22,6 +23,7 @@ import java.util.Map;
* Created on 2024/9/8 * Created on 2024/9/8
*/ */
public class FileCAFILE extends FileNodeFILE{ public class FileCAFILE extends FileNodeFILE{
public static final String ROOT = ProjectConstants.CERTIFICATES_DIRECTORY;
private List<FileCAFILE> children = new ArrayList<>(); private List<FileCAFILE> children = new ArrayList<>();
private boolean builded = false; private boolean builded = false;
private String id = StringUtils.EMPTY; private String id = StringUtils.EMPTY;
@ -132,6 +134,13 @@ public class FileCAFILE extends FileNodeFILE{
} }
} }
} }
for (Map.Entry<String, FileCAFILE> entry : tree.entrySet()) {
if (entry.getKey().endsWith(ROOT)) {
root = entry.getValue();
root.setId(StableUtils.pathJoin(ProjectConstants.RESOURCES_NAME, ProjectConstants.CERTIFICATES_DIRECTORY));
break;
}
}
return root; return root;
} }
@ -144,8 +153,15 @@ public class FileCAFILE extends FileNodeFILE{
return new FileCAFILE(fileNode, true, bean.getId()); return new FileCAFILE(fileNode, true, bean.getId());
} }
} }
return null; FileNode fileNode = new FileNode();
fileNode.setEnvPath(s);
fileNode.setDirectory(true);
return new FileCAFILE(fileNode, true, ROOT);
} }
@Override
public String prefix() {
return FILEFactory.FILE_CA_PREFIX;
}
} }

Loading…
Cancel
Save