19 package org.turro.agreements;
21 import java.util.HashMap;
23 import java.util.logging.Level;
24 import java.util.logging.Logger;
25 import org.turro.action.IAgreements;
26 import org.turro.action.MailSenders;
27 import org.turro.action.queue.NotificationCategory;
28 import org.turro.action.queue.NotificationRole;
29 import org.turro.annotation.ElephantPlugin;
30 import org.turro.elephant.context.ElephantContext;
31 import org.turro.elephant.context.IConstructor;
32 import org.turro.elephant.entities.db.AgreementSignature;
33 import org.turro.plugin.contacts.IContact;
39 @ElephantPlugin(label =
"agreements")
70 public boolean canAct(String action) {
71 return agreements.
canAct(action);
87 if(as.shouldSend() && as.getSignedDate() ==
null && as.getAgreement().isRequiredToNotify()) {
89 Map args =
new HashMap();
98 }
catch (Exception ex) {
108 if(!as.doesAgree() && as.getAgreement().isRequiredToAccess()) {
109 return "/user/myagreements/?item=" + as.getId();
118 if(!as.doesAgree() && as.getAgreement().isRequiredToAction() && action.equals(as.getAgreement().getAction())) {
119 return "/user/myagreements/?item=" + as.getId();
static IMailSender getPool()
NotificationRole getRole()
static String createURL(IConstructor constructor, AgreementSignature signature, IContact contact, boolean accept)
String getPendingAccessURL()
boolean canAct(String action)
boolean declinedAccessing()
void setContact(IContact contact)
boolean canSendEmails(NotificationCategory nc)
void sendIfNecessary(IConstructor constructor)
void setContact(String idContact)
String getPendingActURL(String action)
boolean declinedNotifications()
boolean declinedAccessing()
List< AgreementSignature > getSignatures(String action)
boolean declinedNotifications()
boolean canAct(String action)
void markAsSent(AgreementSignature as)
static String getSiteName()
static String logMsg(String msg)
IMailSender setRoot(String root)