Skip to content

Add Paginiation and Lookups by Attributes #1

wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Prev Previous commit
Fix Group Delete Issue
pspaude committed Oct 7, 2021
commit 336435b9e4acb17b8bd0e602f796a27ff482d5de
@@ -65,6 +65,7 @@ public class GroupProcessor extends Processor {
private static final String J_RESULT_CODE = "resultCode";
private static final String J_SUCCESS = "success";
private static final String J_WS_ATTRIBUTE_ASSIGN_TYPE = "attributeAssignType";
private static final String J_WS_GROUP_NOT_FOUND = "GROUP_NOT_FOUND";

private static final String J_WS_SUBJECTS = "wsSubjects";
private static final String J_WS_GROUP = "wsGroup";
@@ -261,10 +262,7 @@ private boolean executeGetMembers(HttpPost request, JSONObject body, ResultsHand
addPageNumber(body, pageNumber, shouldPage);
final CallResponse callResponse = callRequest(request, body, (statusCode, responseBody) -> {
final JSONObject errorResponse = new JSONObject(responseBody);
final JSONObject resultMetadata = (JSONObject) getIfExists(errorResponse, List.of(J_WS_GET_MEMBERS_RESULTS, J_RESULTS), List.of(J_RESULT_METADATA));
final String resultCode = resultMetadata != null ? getStringOrNull(resultMetadata, J_RESULT_CODE) : null;
boolean notFound = "GROUP_NOT_FOUND".equals(resultCode);
if (notFound) {
if (errorResponse.toString().contains(J_WS_GROUP_NOT_FOUND)) {
return CallResponse.error(responseBody);
} else {
return null;