|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.juniverse.jorganizer.todos.ToDoManager
This businesslogic class handles basic operatons like save, delete and delivere ToDo's
| Field Summary | |
private java.lang.String |
rootDir
|
static java.lang.String |
SUFFIX
|
private java.util.Vector |
todos
|
| Constructor Summary | |
ToDoManager()
Standardconstrutor for ToDoManager This construtor uses the rootDir spezified in the org.juniverse.jorganizer.todos.Environment ResourceBundle
The constructor loads all ToDos |
|
ToDoManager(java.lang.String rootDir)
This constructor for the ToDoManager loads all ToDos from the directory spezified in the rootDir parameter |
|
| Method Summary | |
void |
delete(ToDo todo)
This method delete's the passed in ToDo object. |
private java.lang.String |
generateFileName(ToDo todo)
This private method generates a filename for a *.todo file Filenames are created by the following rules: {timestamp_create_day_only} + "t" + {timestamp_as_unique_id} + "_" + {userid} + "_." + {SUFFIX} |
java.util.Vector |
getToDoByDate(java.util.Date date)
Returns an Vector of ToDo objects with all ToDo's from a special date. |
java.util.Vector |
getToDos()
This method returns an Vector of ToDo objects with all ToDo's that are
stored in the system. |
java.util.Vector |
getToDosByFrom(int userid)
Returns an Vector of ToDo objects with all ToDo's for a single user,
that is specified in the userid attribute. |
private java.util.Vector |
load()
This private method load's all *.todo files from the rootDir
and saves them in the todos Vector. |
void |
save(ToDo todo)
This method saves the passed in ToDo object if it is new. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private java.lang.String rootDir
private java.util.Vector todos
public static final java.lang.String SUFFIX
| Constructor Detail |
public ToDoManager()
org.juniverse.jorganizer.todos.Environment ResourceBundle
public ToDoManager(java.lang.String rootDir)
rootDir - the directory, where the todo files are stored.| Method Detail |
private java.util.Vector load()
rootDir
and saves them in the todos Vector.
public java.util.Vector getToDos()
IToDoManagerToDo objects with all ToDo's that are
stored in the system.
getToDos in interface IToDoManagerIToDoManager.getToDos()public java.util.Vector getToDosByFrom(int userid)
IToDoManagerToDo objects with all ToDo's for a single user,
that is specified in the userid attribute.
getToDosByFrom in interface IToDoManageruserid - a valid userid of an JOrganizer user
org.juniverse.jorganizer.todos.IToDoManager#getToDosByUserId(int)public java.util.Vector getToDoByDate(java.util.Date date)
IToDoManagerToDo objects with all ToDo's from a special date.
getToDoByDate in interface IToDoManagerdate - a java.util.date object
IToDoManager.getToDoByDate(Date)public void save(ToDo todo)
IToDoManager
save in interface IToDoManagertodo - a ToDo objectIToDoManager.save(ToDo)private java.lang.String generateFileName(ToDo todo)
{timestamp_create_day_only} + "t" + {timestamp_as_unique_id} + "_" + {userid} + "_." + {SUFFIX}
public void delete(ToDo todo)
IToDoManager
delete in interface IToDoManagertodo - a ToDo objectIToDoManager.delete(ToDo)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||