com.ondelette.servlet.webannonces
Class AnnoncesFolder

java.lang.Object
  |
  +--com.ondelette.servlet.webannonces.AnnoncesFolder
All Implemented Interfaces:
java.lang.Runnable

public class AnnoncesFolder
extends java.lang.Object
implements java.lang.Runnable

A group of "annonce" (classified ads)


Field Summary
protected  java.io.File mFolderfile
          a folder is stored in a file referred to as Folderfile
 
Constructor Summary
AnnoncesFolder(int size, long delay, java.io.File Folderfile)
          Constructor for the AnnoncesFolder object
 
Method Summary
 void add(Annonce annonce)
          Add an "annonce" (classified ad)
 void destroy()
          Call this when the servlet dies
 java.util.Enumeration getAnnonces()
          Gets the annonces attribute of the AnnoncesFolder object
 void remove(int id)
          Remove an "Annonce" based on its id
 void run()
          Main processing method for the AnnoncesFolder object
 void show(java.io.PrintWriter out)
          Printout the folder to HTML
 void showAdmin(java.io.PrintWriter out)
          Admin printout in HTML
 void write()
          Save the folder to a file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mFolderfile

protected java.io.File mFolderfile
a folder is stored in a file referred to as Folderfile

Since:
0.30
Constructor Detail

AnnoncesFolder

public AnnoncesFolder(int size,
                      long delay,
                      java.io.File Folderfile)
Constructor for the AnnoncesFolder object

Parameters:
size -
delay -
Folderfile -
Since:
0.30
Method Detail

getAnnonces

public java.util.Enumeration getAnnonces()
Gets the annonces attribute of the AnnoncesFolder object

Returns:
The annonces value
Since:
0.30

add

public void add(Annonce annonce)
Add an "annonce" (classified ad)

Parameters:
annonce -
Since:
0.30

remove

public void remove(int id)
Remove an "Annonce" based on its id

Parameters:
id -
Since:
0.30

write

public void write()
           throws java.io.IOException
Save the folder to a file

Throws:
java.io.IOException
Since:
0.30

run

public void run()
Main processing method for the AnnoncesFolder object

Specified by:
run in interface java.lang.Runnable
Since:
0.30

destroy

public void destroy()
Call this when the servlet dies

Since:
0.30

show

public void show(java.io.PrintWriter out)
          throws java.io.IOException
Printout the folder to HTML

Parameters:
out -
Throws:
java.io.IOException
Since:
0.30

showAdmin

public void showAdmin(java.io.PrintWriter out)
               throws java.io.IOException
Admin printout in HTML

Parameters:
out -
Throws:
java.io.IOException
Since:
0.30