email = new EmailPrint();
maxEmails=3;
maxEmails = Integer.parseInt(trans.getProperty("MAX_EMAILS","3"));
email = new EmailPrint();
maxEmails=3;
maxEmails = Integer.parseInt(trans.getProperty("MAX_EMAILS","3"));
ownerCreds.put(UNKNOWN_ID,noOwner);
// Get a list of ONLY the ones needing email by Owner
ownerCreds.put(UNKNOWN_ID,noOwner);
// Get a list of ONLY the ones needing email by Owner
ownerCreds.put(owner, (llc=new ArrayList<>()));
}
llc.add(new LastCred(c,last));
ownerCreds.put(owner, (llc=new ArrayList<>()));
}
llc.add(new LastCred(c,last));
String owner = es.getKey();
boolean header = true;
try {
Organization org = OrganizationFactory.obtain(env, owner);
Identity user = org.getIdentity(noAvg, owner);
String owner = es.getKey();
boolean header = true;
try {
Organization org = OrganizationFactory.obtain(env, owner);
Identity user = org.getIdentity(noAvg, owner);
bCritical=bNormal=bEarly = false;
email.clear();
msg.clear();
email.addTo(user==null?supportEmailAddr:user.email());
ownNotf = Notification.get(es.getKey(),TYPE.CN);
bCritical=bNormal=bEarly = false;
email.clear();
msg.clear();
email.addTo(user==null?supportEmailAddr:user.email());
ownNotf = Notification.get(es.getKey(),TYPE.CN);
ownNotf = Notification.create(user==null?UNKNOWN_ID:user.fullID(), TYPE.CN);
}
last = ownNotf.last;
// Get Max ID size for formatting purposes
int length = AAF_INSTANTIATED_MECHID.length();
ownNotf = Notification.create(user==null?UNKNOWN_ID:user.fullID(), TYPE.CN);
}
last = ownNotf.last;
// Get Max ID size for formatting purposes
int length = AAF_INSTANTIATED_MECHID.length();
length = Math.max(length, lc.cred.id.length());
}
String id_exp_fmt = "\t%-"+length+"s %15s %s";
Collections.sort(es.getValue(),LastCred.COMPARE);
length = Math.max(length, lc.cred.id.length());
}
String id_exp_fmt = "\t%-"+length+"s %15s %s";
Collections.sort(es.getValue(),LastCred.COMPARE);
msg.line("\tThe following are friendly 2 month reminders, just in case you need to schedule your updates early. "
+ "You will be reminded next month\n");
msg.line(id_exp_fmt, AAF_INSTANTIATED_MECHID,EXPIRATION_DATE, QUICK_LINK);
msg.line("\tThe following are friendly 2 month reminders, just in case you need to schedule your updates early. "
+ "You will be reminded next month\n");
msg.line(id_exp_fmt, AAF_INSTANTIATED_MECHID,EXPIRATION_DATE, QUICK_LINK);
msg.line("\tIt is now important for you to update Passwords all all configurations using them for the following.\n" +
(last2wks?"\tNote: Your Supervisor is CCd\n":"\tNote: Your Supervisor will be notified if this is not being done before the last 2 weeks\n"));
msg.line(id_exp_fmt, AAF_INSTANTIATED_MECHID,EXPIRATION_DATE, QUICK_LINK);
msg.line("\tIt is now important for you to update Passwords all all configurations using them for the following.\n" +
(last2wks?"\tNote: Your Supervisor is CCd\n":"\tNote: Your Supervisor will be notified if this is not being done before the last 2 weeks\n"));
msg.line(id_exp_fmt, AAF_INSTANTIATED_MECHID,EXPIRATION_DATE, QUICK_LINK);
- } else if(lc.last.after(tooLate) && lc.last.before(critical)) { // Email Every Day, with Supervisor
- if(!bCritical && header) {
+ } else if (lc.last.after(tooLate) && lc.last.before(critical)) { // Email Every Day, with Supervisor
+ if (!bCritical && header) {
msg.line("\t!!! WARNING: These Credentials will expire in LESS THAN ONE WEEK !!!!\n" +
"\tYour supervisor is added to this Email\n");
msg.line(id_exp_fmt, AAF_INSTANTIATED_MECHID,EXPIRATION_DATE, QUICK_LINK);
msg.line("\t!!! WARNING: These Credentials will expire in LESS THAN ONE WEEK !!!!\n" +
"\tYour supervisor is added to this Email\n");
msg.line(id_exp_fmt, AAF_INSTANTIATED_MECHID,EXPIRATION_DATE, QUICK_LINK);
msg.line(LINE);
msg.line("Why are you receiving this Notification?\n");
msg.line("You are the listed owner of one or more AAF Namespaces. ASPR requires that those responsible for "
msg.line(LINE);
msg.line("Why are you receiving this Notification?\n");
msg.line("You are the listed owner of one or more AAF Namespaces. ASPR requires that those responsible for "
msg.line(" %s/ns\n\n",env.getProperty(GUI_URL));
email.msg(msg);
Result<Void> rv = email.exec(trans, org,"");
msg.line(" %s/ns\n\n",env.getProperty(GUI_URL));
email.msg(msg);
Result<Void> rv = email.exec(trans, org,"");