当前位置: 首页 > wzjs >正文

dede自定义网站地图营销软文范例

dede自定义网站地图,营销软文范例,网站开发网页设计js,某女性门户源码含数据模板不错分类全适合做女性网站引言 权限管理是企业级应用的核心功能之一,OneCode 3.0通过esdright模块构建了一套灵活可扩展的权限引擎,支持组件、模块、流程等多维度的权限控制。本文将深入剖析其实现架构、核心组件及设计思想。 总体架构设计 OneCode权限引擎采用分层设计&#xff…

引言

权限管理是企业级应用的核心功能之一,OneCode 3.0通过esdright模块构建了一套灵活可扩展的权限引擎,支持组件、模块、流程等多维度的权限控制。本文将深入剖析其实现架构、核心组件及设计思想。

总体架构设计

OneCode权限引擎采用分层设计,通过类型化定义、树形结构展示和服务化处理构建完整权限体系:

1. 权限类型体系

通过RightType枚举定义三大核心权限类型,采用枚举扩展模式支持未来功能扩展:

public enum RightType implements TreeItem {comright("组件权限", "bpmfont bpmgongzuoliuzhutiguizeweihuguanli", true, false, false, AttributeNavService.class),moduleright("模块权限", "bpmfont bpmgongzuoliuxitongpeizhi", true, false, false, MenuFormulaService.class),bpmright("流程授权", "spafont spa-icon-app", true, false, false, BPMTreeRightIndex.class);// ... 类型定义与绑定类实现
}

每种权限类型绑定对应的处理类,实现职责分离。

2. 权限树结构设计

采用树形结构展示权限层级关系,核心实现包括:

  • BPMRightTree:流程权限树节点,关联流程定义ID和活动定义ID
  • ComRightTree:组件权限树节点,支持属性类型和公式类型双重分类
  • ModuleRightTree:模块权限树节点,关联模块定义信息

树节点通过@ChildTreeAnnotation实现动态加载,如组件权限树绑定AttributeNavService实现子节点加载:

@ChildTreeAnnotation(bindClass = AttributeNavService.class)
public ComRightTree(Attributetype attributetype, String currentClassName) {this.caption = attributetype.getName();this.currentClassName = currentClassName;this.id = attributetype.getType();this.imageClass = attributetype.getImageClass();this.attributetype = attributetype;
}

核心服务实现

权限引擎通过多个服务类实现权限的管理、验证和控制逻辑:

1. 权限入口控制器

RightIndex作为权限管理的入口控制器,提供三大权限类型的访问端点:

@Controller
@RequestMapping("/esd/right/")
@MethodChinaName(cname = "权限管理")
public class RightIndex {@MethodChinaName(cname = "组件授权")@RequestMapping(method = RequestMethod.POST, value = "ComRight")public TreeListResultModel<List<ComRightTree>> getComRight(String id, String projectName, String currentClassName) { ... }@MethodChinaName(cname = "模块授权")@RequestMapping(method = RequestMethod.POST, value = "ModuleRight")public TreeListResultModel<List<ModuleRightTree>> getModuleRight(String id, String projectName, String className) { ... }@MethodChinaName(cname = "流程授权")@RequestMapping(method = RequestMethod.POST, value = "BpmRight")public TreeListResultModel<List<BPMRightTree>> getBpmRight(String id, String projectName, String className) { ... }
}

通过@RequestMapping定义REST接口,使用TreePageUtil构建树形返回结果。

2. 模块权限服务

ModuleFormulaService实现模块权限的核心逻辑,包括表达式CRUD和权限验证:

  • 表达式管理:支持权限表达式的添加、编辑、删除和查询
  • 树形展示:通过getFormulaTree方法提供权限选择树
  • 权限验证:通过ESDClient与后端交互验证权限

关键实现代码:

@RequestMapping(method = RequestMethod.POST, value = "Index")
public ListResultModel<List<ModuleInstGridView>> getFormulaInstList(String projectName) {ListResultModel<List<ModuleInstGridView>> resultModel = new ListResultModel<>();try {Project config = ESDFacrory.getAdminESDClient().getProjectByName(projectName);List<FormulaInst> list = config.getFormulas();List<FormulaInst> instList = new ArrayList<>();for (FormulaInst inst : list) {if (inst.getFormulaType() != null && inst.getFormulaType().equals(FormulaType.ModuleRight)) {instList.add(inst);}}resultModel = PageUtil.getDefaultPageList(instList, ModuleInstGridView.class);} catch (JDSException e) {e.printStackTrace();}return resultModel;
}

3. 动作权限服务

ActionFormulaService专注于组件动作级别的权限控制,实现细粒度的操作权限管理:

@RequestMapping(method = RequestMethod.POST, value = "Index")
public ListResultModel<List<ModuleActionGridView>> getFormulaInstList(String projectName, String currentClassName) {// 从模块配置中筛选动作权限表达式ProjectVersion version = ESDFacrory.getAdminESDClient().getProjectVersionByName(projectName);EUModule euModule = ESDFacrory.getAdminESDClient().getModule(currentClassName, version.getVersionName());List<ModuleFormulaInst> list = euModule.getComponent().getFormulas();// ... 筛选与转换逻辑
}

组织权限集成

权限引擎与组织架构深度集成,通过org包下的服务类实现基于组织的权限控制:

1. 流程权限集成

BPMTreeRightIndex实现流程节点级别的权限控制,关联流程定义和活动定义:

@RequestMapping(method = RequestMethod.POST, value = "BPMRightNav")
public TreeListResultModel<List<BPMRightTree>> getOrgRightNav(String activityDefId, String processDefId, String projectName) {return TreePageUtil.getTreeList(Arrays.asList(BPMRightFormulaType.values()), BPMRightTree.class);
}

2. 阅办人授权

ReadFormulaService实现文档阅办权限的精细化控制,支持阅办人表达式的管理:

@RequestMapping(method = RequestMethod.POST, value = "Index")
public ListResultModel<List<ReadGridView>> getFormulaInstList(String projectId) {// 筛选阅办人权限表达式List<FormulaInst> instList = new ArrayList<>();for (FormulaInst inst : list) {if (inst != null && inst.getFormulaType() != null && inst.getFormulaType().equals(FormulaType.ReaderSelectedID)) {instList.add(inst);}}// ...
}

属性权限控制

AttributeNavService实现基于属性的权限控制,支持不同属性类型的权限差异化管理:

@RequestMapping(method = RequestMethod.POST, value = "FormulaList")
public ListResultModel<List<PageRightGridView>> getFormulaList(FormulaType formulaType, String projectName, String currentClassName) {// 根据公式类型筛选权限表达式List<FormulaInst> instList = new ArrayList<>();for (FormulaInst inst : list) {if (inst != null && inst.getFormulaType() != null && inst.getFormulaType().equals(formulaType)) {instList.add(inst);}}// ...
}

权限表达式引擎

权限引擎的核心在于表达式处理,通过公式定义实现灵活的权限规则:

  1. 表达式类型:通过FormulaType枚举定义多种权限表达式类型
  2. 表达式管理:支持表达式的添加、编辑、删除和查询
  3. 表达式执行:通过ESDFacrory.getAdminESDClient()与后端交互执行权限验证

关键代码示例(添加表达式):

@RequestMapping(value = {"addFormula"}, method = {RequestMethod.GET, RequestMethod.POST})
public @ResponseBody ResultModel<Boolean> addFormulaInst(String SelectFormulaTree, String projectName) {try {Project config = ESDFacrory.getAdminESDClient().getProjectByName(projectName);String[] formulaIdArr = StringUtility.split(SelectFormulaTree, ";");for (String id : formulaIdArr) {ParticipantSelect select = FormulaFactory.getInstance(ESDFacrory.getAdminESDClient().getSpace()).getFormulaById(id);FormulaInst inst = new FormulaInst();inst.setExpression(select.getFormula());inst.setFormulaType(select.getFormulaType());inst.setParticipantSelectId(select.getParticipantSelectId());inst.setName(select.getSelectName());inst.setFormulaInstId(UUID.randomUUID().toString());ESDFacrory.getAdminESDClient().updateFormulaConfig(config.getId(),inst);}} catch (JDSException e) {e.printStackTrace();}return resultModel;
}

与OneCode核心设计的契合

权限引擎深度融合OneCode的两大核心设计理念:

  1. 注解驱动开发:大量使用自定义注解实现权限元数据定义

    • @MethodChinaName:定义权限中文名称
    • @NavTreeViewAnnotation:声明树形导航视图
    • @APIEventAnnotation:绑定API事件处理
  2. 元数据驱动开发:通过FormulaInst等元数据对象描述权限规则,实现配置化权限管理

总结与展望

OneCode 3.0权限引擎通过类型化、层次化、服务化的设计,构建了灵活强大的权限管理体系。核心优势包括:

  • 多维度权限控制:支持组件、模块、流程等多层面权限管理
  • 细粒度权限定义:从功能到数据的精细化权限控制
  • 灵活的表达式引擎:通过公式定义实现复杂权限规则
  • 与组织架构深度集成:基于组织的权限分配与控制

未来可进一步增强AI能力,如基于用户行为推荐权限配置、智能检测权限冲突等,提升权限管理的智能化水平。

http://www.dtcms.com/wzjs/197644.html

相关文章:

  • 上海网站制作有名 乐云践新购物网站哪个最好
  • 驻马店做网站的公司注册推广赚钱一个40元
  • 怎么建设一个社交网站长沙网站优化培训
  • 网站建设全套教程下载广州seo公司推荐
  • 怎样做化妆品公司网站常州网络推广哪家好
  • wordpress tint西安网站排名优化培训
  • 网站开发实验室建设方案磁力帝
  • 做网站和app需要多久福州seo关键字推广
  • 公司网站建设包括福州seo排名优化公司
  • 郴州网站建设网络推广渠道英文seo外链发布工具
  • 广告设计图片用什么软件天津seo数据监控
  • 东莞做网站建设小学生抄写新闻20字
  • 网站建设-信科网络视频推广渠道有哪些
  • 网站认证怎么做怎么做产品推广和宣传
  • 国内做网站比较好的公司有哪些360优化大师软件
  • 网站备案关闭网站百度推广代运营
  • php做网站为什么比java快百度产品
  • 建设工程新工艺网站app推广团队
  • 做推送封图的网站seo优化排名技术百度教程
  • 2023智慧树网络营销答案镇江seo
  • 网站备案几天中国十大热门网站排名
  • 3800给做网站最经典的营销案例
  • 手机网站在哪里找到网站seo优化有哪些方面
  • 网站建设详细方案怎么在网上做广告宣传
  • 怎么做订阅号百度seo优化技术
  • 建设银行的官方网站电话做一个app软件大概要多少钱
  • 基于html的旅游网页设计毕业论文衡阳seo优化推荐
  • 建设网站的企业专业服务百度网址提交
  • 西安东郊网站建设公司百度推广计划
  • 个人简历word可编辑wp博客seo插件