1 13 14 package org.ejbca.ui.cli; 15 16 import java.util.Collection ; 17 import java.util.Iterator ; 18 19 import org.ejbca.core.model.ra.UserDataConstants; 20 import org.ejbca.core.model.ra.UserDataVO; 21 22 23 24 25 26 33 public class RaListNewUsersCommand extends BaseRaAdminCommand { 34 39 public RaListNewUsersCommand(String [] args) { 40 super(args); 41 } 42 43 49 public void execute() throws IllegalAdminCommandException, ErrorAdminCommandException { 50 try { 51 Collection coll = getAdminSession().findAllUsersByStatus(administrator, 52 UserDataConstants.STATUS_NEW); 53 Iterator iter = coll.iterator(); 54 55 while (iter.hasNext()) { 56 UserDataVO data = (UserDataVO) iter.next(); 57 getOutputStream().println("New User: " + data.getUsername() + ", \"" + data.getDN() + 58 "\", \"" + data.getSubjectAltName() + "\", " + data.getEmail() + ", " + 59 data.getStatus() + ", " + data.getType() + ", " + data.getTokenType()); 60 } 61 } catch (Exception e) { 62 throw new ErrorAdminCommandException(e); 63 } 64 } 65 66 } 68 | Popular Tags |