Interface TodoLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods for retrieving todos.
This lookup session defines several views:
- comparative view: elements may be silently omitted or re-ordered
- plenary view: provides a complete result set or is an error condition
- isolated checklist view: All todo methods in this session
operate, retrieve and pertain to todos defined explicitly in the
current checklist. Using an isolated view is useful for managing todos
with the
TodoAdminSession. - federated checklist view: All todo lookup methods in this session operate, retrieve and pertain to all todos defined in this checklist and any other checklists implicitly available in this checklist through checklist inheritence.
- effective todo view: All todo lookup methods return todos where the current dates falls in between the effective dates inclusive.
- any effective todo view: Todos of any effective date are returned.
- sequestered todo viiew: All event methods suppress sequestered todos.
- unsequestered todo view: All event methods return all todos.
The methods useFederatedChecklistView() and
useIsolatedChecklistView() behave as a radio group and one should be
selected before invoking any lookup methods.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can examine this checklist.Gets theChecklistassociated with this session.Gets theChecklistIdassociated with this session.Gets theTodospecified by itsId.getTodos()Gets all todos.getTodosByDependency(Id dependencyTodoId) Gets aTodoListof todos dependent upon the given todo.getTodosByDueDate(DateTime from, DateTime to) Gets aTodoListwith a due date within the given date range inclusive.getTodosByGenusType(Type todoGenusType) Gets aTodoListcorresponding to the given todo genusTypewhich does not include todos of genus types derived from the specifiedType.getTodosByIds(IdList todoIds) Gets aTodoListcorresponding to the givenIdList.getTodosByParentGenusType(Type todoGenusType) Gets aTodoListcorresponding to the given todo genusTypeand include any additional todos with genus types derived from the specifiedType.getTodosByPriority(Type priorityType) Gets aTodoListat the given priorityTypeor higher.getTodosByRecordType(Type todoRecordType) Gets aTodoListcontaining the given todo recordType.getTodosOnDate(DateTime from, DateTime to) Gets aTodoListwith starting effective during the entire given date range inclusive but not confined to the date range.voidAll todos of any effective dates are returned by all methods in this session.voidThe returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.voidOnly todos whose effective dates are current are returned by methods in this session.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.voidA complete view of theTodoreturns is desired.voidThe returns from the lookup methods omit sequestered todos.voidAll todos are returned including sequestered todos.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getChecklistId
Id getChecklistId()Gets theChecklistIdassociated with this session.- Returns:
- the
Checklist Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getChecklist
Gets theChecklistassociated with this session.- Returns:
- the checklist
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canLookupTodos
boolean canLookupTodos()Tests if this user can examine this checklist. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer these operations.- Returns:
falseif checklist reading methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useComparativeTodoView
void useComparativeTodoView()The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.- Compliance:
mandatory- This method is must be implemented.
-
usePlenaryTodoView
void usePlenaryTodoView()A complete view of theTodoreturns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.- Compliance:
mandatory- This method is must be implemented.
-
useFederatedChecklistView
void useFederatedChecklistView()Federates the view for methods in this session. A federated view will include todos in checklists which are children of this checklist in the checklist hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedChecklistView
void useIsolatedChecklistView()Isolates the view for methods in this session. An isolated view restricts retrievals to this checklist only.- Compliance:
mandatory- This method is must be implemented.
-
useEffectiveTodoView
void useEffectiveTodoView()Only todos whose effective dates are current are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
useAnyEffectiveTodoView
void useAnyEffectiveTodoView()All todos of any effective dates are returned by all methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
useSequesteredTodoView
void useSequesteredTodoView()The returns from the lookup methods omit sequestered todos.- Compliance:
mandatory- This method is must be implemented.
-
useUnsequesteredTodoView
void useUnsequesteredTodoView()All todos are returned including sequestered todos.- Compliance:
mandatory- This method is must be implemented.
-
getTodo
Todo getTodo(Id todoId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theTodospecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedTodomay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to aTodoand retained for compatibility. In effective mode, todos are returned that are currently effective. In any effective mode, effective todos and those currently expired are returned. In sequestered mode, no sequestered todos are returned. In unsequestered mode, all todos are returned.- Parameters:
todoId- theIdof theTodoto retrieve- Returns:
- the returned
Todo - Throws:
NotFoundException- noTodofound with the givenIdNullArgumentException-todoIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getTodosByIds
TodoList getTodosByIds(IdList todoIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets aTodoListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the todos specified in theIdlist, in the order of the list, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessible todos may be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, todos are returned that are currently effective. In any effective mode, effective todos and those currently expired are returned. In sequestered mode, no sequestered todos are returned. In unsequestered mode, all todos are returned.- Parameters:
todoIds- the list ofIdsto retrieve- Returns:
- the returned
Todo list - Throws:
NotFoundException- anId wasnot foundNullArgumentException-todoIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getTodosByGenusType
TodoList getTodosByGenusType(Type todoGenusType) throws OperationFailedException, PermissionDeniedException Gets aTodoListcorresponding to the given todo genusTypewhich does not include todos of genus types derived from the specifiedType. In plenary mode, the returned list contains all known todos or an error results. Otherwise, the returned list may contain only those todos that are accessible through this session. In effective mode, todos are returned that are currently effective. In any effective mode, effective todos and those currently expired are returned. In sequestered mode, no sequestered todos are returned. In unsequestered mode, all todos are returned.- Parameters:
todoGenusType- a todo genus type- Returns:
- the returned
Todolist - Throws:
NullArgumentException-todoGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getTodosByParentGenusType
TodoList getTodosByParentGenusType(Type todoGenusType) throws OperationFailedException, PermissionDeniedException Gets aTodoListcorresponding to the given todo genusTypeand include any additional todos with genus types derived from the specifiedType. In plenary mode, the returned list contains all known todos or an error results. Otherwise, the returned list may contain only those todos that are accessible through this session. In effective mode, todos are returned that are currently effective. In any effective mode, effective todos and those currently expired are returned. In sequestered mode, no sequestered todos are returned. In unsequestered mode, all todos are returned.- Parameters:
todoGenusType- a todo genus type- Returns:
- the returned
Todolist - Throws:
NullArgumentException-todoGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getTodosByRecordType
TodoList getTodosByRecordType(Type todoRecordType) throws OperationFailedException, PermissionDeniedException Gets aTodoListcontaining the given todo recordType. In plenary mode, the returned list contains all known todos or an error results. Otherwise, the returned list may contain only those todos that are accessible through this session. In effective mode, todos are returned that are currently effective. In any effective mode, effective todos and those currently expired are returned.- Parameters:
todoRecordType- a todo record type- Returns:
- the returned
Todolist - Throws:
NullArgumentException-todoRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getTodosOnDate
TodoList getTodosOnDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aTodoListwith starting effective during the entire given date range inclusive but not confined to the date range. This method return sthe same results in either effective status mode. In plenary mode, the returned list contains all known todos or an error results. Otherwise, the returned list may contain only those todos that are accessible through this session. In effective mode, todos are returned that are currently effective. In any effective mode, effective todos and those currently expired are returned. In sequestered mode, no sequestered todos are returned. In unsequestered mode, all todos are returned.- Parameters:
from- starting dateto- ending date- Returns:
- the returned
Todolist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getTodosByPriority
TodoList getTodosByPriority(Type priorityType) throws OperationFailedException, PermissionDeniedException Gets aTodoListat the given priorityTypeor higher. In plenary mode, the returned list contains all known todos or an error results. Otherwise, the returned list may contain only those todos that are accessible through this session. In effective mode, todos are returned that are currently effective. In any effective mode, effective todos and those currently expired are returned.- Parameters:
priorityType- a priority type- Returns:
- the returned
Todolist - Throws:
NullArgumentException-priorityTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getTodosByDueDate
TodoList getTodosByDueDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aTodoListwith a due date within the given date range inclusive. In plenary mode, the returned list contains all known todos or an error results. Otherwise, the returned list may contain only those todos that are accessible through this session. In effective mode, todos are returned that are currently effective. In any effective mode, effective todos and those currently expired are returned. In sequestered mode, no sequestered todos are returned. In unsequestered mode, all todos are returned.- Parameters:
from- starting dateto- ending date- Returns:
- the returned
Todolist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getTodosByDependency
TodoList getTodosByDependency(Id dependencyTodoId) throws OperationFailedException, PermissionDeniedException Gets aTodoListof todos dependent upon the given todo. In plenary mode, the returned list contains all known todos or an error results. Otherwise, the returned list may contain only those todos that are accessible through this session. In effective mode, todos are returned that are currently effective. In any effective mode, effective todos and those currently expired are returned. In sequestered mode, no sequestered todos are returned. In unsequestered mode, all todos are returned.- Parameters:
dependencyTodoId- a todo- Returns:
- the returned
Todolist - Throws:
NullArgumentException-dependencyTodoIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getTodos
Gets all todos. In plenary mode, the returned list contains all known todos or an error results. Otherwise, the returned list may contain only those todos that are accessible through this session. In effective mode, todos are returned that are currently effective. In any effective mode, effective todos and those currently expired are returned. In sequestered mode, no sequestered todos are returned. In unsequestered mode, all todos are returned.- Returns:
- a list of todos
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-