Set<Principal> groups, String principalName, String webStateUrl,
Set<UserGroupMembership> memberships, WebState webState) {
String globalNamespace = sharepointClientContext.getGoogleGlobalNamespace();
String localNamespace = sharepointClientContext.getGoogleLocalNamespace();
if (PrincipalType.USER.equals(principal.getType())) {
users.add(new Principal(SpiConstants.PrincipalType.UNKNOWN,
globalNamespace, principalName,
CaseSensitivityType.EVERYTHING_CASE_INSENSITIVE));
} else if (PrincipalType.DOMAINGROUP.equals(principal.getType())) {
groups.add(new Principal(SpiConstants.PrincipalType.UNKNOWN,
globalNamespace, principalName,
CaseSensitivityType.EVERYTHING_CASE_INSENSITIVE));
} else if (PrincipalType.SPGROUP.equals(principal.getType())) {
groups.add(Util.getSharePointGroupPrincipal(localNamespace,
webStateUrl, principalName));