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


Java Assignee类代码示例

本文整理汇总了Java中org.kuali.rice.kim.api.common.assignee.Assignee的典型用法代码示例。如果您正苦于以下问题:Java Assignee类的具体用法?Java Assignee怎么用?Java Assignee使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Assignee类属于org.kuali.rice.kim.api.common.assignee包,在下文中一共展示了Assignee类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getRoleMembersFromDerivedRole

import org.kuali.rice.kim.api.common.assignee.Assignee; //导入依赖的package包/类
@Override
public List<RoleMembership> getRoleMembersFromDerivedRole(String namespaceCode, String roleName, Map<String, String> qualification) {
    if (StringUtils.isBlank(namespaceCode)) {
        throw new RiceIllegalArgumentException("namespaceCode was null or blank");
    }

    if (roleName == null) {
        throw new RiceIllegalArgumentException("roleName was null");
    }
    List<Assignee> permissionAssignees = getPermissionAssignees(qualification);
    List<RoleMembership> members = new ArrayList<RoleMembership>();
    for (Assignee permissionAssigneeInfo : permissionAssignees) {
        if (StringUtils.isNotBlank(permissionAssigneeInfo.getPrincipalId())) {
            members.add(RoleMembership.Builder.create(null/*roleId*/, null, permissionAssigneeInfo.getPrincipalId(), MemberType.PRINCIPAL, null).build());
        } else if (StringUtils.isNotBlank(permissionAssigneeInfo.getGroupId())) {
            members.add(RoleMembership.Builder.create(null/*roleId*/, null, permissionAssigneeInfo.getGroupId(), MemberType.GROUP, null).build());
        }
    }
    return members;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:21,代码来源:PermissionDerivedRoleTypeServiceImpl.java

示例2: getPermissionAssigneesByTemplate

import org.kuali.rice.kim.api.common.assignee.Assignee; //导入依赖的package包/类
/**
 * @see org.kuali.rice.kim.api.permission.PermissionService#getPermissionAssigneesByTemplate(java.lang.String,
 *      java.lang.String, java.util.Map, java.util.Map)
 */
@Override
public List<Assignee> getPermissionAssigneesByTemplate(String namespaceCode, String permissionTemplateName,
        Map<String, String> permissionDetails, Map<String, String> qualification)
        throws RiceIllegalArgumentException {
    throw new UnsupportedOperationException();
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:11,代码来源:MockPermissionService.java

示例3: getPermissionAssignees

import org.kuali.rice.kim.api.common.assignee.Assignee; //导入依赖的package包/类
@Override
 public List<Assignee> getPermissionAssignees( String namespaceCode, String permissionName,
         Map<String, String> qualification ) throws RiceIllegalArgumentException {
     incomingParamCheck(namespaceCode, "namespaceCode");
     incomingParamCheck(permissionName, "permissionName");
     incomingParamCheck(qualification, "qualification");

 	List<String> roleIds = getRoleIdsForPermission( namespaceCode, permissionName);
 	if ( roleIds.isEmpty() ) {
 		return Collections.emptyList();
 	}
 	Collection<RoleMembership> roleMembers = roleService.getRoleMembers( roleIds,qualification );
 	List<Assignee> results = new ArrayList<Assignee>();
     for ( RoleMembership rm : roleMembers ) {
List<DelegateType.Builder> delegateBuilderList = new ArrayList<DelegateType.Builder>();
if (!rm.getDelegates().isEmpty()) {
 			for (DelegateType delegate : rm.getDelegates()){
                 delegateBuilderList.add(DelegateType.Builder.create(delegate));
 			}
}
 		if ( MemberType.PRINCIPAL.equals(rm.getType()) ) {
 			results.add (Assignee.Builder.create(rm.getMemberId(), null, delegateBuilderList).build());
 		} else if ( MemberType.GROUP.equals(rm.getType()) ) {
 			results.add (Assignee.Builder.create(null, rm.getMemberId(), delegateBuilderList).build());
 		}
 	}

 	return Collections.unmodifiableList(results);
 }
 
开发者ID:kuali,项目名称:kc-rice,代码行数:30,代码来源:PermissionServiceImpl.java

示例4: getPermissionAssigneesByTemplate

import org.kuali.rice.kim.api.common.assignee.Assignee; //导入依赖的package包/类
@Override
 public List<Assignee> getPermissionAssigneesByTemplate(String namespaceCode, String permissionTemplateName,
         Map<String, String> permissionDetails, Map<String, String> qualification) throws RiceIllegalArgumentException {
     incomingParamCheck(namespaceCode, "namespaceCode");
     incomingParamCheck(permissionTemplateName, "permissionTemplateName");
     incomingParamCheck(qualification, "qualification");

 	List<String> roleIds = getRoleIdsForPermissionTemplate( namespaceCode, permissionTemplateName, permissionDetails);
 	if ( roleIds.isEmpty() ) {
 		return Collections.emptyList();
 	}
 	Collection<RoleMembership> roleMembers = roleService.getRoleMembers( roleIds,qualification);
 	List<Assignee> results = new ArrayList<Assignee>();
     for ( RoleMembership rm : roleMembers ) {
List<DelegateType.Builder> delegateBuilderList = new ArrayList<DelegateType.Builder>();
if (!rm.getDelegates().isEmpty()) {
 			for (DelegateType delegate : rm.getDelegates()){
                 delegateBuilderList.add(DelegateType.Builder.create(delegate));
 			}
}
 		if ( MemberType.PRINCIPAL.equals(rm.getType()) ) {
 			results.add (Assignee.Builder.create(rm.getMemberId(), null, delegateBuilderList).build());
 		} else { // a group membership
 			results.add (Assignee.Builder.create(null, rm.getMemberId(), delegateBuilderList).build());
 		}
 	}
 	return Collections.unmodifiableList(results);
 }
 
开发者ID:kuali,项目名称:kc-rice,代码行数:29,代码来源:PermissionServiceImpl.java

示例5: testGetPermissionAssignees

import org.kuali.rice.kim.api.common.assignee.Assignee; //导入依赖的package包/类
@Test
public void testGetPermissionAssignees() {
	
	List<Assignee> assignees = getPermissionService().getPermissionAssignees("KUALI", "Log In Kuali Portal", Collections.<String, String>emptyMap());
	assertNotNull(assignees);
	assertEquals(1, assignees.size());
	Assignee permInfo = assignees.get(0);
	assertEquals("entity123pId", permInfo.getPrincipalId());
	assignees = getPermissionService().getPermissionAssignees("KUALI", "Not A Valid Permission Name", Collections.<String, String>emptyMap());
	// TODO - jax-ws remoted service returns null; local return empty List. Fix webservice return
	assertTrue(null == assignees || assignees.size() == 0);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:13,代码来源:PermissionServiceTest.java

示例6: getPermissionAssignees

import org.kuali.rice.kim.api.common.assignee.Assignee; //导入依赖的package包/类
/**
 * @see org.kuali.rice.kim.api.permission.PermissionService#getPermissionAssignees(java.lang.String,
 *      java.lang.String, java.util.Map)
 */
@Override
public List<Assignee> getPermissionAssignees(String namespaceCode, String permissionName,
        Map<String, String> qualification) throws RiceIllegalArgumentException {
    throw new UnsupportedOperationException();
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:10,代码来源:MockPermissionService.java

示例7: getPermissionAssignees

import org.kuali.rice.kim.api.common.assignee.Assignee; //导入依赖的package包/类
protected List<Assignee> getPermissionAssignees(Map<String, String> qualification) {
	return getPermissionService().getPermissionAssigneesByTemplate(permissionTemplateNamespace,
               permissionTemplateName, new HashMap<String, String>(qualification), new HashMap<String, String>(
               qualification));
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:6,代码来源:PermissionDerivedRoleTypeServiceImpl.java

示例8: getPermissionAssignees

import org.kuali.rice.kim.api.common.assignee.Assignee; //导入依赖的package包/类
List<Assignee> getPermissionAssignees(
         String namespaceCode,
         String permissionName,
          Map<String, String> permissionDetails,
          Map<String, String> qualification
);
 
开发者ID:kuali,项目名称:kc-rice,代码行数:7,代码来源:IdentityManagementService.java

示例9: getPermissionAssigneesForTemplate

import org.kuali.rice.kim.api.common.assignee.Assignee; //导入依赖的package包/类
List<Assignee> getPermissionAssigneesForTemplate(String namespaceCode, String permissionTemplateName,
Map<String, String> permissionDetails, Map<String, String> qualification);
 
开发者ID:kuali,项目名称:kc-rice,代码行数:3,代码来源:IdentityManagementService.java

示例10: getPermissionAssignees

import org.kuali.rice.kim.api.common.assignee.Assignee; //导入依赖的package包/类
@Override
public List<Assignee> getPermissionAssignees(String namespaceCode,
		String permissionName, Map<String, String> permissionDetails, Map<String, String> qualification) {
	return this.permissionService.getPermissionAssignees(namespaceCode, permissionName, qualification);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:6,代码来源:IdentityManagementServiceImpl.java

示例11: getPermissionAssigneesForTemplate

import org.kuali.rice.kim.api.common.assignee.Assignee; //导入依赖的package包/类
@Override
public List<Assignee> getPermissionAssigneesForTemplate(String namespaceCode, String permissionTemplateName,
           Map<String, String> permissionDetails, Map<String, String> qualification) {
	return this.permissionService.getPermissionAssigneesByTemplate(namespaceCode, permissionTemplateName,
               new HashMap<String, String>(permissionDetails), new HashMap<String, String>(qualification));
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:7,代码来源:IdentityManagementServiceImpl.java

示例12: getPermissionAssignees

import org.kuali.rice.kim.api.common.assignee.Assignee; //导入依赖的package包/类
/**
    * Get the list of principals/groups who have a given permission.  This also returns delegates
    * for the given principals/groups who also have this permission given the context in the
    * qualification parameter.
    * 
    * Each role assigned to the principal is checked for qualifications.  If a qualifier 
    * exists on the principal's membership in that role, that is checked first through
    * the role's type service.  Once it is determined that the principal has the role
    * in the given context (qualification), the permissions are examined.
    *
    * @param namespaceCode the namespace code.  cannot be null or blank.
    * @param permissionName the permission name. cannot be null or blank.
    * @param qualification the permission qualifications
    * @return list of assignees that have been assigned the permissions
    * @throws RiceIllegalArgumentException if the principalId, namespaceCode, permissionName is null or blank
    */
@WebMethod(operationName = "getPermissionAssignees")
   @XmlElementWrapper(name = "assignees", required = true)
   @XmlElement(name = "assignee", required = false)
   @WebResult(name = "assignees")
   List<Assignee> getPermissionAssignees( @WebParam(name="namespaceCode") String namespaceCode,
   									   @WebParam(name="permissionName") String permissionName,
                                          @XmlJavaTypeAdapter(value = MapStringStringAdapter.class)
   									   @WebParam(name="qualification") Map<String, String> qualification )
           throws RiceIllegalArgumentException;
 
开发者ID:kuali,项目名称:kc-rice,代码行数:26,代码来源:PermissionService.java

示例13: getPermissionAssigneesByTemplate

import org.kuali.rice.kim.api.common.assignee.Assignee; //导入依赖的package包/类
/**
    * Get the list of principals/groups who have a given permission that match the given 
    * permission template and permission details.  This also returns delegates
    * for the given principals/groups who also have this permission given the context in the
    * qualification parameter.
    * 
    * Each role assigned to the principal is checked for qualifications.  If a qualifier 
    * exists on the principal's membership in that role, that is checked first through
    * the role's type service.  Once it is determined that the principal has the role
    * in the given context (qualification), the permissions are examined.
    *
    * @param namespaceCode the namespace code.  cannot be null or blank.
    * @param permissionTemplateName the permission name. cannot be null or blank.
    * @param permissionDetails the permission details.
    * @param qualification the permission qualifications
    * @return list of assignees that have been assigned the permissions by template
    * @throws RiceIllegalArgumentException if the principalId, namespaceCode, permissionName is null or blank
    */
@WebMethod(operationName = "getPermissionAssigneesByTemplate")
   @XmlElementWrapper(name = "assignees", required = true)
   @XmlElement(name = "assignee", required = false)
   @WebResult(name = "assignees")
   List<Assignee> getPermissionAssigneesByTemplate(@WebParam(name = "namespaceCode") String namespaceCode,
           @WebParam(name = "permissionTemplateName") String permissionTemplateName,
           @XmlJavaTypeAdapter(value = MapStringStringAdapter.class) @WebParam(
                   name = "permissionDetails") Map<String, String> permissionDetails,
           @XmlJavaTypeAdapter(value = MapStringStringAdapter.class) @WebParam(
                   name = "qualification") Map<String, String> qualification) throws RiceIllegalArgumentException;
 
开发者ID:kuali,项目名称:kc-rice,代码行数:29,代码来源:PermissionService.java


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