Skip to content

Commit

Permalink
Added selected handles code (#482)
Browse files Browse the repository at this point in the history
Signed-off-by: G S Prakash <prakash.gs@cyberpwn.com>
  • Loading branch information
GSPrakash2662 authored Nov 13, 2024
1 parent 3b6967b commit 81b9d79
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,13 @@ public String getCachedStringMAVELScript(){
public String getCachedStringPreRegPacketLocation(){
return globalParamMap.get(RegistrationConstants.PRE_REG_PACKET_LOCATION);
}

public List<String> getSelectedHandles() {
String value = globalParamMap.getOrDefault(RegistrationConstants.SELECTED_HANDLES, "");
return Arrays.asList(value.split(RegistrationConstants.COMMA)).stream()
.map(String::trim)
.filter(item-> !item.isEmpty())
.distinct()
.collect(Collectors.toList());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,11 @@ public void submitRegistrationDto(String makerName) throws Exception {
throw new ClientCheckedException(context, R.string.err_004);
}

if(RegistrationConstants.SELECTED_HANDLES != null){
if(this.registrationDto.getFlowType().equals("NEW")) {
this.registrationDto.getDemographics().put("selectedHandles", RegistrationConstants.SELECTED_HANDLES);
}
List<String> selectedHandles = this.globalParamRepository.getSelectedHandles();
if(selectedHandles != null) {
if (this.registrationDto.getFlowType().equals("NEW")) {
this.registrationDto.getDemographics().put("selectedHandles", selectedHandles);
}
}

// try {
Expand Down

0 comments on commit 81b9d79

Please sign in to comment.