ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/server/uk/org/iscream/cms/server/client/WebFeeder.java
(Generate patch)

Comparing projects/cms/source/server/uk/org/iscream/cms/server/client/WebFeeder.java (file contents):
Revision 1.6 by tdb, Thu Mar 8 23:26:03 2001 UTC vs.
Revision 1.8 by tdb, Thu Mar 15 03:26:43 2001 UTC

# Line 1 | Line 1
1   //---PACKAGE DECLARATION---
2 < package uk.ac.ukc.iscream.client;
2 > package uk.org.iscream.client;
3  
4   //---IMPORTS---
5 < import uk.ac.ukc.iscream.componentmanager.*;
6 < import uk.ac.ukc.iscream.core.*;
7 < import uk.ac.ukc.iscream.util.*;
5 > import uk.org.iscream.componentmanager.*;
6 > import uk.org.iscream.core.*;
7 > import uk.org.iscream.util.*;
8   import java.io.*;
9  
10   /**
# Line 39 | Line 39 | public class WebFeeder {
39  
40      private WebFeeder() {
41          // do something, or nothing.. but must be private
42 +        // need to clean up all the alerts
43 +        // don't need to cleanup latest data
44      }
45  
46   //---PUBLIC METHODS---
# Line 134 | Line 136 | public class WebFeeder {
136          String hostname = alert.getSource();
137          // set paths
138          String destDir = rootPath+"/"+alertSubDir+"/"+hostname;
139 <        String destFile = destDir+"/"+alertFileName;
139 >        String destFile = destDir+"/"+alertFileName+"."+String.valueOf(alert.getInitialAlertTime());
140          // try to create directory
141          File outDir = new File(destDir);
142          if(!outDir.exists()) {
# Line 160 | Line 162 | public class WebFeeder {
162          if(outFile.canWrite()) {
163              PrintWriter out;
164              try {
165 <                out = new PrintWriter(new FileWriter(outFile.getPath(), true));
165 >                out = new PrintWriter(new FileWriter(outFile));
166                  out.println(data);
167                  out.close();
168              } catch (IOException e) {
# Line 176 | Line 178 | public class WebFeeder {
178       * Overrides the {@link java.lang.Object#toString() Object.toString()}
179       * method to provide clean logging (every class should have this).
180       *
181 <     * This uses the uk.ac.ukc.iscream.util.FormatName class
181 >     * This uses the uk.org.iscream.util.FormatName class
182       * to format the toString()
183       *
184       * @return the name of this class and its CVS revision

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines