use of com.linkedin.restli.examples.groups.api.ComplexKeyGroupMembership in project rest.li by linkedin.
the class GroupMembershipsResource3 method fromGroupMembership.
private static ComplexKeyGroupMembership fromGroupMembership(GroupMembership groupMembership) {
if (groupMembership == null) {
return null;
}
ComplexKeyGroupMembership complexKeyGroupMembership = new ComplexKeyGroupMembership(groupMembership.data());
GroupMembershipKey groupMembershipKey = new GroupMembershipKey();
groupMembershipKey.setGroupID(groupMembership.getGroupID());
groupMembershipKey.setMemberID(groupMembership.getMemberID());
complexKeyGroupMembership.setId(groupMembershipKey);
return complexKeyGroupMembership;
}
use of com.linkedin.restli.examples.groups.api.ComplexKeyGroupMembership in project rest.li by linkedin.
the class TestGroupsClient method buildComplexKeyGroupMembership.
private static ComplexKeyGroupMembership buildComplexKeyGroupMembership(GroupMembershipKey id, String contactEmail, String firstName, String lastName) {
ComplexKeyGroupMembership groupMembership = new ComplexKeyGroupMembership();
groupMembership.setId(id);
groupMembership.setContactEmail(contactEmail);
groupMembership.setFirstName(firstName);
groupMembership.setLastName(lastName);
// These fields must be set when creating a stand-alone group membership,
// lest the membership be considered incomplete.
groupMembership.setAllowMessagesFromMembers(true);
groupMembership.setEmailAnnouncementsFromManagers(true);
groupMembership.setEmailDigestFrequency(EmailDigestFrequency.WEEKLY);
groupMembership.setEmailForEveryNewPost(true);
groupMembership.setIsPublicized(true);
groupMembership.setMembershipLevel(MembershipLevel.MEMBER);
groupMembership.setWriteLevel(WriteLevel.DEFAULT);
return groupMembership;
}
Aggregations