类 Y9OrgUtil


  • public class Y9OrgUtil
    extends Object
    组织工具类
    作者:
    shidaobang
    Date:
    2022/12/02
    • 构造器详细资料

      • Y9OrgUtil

        public Y9OrgUtil()
    • 方法详细资料

      • isMoved

        public static boolean isMoved​(Y9OrgBase originOrgBase,
                                      Y9OrgBase updateOrgBase)
        判断组织节点是否有移动
        参数:
        originOrgBase - 原始组织节点对象
        updateOrgBase - 更新后组织节点对象
        返回:
        boolean
      • isCurrentOrAncestorChanged

        public static boolean isCurrentOrAncestorChanged​(Y9OrgBase originOrgBase,
                                                         Y9OrgBase updateOrgBase)
        判断当前组织节点及其任一祖先节点的名字是否有改变或其祖先节点是否还是原先的
        参数:
        originOrgBase - 原始组织节点对象
        updateOrgBase - 更新后组织节点对象
        返回:
        boolean
      • isRenamed

        public static boolean isRenamed​(Y9OrgBase originOrgBase,
                                        Y9OrgBase updateOrgBase)
        判断组织节点是否有改名
        参数:
        originOrgBase - 原始组织节点对象
        updateOrgBase - 更新后组织节点对象
        返回:
        boolean
      • isAncestorOf

        public static boolean isAncestorOf​(Y9OrgBase a,
                                           Y9OrgBase b)
        组织节点a是否为组织节点b的祖先节点
        参数:
        a - 组织节点a
        b - 组织节点b
        返回:
        boolean
      • isSameOf

        public static boolean isSameOf​(Y9OrgBase a,
                                       Y9OrgBase b)
        组织节点a和组织节点b是否为相同节点
        参数:
        a - 组织节点a
        b - 组织节点b
        返回:
        boolean
      • isDescendantOf

        public static boolean isDescendantOf​(Y9OrgBase a,
                                             Y9OrgBase b)
        组织节点a是否为组织节点b的子孙节点
        参数:
        a - 组织节点a
        b - 组织节点b
        返回:
        boolean
      • buildDn

        public static String buildDn​(net.risesoft.enums.platform.OrgTypeEnum orgTypeEnum,
                                     String name,
                                     String parentDn)
        构建 dn
        dn 例子: cn=测试人员,ou=测试部门,o=测试组织
        参数:
        orgTypeEnum - 组织类型列举
        name - 名称
        parentDn - 父dn
        返回:
        String
      • buildGuidPath

        public static String buildGuidPath​(String parentGuidPath,
                                           String id)
        构建 id 路径
        参数:
        parentGuidPath - 父 id 路径 Y9OrgBase
        id - ID
        返回:
        String