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


Java GroupService.getMemberPrincipalIds方法代码示例

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


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

示例1: FutureRequestDocumentStateManager

import org.kuali.rice.kim.api.group.GroupService; //导入方法依赖的package包/类
public FutureRequestDocumentStateManager (DocumentRouteHeaderValue document, Group kimGroup)
  {
      GroupService ims = KimApiServiceLocator.getGroupService();
      List<String> principalIds =
          ims.getMemberPrincipalIds(kimGroup.getId());

      for (String id : principalIds)
{
    FutureRequestDocumentStateManager requestStateMngr =
        new FutureRequestDocumentStateManager(document, id);
    if (requestStateMngr.isReceiveFutureRequests()) {
	this.receiveFutureRequests = true;
    } else if (requestStateMngr.isDoNotReceiveFutureRequests()) {
	this.doNotReceiveFutureRequests = true;
    }
}
  }
 
开发者ID:kuali,项目名称:kc-rice,代码行数:18,代码来源:FutureRequestDocumentStateManager.java

示例2: testGroupImportXml

import org.kuali.rice.kim.api.group.GroupService; //导入方法依赖的package包/类
/**
 *
 * Verify that a workgroup with a bad user in the xml is not going to be put in the db.
 *
 * @throws Exception
 */

@Test public void testGroupImportXml() throws Exception {
	loadXmlFile("GroupXmlImportTest.xml");

    IdentityService identityService = KimApiServiceLocator.getIdentityService();
    GroupService groupService = KimApiServiceLocator.getGroupService();
    //verify that the group was ingested
    Group group = groupService.getGroupByNamespaceCodeAndName(KimConstants.KIM_GROUP_WORKFLOW_NAMESPACE_CODE,
            "TestUserGroup");

    assertNotNull(group);
    List<String> members = groupService.getMemberPrincipalIds(group.getId());
    List<String> groups = groupService.getMemberGroupIds(group.getId());
    assertTrue(groupService.isMemberOfGroup(identityService.getPrincipalByPrincipalName("ewestfal").getPrincipalId(), group.getId()));
    assertTrue(groupService.isMemberOfGroup(identityService.getPrincipalByPrincipalName("rkirkend").getPrincipalId(), group.getId()));
    assertTrue(groupService.isMemberOfGroup("2015", group.getId()));
    assertTrue(KimApiServiceLocator.getGroupService().isGroupMemberOfGroup(groupService.getGroupByNamespaceCodeAndName(
            KimConstants.KIM_GROUP_WORKFLOW_NAMESPACE_CODE, "TestWorkgroup").getId(), group.getId()));
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:26,代码来源:GroupXmlImportTest.java

示例3: saveWorkgroup

import org.kuali.rice.kim.api.group.GroupService; //导入方法依赖的package包/类
@Override
public GroupBo saveWorkgroup(GroupBo group) {
	GroupService ims = getGroupService();
    List<String> oldIds = Collections.emptyList();
	if (StringUtils.isNotEmpty(group.getId())) {
        oldIds = ims.getMemberPrincipalIds(group.getId());
    }
    group = getDataObjectService().save(group,PersistenceOption.FLUSH);
    List<String> newIds = ims.getMemberPrincipalIds(group.getId());
    updateForWorkgroupChange(group.getId(), oldIds, newIds);
    return group;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:13,代码来源:GroupInternalServiceImpl.java

示例4: removeAllMembers

import org.kuali.rice.kim.api.group.GroupService; //导入方法依赖的package包/类
@Override
public void removeAllMembers(String groupId) throws RiceIllegalArgumentException{
    incomingParamCheck(groupId, "groupId");


    GroupService groupService = KimApiServiceLocator.getGroupService();
    List<String> memberPrincipalsBefore = groupService.getMemberPrincipalIds(groupId);

    Collection<GroupMemberBo> toDeactivate = getActiveGroupMembers(groupId, null, null);
    java.sql.Timestamp today = new java.sql.Timestamp(System.currentTimeMillis());

    // Set principals as inactive
    for (GroupMemberBo aToDeactivate : toDeactivate) {
        aToDeactivate.setActiveToDateValue(today);
    }

    // Save
    for (GroupMemberBo bo : toDeactivate) {
        this.dataObjectService.save(bo);
    }
    List<String> memberPrincipalsAfter = groupService.getMemberPrincipalIds(groupId);

    if (!CollectionUtils.isEmpty(memberPrincipalsAfter)) {
	    // should never happen!
	    LOG.warn("after attempting removal of all members, group with id '" + groupId + "' still has principal members");
    }

    // do updates
    KimImplServiceLocator.getGroupInternalService().updateForWorkgroupChange(groupId, memberPrincipalsBefore,
           memberPrincipalsAfter);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:32,代码来源:GroupServiceImpl.java

示例5: saveWorkgroup

import org.kuali.rice.kim.api.group.GroupService; //导入方法依赖的package包/类
@Override
public GroupBo saveWorkgroup(GroupBo group) {
	GroupService ims = getGroupService();
    List<String> oldIds = Collections.emptyList();
	if (StringUtils.isNotEmpty(group.getId())) {
        oldIds = ims.getMemberPrincipalIds(group.getId());
    }
    group = (GroupBo)getBusinessObjectService().save( group );
    List<String> newIds = ims.getMemberPrincipalIds(group.getId());
    updateForWorkgroupChange(group.getId(), oldIds, newIds);
    return group;
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:13,代码来源:GroupInternalServiceImpl.java

示例6: removeAllMembers

import org.kuali.rice.kim.api.group.GroupService; //导入方法依赖的package包/类
@Override
public void removeAllMembers(String groupId) throws RiceIllegalArgumentException{
    incomingParamCheck(groupId, "groupId");


    GroupService groupService = KimApiServiceLocator.getGroupService();
    List<String> memberPrincipalsBefore = groupService.getMemberPrincipalIds(groupId);

    Collection<GroupMemberBo> toDeactivate = getActiveGroupMembers(groupId, null, null);
    java.sql.Timestamp today = new java.sql.Timestamp(System.currentTimeMillis());

    // Set principals as inactive
    for (GroupMemberBo aToDeactivate : toDeactivate) {
        aToDeactivate.setActiveToDateValue(today);
    }

    // Save
    this.businessObjectService.save(new ArrayList<GroupMemberBo>(toDeactivate));
    List<String> memberPrincipalsAfter = groupService.getMemberPrincipalIds(groupId);

    if (!CollectionUtils.isEmpty(memberPrincipalsAfter)) {
	    // should never happen!
	    LOG.warn("after attempting removal of all members, group with id '" + groupId + "' still has principal members");
    }

    // do updates
    KimImplServiceLocator.getGroupInternalService().updateForWorkgroupChange(groupId, memberPrincipalsBefore,
           memberPrincipalsAfter);
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:30,代码来源:GroupServiceImpl.java


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