Compoze Software, Inc.

com.compoze.todo
Class ToDoSession

java.lang.Object
  |
  +--com.compoze.todo.ToDoSession
All Implemented Interfaces:
java.io.Serializable

public class ToDoSession
extends java.lang.Object
implements java.io.Serializable

This class provides a session for managing to do information, and is the entry point into the ToDo API. It collects together properties used by the ToDo API and is not subclassed.

An instance of the ToDoSession can be obtained by calling getSession() with an authenticated user. Once a session is obtained, there are several entry points into the rest of the API. If you wish to begin manipulating to dos, you should use the getToDos() method to get the todos collection. Alternatively, if you already have the ID of the to do that you wish to retrieve you may use the getToDo(long).

See Also:
Serialized Form

Method Summary
static ToDoSession getSession(User user)
          Gets the to do session using the specified user.
 ToDo getToDo(long lToDoID)
          Gets a to do with the given id.
 ToDos getToDos()
          Gets the to dos collection for all of the to dos the authenticated user has ToDoPermission.READ permission.
 User getUser()
          Gets the authenticated user for this session.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getSession

public static ToDoSession getSession(User user)
Gets the to do session using the specified user.
Parameters:
user - the authenticated user
Returns:
the new to do session

getToDos

public ToDos getToDos()
Gets the to dos collection for all of the to dos the authenticated user has ToDoPermission.READ permission.
Returns:
the to dos collection

getToDo

public ToDo getToDo(long lToDoID)
             throws java.security.AccessControlException
Gets a to do with the given id.
Parameters:
lToDoID - the to do id
Returns:
the to do or null if not found
Throws:
java.security.AccessControlException - if the authenticated user is not allowed to read the to do

getUser

public User getUser()
Gets the authenticated user for this session.
Returns:
the authenticated user

toString

public java.lang.String toString()
Returns a string representation of the object.
Overrides:
toString in class java.lang.Object
Returns:
tthe string representation of the object

Compoze Software, Inc.

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.