Skip to content

Commit

Permalink
[MOSIP-33340] Selected handles populated to demographic
Browse files Browse the repository at this point in the history
  • Loading branch information
smruti933 committed May 31, 2024
1 parent 71fcda8 commit eb20f0b
Showing 1 changed file with 8 additions and 6 deletions.
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

0 comments on commit eb20f0b

Please sign in to comment.