当前位置: 首页>>代码示例>>Java>>正文


Java KimTypeBo.setName方法代码示例

本文整理汇总了Java中org.kuali.rice.kim.impl.type.KimTypeBo.setName方法的典型用法代码示例。如果您正苦于以下问题:Java KimTypeBo.setName方法的具体用法?Java KimTypeBo.setName怎么用?Java KimTypeBo.setName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.kuali.rice.kim.impl.type.KimTypeBo的用法示例。


在下文中一共展示了KimTypeBo.setName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createDelegate

import org.kuali.rice.kim.impl.type.KimTypeBo; //导入方法依赖的package包/类
private void createDelegate(){

        if (suiteCreateDelegateInitialized) {
            return;
        }

        // create delegation KimType
        Long kimDlgnTypeId = getNextSequenceLongValue("KRIM_TYP_ID_S");
        KimTypeBo kimDlgnType = new KimTypeBo();
        kimDlgnType.setId("" + kimDlgnTypeId);
        kimDlgnType.setName("TestBaseDelegationType");
        kimDlgnType.setNamespaceCode(NAMESPACE);
        kimDlgnType.setServiceName("testBaseDelegationTypeService");
        kimDlgnType.setActive(true);
        kimDlgnType = KradDataServiceLocator.getDataObjectService().save(kimDlgnType);

        /*
         * Manually create a delegate
         */
        String id = "" + getNextSequenceLongValue("KRIM_DLGN_MBR_ID_S");
        DelegateTypeBo delegate = new DelegateTypeBo();

        delegate.setDelegationId(id);
        delegate.setDelegationType(DelegationType.PRIMARY);
        delegate.setActive(true);
        delegate.setKimTypeId("" + kimDlgnTypeId);
        /*
         * Assign it a role that was created above.  This should mean that every
         * principle in the role can have the delegate added below as a delegate
         */
        Role role = KimApiServiceLocator.getRoleService().getRoleByNamespaceCodeAndName(NAMESPACE, ROLE_NAME);
        assertNotNull("Role should exist.", role);
        delegate.setRoleId(role.getId());
        delegate = KradDataServiceLocator.getDataObjectService().save(delegate);

        // BC of the way the jpa is handled we have to create the delagate, then the members
        String delgMemberId = "" + getNextSequenceLongValue("KRIM_DLGN_MBR_ID_S");
        DelegateMemberBo user1RoleDelegate = new DelegateMemberBo();
        user1RoleDelegate.setDelegationMemberId(delgMemberId);
        // This is the user the delegation requests should be sent to.
        // Note: If initiator is same as delegate, forceAction is utilized in responsibilities of approvers.
        Principal kPrincipal = KimApiServiceLocator.getIdentityService().getPrincipalByPrincipalName("ewestfal");
        assertNotNull(kPrincipal);
        user1RoleDelegate.setMemberId(kPrincipal.getPrincipalId());
        /*
         * this is checked when adding delegates in both the ActionRequestFactory
         * and RoleServiceImpl
         */
        user1RoleDelegate.setType( MemberType.PRINCIPAL );

        // attach it to the delegate we created above
        user1RoleDelegate.setDelegationId(delegate.getDelegationId());

        user1RoleDelegate = KradDataServiceLocator.getDataObjectService().save(user1RoleDelegate);

        suiteCreateDelegateInitialized = true;

    }
 
开发者ID:kuali,项目名称:kc-rice,代码行数:59,代码来源:RoleRouteModuleTest.java

示例2: createDelegate

import org.kuali.rice.kim.impl.type.KimTypeBo; //导入方法依赖的package包/类
private void createDelegate(){

        if (suiteCreateDelegateInitialized) {
            return;
        }

        // create delegation KimType
        Long kimDlgnTypeId = KRADServiceLocator.getSequenceAccessorService().getNextAvailableSequenceNumber("KRIM_TYP_ID_S");
        KimTypeBo kimDlgnType = new KimTypeBo();
        kimDlgnType.setId("" + kimDlgnTypeId);
        kimDlgnType.setName("TestBaseDelegationType");
        kimDlgnType.setNamespaceCode(NAMESPACE);
        kimDlgnType.setServiceName("testBaseDelegationTypeService");
        kimDlgnType.setActive(true);
        kimDlgnType = KRADServiceLocator.getBusinessObjectService().save(kimDlgnType);

        /*
         * Manually create a delegate
         */
        String id = "" + KRADServiceLocator.getSequenceAccessorService().getNextAvailableSequenceNumber("KRIM_DLGN_MBR_ID_S");
        DelegateTypeBo delegate = new DelegateTypeBo();

        delegate.setDelegationId(id);
        delegate.setDelegationType(DelegationType.PRIMARY);
        delegate.setActive(true);
        delegate.setKimTypeId("" + kimDlgnTypeId);
        /*
         * Assign it a role that was created above.  This should mean that every
         * principle in the role can have the delegate added below as a delegate
         */
        Role role = KimApiServiceLocator.getRoleService().getRoleByNamespaceCodeAndName(NAMESPACE, ROLE_NAME);
        assertNotNull("Role should exist.", role);
        delegate.setRoleId(role.getId());
        delegate = KRADServiceLocator.getBusinessObjectService().save(delegate);

        // BC of the way the jpa is handled we have to create the delagate, then the members
        String delgMemberId = "" + KRADServiceLocator.getSequenceAccessorService().getNextAvailableSequenceNumber("KRIM_DLGN_MBR_ID_S");
        DelegateMemberBo user1RoleDelegate = new DelegateMemberBo();
        user1RoleDelegate.setDelegationMemberId(delgMemberId);
        // This is the user the delegation requests should be sent to.
        // Note: If initiator is same as delegate, forceAction is utilized in responsibilities of approvers.
        Principal kPrincipal = KimApiServiceLocator.getIdentityService().getPrincipalByPrincipalName("ewestfal");
        assertNotNull(kPrincipal);
        user1RoleDelegate.setMemberId(kPrincipal.getPrincipalId());
        /*
         * this is checked when adding delegates in both the ActionRequestFactory
         * and RoleServiceImpl
         */
        user1RoleDelegate.setType( MemberType.PRINCIPAL );

        // attach it to the delegate we created above
        user1RoleDelegate.setDelegationId(delegate.getDelegationId());

        user1RoleDelegate = KRADServiceLocator.getBusinessObjectService().save(user1RoleDelegate);

        suiteCreateDelegateInitialized = true;

    }
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:59,代码来源:RoleRouteModuleTest.java


注:本文中的org.kuali.rice.kim.impl.type.KimTypeBo.setName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。