Browse Source
* commit '8faff3b79c50706c185a334c988765339ca776f9': REPORT-137542 - 远程设计下长时间设计后切换模板卡慢 REPORT-130954 fix: 设计器启动屏蔽不支持的功能 REPORT-137543 【fr-fbp冒烟】【数据源】设计器数据连接 重命名判断异常fbp/feature
superman
1 month ago
10 changed files with 156 additions and 39 deletions
@ -0,0 +1,62 @@
|
||||
package com.fanruan.boot.adaptation; |
||||
|
||||
import com.fanruan.portal.module.PortalModuleManager; |
||||
import com.fr.third.guava.collect.Sets; |
||||
|
||||
import java.util.Optional; |
||||
import java.util.Set; |
||||
|
||||
import static com.fanruan.portal.authority.PortalAuthorityItems.ENTERPRISE_GENERAL_ID; |
||||
import static com.fanruan.portal.authority.PortalAuthorityItems.ENTERPRISE_ID; |
||||
import static com.fanruan.portal.authority.PortalAuthorityItems.MAP_ID; |
||||
import static com.fanruan.portal.authority.PortalAuthorityItems.PORTAL_MANAGEMENT_ID; |
||||
import static com.fanruan.portal.authority.PortalAuthorityItems.SECURITY_ID; |
||||
|
||||
/** |
||||
* 内置服务器支持展示的模块,预期调用顺序在业务模块之后 |
||||
* |
||||
* @author Anner |
||||
* @since 11.0 |
||||
* Created on 2024/10/15 |
||||
*/ |
||||
public class DesignServerSupportModule { |
||||
private final static Set<String> SUPPORT_MODULE = Sets.newHashSet( |
||||
// 系统管理
|
||||
PORTAL_MANAGEMENT_ID, |
||||
// 企业设置
|
||||
ENTERPRISE_ID, |
||||
// 企业设置 - 通用设置
|
||||
ENTERPRISE_GENERAL_ID, |
||||
// 安全管理
|
||||
SECURITY_ID, |
||||
// 地图管理
|
||||
MAP_ID |
||||
); |
||||
|
||||
/** |
||||
* 注册一下支持展示的模块 |
||||
* |
||||
* @param moduleName name |
||||
*/ |
||||
public static void register(String moduleName) { |
||||
Optional.of(moduleName).ifPresent(SUPPORT_MODULE::add); |
||||
} |
||||
|
||||
/** |
||||
* 取消注册展示的模块 |
||||
* |
||||
* @param moduleName name |
||||
*/ |
||||
public static void unregister(String moduleName) { |
||||
Optional.of(moduleName).ifPresent(SUPPORT_MODULE::remove); |
||||
} |
||||
|
||||
/** |
||||
* 启动入口,重建一下展示的module |
||||
*/ |
||||
public static void rebuild() { |
||||
PortalModuleManager.allModules().keySet().stream() |
||||
.filter(m -> !SUPPORT_MODULE.contains(m)) |
||||
.forEach(PortalModuleManager::unregister); |
||||
} |
||||
} |
Loading…
Reference in new issue