本文整理汇总了Java中org.kuali.rice.kim.document.IdentityManagementRoleDocument.setRoleNamespace方法的典型用法代码示例。如果您正苦于以下问题:Java IdentityManagementRoleDocument.setRoleNamespace方法的具体用法?Java IdentityManagementRoleDocument.setRoleNamespace怎么用?Java IdentityManagementRoleDocument.setRoleNamespace使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.kuali.rice.kim.document.IdentityManagementRoleDocument
的用法示例。
在下文中一共展示了IdentityManagementRoleDocument.setRoleNamespace方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadRoleDoc
import org.kuali.rice.kim.document.IdentityManagementRoleDocument; //导入方法依赖的package包/类
@Override
public void loadRoleDoc(IdentityManagementRoleDocument identityManagementRoleDocument, Role role){
RoleBo roleBo = getDataObjectService().find(RoleBo.class, role.getId());
identityManagementRoleDocument.setRoleId(roleBo.getId());
identityManagementRoleDocument.setKimType(KimTypeBo.to(roleBo.getKimRoleType()));
identityManagementRoleDocument.setRoleTypeName(roleBo.getKimRoleType().getName());
identityManagementRoleDocument.setRoleTypeId(roleBo.getKimTypeId());
identityManagementRoleDocument.setRoleName(roleBo.getName());
identityManagementRoleDocument.setRoleDescription(roleBo.getDescription());
identityManagementRoleDocument.setActive(roleBo.isActive());
identityManagementRoleDocument.setRoleNamespace(roleBo.getNamespaceCode());
identityManagementRoleDocument.setEditing(true);
identityManagementRoleDocument.setPermissions(loadPermissions(
getDataObjectService().findMatching(RolePermissionBo.class,
QueryByCriteria.Builder.forAttribute(KimConstants.PrimaryKeyConstants.SUB_ROLE_ID, role.getId()).build()).getResults()));
identityManagementRoleDocument.setResponsibilities(loadResponsibilities(
getDataObjectService().findMatching(RoleResponsibilityBo.class,
QueryByCriteria.Builder.forAttribute(KimConstants.PrimaryKeyConstants.SUB_ROLE_ID, role.getId()).build()).getResults()));
loadResponsibilityRoleRspActions(identityManagementRoleDocument);
identityManagementRoleDocument.setMembers(loadRoleMembers(identityManagementRoleDocument, roleBo.getMembers()));
loadMemberRoleRspActions(identityManagementRoleDocument);
identityManagementRoleDocument.setDelegations(loadRoleDocumentDelegations(identityManagementRoleDocument, getRoleDelegations(roleBo.getId())));
//Since delegation members are flattened out on the UI...
setDelegationMembersInDocument(identityManagementRoleDocument);
identityManagementRoleDocument.setKimType(KimTypeBo.to(roleBo.getKimRoleType()));
}
示例2: testInactiveRoleMemberOnly
import org.kuali.rice.kim.document.IdentityManagementRoleDocument; //导入方法依赖的package包/类
@Test
public void testInactiveRoleMemberOnly() {
KimType.Builder ktBuilder = KimType.Builder.create();
ktBuilder.setId("1");
ktBuilder.setNamespaceCode("KUALI");
ktBuilder.setName("Default");
Long version = new Long(1) ;
ktBuilder.setVersionNumber(version);
KimType kt = ktBuilder.build() ;
IdentityManagementRoleDocument identityManagementRoleDocument = new IdentityManagementRoleDocument();
identityManagementRoleDocument.setKimType(kt);
identityManagementRoleDocument.setRoleId("KRSAP10003");
identityManagementRoleDocument.setRoleTypeId("1");
identityManagementRoleDocument.setRoleName("Default");
identityManagementRoleDocument.setRoleNamespace("KR_SAP");
identityManagementRoleDocument.setRoleName("Sample App Admin");
RoleMemberBo roleMemberBo = new RoleMemberBo();
roleMemberBo.setId("KRSAP10003");
roleMemberBo.setRoleId("KRSAP1003");
roleMemberBo.setMemberId("dev1");
roleMemberBo.setTypeCode("P");
// make the role member inactive
Timestamp timestamp = new Timestamp(System.currentTimeMillis());
roleMemberBo.setActiveToDateValue(timestamp);
ArrayList<RoleMemberBo> roleMemberBos = new ArrayList<RoleMemberBo>();
roleMemberBos.add(roleMemberBo);
// We've got one role member, and it is inactive.
UiDocumentServiceImpl uiDocumentServiceImpl = new UiDocumentServiceImpl() ;
List<KimDocumentRoleMember> kimDocumentRoleMembers = uiDocumentServiceImpl.loadRoleMembers(identityManagementRoleDocument, roleMemberBos);
assertEquals("KimDocuemtnRoleMember size is incorrect", 0, kimDocumentRoleMembers.size());
}
示例3: loadRoleDoc
import org.kuali.rice.kim.document.IdentityManagementRoleDocument; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public void loadRoleDoc(IdentityManagementRoleDocument identityManagementRoleDocument, Role role){
Map<String, String> criteria = new HashMap<String, String>();
criteria.put(KimConstants.PrimaryKeyConstants.ROLE_ID, role.getId());
RoleBo roleBo = getBusinessObjectService().findByPrimaryKey(RoleBo.class, criteria);
Map<String, String> subClassCriteria = new HashMap<String, String>();
subClassCriteria.put(KimConstants.PrimaryKeyConstants.SUB_ROLE_ID, role.getId());
identityManagementRoleDocument.setRoleId(roleBo.getId());
identityManagementRoleDocument.setKimType(KimTypeBo.to(roleBo.getKimRoleType()));
identityManagementRoleDocument.setRoleTypeName(roleBo.getKimRoleType().getName());
identityManagementRoleDocument.setRoleTypeId(roleBo.getKimTypeId());
identityManagementRoleDocument.setRoleName(roleBo.getName());
identityManagementRoleDocument.setRoleDescription(roleBo.getDescription());
identityManagementRoleDocument.setActive(roleBo.isActive());
identityManagementRoleDocument.setRoleNamespace(roleBo.getNamespaceCode());
identityManagementRoleDocument.setEditing(true);
identityManagementRoleDocument.setPermissions(loadPermissions(
(List<RolePermissionBo>) getBusinessObjectService().findMatching(RolePermissionBo.class,
subClassCriteria)));
identityManagementRoleDocument.setResponsibilities(loadResponsibilities(
(List<RoleResponsibilityBo>) getBusinessObjectService().findMatching(RoleResponsibilityBo.class,
subClassCriteria)));
loadResponsibilityRoleRspActions(identityManagementRoleDocument);
identityManagementRoleDocument.setMembers(loadRoleMembers(identityManagementRoleDocument, roleBo.getMembers()));
loadMemberRoleRspActions(identityManagementRoleDocument);
identityManagementRoleDocument.setDelegations(loadRoleDocumentDelegations(identityManagementRoleDocument, getRoleDelegations(roleBo.getId())));
//Since delegation members are flattened out on the UI...
setDelegationMembersInDocument(identityManagementRoleDocument);
identityManagementRoleDocument.setKimType(KimTypeBo.to(roleBo.getKimRoleType()));
}