Package org.ejbca.core.model.approval

Examples of org.ejbca.core.model.approval.ApprovalDataText


  }

  @Override
  public List<ApprovalDataText> getNewRequestDataAsText(Admin admin){
    ArrayList<ApprovalDataText> newText = new ArrayList<ApprovalDataText>();
    newText.add(new ApprovalDataText("DUMMYDATAROW1: ", "YES" , false, false));
    newText.add(new ApprovalDataText("DUMMYDATAROW2: ", "YES" , false, false));
    return newText;
  }
View Full Code Here


   */
  @Override
  public List<ApprovalDataText> getNewRequestDataAsText(Admin admin) {
    ArrayList<ApprovalDataText> retval = new ArrayList<ApprovalDataText>();
    if ( username != null ) {
      retval.add(new ApprovalDataText("USERNAME",username,true,false));
    }
    if ( reason == RevokedCertInfo.NOT_REVOKED) {
      retval.add(new ApprovalDataText("REASON","UNREVOKE",true,true));
    } else {
      retval.add(new ApprovalDataText("REASON",SecConst.reasontexts[reason],true,true));
    }
    if ( certificateSerialNumber != null && issuerDN != null ) {
      retval.add(new ApprovalDataText("CERTSERIALNUMBER",certificateSerialNumber.toString(16),true,false));
      retval.add(new ApprovalDataText("ISSUERDN",issuerDN,true,false));
    }
    return retval;
  }
View Full Code Here

  }

  @Override
  public List<ApprovalDataText> getNewRequestDataAsText(Admin admin) {
    ArrayList<ApprovalDataText> retval = new ArrayList<ApprovalDataText>();
    retval.add(new ApprovalDataText("USERNAME",username,true,false));
    retval.add(new ApprovalDataText("STATUS",UserDataConstants.getTranslatableStatusText(newstatus),true,true));   
    return retval;
  }
View Full Code Here

  }
 
  @Override
  public List<ApprovalDataText> getOldRequestDataAsText(Admin admin) {
    ArrayList<ApprovalDataText> retval = new ArrayList<ApprovalDataText>();
    retval.add(new ApprovalDataText("USERNAME",username,true,false));
    retval.add(new ApprovalDataText("STATUS",UserDataConstants.getTranslatableStatusText(oldstatus),true,true));   
    return retval;
  }
View Full Code Here

  }

  @Override
  public List<ApprovalDataText> getNewRequestDataAsText(Admin admin) {
    ArrayList<ApprovalDataText> retval = new ArrayList<ApprovalDataText>();
    retval.add(new ApprovalDataText("USERNAME",username,true,false));   
    retval.add(new ApprovalDataText("SUBJECTDN",dn,true,false));
    retval.add(new ApprovalDataText("LABEL",tokenTypeLabel,true,true));
    return retval;
  }
View Full Code Here

  }

  @Override
  public List<ApprovalDataText> getNewRequestDataAsText(Admin admin) {
    ArrayList<ApprovalDataText> retval = new ArrayList<ApprovalDataText>();
    retval.add(new ApprovalDataText("USERNAME",username,true,false));   
    retval.add(new ApprovalDataText("SUBJECTDN",dn,true,false));
    retval.add(new ApprovalDataText("HARDTOKENSN",tokensn,true,false));
    if(viewpuk){
      retval.add(new ApprovalDataText("VIEWPUKENDENTITYRULE","YES",true,true));     
    }else{
      retval.add(new ApprovalDataText("VIEWPUKENDENTITYRULE","NO",true,true));
    }
    return retval;
  }
View Full Code Here

  }

  @Override
  public List<ApprovalDataText> getNewRequestDataAsText(Admin admin) {
    ArrayList<ApprovalDataText> retval = new ArrayList<ApprovalDataText>();
    retval.add(new ApprovalDataText("USERNAME",username,true,false));
    retval.add(new ApprovalDataText("CERTSERIALNUMBER",CertTools.getSerialNumberAsString(cert),true,false));
    retval.add(new ApprovalDataText("SUBJECTDN",CertTools.getSubjectDN(cert).toString(),true,false));
    retval.add(new ApprovalDataText("ISSUERDN",CertTools.getIssuerDN(cert).toString(),true,false));
    return retval;
  }
View Full Code Here

  }

  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;
  }
View Full Code Here

    return retval;
  }
 
  private ApprovalDataText getTextWithNoValueString(String header, String data){
    if(data==null || data.equals("")){
      return new ApprovalDataText(header,"NOVALUE",true,true);
    }
    return new ApprovalDataText(header,data,true,false);
  }
View Full Code Here

  }

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

TOP

Related Classes of org.ejbca.core.model.approval.ApprovalDataText

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.