Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MOSIP-33340] Selected handles populated to demographic #23

Merged
merged 1 commit into from
May 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
package io.mosip.registration.processor.stages.uingenerator.stage;

import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.*;

import org.apache.commons.lang3.exception.ExceptionUtils;
import org.json.JSONArray;
Expand Down Expand Up @@ -111,6 +107,7 @@ public class UinGeneratorStage extends MosipVerticleAPIManager {
private static Logger regProcLogger = RegProcessorLogger.getLogger(UinGeneratorStage.class);
private static final String RECORD_ALREADY_EXISTS_ERROR = "IDR-IDC-012";
private static final String STAGE_PROPERTY_PREFIX = "mosip.regproc.uin.generator.";
private static final String SELECTED_HANDLES = "selectedHandles";
private static final String UIN = "UIN";
private static final String IDREPO_STATUS = "DRAFTED";

Expand Down Expand Up @@ -485,12 +482,17 @@ else if (json instanceof JSONArray) {
jsonList.add(hashMap);
}
demographicIdentity.putIfAbsent(e.getKey(), jsonList);
} else
} else if (e.getKey().equals(SELECTED_HANDLES) && value instanceof String) {
demographicIdentity.put(e.getKey(), Arrays.asList(value.split(",")));
} else {
demographicIdentity.putIfAbsent(e.getKey(), value);
}
} else
demographicIdentity.putIfAbsent(e.getKey(), value);

}
}

}

/**
Expand Down
Loading