|
|
@@ -679,6 +679,29 @@ public class NodeAttachmentImpl implements NodeAttachmentService {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
+ public Map<String, Object> getDefaultAttachment(String tableName) {
|
|
|
+ Map<String,List<String>> resultMap = getCurrentAttachmentName(tableName,null);
|
|
|
+ String directoryName = resultMap.keySet().stream().findFirst().get();
|
|
|
+ Map<String, Object> structure = new HashMap<>();
|
|
|
+ structure.put("name", directoryName);
|
|
|
+ structure.put("type", "directory" );
|
|
|
+ structure.put("path", "");
|
|
|
+ List<String> subDirectoryList = resultMap.values().stream().findFirst().get();
|
|
|
+ List<Map<String, Object>> list = new ArrayList<>();
|
|
|
+ for (String subDirectoryName : subDirectoryList) {
|
|
|
+ Map<String, Object> children = new LinkedHashMap<>();
|
|
|
+ children.put("name", subDirectoryName);
|
|
|
+ children.put("type", "directory" );
|
|
|
+ children.put("path", "");
|
|
|
+ children.put("children", new ArrayList<>());
|
|
|
+ list.add(children);
|
|
|
+ }
|
|
|
+ structure.put("children", list);
|
|
|
+ return structure;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
}
|