本文整理汇总了Java中org.kuali.rice.kim.api.group.GroupMember.getActiveToDate方法的典型用法代码示例。如果您正苦于以下问题:Java GroupMember.getActiveToDate方法的具体用法?Java GroupMember.getActiveToDate怎么用?Java GroupMember.getActiveToDate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.kuali.rice.kim.api.group.GroupMember
的用法示例。
在下文中一共展示了GroupMember.getActiveToDate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadGroupToPersonDoc
import org.kuali.rice.kim.api.group.GroupMember; //导入方法依赖的package包/类
/**
*
* This method loads related group data to pending person document when user initiates the 'edit' or 'inquiry'.
*
* @param identityManagementPersonDocument
* @param groups
*/
protected void loadGroupToPersonDoc(IdentityManagementPersonDocument identityManagementPersonDocument, List<? extends Group> groups) {
List <PersonDocumentGroup> docGroups = new ArrayList <PersonDocumentGroup>();
if(ObjectUtils.isNotNull(groups)){
for (Group group: groups) {
if (getGroupService().isDirectMemberOfGroup(identityManagementPersonDocument.getPrincipalId(), group.getId())) {
PersonDocumentGroup docGroup = new PersonDocumentGroup();
docGroup.setGroupId(group.getId());
docGroup.setGroupName(group.getName());
docGroup.setNamespaceCode(group.getNamespaceCode());
docGroup.setPrincipalId(identityManagementPersonDocument.getPrincipalId());
Collection<GroupMember> groupMemberships = null;
groupMemberships = getGroupService().getMembersOfGroup(group.getId());
if(ObjectUtils.isNotNull(groupMemberships)){
for (GroupMember groupMember: groupMemberships) {
if (StringUtils.equals(groupMember.getMemberId(), identityManagementPersonDocument.getPrincipalId()) &&
KimGroupMemberTypes.PRINCIPAL_MEMBER_TYPE.equals(groupMember.getType())) {
docGroup.setGroupMemberId(groupMember.getId());
if (groupMember.getActiveFromDate() != null) {
docGroup.setActiveFromDate(groupMember.getActiveFromDate() == null ? null : new Timestamp(groupMember.getActiveFromDate().getMillis()));
}
if (groupMember.getActiveToDate() != null) {
docGroup.setActiveToDate(groupMember.getActiveToDate() == null ? null : new Timestamp(groupMember.getActiveToDate().getMillis()));
}
continue;
}
}
}
docGroup.setKimTypeId(group.getKimTypeId());
docGroup.setEdit(true);
docGroups.add(docGroup);
}
}
}
identityManagementPersonDocument.setGroups(docGroups);
}
示例2: loadGroupToPersonDoc
import org.kuali.rice.kim.api.group.GroupMember; //导入方法依赖的package包/类
/**
*
* This method loads related group data to pending person document when user initiates the 'edit' or 'inquiry'.
*
* @param identityManagementPersonDocument
* @param groups
*/
protected void loadGroupToPersonDoc(IdentityManagementPersonDocument identityManagementPersonDocument, List<? extends Group> groups) {
List <PersonDocumentGroup> docGroups = new ArrayList <PersonDocumentGroup>();
if(ObjectUtils.isNotNull(groups)){
for (Group group: groups) {
if (getGroupService().isDirectMemberOfGroup(identityManagementPersonDocument.getPrincipalId(), group.getId())) {
PersonDocumentGroup docGroup = new PersonDocumentGroup();
docGroup.setGroupId(group.getId());
docGroup.setGroupName(group.getName());
docGroup.setNamespaceCode(group.getNamespaceCode());
docGroup.setPrincipalId(identityManagementPersonDocument.getPrincipalId());
Collection<GroupMember> groupMemberships = null;
groupMemberships = getGroupService().getMembersOfGroup(group.getId());
if(ObjectUtils.isNotNull(groupMemberships)){
for (GroupMember groupMember: groupMemberships) {
if (StringUtils.equals(groupMember.getMemberId(), identityManagementPersonDocument.getPrincipalId()) &&
KimGroupMemberTypes.PRINCIPAL_MEMBER_TYPE.equals(groupMember.getType())) {
docGroup.setGroupMemberId(groupMember.getId());
if (groupMember.getActiveFromDate() != null) {
docGroup.setActiveFromDate(groupMember.getActiveFromDate() == null ? null : new Timestamp(groupMember.getActiveFromDate().getMillis()));
}
if (groupMember.getActiveToDate() != null) {
docGroup.setActiveToDate(groupMember.getActiveToDate() == null ? null : new Timestamp(groupMember.getActiveToDate().getMillis()));
}
continue;
}
}
}
docGroup.setKimTypeId(group.getKimTypeId());
docGroup.setEdit(true);
docGroups.add(docGroup);
}
}
}
Collections.sort(docGroups, new Comparator<PersonDocumentGroup>() {
@Override
public int compare(PersonDocumentGroup o1, PersonDocumentGroup o2) {
return o1.getGroupId().compareTo(o2.getGroupId());
}
});
identityManagementPersonDocument.setGroups(docGroups);
}