org.jcrontab.data
Class FileSource

java.lang.Object
  |
  +--org.jcrontab.data.FileSource
All Implemented Interfaces:
DataSource

public class FileSource
extends java.lang.Object
implements DataSource

This class Is the implementation of DataSource to access Info in a FileSystem

Version:
$Revision: 1.39 $
Author:
$Author: iolalla $

Constructor Summary
protected FileSource()
          Creates new FileSource
 
Method Summary
 CrontabEntryBean find(CrontabEntryBean ceb)
          This method searches the given Bean from the File
 CrontabEntryBean[] findAll()
          This method searches all the CrontabEntryBean from the File
 DataSource getInstance()
          This method returns the singleton is very important to grant That only a Thread accesses at a time
 void remove(CrontabEntryBean[] ceb)
          This method removes the CrontabEntryBean array from the File
 void store(CrontabEntryBean bean)
          This method saves the CrontabEntryBean the actual problem with this method is that doesn´t store comments and blank lines from the original file any ideas?
 void store(CrontabEntryBean[] beans)
          This method saves the CrontabEntryBean array the actual problem with this method is that doesn´t store comments and blank lines from the original file any ideas?
 void storeAll(CrontabEntryBean[] list)
          This method saves the CrontabEntryBean array the actual problem with this method is that doesn´t store comments and blank lines from the original file any ideas?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileSource

protected FileSource()
Creates new FileSource

Method Detail

getInstance

public DataSource getInstance()
This method returns the singleton is very important to grant That only a Thread accesses at a time

Specified by:
getInstance in interface DataSource
Returns:
DataSource

find

public CrontabEntryBean find(CrontabEntryBean ceb)
                      throws CrontabEntryException,
                             java.io.IOException,
                             DataNotFoundException
This method searches the given Bean from the File

Specified by:
find in interface DataSource
Returns:
CrontabEntryBean beans Array the result of the search
Throws:
CrontabEntryException - when it can't parse the line correctly
java.io.IOException - If it can't access correctly to the File
DataNotFoundException - whe it can't find nothing in the file

findAll

public CrontabEntryBean[] findAll()
                           throws CrontabEntryException,
                                  java.io.IOException,
                                  DataNotFoundException
This method searches all the CrontabEntryBean from the File

Specified by:
findAll in interface DataSource
Returns:
CrontabEntryBean beans Array the result of the search
Throws:
CrontabEntryException - when it can't parse the line correctly
java.io.IOException - If it can't access correctly to the File
DataNotFoundException - whe it can't find nothing in the file

remove

public void remove(CrontabEntryBean[] ceb)
            throws java.lang.Exception
This method removes the CrontabEntryBean array from the File

Specified by:
remove in interface DataSource
Throws:
java.lang.Exception

storeAll

public void storeAll(CrontabEntryBean[] list)
              throws CrontabEntryException,
                     java.io.FileNotFoundException,
                     java.io.IOException
This method saves the CrontabEntryBean array the actual problem with this method is that doesn´t store comments and blank lines from the original file any ideas?

Throws:
CrontabEntryException - when it can't parse the line correctly
java.io.IOException - If it can't access correctly to the File
DataNotFoundException - whe it can't find nothing in the file usually Exception should'nt this
java.io.FileNotFoundException

store

public void store(CrontabEntryBean[] beans)
           throws CrontabEntryException,
                  java.io.IOException,
                  DataNotFoundException
This method saves the CrontabEntryBean array the actual problem with this method is that doesn´t store comments and blank lines from the original file any ideas?

Specified by:
store in interface DataSource
Throws:
CrontabEntryException - when it can't parse the line correctly
java.io.IOException - If it can't access correctly to the File
DataNotFoundException - whe it can't find nothing in the file usually Exception should'nt this

store

public void store(CrontabEntryBean bean)
           throws CrontabEntryException,
                  java.io.IOException,
                  DataNotFoundException
This method saves the CrontabEntryBean the actual problem with this method is that doesn´t store comments and blank lines from the original file any ideas?

Specified by:
store in interface DataSource
Throws:
CrontabEntryException - when it can't parse the line correctly
java.io.IOException - If it can't access correctly to the File
DataNotFoundException - whe it can't find nothing in the file usually Exception should'nt this