diff options
Diffstat (limited to 'pki/base/common/src/com/netscape/certsrv/notification')
7 files changed, 0 insertions, 402 deletions
diff --git a/pki/base/common/src/com/netscape/certsrv/notification/ENotificationException.java b/pki/base/common/src/com/netscape/certsrv/notification/ENotificationException.java deleted file mode 100644 index fffc8edeb..000000000 --- a/pki/base/common/src/com/netscape/certsrv/notification/ENotificationException.java +++ /dev/null @@ -1,77 +0,0 @@ -// --- BEGIN COPYRIGHT BLOCK --- -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; version 2 of the License. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License along -// with this program; if not, write to the Free Software Foundation, Inc., -// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -// -// (C) 2007 Red Hat, Inc. -// All rights reserved. -// --- END COPYRIGHT BLOCK --- -package com.netscape.certsrv.notification; - -import com.netscape.certsrv.base.EBaseException; - -/** - * A class represents a notification exception. - * <P> - * - * @version $Revision$, $Date$ - */ -public class ENotificationException extends EBaseException { - - /** - * - */ - private static final long serialVersionUID = 2101529206306996303L; - /** - * Identity resource class name. - */ - private static final String NOTIFICATION_RESOURCES = NotificationResources.class.getName(); - - /** - * Constructs a notification exception - * <P> - */ - public ENotificationException(String msgFormat) { - super(msgFormat); - } - - /** - * Constructs a Identity exception. - * <P> - */ - public ENotificationException(String msgFormat, String param) { - super(msgFormat, param); - } - - /** - * Constructs a Identity exception. - * <P> - */ - public ENotificationException(String msgFormat, Exception e) { - super(msgFormat, e); - } - - /** - * Constructs a Identity exception. - * <P> - */ - public ENotificationException(String msgFormat, Object params[]) { - super(msgFormat, params); - } - - /** - * Retrieves bundle name. - */ - protected String getBundleName() { - return NOTIFICATION_RESOURCES; - } -} diff --git a/pki/base/common/src/com/netscape/certsrv/notification/IEmailFormProcessor.java b/pki/base/common/src/com/netscape/certsrv/notification/IEmailFormProcessor.java deleted file mode 100644 index 40114bd1e..000000000 --- a/pki/base/common/src/com/netscape/certsrv/notification/IEmailFormProcessor.java +++ /dev/null @@ -1,79 +0,0 @@ -// --- BEGIN COPYRIGHT BLOCK --- -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; version 2 of the License. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License along -// with this program; if not, write to the Free Software Foundation, Inc., -// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -// -// (C) 2007 Red Hat, Inc. -// All rights reserved. -// --- END COPYRIGHT BLOCK --- -package com.netscape.certsrv.notification; - -import java.util.Hashtable; -import java.util.Vector; - -/** - * formulates the final email. Escape character '\' is understood. - * '$' is used preceeding a token name. A token name should not be a - * substring of any other token name - * <p> - * - * @version $Revision$, $Date$ - */ -public interface IEmailFormProcessor { - - // list of token names - public final static String TOKEN_ID = "InstanceID"; - public final static String TOKEN_SERIAL_NUM = "SerialNumber"; - public final static String TOKEN_HEX_SERIAL_NUM = "HexSerialNumber"; - public final static String TOKEN_REQUEST_ID = "RequestId"; - public final static String TOKEN_HTTP_HOST = "HttpHost"; - public final static String TOKEN_HTTP_PORT = "HttpPort"; - public final static String TOKEN_ISSUER_DN = "IssuerDN"; - public final static String TOKEN_SUBJECT_DN = "SubjectDN"; - public final static String TOKEN_REQUESTOR_EMAIL = "RequestorEmail"; - public final static String TOKEN_CERT_TYPE = "CertType"; - public final static String TOKEN_REQUEST_TYPE = "RequestType"; - public final static String TOKEN_STATUS = "Status"; - public final static String TOKEN_NOT_AFTER = "NotAfter"; - public final static String TOKEN_NOT_BEFORE = "NotBefore"; - public final static String TOKEN_SENDER_EMAIL = "SenderEmail"; - public final static String TOKEN_RECIPIENT_EMAIL = "RecipientEmail"; - public final static String TOKEN_SUMMARY_ITEM_LIST = "SummaryItemList"; - public final static String TOKEN_SUMMARY_TOTAL_NUM = "SummaryTotalNum"; - public final static String TOKEN_SUMMARY_SUCCESS_NUM = "SummaryTotalSuccess"; - public final static String TOKEN_SUMMARY_FAILURE_NUM = "SummaryTotalFailure"; - public final static String TOKEN_EXECUTION_TIME = "ExecutionTime"; - - public final static String TOKEN_REVOCATION_DATE = "RevocationDate"; - - /* - * takes the form template, parse and replace all $tokens with the - * right values. It handles escape character '\' - * @param form The locale specific form template, - * @param tok2vals a hashtable containing one to one mapping - * from $tokens used by the admins in the form template to the real - * values corresponding to the $tokens - * @return mail content - */ - public String getEmailContent(String form, - Hashtable<String, Object> tok2vals); - - /** - * takes a vector of strings and concatenate them - */ - public String formContent(Vector<String> vec); - - /** - * logs an entry in the log file. - */ - public void log(int level, String msg); -} diff --git a/pki/base/common/src/com/netscape/certsrv/notification/IEmailResolver.java b/pki/base/common/src/com/netscape/certsrv/notification/IEmailResolver.java deleted file mode 100644 index 39e5bed37..000000000 --- a/pki/base/common/src/com/netscape/certsrv/notification/IEmailResolver.java +++ /dev/null @@ -1,40 +0,0 @@ -// --- BEGIN COPYRIGHT BLOCK --- -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; version 2 of the License. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License along -// with this program; if not, write to the Free Software Foundation, Inc., -// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -// -// (C) 2007 Red Hat, Inc. -// All rights reserved. -// --- END COPYRIGHT BLOCK --- -package com.netscape.certsrv.notification; - -import com.netscape.certsrv.base.EBaseException; - -/** - * An email resolver that first checks the request email, if none, - * then follows by checking the subjectDN of the certificate - * <p> - * - * @version $Revision$, $Date$ - */ -public interface IEmailResolver { - - /** - * returns an email address by using the resolver keys. The - * return value can possibly be null - * - * @param keys list of keys used for resolving the email address - */ - public String getEmail(IEmailResolverKeys keys) - throws EBaseException, ENotificationException; - -} diff --git a/pki/base/common/src/com/netscape/certsrv/notification/IEmailResolverKeys.java b/pki/base/common/src/com/netscape/certsrv/notification/IEmailResolverKeys.java deleted file mode 100644 index 1363a9e09..000000000 --- a/pki/base/common/src/com/netscape/certsrv/notification/IEmailResolverKeys.java +++ /dev/null @@ -1,35 +0,0 @@ -// --- BEGIN COPYRIGHT BLOCK --- -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; version 2 of the License. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License along -// with this program; if not, write to the Free Software Foundation, Inc., -// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -// -// (C) 2007 Red Hat, Inc. -// All rights reserved. -// --- END COPYRIGHT BLOCK --- -package com.netscape.certsrv.notification; - -import com.netscape.certsrv.base.IAttrSet; - -/** - * An interface represents email resolver (ordered) keys for resolving - * emails - * e.g. request/cert, cert/request, request, request/cert/subjectalternatename etc. - * <P> - * - * @version $Revision$, $Date$ - */ -public interface IEmailResolverKeys extends IAttrSet { - - public static final String KEY_REQUEST = "request"; - public static final String KEY_CERT = "cert"; - -} diff --git a/pki/base/common/src/com/netscape/certsrv/notification/IEmailTemplate.java b/pki/base/common/src/com/netscape/certsrv/notification/IEmailTemplate.java deleted file mode 100644 index cbdea8436..000000000 --- a/pki/base/common/src/com/netscape/certsrv/notification/IEmailTemplate.java +++ /dev/null @@ -1,48 +0,0 @@ -// --- BEGIN COPYRIGHT BLOCK --- -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; version 2 of the License. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License along -// with this program; if not, write to the Free Software Foundation, Inc., -// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -// -// (C) 2007 Red Hat, Inc. -// All rights reserved. -// --- END COPYRIGHT BLOCK --- -package com.netscape.certsrv.notification; - -/** - * Files to be processed and returned to the requested parties. It - * is a template with $tokens to be used by the form/template processor. - * - * @version $Revision$, $Date$ - */ - -public interface IEmailTemplate { - - public boolean init(); - - /** - * @return Template Name in string form - */ - public String getTemplateName(); - - /** - * @return true if template is an html file, false otherwise - */ - public boolean isHTML(); - - /** - * @return Content of the template - */ - public String toString(); - - public int length(); - -} diff --git a/pki/base/common/src/com/netscape/certsrv/notification/IMailNotification.java b/pki/base/common/src/com/netscape/certsrv/notification/IMailNotification.java deleted file mode 100644 index 356a6bba3..000000000 --- a/pki/base/common/src/com/netscape/certsrv/notification/IMailNotification.java +++ /dev/null @@ -1,80 +0,0 @@ -// --- BEGIN COPYRIGHT BLOCK --- -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; version 2 of the License. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License along -// with this program; if not, write to the Free Software Foundation, Inc., -// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -// -// (C) 2007 Red Hat, Inc. -// All rights reserved. -// --- END COPYRIGHT BLOCK --- -package com.netscape.certsrv.notification; - -import java.io.IOException; -import java.util.Vector; - -/** - * This class handles mail notification via SMTP. - * This class uses <b>smtp.host</b> in the configuration for smtp - * host. The port default (25) is used. If no smtp specified, local - * host is used - * - * @version $Revision$, $Date$ - */ -public interface IMailNotification { - - /** - * send one message to one or more addressees - */ - public void sendNotification() throws IOException, ENotificationException; - - /** - * sets the "From" field - * - * @param from email address of the sender - */ - public void setFrom(String from); - - /** - * sets the "Subject" field - * - * @param subject subject of the email - */ - public void setSubject(String subject); - - /** - * sets the "Content-Type" field - * - * @param contentType content type of the email - */ - public void setContentType(String contentType); - - /** - * sets the content of the email - * - * @param content the message content - */ - public void setContent(String content); - - /** - * sets the recipients' email addresses - * - * @param addresses a list of email addresses of the recipients - */ - public void setTo(Vector<String> addresses); - - /** - * sets the recipient's email address - * - * @param to address of the recipient email address - */ - public void setTo(String to); - -} diff --git a/pki/base/common/src/com/netscape/certsrv/notification/NotificationResources.java b/pki/base/common/src/com/netscape/certsrv/notification/NotificationResources.java deleted file mode 100644 index b81443999..000000000 --- a/pki/base/common/src/com/netscape/certsrv/notification/NotificationResources.java +++ /dev/null @@ -1,43 +0,0 @@ -// --- BEGIN COPYRIGHT BLOCK --- -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; version 2 of the License. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License along -// with this program; if not, write to the Free Software Foundation, Inc., -// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -// -// (C) 2007 Red Hat, Inc. -// All rights reserved. -// --- END COPYRIGHT BLOCK --- -package com.netscape.certsrv.notification; - -import java.util.ListResourceBundle; - -/** - * A class represents a resource bundle for the - * Mail Notification package - * - * @version $Revision$, $Date$ - */ -public class NotificationResources extends ListResourceBundle { - - /** - * Returns the content of this resource. - */ - public Object[][] getContents() { - return contents; - } - - /** - * Constants. The suffix represents the number of - * possible parameters. - */ - - static final Object[][] contents = {}; -} |