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


Java IdentityManagementRoleDocument.getResponsibilities方法代码示例

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


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

示例1: getChangedRoleResponsibilityIds

import org.kuali.rice.kim.document.IdentityManagementRoleDocument; //导入方法依赖的package包/类
protected Set<String> getChangedRoleResponsibilityIds(
		IdentityManagementRoleDocument identityManagementRoleDocument, List<RoleResponsibilityBo> origRoleResponsibilities){
	Set<String> lRet = new HashSet<String>();
	List<String> newResp = new ArrayList<String>();
	List<String> oldResp = new ArrayList<String>();
	if(CollectionUtils.isNotEmpty(identityManagementRoleDocument.getResponsibilities())){
		for(KimDocumentRoleResponsibility documentRoleResponsibility: identityManagementRoleDocument.getResponsibilities()){
			newResp.add(documentRoleResponsibility.getResponsibilityId());
		}
	}
	if(ObjectUtils.isNotNull(origRoleResponsibilities)){
		for(RoleResponsibilityBo roleRespBo: origRoleResponsibilities){
			oldResp.add(roleRespBo.getResponsibilityId());
		}
	}
	lRet.addAll(newResp);
	lRet.addAll(oldResp);

	return lRet;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:21,代码来源:UiDocumentServiceImpl.java

示例2: loadResponsibilityRoleRspActions

import org.kuali.rice.kim.document.IdentityManagementRoleDocument; //导入方法依赖的package包/类
protected void loadResponsibilityRoleRspActions(IdentityManagementRoleDocument identityManagementRoleDocument){
	if(CollectionUtils.isNotEmpty(identityManagementRoleDocument.getResponsibilities())){
		for(KimDocumentRoleResponsibility responsibility: identityManagementRoleDocument.getResponsibilities()){
			responsibility.getRoleRspActions().addAll(loadKimDocumentRoleRespActions(
					getRoleResponsibilityActionImpls(responsibility.getRoleResponsibilityId())));
		}
	}
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:9,代码来源:UiDocumentServiceImpl.java

示例3: getRoleResponsibilitiesActions

import org.kuali.rice.kim.document.IdentityManagementRoleDocument; //导入方法依赖的package包/类
protected List <RoleResponsibilityActionBo> getRoleResponsibilitiesActions(
		IdentityManagementRoleDocument identityManagementRoleDocument){
	List <RoleResponsibilityActionBo>  roleRspActions = new ArrayList<RoleResponsibilityActionBo>();
	if(CollectionUtils.isNotEmpty(identityManagementRoleDocument.getResponsibilities())){
	// loop over the responsibilities assigned to the role
		for(KimDocumentRoleResponsibility roleResponsibility : identityManagementRoleDocument.getResponsibilities()){
			// only process if the actions are not assigned at the role member level
			if(!getResponsibilityInternalService().areActionsAtAssignmentLevelById(roleResponsibility.getResponsibilityId())){
				List<KimDocumentRoleResponsibilityAction> documentRoleResponsibilityActions = roleResponsibility.getRoleRspActions();
				if( ObjectUtils.isNotNull(documentRoleResponsibilityActions)
						&& !documentRoleResponsibilityActions.isEmpty()
						&& StringUtils.isNotBlank(documentRoleResponsibilityActions.get(0).getRoleResponsibilityActionId() ) ) {
					RoleResponsibilityActionBo roleRspAction = new RoleResponsibilityActionBo();
					roleRspAction.setId(documentRoleResponsibilityActions.get(0).getRoleResponsibilityActionId());
					roleRspAction.setActionPolicyCode(documentRoleResponsibilityActions.get(0).getActionPolicyCode());
					roleRspAction.setActionTypeCode(documentRoleResponsibilityActions.get(0).getActionTypeCode());
					roleRspAction.setPriorityNumber(documentRoleResponsibilityActions.get(0).getPriorityNumber());
					roleRspAction.setForceAction(documentRoleResponsibilityActions.get(0).isForceAction());
					roleRspAction.setRoleMemberId("*");
					roleRspAction.setRoleResponsibilityId(documentRoleResponsibilityActions.get(0).getRoleResponsibilityId());
					updateResponsibilityActionVersionNumber(roleRspAction, getRoleResponsibilityActionImpl(roleRspAction.getId()));
					roleRspActions.add(roleRspAction);
				}
			}
		}
	}
	return roleRspActions;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:29,代码来源:UiDocumentServiceImpl.java

示例4: processAddResponsibility

import org.kuali.rice.kim.document.IdentityManagementRoleDocument; //导入方法依赖的package包/类
public boolean processAddResponsibility(AddResponsibilityEvent addResponsibilityEvent) {
	KimDocumentRoleResponsibility newResponsibility = addResponsibilityEvent.getResponsibility();
	if(newResponsibility==null){
		GlobalVariables.getMessageMap().putError(ERROR_PATH, RiceKeyConstants.ERROR_EMPTY_ENTRY, new String[] {"Responsibility"});
		return false;
	}

	ResponsibilityBo kimResponsibilityImpl = newResponsibility.getKimResponsibility();
	if(kimResponsibilityImpl==null){
		GlobalVariables.getMessageMap().putError(ERROR_PATH, RiceKeyConstants.ERROR_EMPTY_ENTRY, new String[] {"Responsibility"});
		return false;
	}

	IdentityManagementRoleDocument document = (IdentityManagementRoleDocument)addResponsibilityEvent.getDocument();		
    boolean rulePassed = true;
	if (!hasPermissionToGrantResponsibility(ResponsibilityBo.to(kimResponsibilityImpl), document)) {
           GlobalVariables.getMessageMap().putError(ERROR_PATH, RiceKeyConstants.ERROR_ASSIGN_RESPONSIBILITY, 
           		new String[] {kimResponsibilityImpl.getNamespaceCode(), kimResponsibilityImpl.getTemplate().getName()});
           return false;
	}
	
	if (newResponsibility == null || StringUtils.isBlank(newResponsibility.getResponsibilityId())) {
           rulePassed = false;
           GlobalVariables.getMessageMap().putError(ERROR_PATH, RiceKeyConstants.ERROR_EMPTY_ENTRY, new String[] {"Responsibility"});
       } else {
       	int i = 0;
	    for (KimDocumentRoleResponsibility responsibility: document.getResponsibilities()) {
	    	if (responsibility.getResponsibilityId().equals(newResponsibility.getResponsibilityId())) {
	            rulePassed = false;
	            GlobalVariables.getMessageMap().putError("document.responsibilities["+i+"].responsibilityId", RiceKeyConstants.ERROR_DUPLICATE_ENTRY, new String[] {"Responsibility"});
	    	}
	    	i++;
	    }
       }
	return rulePassed;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:37,代码来源:KimDocumentResponsibilityRule.java

示例5: validResponsibilities

import org.kuali.rice.kim.document.IdentityManagementRoleDocument; //导入方法依赖的package包/类
protected boolean validResponsibilities(IdentityManagementRoleDocument document){
	ResponsibilityBo kimResponsibilityImpl;
	boolean valid = true;
	int i = 0;
	for(KimDocumentRoleResponsibility responsibility: document.getResponsibilities()){
		kimResponsibilityImpl = responsibility.getKimResponsibility();
		if(!responsibility.isActive() && !hasPermissionToGrantResponsibility(ResponsibilityBo.to(responsibility.getKimResponsibility()), document)){
	        GlobalVariables.getMessageMap().putError("responsibilities["+i+"].active", RiceKeyConstants.ERROR_ASSIGN_RESPONSIBILITY,
	        		new String[] {kimResponsibilityImpl.getNamespaceCode(), kimResponsibilityImpl.getTemplate().getName()});
	        valid = false;
		}
		i++;
	}
	return valid;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:16,代码来源:IdentityManagementRoleDocumentRule.java


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