import org.cacert.gigi.dbObjects.DomainPingType;
import org.cacert.gigi.dbObjects.EmailAddress;
import org.cacert.gigi.dbObjects.Group;
-import org.cacert.gigi.dbObjects.Name;
+import org.cacert.gigi.dbObjects.NamePart;
+import org.cacert.gigi.dbObjects.NamePart.NamePartType;
import org.cacert.gigi.dbObjects.User;
import org.cacert.gigi.email.EmailProvider;
import org.cacert.gigi.localisation.Language;
private static Manager instance;
- Template t = new Template(Manager.class.getResource("ManagerMails.templ"));
+ private static final Template t = new Template(Manager.class.getResource("ManagerMails.templ"));
HashMap<String, LinkedList<String>> emails = new HashMap<>();
}
@Override
- public synchronized void sendmail(String to, String subject, String message, String from, String replyto, String toname, String fromname, String errorsto, boolean extra) throws IOException {
+ public synchronized void sendMail(String to, String subject, String message, String from, String replyto, String toname, String fromname, String errorsto, boolean extra) throws IOException {
HashMap<String, LinkedList<String>> mails = Manager.getInstance().emails;
LinkedList<String> hismails = mails.get(to);
if (hismails == null) {
Calendar gc = GregorianCalendar.getInstance();
gc.setTimeInMillis(0);
gc.set(1990, 0, 1);
- User u = new User(email, "xvXV12°§", new Name("Först", "Läst", "Müddle", "Süffix"), new DayDate(gc.getTime().getTime()), Locale.ENGLISH);
+ User u = new User(email, "xvXV12°§", new DayDate(gc.getTime().getTime()), Locale.ENGLISH, //
+ new NamePart(NamePartType.FIRST_NAME, "Först"), new NamePart(NamePartType.FIRST_NAME, "Müddle"),//
+ new NamePart(NamePartType.LAST_NAME, "Läst"), new NamePart(NamePartType.SUFFIX, "Süffix"));
EmailAddress ea = u.getEmails()[0];
verify(email, ea);
}
}
try {
for (int i = 0; i < 10; i++) {
- Notary.assure(getAssurer(i), byEmail, byEmail.getName(), byEmail.getDoB(), 10, "Testmanager Assure up code", "2014-11-06", AssuranceType.FACE_TO_FACE);
+ Notary.assure(getAssurer(i), byEmail, byEmail.getPreferredName(), byEmail.getDoB(), 10, "Testmanager Assure up code", "2014-11-06", AssuranceType.FACE_TO_FACE);
}
} catch (GigiApiException e) {
throw new Error(e);
try {
for (int i = 0; i < 25; i++) {
User a = getAssurer(i);
- Notary.assure(byEmail, a, a.getName(), a.getDoB(), 10, "Testmanager exp up code", "2014-11-06", AssuranceType.FACE_TO_FACE);
+ Notary.assure(byEmail, a, a.getNames()[0], a.getDoB(), 10, "Testmanager exp up code", "2014-11-06", AssuranceType.FACE_TO_FACE);
}
} catch (GigiApiException e) {
throw new Error(e);
}
}
- private Template form = new Template(Manager.class.getResource("Manager.templ"));
+ private static final Template form = new Template(Manager.class.getResource("Manager.templ"));
@Override
public boolean needsLogin() {