本文整理汇总了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;
}
}
}
示例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()));
}
示例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;
}
示例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);
}
示例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;
}
示例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);
}