}
public List<ApprovalDataText> getNewRequestDataAsText(Admin admin, CAAdminSession caAdminSession, EndEntityProfileSession endEntityProfileSession,
CertificateProfileSession certificateProfileSession, HardTokenSession hardTokenSession) {
ArrayList<ApprovalDataText> retval = new ArrayList<ApprovalDataText>();
retval.add(new ApprovalDataText("USERNAME",newuserdata.getUsername(),true,false));
String passwordtext = "NOTSHOWN";
if((newuserdata.getPassword() == null && !StringUtils.isEmpty(orguserdata.getPassword())) ||
(!StringUtils.isEmpty(newuserdata.getPassword()) && orguserdata.getPassword() == null)) {
passwordtext = "NEWPASSWORD";
}
if(newuserdata.getPassword() != null && orguserdata.getPassword() != null){
if(!newuserdata.getPassword().equals(orguserdata.getPassword())){
passwordtext = "NEWPASSWORD";
}
}
retval.add(new ApprovalDataText("PASSWORD",passwordtext,true,true));
retval.add(new ApprovalDataText("SUBJECTDN",CertTools.stringToBCDNString(newuserdata.getDN()),true,false));
retval.add(getTextWithNoValueString("SUBJECTALTNAME",newuserdata.getSubjectAltName()));
String dirattrs = newuserdata.getExtendedinformation() != null ? newuserdata.getExtendedinformation().getSubjectDirectoryAttributes() : null;
retval.add(getTextWithNoValueString("SUBJECTDIRATTRIBUTES",dirattrs));
retval.add(getTextWithNoValueString("EMAIL",newuserdata.getEmail()));
retval.add(new ApprovalDataText("CA", caAdminSession.getCAInfo(admin, newuserdata.getCAId()).getName(),true,false));
retval.add(new ApprovalDataText("ENDENTITYPROFILE", endEntityProfileSession.getEndEntityProfileName(admin, newuserdata.getEndEntityProfileId()),true,false));
retval.add(new ApprovalDataText("CERTIFICATEPROFILE", certificateProfileSession.getCertificateProfileName(admin, newuserdata.getCertificateProfileId()),true,false));
retval.add(ApprovalRequestHelper.getTokenName(hardTokenSession, admin,newuserdata.getTokenType()));
retval.add(getTextWithNoValueString("HARDTOKENISSUERALIAS", hardTokenSession.getHardTokenIssuerAlias(admin, newuserdata.getHardTokenIssuerId())));
retval.add(new ApprovalDataText("KEYRECOVERABLE",newuserdata.getKeyRecoverable() ? "YES" : "NO",true,true));
retval.add(new ApprovalDataText("SENDNOTIFICATION",newuserdata.getSendNotification() ? "YES" : "NO",true,true));
retval.add(new ApprovalDataText("STATUS",UserDataConstants.getTranslatableStatusText(newuserdata.getStatus()),true,true));
return retval;
}