summaryrefslogtreecommitdiffstats
path: root/pki/base/common/src/com/netscape/cmscore/notification/EmailTemplate.java
diff options
context:
space:
mode:
Diffstat (limited to 'pki/base/common/src/com/netscape/cmscore/notification/EmailTemplate.java')
-rw-r--r--pki/base/common/src/com/netscape/cmscore/notification/EmailTemplate.java54
1 files changed, 28 insertions, 26 deletions
diff --git a/pki/base/common/src/com/netscape/cmscore/notification/EmailTemplate.java b/pki/base/common/src/com/netscape/cmscore/notification/EmailTemplate.java
index 5c9e9ae0..ac25616c 100644
--- a/pki/base/common/src/com/netscape/cmscore/notification/EmailTemplate.java
+++ b/pki/base/common/src/com/netscape/cmscore/notification/EmailTemplate.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.cmscore.notification;
-
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
@@ -28,21 +27,21 @@ import com.netscape.certsrv.apps.CMS;
import com.netscape.certsrv.logging.ILogger;
import com.netscape.certsrv.notification.IEmailTemplate;
-
/**
- * Files to be processed and returned to the requested parties. It
- * is a template with $tokens to be used by the form/template processor.
- *
- *
+ * Files to be processed and returned to the requested parties. It is a template
+ * with $tokens to be used by the form/template processor.
+ *
+ *
* @author cfu
* @version $Revision$, $Date$
*/
public class EmailTemplate implements IEmailTemplate {
- /*==========================================================
- * variables
- *==========================================================*/
+ /*
+ * ========================================================== variables
+ * ==========================================================
+ */
/* private variables */
private String mTemplateFile = new String();
@@ -51,27 +50,29 @@ public class EmailTemplate implements IEmailTemplate {
/* public vaiables */
public String mFileContents;
- /*==========================================================
- * constructors
- *==========================================================*/
+ /*
+ * ========================================================== constructors
+ * ==========================================================
+ */
/**
* Default Constructor
- *
+ *
* @param templateFile File name of the template including the full path and
- * file extension
+ * file extension
*/
public EmailTemplate(String templatePath) {
mTemplateFile = templatePath;
}
- /*==========================================================
- * public methods
- *==========================================================*/
+ /*
+ * ========================================================== public methods
+ * ==========================================================
+ */
/*
* Load the template from the file
- *
+ *
* @return true if successful
*/
public boolean init() {
@@ -124,14 +125,14 @@ public class EmailTemplate implements IEmailTemplate {
return mTemplateFile;
}
- /**
+ /**
* @return true if template is an html file, false otherwise
*/
public boolean isHTML() {
if (mTemplateFile.endsWith(".html") ||
- mTemplateFile.endsWith(".HTML") ||
- mTemplateFile.endsWith(".htm") ||
- mTemplateFile.endsWith(".HTM"))
+ mTemplateFile.endsWith(".HTML") ||
+ mTemplateFile.endsWith(".htm") ||
+ mTemplateFile.endsWith(".HTM"))
return true;
else
return false;
@@ -144,9 +145,10 @@ public class EmailTemplate implements IEmailTemplate {
return mFileContents;
}
- /*==========================================================
- * private methods
- *==========================================================*/
+ /*
+ * ========================================================== private
+ * methods==========================================================
+ */
/* load file into string */
private String loadFile(FileReader input) {
@@ -178,7 +180,7 @@ public class EmailTemplate implements IEmailTemplate {
if (mLogger == null)
return;
mLogger.log(ILogger.EV_SYSTEM, null, ILogger.S_OTHER,
- level, msg);
+ level, msg);
}
}