Use this class to insert or update or delete a membership

Sample call

 MembershipSave membershipSave = new MembershipSave().assignGroup(group1).assignSubject(subject);;

Sample call to delete a membership

 MembershipSave membershipSave = new MembershipSave().assignGroup(group1).assignSubject(subject).assignSaveMode(SaveMode.DELETE);;

Sample call to add a membership using group name and subject identifier and sourceId.  Note, use double quotes to be java compliant

 new MembershipSave().assignGroupName('a:b:c').assignSubjectIdentifier('jsmith').assignSubjectSourceId('myUsers').save();


Java docs:

  • No labels